Beruflich Dokumente
Kultur Dokumente
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
50
51
52
53
54
55
56
57
58
59
60
OR
*/
#define
#define
#define
#define
#define
ll long long
ull unsigned long long
ui unsigned int
us unsigned short
IOS ios_base::sync_with_stdio(0);
//to synchronize the input of cin and scanf
#define INF 1001001001
#define PI 3.1415926535897932384626
// To simplify repetitions/loops,
// Note: define your loop style and stick with it through out!
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define TRvi(c, it) \
for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) \
for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) \
for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define INF 2000000000 // 2 billion
// If you need to recall how to use memset:
#define MEMSET_INF 127 // about 2B
#define MEMSET_HALF_INF 63 // about 1B
memset(dist, MEMSET_INF, sizeof dist);
// useful to initialize shortest path distances
memset(arr, 0, sizeof arr); // useful to clear array of integers
-1-
F:\Moje\Macro-Collection.h
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
char2Int(c) (c-'0')
lastEle(vec) vec[vec.size()-1]
SZ(x) ((int)((x).size()))
REMAX(a,b) (a)=max((a),(b)) // set a to the maximum of a and b
REMIN(a,b) (a)=min((a),(b));
pair
make_pair
first
second
// for debug
inline void pisz(int n) { printf("%d\n",n); }
#define DBG(vari) cerr<<#vari<<" = "<<(vari)<<endl;
#define printA(a,L,R) FE(i,L,R) cout << a[i] << (i==R?'\n':' ')
#define printV(a) printA(a,0,a.size()-1)
#define MAXN 10000
//for vectors
#define pb push_back
typedef int elem_t;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
/*---- [EOF]------------------[EOF]----------------
-2-
*/