http://codeforces.net/problemset/problem/698/C
Hi codeforces, though read the tutorial, I still don't understand it. Please anyone explain how to solve it in detail?why we can look backwards? What is the idea?
Btw, what math should I know to understand it?(i can know the dp,bitmask)
Thank you:D