Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

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

This is a very strange incident. And I'll not be exaggerating when I say this but, I truly am bewildered by it.

While solving the following question : http://codeforces.com/problemset/problem/614/A

I got a WA on Test case 39. When I decided to run the same code on Ideone, this is what I found:

Case 1 : I run the code as it as : http://ideone.com/MLGW4I

Case 2 : I add an additional printf statement, leaving the entire remaining code unchanged. : http://ideone.com/X9kngM

The change can be seen (addition of an extra printf statement) in line no. 31 of the code.

How can it be possible that a simple printf statement changes the output that follows, when nothing is changed anywhere else? Or is it some pretty big blunder that I'm making and am completely unaware of it?

Any help regarding this will be much appreciated.

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

»
8 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится
  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +6 Проголосовать: не нравится

    I am blown away by this. I wonder, how on the earth could I've even thought if anything like this could ever exist. Thanks a lot! :)