专栏文章
更加优秀的快读快输
个人记录参与者 1已保存评论 0
文章操作
快速查看文章及其快照的属性,并进行相关操作。
- 当前评论
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @minyc2ow
- 此快照首次捕获于
- 2025/12/02 10:21 3 个月前
- 此快照最后确认于
- 2025/12/02 10:21 3 个月前
CPP
template<typename T>inline void read(T &x){
x=0;int f=1;char c=getchar();
while(!isdigit(c)){if(c=='-')f=-f;c=getchar();}
while (isdigit(c)){x=x*10+(c-48);c=getchar();}
x*=f;
}
template<typename T,typename...Args>inline void read(T &x,Args&...y){read(x),read(y...);}
template<typename T>inline void write(T x,char ch=' '){
stack<char>st;
if(x<0)putchar('-'),x=-x;
if(x==0)putchar('0');
while(x)st.push(x%10+'0'),x/=10;
while(!st.empty())putchar(st.top()),st.pop();
putchar(ch);
}
template<typename...Args>inline void write(char ch,Args...y){write(y...,ch);}
输入时:
read(a,b,c,d...);输出时:
write(x); 或 write('\n',a,b,c,d...);相关推荐
评论
共 0 条评论,欢迎与作者交流。
正在加载评论...