Med0b1011's blog

By Med0b1011, history, 11 months ago, In English,

Hello recently I attempted this problem:

I understand editorial's solution, but I found in comments a very nice solution, that appears it can be generalized to query sums or higher dimensions. Here is it.


Link to code :

I could only get a vague idea, but not much into detail of what's going on especially the code. With this being a 4 years old comment, I don't think it's a good idea to ask the guy who posted, but can anyone please clarify in an easier way, or provide similar problems/blogs to it? Perhaps how to solve this problem if it was for sum queries instead of xor using this technique.


  • Vote: I like it  
  • +22
  • Vote: I do not like it  

11 months ago, # |
  Vote: I like it +16 Vote: I do not like it

See this.