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

Автор Mnmbrane, 9 лет назад, По-английски

I'm getting a compilation error as my verdict on when submitting this code, but it runs fine on my computer. Any ideas?

http://codeforces.com/contest/489/submission/8759488

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

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

You are using the to_string method to convert an integer to a string. This function only exists in C++11 and doesn't exist in previous versions. However, you are submitting in GNU C++, not C++ 11. A solution is to change the programming language you are submitting into GNU C++0x.

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

In Codeforces, you can submit your code in Custom Invocation to view the error information outputted by compiler when you got "strange" Compilation Error.

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

Check your header file sometimes our computer compiler run our code without including the header file(like we can use string related function without using string.h header file) but an online judge can't run a code properly without including the header file. So, check the header file :-).