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
Post
by miras » Mon Nov 08, 2004 9:24 pm
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
Post
by w k » Tue Nov 09, 2004 12:44 am
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 » Tue Nov 09, 2004 4:47 am
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 » Tue Nov 09, 2004 11:11 am
...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
Post
by misof » Tue Nov 09, 2004 2:38 pm
Try this one:
The answer should be
Eduard
Experienced poster
Posts: 183 Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan
Post
by Eduard » Tue Nov 09, 2004 3:21 pm
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.
miras
Learning poster
Posts: 98 Joined: Sat Jun 14, 2003 1:45 pm
Post
by miras » Tue Nov 09, 2004 4:04 pm
hm...
My program passes all tests on this page... but it still get WA ;-(
do you have any special testcases ??
Remember Never Give Up
Regrads
Miras
prince56k
New poster
Posts: 33 Joined: Fri Dec 12, 2003 10:32 pm
Location: BANGLADESH
Post
by prince56k » Tue Nov 09, 2004 8:12 pm
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 » Tue Nov 09, 2004 11:00 pm
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 » Wed Nov 10, 2004 12:02 am
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 » Wed Nov 10, 2004 12:43 am
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 » Wed Nov 10, 2004 1:00 am
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 » Wed Nov 10, 2004 8:13 am
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.
It is really frustrating when input data isn't as promised by the problem statement.
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 » Wed Nov 10, 2004 8:31 am
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 » Wed Nov 10, 2004 10:09 am
Hey..
Dear Prince56k my program passed all your tests...
do u have any ideas ??
PLZ.
Remember Never Give Up
Regrads
Miras