I want to solve a programming contest task (C++ with XCode) which has a relatively big input (300 lines). When copying a test input into the console, it doesn't read it all. So I have written a minimalistic test program to simply read in 300 lines:
#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
ios_base::sync_with_stdio(false);
string xxx;
for(int i = 0; i < 300; i++)
cin >> xxx;
return 0;
}
If I execute it and copy 340 lines with "aaaaaaaaaa" into the console, it doesn't end. If I stop it with the debugger, it says i = 92. If I then continue, it quits. But when I copy pieces of 50 lines into the console, it quits immeadiately as it should...
Can anyone help me with this?
PS: I inserted the 'ios_base::sync_with_stdio(false);', because I read that this would spped the input up.