-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboilerplate.cpp
43 lines (35 loc) · 962 Bytes
/
boilerplate.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
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
#define repeat(_i, _x) for (int _i = 0; _i < (_x); ++_i)
#define for_range(_i, _start, _end, _itr) \
for (int _i = (_start); _i < (_end); _i += _itr)
void setIO(const string str = "") {
ios::sync_with_stdio(false);
#ifdef LOCAL // compile with -DLOCAL
cout << "compiled locally" << endl;
if (str.empty())
freopen("test.in", "r", stdin);
else {
freopen((str + ".in").c_str(), "r", stdin);
}
#else
if (!str.empty()) {
freopen((str + ".in").c_str(), "r", stdin);
freopen((str + ".out").c_str(), "w", stdout);
}
#endif
}
#define _range(_x) _x.begin(), _x.end()
#define _rrange(_x) _x.rbegin(), _x.rend()
int main() {
setIO();
int len;
cin >> len;
vector<int> v(len);
repeat(i, len) {
cin >> v[i];
}
}