Help on solving a task
Hello!
Can you explain me the idea behind the solution for task B here: http://codeforces.me/gym/100234 ?