Limits: 1s, 512 MB
Little boy Tom recently learnt about BIT operation. And he is interested in it. So he himself plays the game with BITs. Seeing this, great programmer Jerry give him a task. Initially, Jerry gives an array with N numbers and Q queries.
This is a companion discussion topic for the original entry at https://toph.co/p/playing-with-bits