ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1000. A+B Problem

How do you get 0.001?
Posted by test2008 29 Oct 2008 22:08
I don't understand, how it is possible... The simplest solution works for 0.015 sec.
Re: How do you get 0.001?
How do you read and write?
Re: How do you get 0.001?
Posted by test2008 30 Oct 2008 01:58
scanf("%d%d", &a, &b);
printf("%d\n", a + b);


and streamed input doesn't give any increase in speed

Edited by author 30.10.2008 01:59
Re: How do you get 0.001?
Posted by kcd_{CMC MSU} 12 Oct 2009 00:58
Can you explain me how to read and write for 0.001 sec?
Do you use buffer input?
Re: How do you get 0.001?
Posted by icanwin 13 Oct 2009 15:08
Probably 15 ms is a minimum tick of OS (mb Windows). Thus the program
#include <windows.h>
#include <stdio.h>
int main()
{
 Sleep(0);

 return EXIT_SUCCESS;
}

will work 15 ms while it will be not replaced by any another (as a result of actions of the dispatcher). Including the program for measurement of execution time.
Someone can bypass this restriction.

Edited by author 13.10.2009 15:13