Блог пользователя luke0201

Автор luke0201, история, 8 лет назад, По-английски

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..?

  • Проголосовать: нравится
  • -12
  • Проголосовать: не нравится

»
8 лет назад, # |
Rev. 3   Проголосовать: нравится +4 Проголосовать: не нравится

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 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.