hIt 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.
Mhmm its only 1000 000 numbers so it should be possible to read em all in less than a 0.1 sec
DI 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?
Mstill cant read in time:D
D@MilosRadic, it's possible to read the numbers but you have to use your own I/O...
Mah u mean to read am as chars first...
DYep, u read the whole buffer at once using fread...
Mdont feel like doing it:)
hReading 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.
AThe time limit from the BubbleCup competition was 3 secs for this task. Without reading optimizations it's impossible to solve it...
Mwell 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
DIt's possible to solve it in O(N) :)
Mhow?:D
edit:ah i didnt read the task well so ok O(n) is the limit:D
emoze neki hint za O(n) rjesenje? xD