Help needed in atcoder problem.
Please help me in solving this problem. There is no editorial available for this problem.