AFO 于NOIP2022
身边被巨佬包围着是一种幸运,因为就算你成不了巨佬,但至少你离他们很近了(物理意义上)
借某巨佬的名言:比别人老还比别人菜,那就得加倍努力!
AT账号:
CF账号:
快读快写
template <typename T>inline void read(T &x){
x=0;
char c=getchar();
T ret=0;
while(!isdigit(c))ret|=!(c^'-'),c=getchar();
while(isdigit(c))x=(x<<3)+(x<<1)+(c^48),c=getchar();
if(ret)x=(~x)+1;
}
template <typename T>inline void print(T x){
if(x<0)putchar('-'),x=(~x)+1;
if(x>9)print(x/10);
putchar(x%10+'0');
}缓冲区极致优化,好像本地需要文件读入
#define getchar() p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2) ? EOF : *p1++
#define putchar(x) (p3 - obuf < 1000000) ? (*p3++ = x) : (fwrite(obuf, p3 - obuf, 1, stdout), p3 = obuf, *p3++ = x)
static char buf[1000000], *p1 = buf, *p2 = buf, obuf[1000000], *p3 = obuf;
\\main函数return 0的前面
fwrite(obuf, p3 - obuf, 1, stdout);