-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.cpp
101 lines (93 loc) · 2.52 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
AUTHOR : @sam_jn
*/
//lo + 1, hi, ret lo
#include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
using namespace std;
// using namespace __gnu_pbds;
// typedef tree<pair<int, int>, null_type, less_equal<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define boost ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define MOD 1000000007
#define pb push_back
#define ff first
#define ss second
#define NN 1000002
#define in(a, n) for(int i = 0; i < n; i++) cin >> a[i];
#define ot(a, n) for(int i = 0; i < n; i++) cout << a[i] << " ";
#define ot2(a, n) for(int i = 0; i < n; i++) cout << a[i] << "\n";
ll pwr(ll a, ll b);
ll pwr(ll a, ll b, ll m);
int baap[200002];
int prime[NN];
int find(int i);
bool Union(int x, int y);
ll inv(ll x) {return pwr(x, MOD - 2, MOD);}
void init();
ll max(ll x, ll y, ll z) {return max(x, max(y, z));}
int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[8] = {-1, 1, 0, 0, 1, -1, 1, -1};
//----------------------------------SOLUTION-BELOW-------------------------------------------//
void solve(){
int n;
cin >> n;
cout << n;
}
int main(){
#ifndef ONLINE_JUDGE
freopen("../../input.txt", "r", stdin);
freopen("../../output.txt", "w", stdout);
#else
// online submission
#endif
//
boost
int _ = 1;
// cout << 0 << endl;
cin >> _;
while(_--){
solve();
cout << endl;
}
}
//--------------------------------------DEFININTIONS---------------------------------------
ll pwr(ll a, ll b){
if(b == 0)
return 1 ;
ll c = pwr(a, b/2) ;
c = c * c;
if(b % 2)
return c*a;
return c ;
}
ll pwr(ll a, ll b, ll m){
if(b == 0)
return 1;
ll c = pwr(a, b/2, m) % m ;
c = (c * c) % m;
if(b % 2)
return (c * a%m) % m;
return c ;
}
int find(int i)
{
if (baap[i] != i)
baap[i] = find(baap[i]);
return baap[i];
}
bool Union(int x, int y)
{
x = find(x);
y = find(y);
if(x == y) return false;
baap[x] = y;
return true;
}
void init(){
for(ll i = 2; i < NN; i++){
if(prime[i]) continue;
for(ll j = 2*i; j < NN; j += i)
prime[j] = i;
}
}