char *TT, *mo, but[(1 << 18) + 2];
#define getchar() ((TT == mo && (mo = ((TT = but) + fread(but, 1, 1 << 18, stdin)), TT == mo)) ? -1 : *TT++)
template<class T>inline void read(T &x){
x = 0;bool flag = 0;char ch = getchar();
while(!isdigit(ch)) flag |= ch == '-',ch = getchar();
while(isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48),ch = getchar();
if(flag) x = -x;
}
template<class T>void putch(const T x){
if(x > 9) putch(x / 10);
putchar(x % 10 | 48);
}
template<class T>inline void put(const T x){
if(x < 0) putchar('-'),putch(-x);
else putch(x);
}
其他 - 输入输出优化模板
最新推荐文章于 2023-11-20 09:53:55 发布