SADMAN's blog

By SADMAN, history, 14 months ago, In English

How does this code 226728618 run for this problem 121A - Lucky Sum even when I run for 1 to 1000000000 this testcase, my inner loop time complexity takes 1e9. Then how is it accepted? 

  • Vote: I like it
  • -4
  • Vote: I do not like it

»
14 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Сodeforces compiles С++ code with the O2 optimization flag (https://mirror.codeforces.com/blog/entry/96344), and with this optimization the compiler is able to cope with simple summation of one number several times in one second)