/*正数*/
inline void read(int &x)
{
x=0;char c=getchar();
while(c<'0'||c>'9') c=getchar();
while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
}
/*负数*/
inline void read(int &x){
x=0;char c=getchar();bool f=0;
if(c=='-'){
char d=getchar();
while(d>='0'&&d<='9'){x=x*10+d-'0';d=getchar();}
f=1;
}
else while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
if(f)x=-x;
}
读入优化
最新推荐文章于 2020-11-28 18:42:04 发布