-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.cpp
72 lines (61 loc) · 1.14 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <unordered_map>
#include <map>
#include <unordered_set>
#include <set>
using namespace std;
typedef long long ll;
#define FOR(a, b, c) for (int a = b; a < (int)c; ++a)
#define FORN(a, b, c) for (int a = b; a >= (int)c; --a)
#define MAX INT_MAX
#define MIN INT_MIN
#define MAXll LLONG_MAX
#define ii pair<int, int>
#define f first
#define s second
#define print(arr) \
for (auto i : arr) \
cout << i << " ";
#define all(a) a.begin(), a.end()
const ll MOD = 1e9 + 7;
ll nCr(int n, int r)
{
if (n < r)
return 0;
ll num = 1, den = 1;
if (r == 0)
return 1;
while (r)
{
num *= n--;
den *= r--;
ll temp = gcd(num, den);
num /= temp;
den /= temp;
}
return num;
}
void solve()
{
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t = 1;
// cin >> t;
while (t--)
{
solve();
}
}