Hi, I've just come across this problem, and I thought it was really nice. I feel like I need a lot more practice with problems such as these. Anybody know of any similar good ones here on codeforces that are for div. 2? Anything that's DP + greedy is also fine. Thanks in advance.