[1107 E](https://codeforces.com/contest/1107/problem/E) attempted DP (not easy)
1107 E
attempted DP (not easy)