-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.cpp
More file actions
90 lines (71 loc) · 1.16 KB
/
template.cpp
File metadata and controls
90 lines (71 loc) · 1.16 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
Tags
----------------------------------------------------------------------------------------------------------------------------
Problem Description
*/
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <sstream>
#include <limits>
#include <iomanip>
#include <functional>
#include <cstring>
#include <climits>
using namespace std;
const int MOD = 1e9 + 7;
// Fast I/O
void fastIo()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
}
class Solution
{
private:
long long gcd(long long a, long long b)
{
while (b)
{
a %= b;
swap(a, b);
}
return a;
}
long long lcm(long long a, long long b)
{
return a / this->gcd(a, b) * b;
}
long long power(long long base, long long exp, long long mod = MOD)
{
long long result = 1;
base %= mod;
while (exp > 0)
{
if (exp & 1)
result = result * base % mod;
base = base * base % mod;
exp >>= 1;
}
return result;
}
public:
void solve()
{
}
};
int main()
{
fastIo();
return 0;
}