Codeforces Round#430 div 2 Problem D

How should I solve this problem?

Problem link:- http://codeforces.com/contest/842/problem/D

1 Like

I found the solution, https://www.youtube.com/watch?v=PKDQO8B0V3A

Thanks, Rachit Jain for making the video on this problem.

//