Atcoder Problem C (SWITCH)

I was doing this problem from Atcoder : https://atcoder.jp/contests/abc128/tasks/abc128_c
Can someone please explain the solution?
I have seen the editorial but couldn’t understand it.

Solution link: https://atcoder.jp/contests/abc128/submissions/15518338 (Python)
Solution link: https://atcoder.jp/contests/abc128/submissions/5640467 (C++)

https://codeforces.com/blog/entry/67243
Atcoder editorials are bad.

Yeah

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