- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtemplate.cpp
More file actions
Latest commit
126 lines (106 loc) · 3.64 KB
/
Copy pathtemplate.cpp
File metadata and controls
126 lines (106 loc) · 3.64 KB
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
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
121
122
123
124
125
126
/*
Problem Link :
Solved By : Kazi Mahbubur Rahman (iamcrypticcoder)
Status : [AC, WA, TLE, RTE]
Time :
Rank :
Complexity:
*/
#define_CRT_SECURE_NO_WARNINGS
#include<set>
#include<map>
#include<list>
#include<cmath>
#include<ctime>
#include<queue>
#include<stack>
#include<cctype>
#include<cstdio>
#include<string>
#include<vector>
#include<cassert>
#include<cstdlib>
#include<cstring>
#include<sstream>
#include<iostream>
#include<climits>
#include<algorithm>
#include<unordered_set>
#include<unordered_map>
usingnamespacestd;
#defineFOR(i, L, U) for(int i=(int)L; i<=(int)U; i++)
#defineFORD(i, U, L) for(int i=(int)U; i>=(int)L; i--)
#defineREAD(x) freopen(x, "r", stdin)
#defineWRITE(x) freopen(x, "w", stdout)
#defineff first
#definess second
#definePQ priority_queue
#definePB push_back
#defineSZsize()
#defineSQR(x) ((x)*(x))
#defineALL_BITS ((1 << 31) - 1)
#defineNEG_BITS(mask) (mask ^= ALL_BITS)
#defineTEST_BIT(mask, i) (mask & (1 << i))
#defineON_BIT(mask, i) (mask |= (1 << i))
#defineOFF_BIT(mask, i) (mask &= NEG_BITS(1 << i))
#defineIS_POWER_TWO(x) (x && !(x & (x-1)))
#defineOFF_RIGHTMOST_SET_BIT(x) (x & (x-1))
typedefunsignedint uint;
typedeflonglongLL;
typedefunsignedlonglongULL;
typedef pair<int, int> PII;
typedef pair<uint, uint> PUU;
typedef pair<double, double> PDD;
typedef vector<bool> VB;
typedef vector<int> VI;
typedef vector<uint> VU;
typedef vector<double> VD;
typedef vector<char> VC;
typedef vector<string> VS;
typedef map<int, int> MII;
typedef map<uint, uint> MUU;
typedef map<char, int> MCI;
typedef map<string, int> MSI;
typedef vector<vector<bool> > VVB;
typedef vector<vector<int> > VVI;
typedef vector<vector<double> > VVD;
typedef vector<vector<PII> > VVPII;
intallBits() { return ((1 << 31) - 1); }
intnegBits(int n) { return n ^ ((1 << 31) - 1); }
boolcheckBit(int n, int i) { return (n & (1 << i)); }
intsetBit(int n, int i) { return (n | (1 << i)); }
intclearBit(int n, int i) { return (n & ~(1 << i)); }
intflipBit(int n, int i) { return (n ^ (1 << i)); }
boolisPower2(int n) { return (n && !(n & (n-1))); }
longlongGCD(longlong a, longlong b) { while (b)b ^= a ^= b ^= a %= b; return a; }
longlongLCM(longlong a, longlong b) { return a / GCD(a, b) * b; }
// UP, RIGHT, DOWN, LEFT, UPPER-RIGHT, LOWER-RIGHT, LOWER-LEFT, UPPER-LEFT
int dx[8] = { -1, 0, 1, 0, -1, 1, 1, -1 };
int dy[8] = { 0, 1, 0,-1, 1, 1, -1, -1 };
// Represents all moves of a knight in a chessboard
int dxKnightMove[8] = { -1, -2, -2, -1, 1, 2, 2, 1 };
int dyKnightMove[8] = { 2, 1, -1, -2, -2, -1, 1, 2 };
// Input Methods
inlineintsrcInt() { int ret; scanf("%d", &ret); return ret; }
inline uint srcUInt() { uint ret; scanf("%u", &ret); return ret; }
inlineLLsrcLongLong() { longlong ret; scanf("%lld", &ret); return ret; }
inlineULLsrcULongLong() { unsignedlonglong ret; scanf("%llu", &ret); return ret; }
constcharWHITE = 0;
constcharGRAY = 1;
constcharBLACK = 2;
constintINF = int(1e9);
constdoubleEPS = double(1e-9);
constdoubleTO_DEG = double(57.29577951);
constdoublePI = 2*acos(0.0);
constintMAX_N = int(1e5);
intmain() {
//READ("../input.txt");
//WRITE("output.txt");
int i, j, k;
uint TC, tc;
double cl = clock();
// Start your code here
cl = clock() - cl;
fprintf(stderr, "Total Execution Time = %lf seconds\n", cl / CLOCKS_PER_SEC);
return0;
}