Muhammad2006's blog

By Muhammad2006, history, 17 months ago, In English

Here is the solution link.

https://codeforces.com/contest/1798/submission/201240362

But suddenly Codeforces was giving "wrong output format Unexpected end of file — int32 expected (test case 4481)". I'm not familiar with this. Can anyone plz explain it ??

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It means exactly what is says:

  • Unexpected end of file — the output file ended before it should've, i.e. you printed too few tokens.
  • int32 expected — the next token of the output should've been an integer instead of the output ending.

This is one test case where your code fails:

Input:
1
3
2
1 2
2
1 2
2
1 2

Excpected Output:
-1

Your Output:


Your code outputs nothing for the above test case. Can you see why this happens? I can help you more if you can't find the cause of this.

  • »
    »
    17 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Thanks a lot. I've got my mistake.

    I wrote "return 0" in the loop instead of "break".