958 - A Homer's Holiday

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

958 - A Homer's Holiday

Post by jurajz » Sat Feb 26, 2011 10:08 am

I have many WAs in this problem. I have some questions.

1. What to do, when proposition begins with "N" and another proposition is the same except first "N"?
Example of sample input:

Code: Select all

2
canWalk NcanWalk
canBreathe
1
NcanWalk
What is the correct answer? When I assume N(canWalk), it is "no", when I assume (NcanWalk), it is "yes".

2. What to do, when proposition in second section of input was not found in propositions in first section of input? All the planets don't have this proposition, or can I assume, that it is not possible to evaluate expression and for all the planets it is true?

3. Behind "A" or "S", it is always at least one digit? For example "NAScanBreathe" can means, that it is N(A0(S0(canBreathe))), because "nothing" can means zero. And can be here leading zeroes (for example "2" may be written as 1000 times of digit "0" and one "2")?

Any other critical cases? For sample input/output, my program is correct. I write blank line between test cases (also before each test case except the first one).

Thanks in advance.

Post Reply

Return to “Volume 9 (900-999)”