Page 1 of 1

971 - Towers

Posted: Tue Oct 23, 2007 8:50 am
by jurajz
The problem statement has a mistake. I have a lot of TLEs. In first time, I modified problem 10051. This problem runs in O(n*n). But here it is not needed edit rotation of cubes, only height of the tower. Later, I found O(n) algorithm, but still TLE. What is happen? I tried one thing: In my code I changed

while n<>-1 do
begin
...
end;

to

while n>0 do
begin
...
end;

The first is TLE, the second is AC in 0.000. This means, that file don't terminate with -1, but with 0 or another negative number. But problem statement says, "The input terminates by giving the value -1 for N.", what is the mistake... :-?

Re: 971 Towers

Posted: Fri May 16, 2014 2:20 am
by brianfry713
I just created a dataset for this problem and emailed the admins.

Re: 971 Towers

Posted: Sun May 18, 2014 9:11 am
by brianfry713
I had a bug in my code that I used to generate the judge's output. I corrected it, regenerated the output, and emailed it to the admins. Thanks to Josh Bao for pointing this out.