快读快写加强版
作者:
acwing_zyy
,
2022-07-26 16:53:00
,
所有人可见
,
阅读 306
namespace UIO {
const int MAX = 200e6;
char in_buff[MAX], *in;
char out_buff[MAX], *out;
void print() { printf("%s", out_buff); }
int init() {
in_buff[fread(in_buff, 1, MAX, stdin)] = 0;
in = in_buff, out = out_buff;
atexit(print);
return 0;
}
int INIT = init();
template <class T>
inline void read(register T &x) {
x = 0;
while (!isdigit(*in)) ++in;
while (isdigit(*in)) x = (x << 1) + (x << 3) + (*in++ & 15);
}
template <class T>
inline void write(T x) {
char *bgn = out;
do {
*out++ = x % 10 | '0';
} while (x /= 10);
reverse(bgn, out);
*out++ = '\n';
}
}