Help needed to think on dp states
Please help in thought process .Link of Problem
Codeforces Round 941 (Div 1 + 2) Solution Discussion (with Jan)