Last active
July 12, 2016 22:11
-
-
Save netj/7333de10c6420443c9df80d444fe78c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
// See: https://www.quora.com/Is-cin-cout-slower-than-scanf-printf/answer/Anders-Kaseorg | |
ios::sync_with_stdio(false); | |
string line; | |
while (cin) { | |
getline(cin, line); | |
cout << line << "\n"; // endl is worse as it flushes, but makes not much difference | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment