Can anyone explain the reason for three dp tables in the tutorial code of this problem https://codeforces.me/contest/1367/problem/F2
I tried to do with one dp table but didn't get the correct ans.
please explain the which dp table used for what?? THANKS IN ADVANCE