-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanother_template.cpp
More file actions
49 lines (40 loc) · 1.27 KB
/
another_template.cpp
File metadata and controls
49 lines (40 loc) · 1.27 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
using namespace std;
// Check if local run or submission
#ifdef local
const bool dbg = true;
#else
const bool dbg = false;
#endif
// Super-include of all STL
#include <bits/stdc++.h>
// Use int64 to avoid overflow
#define int int64_t
// Debug tools
#define val(x) #x << " = " << (x)
#define bug(x) cout << val(x) << endl;
#define dout if(dbg) cout
// Code simplification
#define def(x) int x; cin >> x
#define cases def(t); while (t--)
#define chkmax(a,b) a = max(a,b)
#define chkmin(a,b) a = min(a,b)
// using keywords helps shorten code
using ii = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vii = vector<ii>;
using vvii = vector<vector<ii>>;
using vs = vector<string>;
// IO
#define tct template<class T>
#define tcab template<class A, class B>
tcab ostream &operator<<(ostream &os, pair<A, B> p) { return os << '{' << p.first << ',' << p.second << '}'; }
tcab istream& operator>>(istream& is, pair<A,B>& p) { return is >> p.first >> p.second; }
tct istream& operator>>(istream& is, vector<T>& v) { for(auto& x : v) is >> x; return is; }
tct ostream& operator<<(ostream& os, vector<T>& v) { for(auto& x : v) os << x; return os; }
int32_t main()
{
if (dbg) freopen("in.txt", "r", stdin);
else cin.tie(0)->sync_with_stdio(0);
return 0;
}