Lightoj 1095
Can anyone give me some ideas for the following problem? http://lightoj.com/volume_showproblem.php?problem=1095
Codeforces Round 946 Solution Discussion