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

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

Recently, I have tried doing QTREE6 on SPOJ.

I read and did the exactly same algorithm (with nearly same code) here and still got TLE.

This is my TLE submission.

The weird thing is his code just ran about 0.19 s, while mine getting over 1 s (even the code seems to be so similar). I have tried many ways like : switching scanf / cin, add some pragma lines, eliminate recursion of hld function ... but still it didn't work.

I really want to know the reasons so I can learn what really make my code so slow.

Thanks so much for reading <3.

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