catalystgma's blog

By catalystgma, history, 5 years ago, In English

Hi,

I am trying to submit a solution for this problem. However, the judge flags my solution as giving WA on the example: image.

The outputs seem to be identical.

The filnames are correct (I copied them from the site).

What should be the problem?

Thanks!

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

»
5 years ago, # |
  Vote: I like it +14 Vote: I do not like it

You're printing an extra space at the end, and as USACO compares solution files character-by-character, it considers it wrong. You can probably see this by highlighting the text on the website and noticing there's an extra space on your end.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, this was the problem.. I checked with diffchecker the 2 outputs and thought the second space was supposed to be '\n'