I guessed that it could work and the number of elements looks like it's $O(\log w)$ level so I just wrote it, without any proof of complexity.
The solution just popped in my head and I thought "Hey, maybe this can work" and wrote it, and this really looks like a solution that should be tested during a full-feedback contest :)
idk whether the solution is right or not but it passed all the tests.
I guessed that it could work and the number of elements looks like it's $O(\log w)$ level so I just wrote it, without any proof of complexity.
The solution just popped in my head and I thought "Hey, maybe this can work" and wrote it, and this really looks like a solution that should be tested during a full-feedback contest :)
idk whether the solution is right or not but it passed all the tests.