Hi everyone! Recently I have been solving some classic interval DP problems, and came across some neat problems. Most of these problems have relatively simple recurrence relations, but the straightforward solutions will not pass in complexity, hence requires an observation to reduce the complexity (generally by reducing the number of states by some pre-computation).
Prerequisites : Introductory interval DP such as Longest Increasing Subsequence, Longest Common Subsequence.
Statement