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

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

Hi,

Have a look at my submission https://mirror.codeforces.com/contest/1096/submission/47671275. It throws weird error, can someone help me understand why the error only occurs on codeforces judge and not on any other.

It works fine on ideone https://ideone.com/ZwFeP2 and on my local machine.

Thanks!

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

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

Your program invokes undefined behavior. In this particular problem heap-buffer-overflow means out-of-bound array access.

See New: Diagnostics of Solutions in C++ — Codeforces

To debug your program, you can try using Catching silly mistakes with GCC — Codeforces