Hi, my question is related with Treaps, and maybe random numbers.
Then I read the problem again and I solved it based on the limit for the time t_i
And after the contest I asked if somebody had solve this problem with treap and the answer was yes and this is the code Solution with treap
Now, I am asking to myself if my code doesn't work because of the way I use the random number generator (maybe the treap is unbalanced or i don't know) or my implementation of the treap is wrong.
I have no idea why my solution doesn't work
Any help will be appreciate. Thanks in advance and please feel free to asked about any part of my code. Here is the discussion after the contest: Here , The blog about the random generator I use and The referenced I used to code my treap