Libraion's blog

By Libraion, history, 4 years ago, In English

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.

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