跳到正文

剪贴板

剪贴板 tmu5136j

原文
剪贴板信息

剪贴板信息

收录
更新
C++
#include<typeinfo>
#define io
#ifdef io
	constexpr int maxn=1<<10;
	char in[maxn],out[maxn],*p1=in,*p2=in,*p3=out;
	#define getchar() (p1==p2&&(p2=(p1=in)+fread(in,1,maxn,stdin),p1==p2)?EOF:*p1++)
	#define flush() (fwrite(out,1,p3-out,stdout))
	#define putchar(x) (p3==out+maxn&&(flush(),p3=out),*p3++=(x))
	class Flush{public:~Flush(){flush();}}_;
#endif
template<typename T>
inline void read(T& x){
	x=0;register T f=1;char c=getchar();
	while(c>'9'||c<'0'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9')x=(x<<3)+(x<<1)+(c^48),c=getchar();
	x*=f;
}
template<typename T,typename ...Ts>
inline void read(T &TS,Ts& ... ts){read(TS);read(ts...);}
template<typename T>
inline void write(T x){
	if(x<0)putchar('-'),x=-x;
	if(x>9)write(x/10);
	putchar(x%10+'0');
}
template<typename T,typename ...Ts>
inline void write(T TS,Ts ... ts){
	if(typeid(TS)==typeid(int))write(TS);
	else putchar(TS);write(ts...);
}