ios_base::sync_with_stdio(0) runtimes!

Правка en1, от Na2a, 2016-08-08 13:30:42

Hello, Codeforces!

Yesterday, in CF Round 366 my friend Birjik encountered a strange problem. His correct code was receiving Runtime Error in sample case.

Take a look to these codes:
Runtime error
Accepted

As you can notice, one code has these lines:

ios_base::sync_with_stdio(0);
cin.tie(0);

Strange, isn't it?
As I have understood, this happens because of an array called read.
Renaming that array solves this problem.

Long story short, using ios_base / cin.tie runtimes if we have a variable named read in our code.
Be careful!

Теги read, ios_base, cin.tie, runtime

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский Na2a 2016-08-08 14:18:52 2 Tiny change: 'ke a look to these cod' -> 'ke a look at these cod'
en3 Английский Na2a 2016-08-08 13:37:13 16
en2 Английский Na2a 2016-08-08 13:36:45 16 Tiny change: ' cin.tie runtimes if we hav' -> ' cin.tie receives runtime error if we hav'
ru1 Русский Na2a 2016-08-08 13:35:28 818 Первая редакция перевода на Русский
en1 Английский Na2a 2016-08-08 13:30:42 751 Initial revision (published)