std:ios:sync_with_stdio (false)以及局限性

如何在输入输出上提高一下效率emmmm

 1 #include<iostream>
 2 #include<stdio.h>
 3 #include<stdlib.h> 
 4 #include<time.h>
 5 using namespace std;
 6 
 7 int main(){
 8     int start=clock();
 9 
10     std::ios::sync_with_stdio(false);
11     for (int i=0;i<10000000;i++){
12         int t;
13        cin>>t;
14     }
15     printf("%.3lf\n",double(clock()-start)/CLOCKS_PER_SEC);
16     return 0;
17 }

 

 

置无关.

posted @ 2020-07-12 11:18  安之若醇  阅读(768)  评论(0编辑  收藏  举报
Live2D服务支持