fille_code's blog

By fille_code, 10 years ago, In English

Hi friends, on an average how many operations can be performed in 1 second,is it 10^7 or 10^9?

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

»
10 years ago, # |
  Vote: I like it +2 Vote: I do not like it

In codeforces it's something like 4 * 10^8 operations per second.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    And for spoj and codechef?

    • »
      »
      »
      10 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      You can check it by yourself — put a cycle which does some fixed number of operations in your solution for problem like A+B and look at running time of this solution at given OJ.

      Obviously different operations are running with different speed — doing A+B isn't same as doing A%B.

»
10 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

You can try with this in C...

long long int a;

time_t start_time,end_time;

time(&start_time);

while(1)

{

a++;

time(&end_time);

if((end_time — start_time)==1) //for 1 second

{printf("%lld",a); break;}

}