-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCF5.cpp
94 lines (93 loc) · 1.72 KB
/
CF5.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
#############################################
Author: Siddharth Mishra
GitHub: https://github.com/Hard-Coder05
#############################################
*/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define MOD 1000000007
#define INF INT_MAX
#define ll long long
#define int long long
#define vi vector<int>
#define pii pair<int, int>
#define ld long double
#define PB push_back
#define MP make_pair
#define FF first
#define SS second
#define max(a, b) ( \
{ \
__typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \
_a > _b ? _a : _b; \
})
#define min(a, b) ( \
{ \
__typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \
_a < _b ? _a : _b; \
})
//////////////////////////////////////////////////////////////////////////////
int power(int a, int b)
{
int res = 1ll;
while (b > 0)
{
if (b % 2ll)
res = (res * a) % MOD;
a = (a * a) % MOD;
b /= 2ll;
}
return res;
}
int GCD(int a, int b)
{
if (b == 0)
return a;
return GCD(b, a % b);
}
int fact(int n)
{
int res = 1;
for (int i = 2; i <= n; i++)
{
res = (res * i) % MOD;
}
return res % MOD;
}
bool isPrime(int n)
{
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
//////////////////////////////////////////////////////////////////////////////
void solve()
{
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int tc;
cin >> tc;
while (tc--)
{
solve();
}
}