I saw this submission of problem 678A - Johny Likes Numbers and tried to hack it with case n=1000000000 and k=1.
It passes within the problem's time limit 0.5s, but I thought it should be a TLE (I tested on ideone and it runs about 0.91s). I can't think of any reason but CF judge is really fast. Any other ideas?
I noticed it depends — some solutions like this get hacked with the same tests, some not, I'm wondering why it is like that too.
Of what I have heard, the setter of the problem can choose the cluster where his problems shall be executed...And these clusters vary in speed...In the previous educational round I could not think of a solution taking less than 10^8 iterations, So I read the editorial..and then I found out that the most appropriate solution was the one which took 10^8 iterations...
But I've never expected such a cluster can run about 10^9 iterations in just half of a second...
This link might help.
It's because of the compiler optimization. I ran the code on my computer. It took 2.1 seconds to run when compiled without -02 flag, but it took 0.3 seconds with the flag.
have you tried this submission in Custom Invocation tab (the last tab after Standing) it's shows you Running Time on CodeForces System , it's necessary tool when you gonna hack using TLE failure
Thank you, this will be one of my most important lessons when trying to hack someone's solution.