Блог пользователя fille_code

Автор fille_code, 9 лет назад, По-английски

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

  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

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

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    And for spoj and codechef?

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      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.

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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;}

}