971 - Towers

All about problems in Volume 9. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
jurajz
Learning poster
Posts: 69
Joined: Sat Sep 02, 2006 7:30 pm
Location: Slovakia

971 - Towers

Post by jurajz » Tue Oct 23, 2007 8:50 am

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... :-?

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 971 Towers

Post by brianfry713 » Fri May 16, 2014 2:20 am

I just created a dataset for this problem and emailed the admins.
Check input and AC output for thousands of problems on uDebug!

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 971 Towers

Post by brianfry713 » Sun May 18, 2014 9:11 am

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.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 9 (900-999)”