-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTEMPLATE.cpp
More file actions
86 lines (79 loc) · 1.57 KB
/
TEMPLATE.cpp
File metadata and controls
86 lines (79 loc) · 1.57 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
#include <bits/stdc++.h>
using namespace std;
#define MOD (1000000000 + 7)
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define nl '\n'
#define all(x) x.begin(), x.end()
#define print(vec, l, r) \
for (int i = l; i <= r; i++) \
cout << vec[i] << " "; \
cout << endl;
#define forf(i, a, b) for (int i = (a); i < (b); i++)
#define forr(i, a, b) for (int i = (a); i > (b); i--)
#define input(vec, N) \
for (int i = 0; i < (N); i++) \
cin >> vec[i];
#define debug(x) cerr << #x << " = " << (x) << endl;
// template starts
typedef long long int ll;
#define int ll
long long binpow(long long a, long long b, long long m)
{
a %= m;
long long res = 1;
while (b > 0)
{
if (b & 1)
res = res * a % m;
a = a * a % m;
b >>= 1;
}
return res;
}
int power(int x, int y)
{
int result = 1;
while (y > 0)
{
if (y % 2 == 0) // y is even
{
x = x * x;
y = y / 2;
}
else // y isn't even
{
result = result * x;
y = y - 1;
}
}
return result;
}
/*<------------ IF WA OCCURS ------------->
* Look for overflow errors
* Think about corner casses once again
* Include cout<<fixed<<setprecision(11); in main for printing decimals
* Use 0LL instead of 0
* Do endl after testcase
*
* <----------- IF TLE OCCURS ------------>
* Use ordered map if unordered map blows up
* Look at i++ and i-- in for loops
* check breaking cases of loops
* calculate time with question constraints
*/
void solve()
{
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int T = 1;
cin >> T;
while (T--)
{
solve();
}
return 0;
}