A code with a 10^15 loop gets accepted in 15ms.

Revision en5, by amanmehta-maniac, 2017-05-26 00:04:24

I was recently wondering what complexity loop can be used in less than 1 sec. For the same, I took one of my previously solved problems and added an extra loop but, even after I increase the looping to as high as 10^15, I get Accepted within 15ms. How could this happen?

Problem link: http://codeforces.com/problemset/problem/371/C

Solution link: http://codeforces.com/contest/371/submission/27344927

PS: If this a bad place to ask for this query, please let me know where to post this. :)

Tags #timelimit

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English amanmehta-maniac 2017-05-26 00:04:24 168
en4 English amanmehta-maniac 2017-05-26 00:02:10 21
en3 English amanmehta-maniac 2017-05-25 23:56:58 0 Tiny change: 'screenshot of my sol' -> 'screenshot( of my sol'
en2 English amanmehta-maniac 2017-05-25 23:55:10 2299
en1 English amanmehta-maniac 2017-05-25 23:50:33 2906 Initial revision (published)