这个快读怎么使用
  • 板块灌水区
  • 楼主ZXY赵显义
  • 当前回复3
  • 已保存回复3
  • 发布时间2022/1/23 15:50
  • 上次更新2023/10/28 11:26:27
查看原帖
这个快读怎么使用
561990
ZXY赵显义楼主2022/1/23 15:50

求助怎么使用,比如输入N再输出N

struct FastIO{
	FILE *fp;
	static const int S=1e5;
	typedef long long ll;
	int wpos;
	char wbuf[S];
	FastIO():wpos(0){}
	inline int xchar(){
		static char buf[S];
		static int len=0,pos=0;
		if(pos==len)pos=0,len=fread(buf,1,S,stdin);
		return buf[pos++];
	}
	inline int xuint(){
		int c=xchar(),x=0;
		while(c<=32)c=xchar();
		for(;'0'<=c&&c<='9';c=xchar())x=x*10+c-'0';
		return x;
	}
	inline int xint(){
		int s=1,c=xchar(),x=0;
		while(c<=32)c=xchar();
		if(c=='-')s=-1,c=xchar();
		for(;'0'<=c&&c<='9';c=xchar())x=x*10+c-'0';
		return x*s;
	}
	inline void xstring(char *s){
		int c=xchar();
		while(c<=32)c=xchar();
		for(;c>32;c=xchar())*s++=c;
		*s=0;
	}
	inline void wchar(int x){
		if(wpos==S)fwrite(wbuf,1,S,stdout);
		wbuf[wpos++]=x;
	}
	inline void wint(ll x){
		if(x<0)wchar('-'),x=-x;
		char s[24];
		int n=0;
		while(x||!n)s[n++]='0'+x%10,x/=10;
		while(n--)wchar(s[n]);
		wchar('\n');
	}
	inline void wstring(const char *s){
		while(*s)wchar(*s++);
	}
	~FastIO(){
		if(wpos)fwrite(wbuf,1,wpos,stdout),wpos=0;
	}
}io;
2022/1/23 15:50
加载中...