关于快读快写
  • 板块灌水区
  • 楼主HMP_Haoge
  • 当前回复9
  • 已保存回复9
  • 发布时间2020/11/28 22:33
  • 上次更新2023/11/5 07:08:07
查看原帖
关于快读快写
254036
HMP_Haoge楼主2020/11/28 22:33

这是蒟蒻用的快读快写

template< typename T >inline void read(T &x)
{
	char c=getchar();x=0;int f=0;
	for(;!isdigit(c);c=getchar()) f|=(c=='-');
	for(;isdigit(c);c=getchar()) x=((x<<3)+(x<<1)+(c^48));
	x=f?-x:x;
}
template< typename T >inline void write(T x)
{
	if(x<0) putchar('-'),x=-x;
	if(x>9) write(x/10);
	putchar(x%10^48);
}

作为一个资深的卡常带师,俺决定追求卓越

所以有没有大佬给蒟蒻看看带缓冲池的快读快写长啥样啊 :D

2020/11/28 22:33
加载中...