Help in a cses judge problem
Can anyone please tell how to solve This Problem
Atcoder Beginner 353 Solution Discussion (with myself)