当前位置:首页 > 操作系统 > Ios

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

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

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

 

技术分享图片

 

置无关.

原文:https://www.cnblogs.com/zhmlzhml/p/13287748.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!