快读knowledge
学长的奇怪快读fread函数好毒瘤
1 #define R register 2 #define getc() (S == T && (T = (S = B) + fread(B, 1, 1 << 15, stdin), S == T) ? EOF : *S++) 3 #define dmax(_a, _b) ((_a) > (_b) ? (_a) : (_b)) 4 #define dmin(_a, _b) ((_a) < (_b) ? (_a) : (_b)) 5 #define cmax(_a, _b) (_a < (_b) ? _a = (_b) : 0) 6 #define cmin(_a, _b) (_a > (_b) ? _a = (_b) : 0) 7 #define cabs(_x) ((_x) < 0 ? (- (_x)) : (_x)) 8 char B[1 << 15], *S = B, *T = B; 9 inline int F() 10 { 11 R char ch; R int cnt = 0; R bool minus = 0; 12 while (ch = getc(), (ch < '0' || ch > '9') && ch != '-') ; 13 ch == '-' ? minus = 1 : cnt = ch - '0'; 14 while (ch = getc(), ch >= '0' && ch <= '9') cnt = cnt * 10 + ch - '0'; 15 return minus ? -cnt : cnt; 16 } 17 #define maxn 110
不错的模板