spotless's blog

By spotless, 10 years ago, In English

I'm getting WA in test 1 and here's the judge respone :


The submission ID : 431231.

Test: #1, time: 30 ms., memory: 42328 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER
Input
hhoowaaaareyyoouu
Output
wre
Answer
wre
Checker Log
wrong answer 1st words differ - expected: 'wre', found: 'wre'
 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

10 years ago, # |
  Vote: I like it +2 Vote: I do not like it
Can you post your code in pastebin.com and give link?
10 years ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

It seems like your program printed extra NULL characters.

UPD: As NULL characters are "invisible", you saw such strange log message from the judge protocol.

UPD2: Oh I am wrong to show the code for explanation. But you can view the output in some editors (e.g. vim) that there are extra characters.
  • 10 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    aha ... That was because I initialized the char array with the same length as the input .. I thought that the constructor of the string would handle it for me or the judge will ignore it or at least give it at a later index not the 1-st character .. 

    anyway, got it Acc .. Thanks alot :)

    • 10 years ago, # ^ |
        Vote: I like it +1 Vote: I do not like it
      You are welcome. Actually this shows that the string you get from the character array is indeed having extra NULL characters.
      • 10 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it
        Yes I saw it before you remove it from the first post :D :D :D 

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

shater