We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Suddenly it passes all tests. It means segTree was not fully evaluated, causing severe performance down. But the same code works fast in my computer. So, what's wrong? Is it caused by difference of compiler settings, or compiler versions?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Range Minimum Query
You are viewing a single comment's thread. Return to all comments →
Before asnwering queries I constructed a segment tree. It's really, really weird, but the tree is not fully evaluated on Hackerrank server.
This code gave me TLE on test 05 ~ 07. But this code works perfectly well in my computer, taking only 0.3 seconds.
I forced
segTree
to be fully evaluated before answering queries:Suddenly it passes all tests. It means
segTree
was not fully evaluated, causing severe performance down. But the same code works fast in my computer. So, what's wrong? Is it caused by difference of compiler settings, or compiler versions?