首页 > 移动平台 > 详细

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

时间:2020-07-12 13:50:38      阅读:83      评论:0      收藏:0      [点我收藏+]

如何在输入输出上提高一下效率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 }

 

技术分享图片

 

置无关.

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!