Fast input/output in competitive programming

后端 未结 3 1016
南笙
南笙 2020-12-24 09:23

I have come across this particular snippet of code many times in solutions of competitive programming contests. I understand the basic use of this code to beat time limits b

3条回答
  •  情歌与酒
    2020-12-24 09:36

    try this for faster I/O

    ios_base::sync_with_stdio(false); cin.tie(NULL);

    It sets whether the standard C++ streams are synchronized to the standard C streams after each input/output operation. By default, iostream objects and cstdio streams are synchronized.

提交回复
热议问题