Page 1 of 2

10769 !!! problems..

Posted: Mon Nov 08, 2004 9:24 pm
by miras
HI !

do u have any tests to this task... becouse i have a vey big problem... becouse i get WA !!!

10769 - Pillars

Posted: Tue Nov 09, 2004 12:44 am
by w k
Shall I consider b1,...,bn and w1,...,wm as real ?

Wojciech

Posted: Tue Nov 09, 2004 4:47 am
by prince56k
nope,
i only consider intger and got AC.

Posted: Tue Nov 09, 2004 11:11 am
by Tobbi
...I also keep getting WA. Could someone post some further test cases? Thanks!!

Tobias

test cases

Posted: Tue Nov 09, 2004 2:38 pm
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

Posted: Tue Nov 09, 2004 3:21 pm
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.

Posted: Tue Nov 09, 2004 4:04 pm
by miras
hm...
My program passes all tests on this page... but it still get WA ;-(
do you have any special testcases ??

:lol:

Posted: Tue Nov 09, 2004 8:12 pm
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]

Posted: Tue Nov 09, 2004 11:00 pm
by w k
Could it be that some of b or w are equal to 0 ?

Wojciech

Posted: Wed Nov 10, 2004 12:02 am
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.

Posted: Wed Nov 10, 2004 12:43 am
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!

Posted: Wed Nov 10, 2004 1:00 am
by w k
My program handles it correctly - at least on my computer . .

Wojciech

Posted: Wed Nov 10, 2004 8:13 am
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.

Posted: Wed Nov 10, 2004 8:31 am
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.

Posted: Wed Nov 10, 2004 10:09 am
by miras
Hey..

Dear Prince56k my program passed all your tests...

do u have any ideas ??

PLZ.