Muhammad2218's blog

By Muhammad2218, history, 8 years ago, In English

I was solving problem C. Circular RMQ. Then i faced a problem, at first i get Time limit exceeded Here!, So i think that i am wrong in something like the whole idea or a bug in the code so i spent hours to find this wrong and i found nothing. But when i removed the line return min(rmq(...),rmq(...)); randomly in rmq function and i put instead of it int p1 = rmq(...), p2 = rmq(...); return min(p1,p2); it actually works and get accepted here. So i think min() function go crazy or some thing when it have two recursive calls in it, am i right ? or there is another thing i don't notice ?

Thanks in advance.

UPD: Built-in min() function don't have this problem.

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it