by wmu · 5y ago · 0 comments
Also, as somebody else mentioned, iostreams are slow. Even simple reading of file can be several times slower than plain C (http://0x80.pl/notesen/2019-01-07-cpp-read-file.html).
https://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdi...
"This line makes it run almost twice as fast:
ios::sync_with_stdio(false);"