@Codewzs
2019-04-14T08:29:24.000000Z
字数 234
阅读 680
C++模板
template<class T>void w(T x)
{
if(x<0)putchar('-'),x=-x;
if(x>9)w(x/10);
putchar(x%10+'0');
}
template<class T,class... Y>void w(T t,Y... a){w(t);w(a...);}
注意:使用此输入优化,请在头文件前加上以下代码:
#pragma GCC diagnostic error "-std=c++11"
使用方法:
int a=1,b=2;
w(a,b);