-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.cpp
92 lines (89 loc) · 4.02 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include <bits/stdc++.h>
using namespace std;
/* template {{{ */
/* vim: set foldmethod=marker: */
/* Roadagain {{{ */
/****************************************************************************************/
/* */
/* */
/* */
/* /####### /## /## */
/* | ##__ ## | ## |__/ */
/* | ## \ ## /###### /###### /####### /###### /###### /###### /## /####### */
/* | #######/ /##__ ## |____ ## /##__ ## |____ ## /##__ ## |____ ##| ##| ##__ ## */
/* | ##__ ##| ## \ ## /#######| ## | ## /#######| ## \ ## /#######| ##| ## \ ## */
/* | ## \ ##| ## | ## /##__ ##| ## | ## /##__ ##| ## | ## /##__ ##| ##| ## | ## */
/* | ## | ##| ######/| #######| #######| #######| #######| #######| ##| ## | ## */
/* |__/ |__/ \______/ \_______/ \_______/ \_______/ \____ ## \_______/|__/|__/ |__/ */
/* /## \ ## */
/* | ######/ */
/* \______/ */
/* */
/****************************************************************************************/
/* }}} */
/* constant {{{ */
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const double PI = acos(-1);
const double EPS = 1e-14;
/* }}} */
/* alias {{{ */
template <class T> using vec = vector<T>;
using ll = long long;
using ull = unsigned long long;
using vi = vec<int>;
using vl = vec<ll>;
using vd = vec<double>;
using pii = pair<int, int>;
using pdd = pair<double, double>;
using vec2 = complex<double>;
using si = set<int>;
using mii = map<int, int>;
/* }}} */
/* repetition {{{ */
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define RFOR(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); --i)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define REPIT(i, obj) for (auto i = (obj).begin(); i != (obj).end(); ++i)
#define RREPIT(i, obj) for (auto i = (obj).rbegin(); i != (obj).rend(); ++i)
/* }}} */
/* short {{{ */
#define pb emplace_back
#define mp make_pair
#define fst first
#define sec second
/* }}} */
/* input {{{ */
template <class T = int> inline T in(){ T x; cin >> x; return x; }
template <class T = int> inline vec<T> in(int n){ vec<T> v(n); REP(i, n) v[i] = in<T>(); return v; }
template <class T = int> inline void in(T* x, int n){ REP(i, n) x[i] = in<T>(); }
#define inl in<ll>
#define ind in<double>
#define ins in<string>
/* }}} */
/* container util {{{ */
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLA(ary, n) (ary), ((ary) + (n))
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define SZ(obj) (obj).size()
#define SZA(ary) (sizeof(ary) / sizeof(*ary))
#define SORT(obj) sort(ALL(obj))
#define SORTA(ary, n) sort(ALLA(ary, n))
#define EXIST(obj, key) ((obj).find(key) != (obj).end())
#define CLEARY(ary) memset((ary), 0, sizeof(ary))
/* }}} */
/* print util {{{ */
template <class T> inline void print(const T& x){ cout << x << '\n'; }
template <class T> inline void printd(const T& x, int d){ cout << fixed << setprecision(d) << x << '\n'; }
template <class T> inline void printv(vec<T>& v){ int n = SZ(v); REP(i, n) cout << v[i] << "\n "[i < n - 1]; }
template <class T> inline void printv(vec<T>& v, int n){ REP(i, n) cout << v[i] << "\n "[i < n - 1]; }
template <class T> inline void printa(T* ary, int n){ REP(i, n) cout << ary[i] << "\n "[i < n - 1]; }
#define DUMP(x) cerr << #x << ": " << (x) << '\n'
#define DEBUG(x) cerr << #x << ": " << (x) << " (" << __LINE__ << ")" << '\n'
/* }}} */
/* template }}} */
signed main()
{
return 0;
}