I don't know why I am getting wrong answer at this problem.
Here's the input i'm trying:
Code: Select all
49
??M?E???
xM?Ex?
??M??E????
M?E?
??m?e???
?M?E??
12M12E????
ME
M?E
?M?E?
?ME?
ME?
???ME???
???M?E????
??????????M?E???????????
??????????M?E??????????
????????????????????M?E?????????????????????
????????????????????M?E??????????????????????
?????????????????????M?E???????????????????????
??????????????????????M?E????????????????????????
?M?E??M?E??
?M?E?M
??M??E???
??M??E????
??M???E???
??M???E????
?M????E?????
M????E?????
?M??E???
?M???E????
?M????E?????
?M?????E??????
?M??????E???????
?M???????E????????
?M????????E?????????
?M?????????E??????????
?M??????????E???????????
?M???????????E????????????
?M????????????E?????????????
?M?????????????E??????????????
?M??????????????E???????????????
?M???????????????E????????????????
?M????????????????E?????????????????
?M?????????????????E??????????????????
?M??????????????????E???????????????????
?M???????????????????E????????????????????
?M????????????????????E?????????????????????
?M?????????????????????E??????????????????????
?M??????????????????????E???????????????????????
Code: Select all
theorem
no-theorem
theorem
no-theorem
no-theorem
theorem
no-theorem
no-theorem
no-theorem
no-theorem
no-theorem
no-theorem
no-theorem
theorem
theorem
no-theorem
theorem
no-theorem
no-theorem
no-theorem
no-theorem
no-theorem
no-theorem
theorem
no-theorem
no-theorem
theorem
no-theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
Does somebody have some extra critical input?
If you wan't I can post my code, but basically what I am doing is as follows:
1. Read the line
2. If the line contains a character different to M, E, or ? then output no-theorem and read next line
3. Extract x, y and z (as denoted in the problem: xMyEz) from the read string
4. If any one of these equals "" or contain a character different from ? then output no-theorem and read next line
5. If the delimiter between x and y is different from M or the delimiter between y and z is different from E, output no-theorem and read next line
6. If the length of y is greater than 1, then delete from y its last character and delete from z its last character until the length of y equals 1 ("un-theoremize").
7. If the length of x + 1 equals z, then it is an axiom, output theorem and read next line; else it is not valid, output no-theorem and read next line.
I alredy checked if the input method was correct and it seems like it is.
Any suggestion?
Thanks a lot for your help.
By the way, i'm sorry to post this problem at the CXI Volume's forum, but CXII Volume's forum is still not available.