快读
jefferymvp
1/22/2026
信息学
21 次阅读
cpp
#ifdef __unix__
#define fread fread_unlocked
#endif
const int SIZE = 1 << 14;
inline __attribute__((always_inline))char getc() {
static char buf[SIZE],*begin = buf,*end = buf;
if (begin == end) {
begin = buf;
end = buf + fread(buf, 1, SIZE, stdin);
}
return*begin++;
}
inline __attribute__((always_inline))int read() {
int ret = 0, sgn = 0, ch = getc();
while (!isdigit(ch))sgn |= ch == '-', ch = getc();
while (isdigit(ch))ret = ret * 10 + ch - '0', ch = getc();
return sgn ? -ret : ret;
}