forked from sahilbansal17/Competitive_Coding
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathicpc.cpp
More file actions
68 lines (48 loc) · 1.8 KB
/
icpc.cpp
File metadata and controls
68 lines (48 loc) · 1.8 KB
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
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef vector < pii > vpii;
typedef vector < pll > vpll;
typedef vector <string> vs;
typedef vector < vi > vvi;
typedef vector < vll > vvll;
#define fl(i, a, b) for (int i(a); i <= (b); i ++)
#define rep(i, n) fl (i, 1, (n))
#define loop(i, n) fl (i, 0, (n) - 1)
#define rfl(i, a, b) for (int i(a); i >= (b); i --)
#define rrep(i, n) rfl (i, (n), 1)
#define all(v) (v).begin(), (v).end()
#define srt(v) sort (all (v))
#define pb push_back
#define mp make_pair
#define dig(i) (s[i] - '0')
#define slen(s) s.length()
#define fr first
#define sc second
#define sz(x) ((int) (x).size())
#define fill (x, y) memset(x, y, sizeof(x))
#define clr(a) fill(a, 0)
#define endl '\n'
#define PI 3.14159265358979323
#define trace1(x1) cerr << #x1 << ": " << x1 << endl;
#define trace2(x1, x2) cerr << #x1 << ": " << x1 << " | " << #x2 << ": " << x2 << endl;
#define trace3(x1, x2, x3) cerr << #x1 << ": " << x1 << " | " << #x2 << ": " << x2 << " | " << #x3 << ": " << x3 << endl;
#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
const ll MOD = 1000000007LL;
const ll MAX = 100010LL;
template <typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b);}
template <typename T> T power(T x, T y, ll m = MOD) { T ans = 1; x %= m; while (y > 0) { if (y & 1ll) ans = (ans * x) % m; y >>= 1ll; x = (x * x)%m; } return ans%m;}
int main() {
#ifndef ONLINE_JUDGE
freopen("/Users/sahilbansal/Desktop/input.txt", "r", stdin);
freopen("/Users/sahilbansal/Desktop/output.txt", "w", stdout);
freopen("/Users/sahilbansal/Desktop/error.txt", "w", stderr);
#endif
FAST_IO;
return 0;
}