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

Автор Meron3r, история, 4 месяца назад, По-английски

Everyone wants to make there code FASTER but there is lots of simple solution. the first and most simple one is this:

std::ios::sync_with_stdio(false);

What this does is that usually cout is synced with stdio. so if we set it to false it will make the code slightly faster

Also you can set cin.tie and cout.tie to NULL like this:

cin.tie(NULL);
cout.tie(NULL);

Which will also make it alittle bit faster.

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

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

thanks!

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

cout.tie does nothing