Stuck in a question
Anyone solved this one??
Codeforces Educational Round 167 Solution Discussion (with Shayan)