输入挂、输出挂模板
inline int Read() {//输入挂
int x=0,f=1; char ch=getchar();
while (ch<'0'||ch>'9') {if (ch=='-') f=-f; ch=getchar();}
while (ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar();
return x*f;
}
1 char s[30]; 2 inline void writeln(int x){//输出挂(仅限数字) 3 if (x<0) putchar('-'),x=-x; 4 if (!x) putchar('0'); else 5 { 6 int len=0; 7 while (x) s[++len]=x%10+'0',x/=10; 8 while (len) putchar(s[len--]); 9 } 10 putchar('\n'); 11 }
posted on 2019-07-22 21:42 Where_Free 阅读(169) 评论(0) 收藏 举报
浙公网安备 33010602011771号