Help needed
Can anyone help me with this problem? I tried to think about it for 2 straight days but cannot up with a solution. Also the editorial doesn't make sense.
AtCoder Beginner Contest 483 discussion
ICPC NA North Central and South Division