Sazzon's blog

By Sazzon, history, 7 years ago, In English

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.

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

»
7 years ago, # |
  Vote: I like it +30 Vote: I do not like it

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