C++ cout cin加速

时间:2021-08-30 10:38:31   收藏:0   阅读:13

以输入x,输出-1为例

cin.tie(0);
ios::sync_with_stdio(false);
std::cin>>x;
std::cout<<-1<<std::endl;

但还是会慢一点,推荐用

scanf("%d",&x); printf("-1");

原文:https://www.cnblogs.com/chenlinchong/p/15195288.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!