I was doing this problem from Atcoder : C - Switches
Can someone please explain the solution?
I have seen the editorial but couldn’t understand it.
Solution link: Submission #15518338 - AtCoder Beginner Contest 128 (Python)
Solution link: Submission #5640467 - AtCoder Beginner Contest 128 (C++)