Comments

I unnecessarily did a trash ahh dp in C

solution

Solution link: https://mirror.codeforces.com/contest/2169/submission/348964665