正文
断开 C++ 输入输出与 C 的同步
ios_base::sync_with_stdio(false)
断开 cin 与 cout 的绑定(tie)
cin.tie(NULL);
cout.tie(NULL);
快读
inline int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
快写
void write(int x){
if(x<0){x=-x;putchar(45);}
if(x>9) write(x/10);
putchar(x%10+48);
return;
}
小结
求点赞关注收藏!