ios::sync_with_stdio(false);
在代码中加入这句语句可以提高cin读入数据的速度,使得cin读入数据的能力和scanf相当
例代码:
int main()
{
int n,L,i,j;
ios::sync_with_stdio(false);
cin>>n>>L;
这样可以提高读入的效率。
ios::sync_with_stdio(false);
在代码中加入这句语句可以提高cin读入数据的速度,使得cin读入数据的能力和scanf相当
例代码:
int main()
{
int n,L,i,j;
ios::sync_with_stdio(false);
cin>>n>>L;
这样可以提高读入的效率。