最近才知道 使用ios::sync_with_stdio(false);和cin.tie(0);之后关掉输入输出的缓冲区之后
cin 和cout的效率与scanf与printf相差无几 很棒!
#include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
// IO
return 0;
}
最近才知道 使用ios::sync_with_stdio(false);和cin.tie(0);之后关掉输入输出的缓冲区之后
cin 和cout的效率与scanf与printf相差无几 很棒!
#include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
// IO
return 0;
}