测评环境
硬件配置
代码 CPU主频:2.50GHz 内存:32G SSD硬盘C++环境
代码 Dev-C++ 5.11 C++98 ConsolePauser.exe 计时
测评代码:
#include <bits/stdc++.h>
using namespace std;
int main()
{
// ios::sync_with_stdio(false);
// freopen("output.txt", "w", stdout);
for(int i = 1; i <= 100000; i++)
{
// printf("0");
// cout << "0";
}
return 0;
}测评结果
| cout | cout(快读) | printf | |
|---|---|---|---|
| 控制台输出 | |||
| 文件输出 |
测评结论
- 在 CCF 竞赛中,建议使用
printf或cout+ 快读; - 文件输出较控制台输出而言更快。
感谢您的阅读!