??C++?????????????
?????awyd234 ???????[ 2016/10/18 9:55:57 ] ????????.NET C++
??????????У????????????????????????????????????????????????????????????????????е?C++???????cin?????????????????????????????????????cin??????????????Pascal??read?????????C/C++??scanf???????C++???????????????C++????Pascal??????????????????????????????????????????????????????????????????????????к?????????????δ????????????????????????е???????????????????????????????
?????????ж????????????ī??????????????????????д?????????????????????????data.txt?У????55MB???????д????????????????????????????£?
????#include <ctime>
????int main()
????{
????int start = clock();
????//DO SOMETHING
????printf("%.3lf
"??double(clock()-start)/CLOCKS_PER_SEC);
????}
?????????????д??????scanf??????????£?
????const int MAXN = 10000000;
????int numbers[MAXN];
????void scanf_read()
????{
????freopen("data.txt"??"r"??stdin);
????for (int i=0;i<MAXN;i++)
????scanf("%d"??&numbers[i]);
????}
????????Ч????????????????Linux??????????2.01??????????cin??????????
????const int MAXN = 10000000;
????int numbers[MAXN];
????void cin_read()
????{
????freopen("data.txt"??"r"??stdin);
????for (int i=0;i<MAXN;i++)
????std::cin >> numbers[i];
????}
????????????????cin????????6.38??????????????cin?????????????????????cin??stdin???????????????????????????????????????????????????????cout??stdout????????????ò?????????????????????????????????????cin????????????????ν??????????????????????std::ios::sync_with_stdio(false);?????????????cin??stdin???????????????£?
????const int MAXN = 10000000;
????int numbers[MAXN];
????void cin_read_nosync()
????{
????freopen("data.txt"??"r"??stdin);
????std::ios::sync_with_stdio(false);
????for (int i=0;i<MAXN;i++)
????std::cin >> numbers[i];
????}
????????????Ч???????Σ?????????????????????2.05????scanfЧ??????????????????????????????cin??cout???
????????????????????????????????????????????????д??????????????????????????????
????const int MAXS = 60*1024*1024;
????char buf[MAXS];
????void analyse(char *buf??int len = MAXS)
????{
????int i;
????numbers[i=0]=0;
????for (char *p=buf;*p && p-buf<len;p++)
????if (*p == ' ')
????numbers[++i]=0;
????else
????numbers[i] = numbers[i] * 10 + *p - '0';
????}
?????????????????????????????????????fread?????????£?
????const int MAXN = 10000000;
????const int MAXS = 60*1024*1024;
????int numbers[MAXN];
????char buf[MAXS];
????void fread_analyse()
????{
????freopen("data.txt"??"rb"??stdin);
????int len = fread(buf??1??MAXS??stdin);
????buf[len] = '