IO 时间比较

Input

先鸽着。

Output

输出 \(10^5\)"1"(每个后换行)。

每个数据都测 \(20\) 次取平均值。

ios 表示 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)

方式 时间(秒)
puts() 0.110
printf() 0.591
cout+'\n' 0.126
cout+endl 2.202
ios+cout+'\n' 0.123
ios+cout+endl 2.152
交替 cout+endl printf() 1.510
posted @ 2022-01-14 22:27  ShaoJia  阅读(95)  评论(1)    收藏  举报