vatsal's blog

By vatsal, history, 8 years ago, In English

How should I approach the problem 13049 ? I tried a simple approach (for lopps,etc) but it timed out as expected. Please provide a detailed(:P) explanation. P.S Anything about SQRT Decomposition?

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

»
8 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

EDIT: It already ended, lol.

Well, I solved this problem using implicit treap. You can read this nice treap tutorial (Google translate).

My solution is a little slow, though. I want to know an alternative solution too :P