I have seen this a lot of time that whenever the size of the program is increased, time of the program is reduced.
For example, I made a program and submitted 3 different programs with a difference of single line i.e an array declaration of different size and time is reduced. It is good to note that TLE part can never be avoided by this thing.
- No array declaration link text (time 0.39)
- array of size 10000000 link text (time 0.36)
- array of size 100000000 link text (time 0.35)
Kindly someone tells me what is going behind the scenes in this.
@admin @vijju123 @ista2000 @sdssudhu @meooow @iamabjain
The array size has absolutely no relation with your running time. What is actually involved, is status of judge server. Is it busy, is it relatively free now, how many problems are up in queue? A EXACT SAME submission can vary by upto 0.09 seconds if submitted consecutively (saw it happening in Pishtree also. From 0.38 to 0.49 seconds, same code, same test case).
You can see for yourself - Try submitting the same code 3 times in a row, submit 3 times in morning, 3 in afternoon and 3 along night. The running times should vary by same degree as you got by increasing array’s size.
1 Like
Thank you for the help @vijju123
You can experiment it yourself. Try submitting the same code 3-6 times, and see the variation in execution time!
I got it now
Your answer made everything clear. Thanks again