Atcoder Problem C (SWITCH)

I was doing this problem from Atcoder :
Can someone please explain the solution?
I have seen the editorial but couldn’t understand it.

Solution link: (Python)
Solution link: (C++)
Atcoder editorials are bad.


This guy just translated it from japanese to english. :sweat_smile: :sweat_smile: :sweat_smile: (I think with the help of google translate.)

1 Like