输入输出外挂
程序员文章站
2024-03-17 16:35:10
...
超快!!!
inline char nc() {
static char buf [100000],*p1=buf,*p2=buf;
return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
inline int read() {
static char c=nc(); int x=0,f=1;
for(;c>'9'||c<'0';c=nc()) if(c=='-') f=-1;
for(;c<='9'&&c>='0';c=nc()) x=(x<<3)+(x<<1)+c-48;
return x*f;
}
正常版输入输出外挂
inline inline int read() {
int x=0;
char c=getchar();
while(c<'0'||c>'9') c=getchar();
while(c>='0'&&c<='9') x=x*10+c-'0', c=getchar();
return x;
}
inline void out(int a){
if(a < 0) {putchar('-'); a = -a;}
if(a >= 10)out(a / 10);
putchar(a % 10 + '0');
}
上一篇: python 函数参数和返回值
下一篇: python基础 day04