码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2020-07-12 12:12:53      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:syn   include   printf   nbsp   info   name   ble   namespace   load   

如何在输入输出上提高一下效率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)以及局限性

标签:syn   include   printf   nbsp   info   name   ble   namespace   load   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!