论卡常
#define mod 1e9+7比const int mod=1e9+7快for(int i=1;i<=n;++i)比for(int i=1;i<=n;i++)快scanf和printf比开了ios::sync_with_stdio(false)的cin和cout快next_permutation比手写全排列快- 三目运算符比
if...else快 - 二进制GCD比
__gcd()快 - fread :
uint8_t buf[1<<22],*p1,*p2; #define getchar (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<22,stdin)),*p1++) long long Fread(){ long long k=0,f=1,c=getchar; for(;!isdigit(c);c=getchar) if(c=='-')f=-1; for(;isdigit(c);c=getchar) k=k*10+(c^48); return k*f; }