- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgcc_template.cpp
More file actions
Latest commit
98 lines (82 loc) · 3.34 KB
/
Copy pathgcc_template.cpp
File metadata and controls
98 lines (82 loc) · 3.34 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
// Problem Link :
// Solved By : iamcrypticcoder
#include<bits/stdc++.h>
usingnamespacestd;
void__print(int x) {cerr << x;}
void__print(long x) {cerr << x;}
void__print(longlong x) {cerr << x;}
void__print(unsigned x) {cerr << x;}
void__print(unsignedlong x) {cerr << x;}
void__print(unsignedlonglong x) {cerr << x;}
void__print(float x) {cerr << x;}
void__print(double x) {cerr << x;}
void__print(longdouble x) {cerr << x;}
void__print(char x) {cerr << '\'' << x << '\'';}
void__print(constchar *x) {cerr << '\"' << x << '\"';}
void__print(const string &x) {cerr << '\"' << x << '\"';}
void__print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void__print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void__print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void_print() {cerr << "]\n";}
template <typename T, typename... V>
void_print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#definedebug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#definedebug(x...)
#endif
#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()
int allBits() { return ((1LL << 31) - 1); }
intnegBits(int n) { return n ^ ((1LL << 31) - 1); }
boolcheckBit(int n, int i) { return (n & (1LL << i)); }
intsetBit(int n, int i) { return (n | (1LL << i)); }
intclearBit(int n, int i) { return (n & ~(1LL << i)); }
intflipBit(int n, int i) { return (n ^ (1LL << 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
inlineint32_tsrcInt32() { int ret; scanf("%d", &ret); return ret; }
inlineuint32_tsrcUInt32() { uint32_t ret; scanf("%u", &ret); return ret; }
inlineint64_tsrcInt64() { int64_t ret; scanf("%lld", &ret); return ret; }
inlineuint64_tsrcUInt64() { uint64_t 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() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
//READ("../input.txt");
//WRITE("output.txt");
int64_tTC, tc;
double cl = clock();
TC = srcInt64();
for (tc = 1; tc <= TC; tc++) {
// Start code for a test case
}
cl = clock() - cl;
fprintf(stderr, "Total Execution Time = %lf seconds\n", cl / CLOCKS_PER_SEC);
return0;
}