How to solve this problem using Dp ??? I read the editorial and found that it has been solved using combinatorics but I saw others have solved it using Dp approach.
Problem Link -https://codeforces.com/contest/1288/problem/C
Please Help !!!! Thanks in advance