[Problem Link](http://lightoj.com:81/volume/problem/1084) I can think about a n^2 DP approach, But I don't know how to optimize it further :( . Any hints,plz??? Thanks in advance.↵
↵
EDIT: NICE PROBLEM. SOLVED IT. WROTE A TUTORIAL ON IT. ↵
https://www.linkedin.com/pulse/beautiful-composition-data-structure-algorithm-najim-ahmed?published=t
↵
EDIT: NICE PROBLEM. SOLVED IT. WROTE A TUTORIAL ON IT. ↵
https://www.linkedin.com/pulse/beautiful-composition-data-structure-algorithm-najim-ahmed?published=t