-
Notifications
You must be signed in to change notification settings - Fork 11
/
template.cpp
56 lines (53 loc) · 1.23 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
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
double PI = acos(-1);
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(v) v.begin(), v.end()
#define alla(arr, sz) arr, arr + sz
#define st(v) sort(all(v))
#define revrs(v) reverse(all(v))
#define sta(arr, sz) sort(alla(arr, sz))
#define revrsa(arr, sz) reverse(alla(arr, sz))
#define tc(t) while (t--)
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define deb(...) logger(#__VA_ARGS__, __VA_ARGS__)
template<typename ...Args>
void logger(string vars, Args&&... values) {
cout << vars << " = ";
string delim = "";
(..., (cout << delim << values, delim = ", "));
cout<<"\n";
}
template <typename... T>
void read(T &...args) {
((cin >> args), ...);
}
template <typename... T>
void write(string delimiter, T &&...args) {
((cout << args << delimiter), ...);
}
template <typename T>
void readContainer(T &t) {
for (auto &e : t) {
read(e);
}
}
template <typename T>
void writeContainer(string delimiter, T &t) {
for (const auto &e : t) {
write(delimiter, e);
}
write("\n");
}
int main(){
fastio;
int t;cin>>t;
tc(t){
}
}