-
Notifications
You must be signed in to change notification settings - Fork 0
/
akhilsharmaa.sublime-snippet
104 lines (71 loc) · 2.49 KB
/
akhilsharmaa.sublime-snippet
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
<snippet>
<content><![CDATA[
// by @akhilsharmaa
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef __gnu_pbds::tree<int, __gnu_pbds::null_type, less<int>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update> ordered_set;
#define pb push_back
#define endl "\n";
#define int long long int
#define ff first
#define ss second
#define FAST_IO cin.tie(NULL); ios_base::sync_with_stdio(false);
#define pii pair<int, int>
#define printV(v) for(auto&&i:v)cout<<i<<' ';cout<<"\n";
#define debugV(v) cerr<<#v<<"-> "; for(auto&&i:v)cerr<<i<<' ';cerr<<"\n";
#define scanV(v) for(auto&&i:v)cin >> i;
#define yN(ok) cout << (ok? "YES": "NO") << endl;
#define tF(ok) cout << (ok? "TRUE": "FALSE") << endl;
#define debugln(n) cerr <<#n<<":"<<n<<endl;
#define debug(n) cerr <<#n<<":"<<n<<' ';
#define pln(n) cout << n << '\n';
#define printMP(mp) cout << #mp << "-> ";for(auto [i, j]: mp)cout<<i<<':'<<j<<", ";
#define debugMP(mp) cerr << #mp << "-> ";for(auto [i, j]: mp)cerr<<i<<':'<<j<<", ";cerr<<"\n";
#define loop(i,j,n) for(int i=(j);i<=((int)n);++i)
#define CLR(v) memset((v),0,sizeof(v))
#define all(v) v.begin(), v.end()
#define sz(v) v.size()
#define gcd(a, b) abs(__gcd(a, b))
#define lcm(a, b) (a*b)/gcd(a, b)
#define mod(n) n % MOD
#define add(a, b) mod(a) + mod(b) % MOD
#define sub(a, b) mod(a) - mod(b) % MOD
#define mul(a, b) mod(a) * mod(b) % MOD
#define amax(_x, _y) _x = max(_x, _y);
#define amin(_x, _y) _x = min(_x, _y);
const int INF = 1e18 + 7;
const int MOD = 1e9 + 7;
const int N = 2e5+7;
// runs before the solve function
void before(){
}
void solve(int ts, int ttlts){
${2}
}
signed main(){
FAST_IO; // fast-io
int t = 1;
// #ifndef ONLINE_JUDGE
${1:cin >> t;}
// #endif
before();
for(int ts = 1; ts <= t; ts++){
#ifndef ONLINE_JUDGE
cerr << "---- #" << ts << " :----\n";
#endif
solve(ts, t);
#ifndef ONLINE_JUDGE
cerr << "xxxxxxxxxxxxx\n\n";
#endif
}
return 0;
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>template-akhilsharmaa</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.c++</scope>
</snippet>