-
Notifications
You must be signed in to change notification settings - Fork 0
/
single_test_case_template.cpp
executable file
·110 lines (96 loc) · 2.96 KB
/
single_test_case_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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
Author: Melike Vurucu (melikechan)
I hope I won't get confused.
*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("sse4,avx,avx2,bmi,bmi2,popcnt,lzcnt") // default architechture flags, you can use below as fallback
// #pragma GCC target("sse4,bmi,bmi2,popcnt,lzcnt")
using namespace std;
using ll = long long;
using ld = long double;
// Loops
#define loopi($i, s, es, n, inc) for (ll $i = s; es < n; $i += inc)
#define loopieq($i, s, es, n, inc) for (ll $i = s; es <= n; $i += inc)
#define loopd($i, s, es, n, dec) for (ll $i = s; es > n; $i -= dec)
#define loopdeq($i, s, es, n, dec) for (ll $i = s; es >= n; $i -= dec)
/*
Pairs and tuples
i -> int (for every int, there is a corresponding i)
l -> long long
*/
typedef pair<int, int> pii;
typedef tuple<int, int, int> piii;
typedef tuple<int, int, int, int> piiii;
typedef tuple<int, int, int, int, int> piiiii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> plll;
typedef tuple<ll, ll, ll, ll> pllll;
typedef tuple<ll, ll, ll, ll, ll> plllll;
/*
Nested vectors
v -> vector (for every level of nesting, there is a corresponding v)
vi -> vector<int>
vl -> vector<long long>
*/
// int -> vector<int>
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
// pair<int, int> -> vector<pair<int, int>>
typedef vector<pii> vpii;
typedef vector<vpii> vvpii;
// tuple<int, int, int> -> vector<tuple<int, int, int>>
typedef vector<piii> vpiii;
typedef vector<vpiii> vvpiii;
// tuple<int, int, int, int> -> vector<tuple<int, int, int, int>>
typedef vector<piiii> vpiiii;
typedef vector<vpiiii> vvpiiii;
// tuple<int, int, int, int, int> -> vector<tuple<int, int, int, int, int>>
typedef vector<piiiii> vpiiiii;
typedef vector<vpiiiii> vvpiiiii;
// long long -> vector<long long>
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
// pair<long long, long long> -> vector<pair<long long, long long>>
typedef vector<pll> vpll;
typedef vector<vpll> vvpll;
// tuple<long long, long long, long long> -> vector<tuple<long long, long long, long long>>
typedef vector<plll> vplll;
typedef vector<vplll> vvplll;
// tuple<long long, long long, long long, long long> -> vector<tuple<long long, long long, long long, long long>>
typedef vector<pllll> vpllll;
typedef vector<vpllll> vvpllll;
// tuple<long long, long long, long long, long long, long long> -> vector<tuple<long long, long long, long long, long long, long long>>
typedef vector<plllll> vplllll;
typedef vector<vplllll> vvplllll;
// Boolean vector
typedef vector<bool> vb;
// Constants
constexpr ll mod = ll(1e9) + 7;
constexpr ll inf = 2e18;
constexpr int intinf = INT_MAX - 1e3;
inline ll lsb(ll x)
{
return (x) & (-x);
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v)
{
for (auto &i : v)
{
os << i << " ";
}
return os;
}
void solve()
{
}
int32_t main(void)
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
solve();
return 0;
}