I was trying to solve [this problem](https://cses.fi/problemset/task/1132/) and this is my ↵
[AC code](https://paste.ubuntu.com/p/g4CZ8jgYdb/). I then found [This short solution](https://paste.ubuntu.com/p/xd35ZWJxJy/) written by some user.↵
Can anyone explain what it does and why is it correct?
[AC code](https://paste.ubuntu.com/p/g4CZ8jgYdb/). I then found [This short solution](https://paste.ubuntu.com/p/xd35ZWJxJy/) written by some user.↵
Can anyone explain what it does and why is it correct?