-
Notifications
You must be signed in to change notification settings - Fork 1
/
CP_template.cpp
60 lines (49 loc) · 1.16 KB
/
CP_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
/*
Author: Dung Tuan Le
University of Rochester
*/
#include <bits/stdc++.h>
#define fio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define FOR(i, l, r) for (int i=l; i<=r; i++)
#define REP(i, r, l) for (int i=r; i>=l; i--)
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define eps 1e-9
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef pair<ll, ll> pllll;
typedef pair<ld, ld> Point;
typedef pair<Point, Point> line;
struct strLine { ld a, b, c; };
typedef vector<int> vi;
typedef vector<long> vl;
typedef vector<ll> vll;
const double pi = 3.141592653589793;
ll gcd(ll a, ll b, ll &x, ll &y) {
if (a == 0) {
x = 0; y = 1;
return b;
}
ll x1, y1;
ll d = gcd(b%a, a, x1, y1);
x = y1 - (b / a) * x1;
y = x1;
return d;
}
ll lcm(ll a, ll b) { return (a*b)/__gcd(a, b); }
ll max(ll a, ll b) { return (a>=b)?a:b; }
ll min(ll a, ll b) { return (a<=b)?a:b; }
int main() {
fio;
// freopen(".in", "r", stdin);
// freopen(".out", "w", stdout);
// fclose(stdin);
return 0;
}