>_<Can you help me with the fwrite?
  • 板块灌水区
  • 楼主晴空一鹤
  • 当前回复25
  • 已保存回复26
  • 发布时间2024/9/5 19:56
  • 上次更新2024/9/5 22:27:29
查看原帖
>_<Can you help me with the fwrite?
158400
晴空一鹤楼主2024/9/5 19:56
#define SIZE (1<<20)
char in[SIZE],out[SIZE],*p1=in,*p2=in,*p3=out;
#define getchar() (p1==p2&&(p2=(p1=in)+fread(in,1,SIZE,stdin),p1==p2)?EOF:*p1++)
#define flush() (fwrite(p3=out,1,SIZE,stdout))
#define putchar(ch) (p3==out+SIZE&&flush(),*p3++=(ch))
class Flush{public:~Flush(){flush();}}_;   
template<typename type>
inline void rd(type &x)
{
x=0;bool flag(0);char ch=getchar();
while(!isdigit(ch)) flag^=ch=='-',ch=getchar();
while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
flag?x=-x:0;
}
template<typename type>
inline void wr(type x)
{
static short Stack[50],top(0);
do Stack[++top]=x%10,x/=10;while(x);
while(top) putchar(Stack[top--]|48);
putchar(' ');
}

RT.UOJ上结尾莫名跟了一堆 \0\0。

2024/9/5 19:56
加载中...