← Back to topics
Topic

BubbleNiceSS - time limit?

halil
It seems to me that it was given very little time for BubbleNiceSS.
Just load the data is not passed in the C++ (using scanf ("% d. ..)), as in GPC, and passes in Free Pascal. Even a trivial passing through a array does not go away even in C++, or in Pascal. If I right, please increase the time limit.
MilosRadic
hmm its only 1000 000 numbers so it should be possible to read em all in less than a 0.1 sec
Dgleich
I agree with halil, the time limit is ridiculous, I haven't succeded in reading all the numbers in 0.1s in C++. Even if we manage to make it so fast there is still time required for the solution... Can you change the time limit to 0.5s or 1s?
MilosRadic
still cant read in time:D
Dgleich
@MilosRadic, it's possible to read the numbers but you have to use your own I/O...
MilosRadic
ah u mean to read am as chars first...
Dgleich
Yep, u read the whole buffer at once using fread...
MilosRadic
dont feel like doing it:)
halil
Reading the numbers using the 'fread' and convert a series of character into numbers is tedious. Better to increase the time limit (maybe 0.8 - 1.0 sec). Because Pascal, perhaps even higher time limit.
Amtrix
The time limit from the BubbleCup competition was 3 secs for this task. Without reading optimizations it's impossible to solve it...
MilosRadic
well it is recquired O(n*logn) for calculating and plus the time to read...so u might make the time 1 sec or more cause of pascal
Dgleich
It's possible to solve it in O(N) :)
MilosRadic
how?:D
edit:ah i didnt read the task well so ok O(n) is the limit:D
elvircrn
moze neki hint za O(n) rjesenje? xD