$mathrm{fread}$ 快读模板。
代码
inline char gc() {
#ifdef LOCAL_ENV
return getchar();
#endif
const int size = 100005;
static char buf[size], *p1 = buf + size, *p2 = buf + size;
if (p1 == p2) p2 = (p1 = buf) + fread(buf, 1, size, stdin);
return p1 == p2 ? -1 : *p1++;
}
inline int read() {
char ch = 0;
int sum = 0, s = 1;
while (!(ch >= '0' && ch <= '9')) if ((ch = gc()) == '-') s = -1;
while (ch >= '0' && ch <= '9') sum = sum * 10 + ch - '0', ch = gc();
return sum * s;
}