Runtime Error on SPOJ only

Revision en1, by IWannaBeTheVeryBest, 2017-07-04 19:19:13

I'm trying to solve MKTHNUM on SPOJ using Wavelet Tree Data structures from rachitjain's blog

Here is my code: http://ideone.com/BMZqj0

Unfortunately, I keep getting RTE on large test cases.

However, I have also tested my solution on this problem with the exact same code (only differs in use of test cases) and it got accepted on that problem.

Can anyone tell why my solution getting RTE on SPOJ while getting accepted on other OJ?

P.S. I also got RTE on KQUERY problem using the same data structure.

Thanks.

Tags #data structure, runtime error, spoj, mkthnum

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English IWannaBeTheVeryBest 2017-07-04 19:19:13 746 Initial revision (published)