#define getchar gc
char getchar(){
static char buf[1<<16],*p1=buf,*p2=buf;
if(p1==p2){
p2=(p1=buf)+fread(buf,1,1<<16,stdin);
if(p2==p1) return EOF;
}
return *p1++;
}
template<class t> void read(t &x){
x=0;char c=getchar();
bool f=0;
while(!isdigit(c)) f|=c=='-',c=getchar();
while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
if(f) x=-x;
}
template<class t> void write(t x){
if(x<0) putchar('-'),write(-x);
else{
if(x>9) write(x/10);
putchar(x%10+'0');
}
}
template<class t> void Write(t x,char c){
write(x);putchar(c);
}
我的IO优化模板
最新推荐文章于 2022-06-23 11:26:05 发布