Dynamic Programming
Hi, please provide an algorithm for this question: Click
I am trying it from long time but couldn't reach a proper algo.
Codeforces Round 946 Solution Discussion