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

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

I am new to C++ so sorry if this question is dumb.

I am solving this problem: http://codeforces.me/contest/707/problem/A

And couldn't understand why this solution failed: http://codeforces.me/contest/707/submission/20019326 According to http://www.cplusplus.com/reference/cstdio/scanf/ , the %s tag should only take one character at a time, right? So reading into a 1 element character array should be fine. Switching variable x to a 2 element character array makes this work for some reason.

Also, the particular test case that fails works locally for me?

Полный текст и комментарии »

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