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.net/contest/1288/problem/C
Please Help !!!! Thanks in advance