-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathempty template ONPC.TXT
More file actions
145 lines (140 loc) · 2.38 KB
/
Copy pathempty template ONPC.TXT
File metadata and controls
145 lines (140 loc) · 2.38 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#pragma comment(linker, "/stack:256000000")
#pragma gcc optimize("O3")
#pragma gcc target("sse4")
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define mp make_pair
#define gl getline
#define pb push_back
#define eb emplace_back
#define ob pop_back
#define sz(x) ((int)(x.size()))
#define UM unordered_map
#define US unordered_set
#define X first
#define Y second
#define whole(x) x.begin(), x.end()
#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <queue>
#include <cmath>
#include <climits>
#include <bitset>
#include <random>
#include <ctime>
#include <chrono>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vpii> vvpii;
typedef pair<double, double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<pll> vpll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<bool, ll> pbl;
typedef vector<pbl> vpbl;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<pdd> vpdd;
typedef vector<string> vs;
mt19937 rng(2391);
mt19937 gnr(chrono::high_resolution_clock::now().time_since_epoch().count());
#ifdef ONPC
int __builtin_popcount(int x)
{
int ans = 0;
while (x)
{
if (x & 1)
++ans;
x >>= 1;
}
return ans;
}
ll __builtin_popcountl(ll x)
{
ll ans = 0;
while (x)
{
if (x & 1)
++ans;
x >>= 1;
}
return ans;
}
int __builtin_clz(int x)
{
int ans = 32;
while (x)
{
--ans;
x >>= 1;
}
return ans;
}
ll __builtin_clzl(ll x)
{
ll ans = 64;
while (x)
{
--ans;
x >>= 1;
}
return ans;
}
int __builtin_ctz(int x)
{
int ans = 0;
while ((x & 1) == 0)
{
++ans;
x >>= 1;
}
return ans;
}
ll __builtin_ctzl(ll x)
{
ll ans = 0;
while ((x & 1) == 0)
{
++ans;
x >>= 1;
}
return ans;
}
#endif
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cerr.tie(0);
#ifdef ONPC
freopen("input.txt", "rt", stdin);
freopen("output.txt", "wt", stdout);
auto start_time = clock();
cerr << setprecision(3) << fixed;
#endif
#ifdef ONPC
auto end_time = clock();
cerr << "Execution time: " << (end_time - start_time) * (int)1e3 / CLOCKS_PER_SEC << " ms\n";
#endif
return 0;
}