Question : [https://codeforces.net/contest/1183/problem/E](https://codeforces.net/contest/1183/problem/E)↵
↵
I want to know how it can be done using↵
1.Graphs↵
2.Dynamic Programming↵
↵
Also there is a harder version of the problem. [problem:https://codeforces.net/contest/1183/problem/H]↵
What changes do i need to make for this in my approach?↵
↵
P.S my rating is 1600. ↵
Any help is appreciated↵
Thanks
↵
I want to know how it can be done using↵
1.Graphs↵
2.Dynamic Programming↵
↵
Also there is a harder version of the problem. [problem:https://codeforces.net/contest/1183/problem/H]↵
What changes do i need to make for this in my approach?↵
↵
P.S my rating is 1600. ↵
Any help is appreciated↵
Thanks