Input: array A[] of length N (1<=N<=400) , K (1<=K<=400)
In one move : you can remove any subarray size at most K which all element in it are the same
Question: Find minimum number of moves to make array empty.
It’s from my past OI problem and editorial said it use Matrix Chain Multiplication DP, but I can’t come up with it.