4568 Papa

The forum to report every bug you find or tell us what you'd like to find in Live Archive

Moderator: Board moderators

4568 Papa

Postby Quantris » Fri Nov 12, 2010 2:50 pm

It seems like the testing data has a mistake regarding the niece/nephew relation. In the problem statement it says (similar for nephew):

X is a niece of Y if there are W and Z such that X is a daughter of W, and W and Y are distinct children of Z


But the testing data seems to ignore the word "distinct" here (if I comment out my one-line check for that I pass, otherwise not). An example testcase:
Code: Select all
tim is john's son.
john is david's son.
bill is david's son.

is tim john's son?
is tim john's nephew?
is tim bill's nephew?


The right answer should be:
Code: Select all
yes
no
yes


But my code that produces this is rejected, while an incorrect code that returns "yes" to the 2nd query is accepted.

Note that the problem statement does allow 'A' to be 'B's nephew and son simultaneously (if B married a sibling!); my program handles this case correctly.
Quantris
New poster
 
Posts: 3
Joined: Sat Dec 27, 2003 3:49 am
Location: Edmonton AB Canada

Re: 4568 Papa

Postby Carlos » Fri Nov 12, 2010 8:00 pm

Please, send us your codes and we'll check it.

Thanks!
DON'T PM ME --> For any doubt, suggestion or error reporting, please mail to:
acmicpclivearchive@gmail.com
User avatar
Carlos
System administrator
 
Posts: 634
Joined: Sat Oct 13, 2001 1:00 am
Location: Valladolid, Spain

Re: 4568 Papa

Postby Carlos » Sun Nov 20, 2011 1:22 am

Solved!
DON'T PM ME --> For any doubt, suggestion or error reporting, please mail to:
acmicpclivearchive@gmail.com
User avatar
Carlos
System administrator
 
Posts: 634
Joined: Sat Oct 13, 2001 1:00 am
Location: Valladolid, Spain


Return to Bugs and Suggestions

Who is online

Users browsing this forum: adgs80uw3, kyuztrrjfhe, lerefqdfgbret and 1 guest

cron