#include<bits/stdc++.h>
#define in inline
#define re register
using namespace std;
in int qread()
{
int x=0,y=1;
int ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')
{
y=-1;
}
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*y;
}
in void qwrite(re int x)
{
if(x<0)
{
putchar('-');
qwrite(-x);
}
else
{
if(x>9)
{
qwrite(x/10);
}
putchar(x%10+'0');
}
return ;
}
int main()
{
return 0;
}
2、卡常起手式:
#pragma GCC optimize("Ofast","inline","-ffast-math")
#pragma GCC target("abm,avx,avx2,mmx,popcnt,sse,sse2,sse3,ssse3,sse4")
#include<bits/stdc++.h>
#define in inline
#define re register
#define swap(r,s) r^s?r^=s^=r^=s:r=s
using namespace std;
in int qread()
{
int x=0,y=1;
int ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')
{
y=-1;
}
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*y;
}
in void qwrite(re int x)
{
if(x<0)
{
putchar('-');
qwrite(-x);
}
else
{
if(x>9)
{
qwrite(x/10);
}
putchar(x%10+'0');
}
return ;
}
int main()
{
return 0;
}
3、图论起手式:
#include<bits/stdc++.h>
#define in inline
#define re register
const int N=N;
const int M=M;
using namespace std;
int cnt,head[N];
struct edge
{
int to,nxt;
};
edge e[M];
in int qread()
{
int x=0,y=1;
int ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')
{
y=-1;
}
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*y;
}
in void qwrite(re int x)
{
if(x<0)
{
putchar('-');
qwrite(-x);
}
else
{
if(x>9)
{
qwrite(x/10);
}
putchar(x%10+'0');
}
return ;
}
in void mr(re int u,re int v)
{
e[++cnt].to=v;
e[cnt].nxt=head[u];
head[u]=cnt;
return ;
}
int main()
{
return 0;
}
4、树论起手式:
#include<bits/stdc++.h>
#define in inline
#define re register
const int N=N;
using namespace std;
int cnt,head[N];
struct edge
{
int to,nxt;
};
edge e[N<<1];
in int qread()
{
int x=0,y=1;
int ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')
{
y=-1;
}
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*y;
}
in void qwrite(re int x)
{
if(x<0)
{
putchar('-');
qwrite(-x);
}
else
{
if(x>9)
{
qwrite(x/10);
}
putchar(x%10+'0');
}
return ;
}
in void mr(re int u,re int v)
{
e[++cnt].to=v;
e[cnt].nxt=head[u];
head[u]=cnt;
return ;
}
in void dfs(re int u,re int fa)
{
for(re int i=head[u];i;i=e[i].nxt)
{
int v=e[i].to;
if(v==fa)
{
continue;
}
dfs(v,u);
}
return ;
}
int main()
{
return 0;
}
5、头文件大全
6、随机数据生成器:
#include<bits/stdc++.h>
#define in inline
#define re register
using namespace std;
in int run(re int l,re int r)
{
return rand()%(r-l+1)+l;
}
int main()
{
srand(time(0)*time(0));
return 0;
}
7、对拍:
#include<bits/stdc++.h>
#define in inline
#define re register
using namespace std;
int main()
{
while(1)
{
system("nametest.exe>name.in");
system("namestd.exe<name.in>std.out");
system("name.exe<name.in>my.out");
if(system("fc std.out my.out"))
{
printf("圣柠檬的数据卡掉了我!\n");
return 0;
}
}
return 0;
}