You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++ Program is getting TLE for large inputs using a time limit of 1.0s in Hightail. However, when run in terminal, the program finishes execution in 0.09s. See the attached files for the sample program and test cases. rmq.zip
The text was updated successfully, but these errors were encountered:
For pseudormq5.in, it actually seems to run forever in Hightail (at least 20 minutes), whereas it runs very fast in terminal. Interesting. But are you sure the program is not buggy? Some undefined behaviour in the program might be causing this. In particular, on my computer for pseudormq7.in it gets a runtime error (when run in the terminal).
I don't think that the program is buggy. I tried out the test cases in my ubuntu and mac terminal, together with windows cmd. I also tested it on an online ide at codingground. All worked perfectly well.
Well, your array st is too small. When that is fixed, the large input works on my machine. Otherwise, the program looks correct to me, and the described issue persists. Thanks for the report.
C++ Program is getting TLE for large inputs using a time limit of 1.0s in Hightail. However, when run in terminal, the program finishes execution in 0.09s. See the attached files for the sample program and test cases.
rmq.zip
The text was updated successfully, but these errors were encountered: