Rating changes for the last round are temporarily rolled back. They will be returned soon. ×

Need help in SegTree SPOJ Problem RPLN

Revision en1, by subbu988, 2021-01-22 07:15:29

I am trying to solve a SegTree Problem, I've written an O(N,lgN) segment tree solution using segment tree. With the given constraints I see that this approach passes For example the solution here passes the problem. I've seen that the verdict of this problem differed from TLE to AC considering memset() for each test case, usage of printf, scanf vs cin/cout and \n instead of endl. I couldn't differentiate between these two solutions and the reason the latter passes and the former results in TLE. Can someone help with this?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English subbu988 2021-01-22 07:15:29 664 Initial revision (published)