#include <iostream>
int main()
{
char x;
while ((x = std::cin.get()) > 0);
return 0;
}
だと超高速だね。>>は書式付きだからね(manipulatorの影響を受ける)。