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

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

Hello,

on today's Educational Round I came across a problem that made me a bit sad..

On the problem Two Seals I submitted this code.

As you can see, on the third input it fails. But when I run this code on my machine with the following CLI

g++ -o [object] [code.cpp] -std=c++11 -Wfatal-errors

It returns me the correct answer for this test case. Can someone help me figure out what am I missing on CLI or compiler option here on codefoces (So I can prevent myself from doing it again) ?

It really made me sad, what if it was a rated round ? My dreams would have been crushed.

Thank you for your time.

PS: I'm using GNU C++14 here on codeforces.

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

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

If you cannot put the seals, your function has no return value, and it causes undefined behavior.