#include<bits/stdc++.h> using namespace std; const int N=1e8+50; char a[N]; inline void solve1() { gets(a); } inline void solve2() { scanf("%s",&a); } inline void solve3() { char ch; while(ch!='\n') ch=getchar(); } inline void solve4() { int i=0; while(~scanf(" %c",&a[i])) i++; } int main() { freopen("judge.txt","r",stdin); clock_t s,t; s=clock(); //solve1(); //solve2(); //solve3(); solve4(); t=clock(); cout<<t-s<<endl; return 0; }
(大部分测试内容于评测鸭上进行)c++
如下为测试内容:(单位:ms)测试
数据大小:10000spa
(gets字符串):0.040394code
(scanf字符串):0.051836ci
(getchar单字符):0.057788字符串
(scanf单字符):0.533744get
数据大小:100000it
(gets字符串):0.149481class
(scanf字符串):0.229154循环
(getchar单字符):0.315258
(scanf单字符):5.139085
数据大小:1000000
(gets字符串):5
(scanf字符串):56
(getchar单字符):48
(scanf单字符):324数据大小:100000000
(gets字符串):661
(scanf字符串):5215
(getchar单字符):4426
(scanf单字符):31578
(本测试仅供参考)