Блог пользователя Muhammad2218

Автор Muhammad2218, история, 8 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -8
  • Проголосовать: не нравится