Help needs in a DP..
I can't solve this problem for a long time. Can you help me? Thank you!
Codeforces Round 1096 Solution Discussion