Battle of the Brains
Posts tagged define
test
2测试一下贴代码
顺便把我的模版贴上来,我每段代码基本上都会用到这50行预定义..所以大家看到一道水题我要写几千B的时候不要误会了XD
所以以后我贴出来的代码会少很多头文件很多代码大家看不懂,和这段合起来看就OK啦~~
这也是从TopCoder上的大牛们那学来的,即可加快了代码速度,也可减少了编码的低级错误..
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 41 42 43 44 45 46 47 48 49 | //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 "iomanip" #include "bitset" #include "list" #include "strstream" #include "ctime" using namespace std; typedef long long LL; typedef unsigned long long ULL; #define CC(m,what) memset(m,what,sizeof(m)) #define FOR(i,a,b) for( int i = (a) ; i < (b) ; i ++ ) #define FF(i,a) for( int i = 0 ; i < (a) ; i ++ ) #define FFD(i,a) for( int i = (a)-1 ; i >= 0 ; i --) #define SS(a) scanf("%d",&a) #define LL(a) ((a)<<1) #define RR(a) (((a)<<1)+1) #define SZ(a) ((int)a.size()) #define PP(n,m,a) puts("---");FF(i,n){FF(j,m)cout << a[i][j] << ' ';puts("");} const double eps = 1e-11; const double Pi = acos(-1.0); #define read freopen("in.txt","r",stdin) #define write freopen("out.txt","w",stdout) #define two(x) ((LL)1<<(x)) #define include(a,b) (((a)&(b))==(b)) template<class T> inline T countbit(T n) {return n?1+countbit(n&(n-1)):0;} template<class T> inline T sqr(T a) {return a*a;} template<class T> inline void checkmin(T &a,T b) {if(a == -1 || 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};//up Right down Left int dy[] = {0,1,0,-1}; |
Popularity: 4% [?]
Page 1 of 11
近期评论