+ 25
I need help. Please
Is it even possible to input 3 numbers with the time less than 1 second? I am participating in some competition, and the time limit is 1 sec, that's why I am asking. If anyone here knows how can you help?
24 Answers
+ 24
It isn't, as I said, it is just written like this "Time limit: 1second"
+ 22
3 random numbers, yes, it has to be a human
+ 21
Maybe, I hope :)
+ 20
Not that, time elapsed in program, that'a what I am asking about
+ 20
I don't know, it just says time limit is 1sec, I haven't figured it out yet. Maybe the time is after the input section?
+ 19
I am limited to standard input, so... My code executes in less than 10ms when I give values, but with input, for example cin, it is extended to 1+ second(s)
+ 19
Input 3 integers, and then do some things, but just inputing part takes more than 1 second :(
+ 13
Well…… Java has threads with methods sleep() and wait(). Not sure about C++ though…… ~_~
+ 12
filip rotate your profile picture 90 ° right
+ 9
Did you figure it out, or do you still have problems?
+ 8
Hmm... Something seems wrong here. My guess would be that it doesn't count the time it takes to input the three numbers.
+ 8
Well, then, I don't know what else it could be. It would be really unfair to include program input time. Is it specified how the time is measured?
+ 7
The time limit includes the time it takes to input the 3 values?
+ 7
Well, sorry. I don't know know I can help on this one. But good luck, and just try to input the numbers fast. :)
+ 7
If you get to input the numbers, then you could just input the same number. This could possibly get the time down to around 1/3 to 1/2 sec.
+ 7
@Filip
Sir, It is the compilation time.
I have been to such a competition where they specified the time limit as the time taken to compile your code by the IDE you're using...
That's why I never use TC++...
C::B shall neatly display you the compilation time as well as the execution time, which takes 2+ seconds due to cin...
+ 6
Well, what are the requirements? Does the code have to execute something after each input? Or does it use them all at the same time?
Or maybe there is a link that you could provide?
+ 6
What kind of numbers do you have to input? The same ones or random ones? And does it have to be a human that inputs the numbers?
+ 6
Actually, the time limit you are talking about it's the runtime of the program according to given inputs. Assuming you are participating in a programming contest, you can be assured that the inputs will be given to the program using a script from an input file and the outputs will be compared with the outputs of an output file. So, don't worry about that.
+ 4
Without knowing the full details of the problem, all we can do is make assumptions.