-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-begginer.cpp
90 lines (89 loc) · 2.65 KB
/
template-begginer.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
/*
Problem Name: *_Problem Name_*
Problem Type: A/B/C/D... - 800/900/1000/1100...
Problem Link: https://codeforces.com/problemset/problem/Index/Type
Author: Jash Desai (jash13desai)
*/
// ---------- HEADER ----------
#include<bits/stdc++.h>
using namespace std;
// ---------- TEMPLATES ----------
template<typename... T>
void see(T&... args) { ((cin >> args), ...);}
template<typename... T>
void put(T&&... args) { ((cout << args << " "), ...);}
template<typename... T>
void putl(T&&... args) { ((cout << args << " "), ...); cout<<'\n';}
// ---------- MACROS ----------
#define int long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define ll long long
#define ld long double
#define ull unsigned long long
#define print(x) cout << (x)
#define sz size()
#define vc(x) vector<x>
#define nl cout<<'\n'
#define sqof(a) (a)*(a)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pii pair<int,int>
#define vii vector<pii>
#define IOS ios_base:: sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);cin.exceptions(cin.failbit)
#define all(x) (x).begin(), (x).end()
#define setpr(x) cout<<setprecision(x)<<fixed
#define setbits(x) builtin_popcount((x))
#define tostr(x) to_string(x)
#define rep(i,a,b) for(int i=a; i<b; i++)
#define seeArr(arr,n) for(int i=0;i<n;i++){cin>>arr[i];}
#define seeVi(v) for(int i=0;i<v.sz;i++){int x; cin>>x; v.pb(x);}
#define seevi(v) for(int i=0;i<v.sz;i++){cin>>v[i];}
// ---------- DEBUG ----------
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x <<" : "; _print(x); cerr << '\n';
#else
#define debug(x)
#endif
void _print(int t) {cerr << t;}
void _print(string t) {cerr << t;}
void _print(char t) {cerr << t;}
void _print(ld t) {cerr << t;}
void _print(double t) {cerr << t;}
void _print(ull t) {cerr << t;}
void _print(bool t) {cerr << t;}
void _print(pair<int, int> t) {cerr << "[ " << t.ff << ", " << t.ss << " ]"; nl;}
template <class T> void _print(vector <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// ---------- CONSTANTS ----------
const ll infmax = INT_MAX;
const ll infmin = INT_MIN;
const ll N1 = 1e3+2;
const ll N2 = 1e5+2;
const ld ep = 0.0000001;
const ld pi = acos(-1.0);
const ll md = 1000000007;
// ---------- FUNCTIONS ----------
int gcd(int a, int b){return (!b) ? a : gcd(b, a % b);}
int fact(int n){if(n==1 || n==0){return 1;} return (n*fact(n-1));}
// ---------- SOLUTIONS ----------
void solve(){}
// ---------- MAIN ----------
signed main() {
#ifndef ONLINE_JUDGE
freopen("error.txt", "w", stderr);
#endif
IOS;
int t=1;
// cin>>t;
while(t--){
solve();
nl;
}
return 0;
}
// ---------- ROUGHCODE ----------
/*
*/
// ---------- END ----------