## 958 - A Homer's Holiday

Moderator: Board moderators

jurajz
Learning poster
Posts: 69
Joined: Sat Sep 02, 2006 7:30 pm
Location: Slovakia

### 958 - A Homer's Holiday

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).