Hi,
In yesterday's contest Codeforces Global Round 7, I came across an interesting finding. During system testing phase submission (https://codeforces.me/contest/1326/submission/73682810) went into TLE (well, that hurt a lot!), but when upon trying submitting later on it was accepted(https://codeforces.me/contest/1326/submission/73785574) !
Requesting 300iq or isaf27 to look into this, if possible!
Thanks!









This is not a bug, small variation in running time is always possible. Time taken by your accepted solution is
967 mswhich is very close to the time limit of1 second. I submitted your solution just now and it passed with998 mswhich is again extremely close to1 second(Link). One should always expect small variations in running time.Sure I understand! But should the limits be that strict? This kind of inconsistent behaviour is not expected. I should have used fast io, but same solution getting submitted is disheartening atleast
I don't think this is a matter of strict time limits. You can add two lines to bring it down to 140 ms
See my submission (a modified version of yours) here: https://codeforces.me/contest/1326/submission/73804217
For more info about fast I/O, see here: https://www.geeksforgeeks.org/fast-io-for-competitive-programming/
Cool thanks!
Don't use scanf/printf while using ios
Why did I receive 6 downvotes for my above comment? It definitely seems like my comment was useful (I clarified unsettling_particle's confusion about the time limits for this problem).