The editorial for the given problem is a tad bit too difficult to understand for me, and I suppose for many others. Thus, I am looking for simpler explanations to the solution. Any help would be greatly appreciated. UPD: Here is the link to the problem: https://codeforces.net/contest/1336/problem/A