Back to General discussions forum
For the Basic Tokenizer
If the first line that commands parsing is:
1552 FOR L=0 TO 7
For me the tokenization should be nwwonwn
In any case, how can it be that the answer given as correct is: nwowowpwowowpwwonwwonwwonwwonwn
There are not that many tokens on that line.
And so with the rest
Your code is not quite correct. Just as an example, look at the following input:
1
IF S(X,Y)=-2 THEN PRINT"X*";
Your program produces wwpwpwpppnwe
but it should be wwpwpwpoonwwqp
.
Yes, of course, I have not said that my code is correct. If not, what the judge gives as correct does not seem so to me:
For the input I've tried (I've just made nly a try waiting to see the correct answer and debug my code from there). Two first lines of the 81 total:
81 1552 FOR L=0 TO 7 IF U=0 OR U=7 THEN Q=Q+1
what I am told is correct for them:
nwowowpwowowpwwonwwonwwonwwonwn nwwpwpwpoonwwpwpwpoonwwon
It doesn't fit me, I don't understand it.
oh, the lines do not appear divided, sorry, the 81 is the number of lines. The primer line ends wint 7. The second line begin wint "IF U"
Sorry again, for my bad English. What I have put before is what is checker shows as "Expected answer was:"
I checked the output for the "expected answer" by submitting a wrong answer. The expected answer shown looked okay in my test.
Are you sure you have copied the full text (there are scrollbars etc.)?
Yes. This is the complete "Expecte answer was"
nwowowpwowowpwwonwwonwwonwwonwn nwwpwpwpoonwwpwpwpoonwwon nwwonwwpwpwpoonwwowon nwwpwpwponwwnpwn nwq nwonpw nwwowonwwowonwwowonwn nwwpwpwn nwq nwpwpwpwwonwnwonpwwonwnpwonowpwwpwpp wwonwnpwwonwnpwwpwpwpoonwn wnpnpnpnpnpnponpnpnpnpnpnpnponpnponpn wwpnpoonwn wppwpnpowpnpponppwpnpowpnpponpon nwwpwpwponwwpwowponwwpwowpowpwowpwn wqpwpwpwowpwowpwwpwpwponwn wnpwqpwpqe nwpwpnppwpnpponpwwpwpnpowpnpponwn nwon woe ww nwwpwpwponwwqp wwpwpwponwwn nwwonwn nwowpwowpwowpwowpwowonpwn wpwpwpowpwpwppwpwpwponpwwpwowponwn nwqpwpwpwowpwow nwwpwpwponwwpwowponwwpwowponwn nwwpwwpnpoonwwqwpnppwpnpppwpnpoonpwn nwwpnppq wwonwnpwwonwnpwwpwwonwn nwowowpwowowpwwonwwonwwonwwonwn nwwonwwpwpwpon nwwpwpwponwwpwpwponwwon nwq nwwpwpwponwwpwowonpwowonponwwn wwpwqpwpwwpw wwe nwwpwpwpoonwwwoonwnwnpwowpwnpww wwpwpwponwwqp nwq wq nwwpwowponwwowon nwq nwpwqpw wwpnpqwpnppwpnpqwpnppwpnpppwpnpoon wpwpnppwpnppowpwpnppwpnpp wpwpw nwwpnponwwpwpnppwpnppoonpwn wpwqpw wwonwn nwpwpwpowpwn nwwpwpwpoonwwqp nwwpwwowpnpwwpnpowpwpnpowpwpnpowpwpnpowpwpnpow nwwpnppwpnpnppwoonpwpnpoon wwpwpwpoonwwwoonwnwnpwwoonwnwnpwnpww nwonpwon nwwonwwowon nwppwowponppwowponpon wwpwpwponwwqp wwpnpwpnpppwn nwpwwpwpwp wq nwn nwwoonwnwnpwwowonwwowonwwowonwn w wowpnppwowpnppwwpwpwpoonwwoonpwwoonwnwnpwn nwwonwn wpwpw nwwpwowpwowponwpwpwowpwowponwpwowowwwowowppwwowon wwpwpwpoonwwwoonwnwnpwwoonwnwnpwnpwwpw nwwpnppq nwwpwpwponwn nwwpwowpwowponwwowonpwn nwowowpwowowpwwonwwonwwonwwonwn wq w wn nwwoe nwwpw nwwpwpwpoonwwqp wwonwwonwwowon nwqpwpwpwwonwn wwwwwe nwwonwn
and this is my incorrect, response
nwwonwn wwonwwonwwowon wwpwpwpoonwwpwowpoonwwpwowpoonwn nwq ww wq nwpwqpw wpwwpwpwp nwwpnpwpnpppwn nwwpnponwwpwpnppwpnppoonpwn nwnpwqpwpqe nwwpwpwpoonwwpwpwpoonwwon nww nwwpwpwn nwq wpwpwpowpwpwppwpwpwponpwwpwowpoonwn wwwwe nwpwpwpowpwn wpwpw nwwpwpwpoonwwwoonwnwnpwwoonwnwnpwnpww nwq nwowowpwowowpwwonwwonwwonwwonwn wwonwwowon wwpwowpwowponwpwpwowpwowponwpwowowwwowowppwwowon wwpwpwpoonwe nwwonwn wwopn nwwpwpwponwe nwwpwpwponwn nwqpwpwpwowpwow wwpwowponwwowon nwpwpnppwpnpponpwwpwpnpowpnppoonwn wwonwnpwwonwnpwwpwwonwn nwq nwwpwowpwowponwwowonpwn nwwpwpwpoonwe nwwpwpwponwwpwowponwwpwowpowpwowpwn nwonpw wwpwpwponwe won nwwpnpqwpnppwpnpqwpnppwpnpppwpnpoon nwwonwwpwpwpoonwwowon wwpwpwpoonwwwoonwnwnpwowpwnpww nwn nwwpwpwponwwnpwn nwq wpwqpw nwwoonwn nwqpwpwpwowpwowpwwpwpwponwn nwwoonwnwnpwwowonwwowonwwowonwn nwwowonwwowonwwowonwn nwpwpnppwpnppowpwpnppwpnpp nwowpwowpwowpwowpwowonpwn wwonwnpwwonwnpwwpwpwpoonwn nwwpwpwpoonwwwoonwnwnpwwoonwnwnpwnpwwpw wwpnppq wppwpnpowpnpponppwpnpowpnpponpon nwqpwpwpwwonwn nwowowpwowowpwwonwwonwwonwwonwn nwwpwpwponwe nw wq wwoonwn nwowpnppwowpnppwwpwpwpoonwwoonpwwoonwnwnpwn nwowowpwowowpwwonwwonwwonwwonwn nwwpnppq nwwpwpwponwwpwpwponwwon wwpnpoonwn nwwpwpwponwwpwowonpwowonponwwn nwn nw wq nwonpwon wpwpwpwwonwnwonpwwonwnpwonowpwwpwpp nwwpwwowpnpwwpnpowpwpnpowpwpnpowpwpnpowpwpnpow nwq wwpe nwpwpw wwpnppwpnpnppwoonpwpnpoon wwpw nwoe
T
The word count does not match, and the token types are completely different. Either there is a strange bug, or you submitted the results for a different (old?) set of inputs.
Something like that must have been, the successive attempts did give me coherent answers.
thank you gardengnome