代码声明

本blog贴出的代码都只有主体
很多语句要加预定义方可编译(出于本人做题习惯- -)
头文件以及预定义都在这篇文章中,两者合体即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//by NotOnlySuccess
 
#include "cstdlib"
#include "cctype"
#include "cstring"
#include "cstdio"
#include "cmath"
#include "algorithm"
#include "vector"
#include "string"
#include "iostream"
#include "sstream"
#include "set"
#include "queue"
#include "stack"
#include "fstream"
#include "strstream"
using namespace std;
 
typedef long long LL;
typedef vector<int> VI;
typedef pair<int,int> PII;
#define MP				make_pair
#define CCQ(que)			while(!que.empty()) que.pop();
#define CC(m,what)			memset(m,what,sizeof(m))
#define FS(i,a)				for( int i = 0 ; a[i] ; i ++ )
#define FF(i,a)				for( int i = 0 ; i < a ; i ++ )
#define FOR(i,a,b)			for( int i = a ; i < b ; i ++ )
#define LL(a)				a<<1		//LL和RR主要用于线段树
#define RR(a)				a<<1|1		//PP用于调试输出二维矩阵
#define PP(n,m,a)			puts("---");FF(i,n){FF(j,m)cout << a[i][j] << ' ';puts("");}
const double Pi = acos(-1.0);
void read(char *a)		{	freopen(a,"r",stdin);	}
void write(char *a)		{	freopen(a,"w",stdout);	}
template<class T> inline void checkmin(T &a,T b)	{if(a < 0 || a > b)a = b;}
template<class T> inline void checkmax(T &a,T b)	{if(a < b)	a = b;}
 
int dx[] = {-1,0,1,0,1,1,-1,-1};//up Right down Left
int dy[] = {0,1,0,-1,1,-1,1,-1};
//-----------------------------------------------------------------

Popularity: 15% [?]

没有引用