比赛时尝试卡常加了如下的fread:
inline int read(){ char tmp=getchar(); int sum=0; while(tmp<'0'||tmp>'9') tmp=getchar(); while(tmp>='0'&&tmp<='9') sum=(sum<<1)+(sum<<3)+tmp-'0',tmp=getchar(); return sum; }
结果本地测居然比scanf要慢......
各位大佬能不能赐教一个效率高而且代码好写的fread呢?(。﹏。)