10769 - Pillars

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

Moderator: Board moderators

miras
Learning poster
Posts: 98
Joined: Sat Jun 14, 2003 1:45 pm

10769 !!! problems..

Post by miras »

HI !

do u have any tests to this task... becouse i have a vey big problem... becouse i get WA !!!
Remember Never Give Up
Regrads
Miras

w k
Learning poster
Posts: 74
Joined: Wed Apr 14, 2004 11:14 pm

10769 - Pillars

Post by w k »

Shall I consider b1,...,bn and w1,...,wm as real ?

Wojciech

prince56k
New poster
Posts: 33
Joined: Fri Dec 12, 2003 10:32 pm
Location: BANGLADESH

Post by prince56k »

nope,
i only consider intger and got AC.

Tobbi
New poster
Posts: 17
Joined: Sat Jan 25, 2003 3:06 pm
Location: Europe

Post by Tobbi »

...I also keep getting WA. Could someone post some further test cases? Thanks!!

Tobias

misof
A great helper
Posts: 430
Joined: Wed Jun 09, 2004 1:31 pm

test cases

Post by misof »

Try this one:

Code: Select all

100
45 5 70 10
45 5 10 10
The answer should be

Code: Select all

70 10 10 10

Eduard
Experienced poster
Posts: 183
Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan

Post by Eduard »

Hello.
During the contest I got one WA before getting AC this problem.And I changed only little think.My old program can't take input like this.
Input

Code: Select all

100
20 20
30 10 30 50

                                              <----Many blank lines
 
100
20 10 4
50 30 45
Hope it helps.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650

miras
Learning poster
Posts: 98
Joined: Sat Jun 14, 2003 1:45 pm

Post by miras »

hm...
My program passes all tests on this page... but it still get WA ;-(
do you have any special testcases ??

:lol:
Remember Never Give Up
Regrads
Miras

prince56k
New poster
Posts: 33
Joined: Fri Dec 12, 2003 10:32 pm
Location: BANGLADESH

Post by prince56k »

Input:

60
10 20 30 60
5 10 10 15

60
10 20 30 35
5 10 10 15

40
5 5 10 10
20 5 10 30 10

80
70 60 30 15 10
90 20 20 10




Output:

30 15 10 5
35 10 10 5
10 20 5 5
30 20 10 20

[/code]

w k
Learning poster
Posts: 74
Joined: Wed Apr 14, 2004 11:14 pm

Post by w k »

Could it be that some of b or w are equal to 0 ?

Wojciech

prince56k
New poster
Posts: 33
Joined: Fri Dec 12, 2003 10:32 pm
Location: BANGLADESH

Post by prince56k »

I don't think that height can be 0. so some of B or W blocks may not be 0. if it is 0 then i would surely get WA rather than AC.

Tobbi
New poster
Posts: 17
Joined: Sat Jan 25, 2003 3:06 pm
Location: Europe

Post by Tobbi »

miras wrote:My program passes all tests on this page... but it still get WA ;-(
do you have any special testcases ??
Are you positive that your program can handle an arbitrary number of blank lines between the test cases?
At least that's what worked for me!

w k
Learning poster
Posts: 74
Joined: Wed Apr 14, 2004 11:14 pm

Post by w k »

My program handles it correctly - at least on my computer . .

Wojciech

shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA

Post by shamim »

I also got many WA's before realizing that there could be multiple blank lines between cases, and possibly several blank lines at the end of the last case. :x
It is really frustrating when input data isn't as promised by the problem statement. :evil:
A blank line separates two consecutive test cases.

prince56k
New poster
Posts: 33
Joined: Fri Dec 12, 2003 10:32 pm
Location: BANGLADESH

Post by prince56k »

I think i was a little bit lucky in contest incase of handling multiple blank line between cases. first i assume that judge data doesn't contain no space at the end of B W blocks height lines. so i tried like that,

scanf("%d %c",&height,&ch);
if(ch=='\n') break;

i submitted and got AC. if i would got WA then i would go for parsing.
gets & strtok.

miras
Learning poster
Posts: 98
Joined: Sat Jun 14, 2003 1:45 pm

Post by miras »

Hey..

Dear Prince56k my program passed all your tests...

do u have any ideas ??

PLZ.
Remember Never Give Up
Regrads
Miras

Post Reply

Return to “Volume 107 (10700-10799)”