luke0201's blog

By luke0201, history, 8 years ago, In English

I'm struggling with 596E - Wilbur and Strings. I tried my source code(14995991) with the same test case in my Xcode and mine works well, but Codeforces keeps judging it differently. Can anyone tell me why..?

  • Vote: I like it
  • -12
  • Vote: I do not like it

»
8 years ago, # |
Rev. 3   Vote: I like it +4 Vote: I do not like it

I don't have time to look through and debug your code, but if it performs differently on the Codeforces machine compared to yours, then almost surely you have some undefined behaviour in your code.

Check for used uninitialized arrays/variables or going out of array bounds. Those are usually the most common mistakes causing such behaviour.

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

Works on my machine with ASAN too and nothing jumps out to me in your code. You might need to do printf debugging. You can launch arbitrary code on the server using custom invocation tab.