|
|
вернуться в форумAs a fixed time solutions on the server? I got AC. My time is 0.001s (This problem #1222) - Objected-oriented progarmming, call methods, cycles in cycles... But my time of Problem #1000 (A+B) (int + int) - 0.015s Why? :))) Re: As a fixed time solutions on the server? Rounding. You can get times of 0.001, 0.015, 0.031, 0.046, 0.062 etc (the step is around 15.5). And, of course, 0.015 wouldn't mean you have exactly that time; it would rather mean that you have somewhere between 0.002 and 0.015. Or around that. Re: As a fixed time solutions on the server? Thanks. Possible time interval of 15 ms, I saw a long time ago. Just do not understand, he can not keep within the 1 ms solution like С++: ----------------------------------- #include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; cout<<(a+b)<<"\n"; } ----------------------------------- or Pascal: ----------------------------------- var a,b: integer; begin readln(a,b); writeln(a+b); end. ----------------------------------- I think it should work many times faster than 1 ms. Time spent on the input and output? P.S. Today I passed the task of "1000 A + B Problem" of 0.001s. But usually - 0.015s. :) Hypotesis: The program may start at the beginning or end of the interval timer - and depending on this time will be different. If TLE < 0.014, repeat Submit, while not AC! ))) |
|
|