关闭stdio的同步提高cin、cout的速度

#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(false);
	int x;
	cin>>x; cout<<x;
	return 0;
}
只需要在程序的开头调用 ios::sync_with_stdio(false);即可

猜你喜欢

转载自blog.csdn.net/bond0909/article/details/80968519