-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.cpp
77 lines (65 loc) · 1.46 KB
/
template.cpp
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
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#ifdef LOCAL
#define debug(...) \
{ \
fprintf(stderr, __VA_ARGS__); \
fflush(stderr); \
}
#else
#define debug(...)
#endif
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos(-1);
const double EPS = 1e-9;
inline int cmp_double(double x, double y, double tol = EPS) {
// (x < y): -1, (x == y): 0, (x > y): 1
return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
template <class T>
inline void print_array(T *v, int n) {
if (n > 0) {
cout << v[0];
}
for (int i = 1; i < n; ++i) {
cout << " " << v[i];
}
cout << endl;
}
template <class T>
inline void read_array(T *v, int n, int start = 0) {
for (int i = start; i < start + n; ++i) {
cin >> v[i];
}
}
template <class T>
inline void print_vector(const vector<T> &v) {
if (!v.empty()) {
cout << v[0];
}
for (int i = 1; i < (int) v.size(); ++i) {
cout << " " << v[i];
}
cout << endl;
}
template <class T>
inline void read_vector(vector<T> &v, int n, int start = 0) {
for (int i = start; i < start + n; ++i) {
cin >> v[i];
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int tc;
cin >> tc;
while (tc--) {
}
return 0;
}