-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.cpp
85 lines (79 loc) Β· 1.72 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
73
74
75
76
77
78
79
80
81
82
83
84
85
#include <bits/stdc++.h>
// #include<ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <algorithm>
#include <unordered_map>
#include <vector>
#include <unordered_set>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <map>
#include <chrono>
using namespace std;
using namespace __gnu_pbds;
using namespace chrono;
#define fastio() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define nline "\n"
#define ll long long
/*---------------------------------------------------------------------------------------------------------------------------*/
ll gcd(ll a, ll b)
{
if (b > a)
{
return gcd(b, a);
}
if (b == 0)
{
return a;
}
return gcd(b, a % b);
}
vector<int> sieve(int n)
{
int *arr = new int[n + 1]();
vector<int> vect;
for (int i = 2; i <= n; i++)
if (arr[i] == 0)
{
vect.push_back(i);
for (int j = 2 * i; j <= n; j += i)
arr[j] = 1;
}
return vect;
}
vector<vector<int>> readMatrix(int n, int m)
{
vector<vector<int>> v;
for (int i = 0; i < n; i++)
{
vector<int> y;
for (int j = 0; j < m; j++)
{
int x;
cin >> x;
y.push_back(x);
}
v.push_back(y);
}
return v;
}
/*--------------------------------------------------------------------------------------------------------------------------*/
void solve()
{
return;
}
int main()
{
fastio();
auto start1 = high_resolution_clock::now();
solve();
auto stop1 = high_resolution_clock::now();
return 0;
} //
// Created by Malek on 02/08/2022.
//