Can someone help me in understanding the solution for this problem. I am not getting any idea about what the editorial says. Please help. Thank you.
Help needed in atcoder problem
Can someone help me in understanding the solution for this problem. I am not getting any idea about what the editorial says. Please help. Thank you.