#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cassert>
#include <ctime>
#include <chrono>
#include <cstdio>
#include <random>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <deque>
#include <queue>
#include <bitset>
#include <list>
#include <fstream>
#include <functional>
#include <complex>
#include "swap.h"
using namespace std;
mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int INF = 1e9, MOD = 1e9 + 7, MOD2 = 998244353, LOG = 19;
const long double EPS = 1e-9, PI = acos(-1);
struct dsu
{
int n;
vector<int> p, deg, res;
vector<vector<int>> has;
dsu() {}
dsu(int in)
{
n = in;
p.resize(n);
iota(p.begin(), p.end(), 0);
deg.resize(n);
res.resize(n, INF);
has.resize(n);
for (int i = 0; i < n; i++)
{
has[i] = { i };
}
}
bool unite(int a, int b, int idx)
{
deg[a]++;
deg[b]++;
bool thr = (deg[a] >= 3 || deg[b] >= 3);
a = p[a];
b = p[b];
if (a == b)
{
if (res[a] == INF)
{
for (auto& i : has[a])
{
res[i] = idx;
}
}
return false;
}
if (has[a].size() < has[b].size())
{
swap(a, b);
}
if ((thr || res[b] != INF) && res[a] == INF)
{
for (auto& i : has[a])
{
res[i] = idx;
}
}
if ((thr || res[a] != INF) && res[b] == INF)
{
for (auto& i : has[b])
{
res[i] = idx;
}
}
for (auto& i : has[b])
{
has[a].push_back(i);
p[i] = a;
}
has[b] = {};
return true;
}
int get(int v)
{
return res[v];
}
};
struct edge
{
int to, idx;
};
const int N = 1e5 + 5;
int n, m;
vector<edge> g[N];
vector<int> binup[N], maxidx[N], h;
vector<int> ew;
dsu kek;
void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W)
{
n = N;
m = M;
vector<tuple<int, int, int>> e;
e.resize(m);
for (int i = 0; i < m; i++)
{
e[i] = { W[i], U[i], V[i] };
}
sort(e.begin(), e.end());
ew.resize(m);
for (int i = 0; i < m; i++)
{
ew[i] = get<0>(e[i]);
}
kek = dsu(n);
for (int i = 0; i < m; i++)
{
auto& [w, a, b] = e[i];
if (kek.unite(a, b, i))
{
g[a].push_back({ b, i });
g[b].push_back({ a, i });
}
}
fill_n(binup, n, vector<int>(LOG));
fill_n(maxidx, n, vector<int>(LOG, INF));
h.resize(n);
auto build = [&](auto build, int v, int p) -> void
{
if (p == -1)
{
h[v] = 0;
binup[v][0] = 0;
maxidx[v][0] = -1;
}
else
{
h[v] = h[p] + 1;
binup[v][0] = p;
}
for (int i = 1; i < LOG; i++)
{
binup[v][i] = binup[binup[v][i - 1]][i - 1];
maxidx[v][i] = max(maxidx[v][i - 1], maxidx[binup[v][i - 1]][i - 1]);
}
for (auto& i : g[v])
{
if (i.to == p)
{
continue;
}
maxidx[i.to][0] = i.idx;
build(build, i.to, v);
}
};
build(build, 0, -1);
}
int getMinimumFuelCapacity(int X, int Y)
{
auto get_la = [&](int v, int x) -> int
{
for (int i = LOG - 1; i > -1; i--)
{
if (h[v] - h[binup[v][i]] <= x)
{
x -= h[v] - h[binup[v][i]];
v = binup[v][i];
}
}
return v;
};
auto get_lca = [&](int a, int b) -> int
{
if (h[a] < h[b])
{
swap(a, b);
}
a = get_la(a, h[a] - h[b]);
if (a == b)
{
return a;
}
for (int i = LOG - 1; i > -1; i--)
{
if (binup[a][i] != binup[b][i])
{
a = binup[a][i];
b = binup[b][i];
}
}
return binup[a][0];
};
int a = X, b = Y, c = get_lca(a, b);
int ans = min(kek.get(a), kek.get(b));
auto get_up = [&](int& ver) -> void
{
for (int i = LOG - 1; i > -1; i--)
{
if (h[binup[ver][i]] >= h[c])
{
ans = max(ans, maxidx[ver][i]);
ver = binup[ver][i];
}
}
};
get_up(a);
get_up(b);
if (ans == INF)
{
return -1;
}
return ew[ans];
}
/*
int main() {
int N, M;
assert(2 == scanf("%d %d", &N, &M));
std::vector<int> U(M), V(M), W(M);
for (int i = 0; i < M; ++i) {
assert(3 == scanf("%d %d %d", &U[i], &V[i], &W[i]));
}
int Q;
assert(1 == scanf("%d", &Q));
std::vector<int> X(Q), Y(Q);
for (int i = 0; i < Q; ++i) {
assert(2 == scanf("%d %d", &X[i], &Y[i]));
}
init(N, M, U, V, W);
std::vector<int> minimum_fuel_capacities(Q);
for (int i = 0; i < Q; ++i) {
minimum_fuel_capacities[i] = getMinimumFuelCapacity(X[i], Y[i]);
}
for (int i = 0; i < Q; ++i) {
printf("%d\n", minimum_fuel_capacities[i]);
}
return 0;
}
*/
/*
<3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠤⠖⠚⢉⣩⣭⡭⠛⠓⠲⠦⣄⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⡴⠋⠁⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠳⢦⡀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⡴⠃⢀⡴⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣆⠀⠀⠀
⠀⠀⠀⠀⡾⠁⣠⠋⠀⠈⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢧⠀⠀
⠀⠀⠀⣸⠁⢰⠃⠀⠀⠀⠈⢣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣇⠀
⠀⠀⠀⡇⠀⡾⡀⠀⠀⠀⠀⣀⣹⣆⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀
⠀⠀⢸⠃⢀⣇⡈⠀⠀⠀⠀⠀⠀⢀⡑⢄⡀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇
⠀⠀⢸⠀⢻⡟⡻⢶⡆⠀⠀⠀⠀⡼⠟⡳⢿⣦⡑⢄⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇
⠀⠀⣸⠀⢸⠃⡇⢀⠇⠀⠀⠀⠀⠀⡼⠀⠀⠈⣿⡗⠂⠀⠀⠀⠀⠀⠀⠀⢸⠁
⠀⠀⡏⠀⣼⠀⢳⠊⠀⠀⠀⠀⠀⠀⠱⣀⣀⠔⣸⠁⠀⠀⠀⠀⠀⠀⠀⢠⡟⠀
⠀⠀⡇⢀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⢸⠃⠀
⠀⢸⠃⠘⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠁⠀⠀⢀⠀⠀⠀⠀⠀⣾⠀⠀
⠀⣸⠀⠀⠹⡄⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⡞⠀⠀⠀⠸⠀⠀⠀⠀⠀⡇⠀⠀
⠀⡏⠀⠀⠀⠙⣆⠀⠀⠀⠀⠀⠀⠀⢀⣠⢶⡇⠀⠀⢰⡀⠀⠀⠀⠀⠀⡇⠀⠀
⢰⠇⡄⠀⠀⠀⡿⢣⣀⣀⣀⡤⠴⡞⠉⠀⢸⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⣧⠀⠀
⣸⠀⡇⠀⠀⠀⠀⠀⠀⠉⠀⠀⠀⢹⠀⠀⢸⠀⠀⢀⣿⠇⠀⠀⠀⠁⠀⢸⠀⠀
⣿⠀⡇⠀⠀⠀⠀⠀⢀⡤⠤⠶⠶⠾⠤⠄⢸⠀⡀⠸⣿⣀⠀⠀⠀⠀⠀⠈⣇⠀
⡇⠀⡇⠀⠀⡀⠀⡴⠋⠀⠀⠀⠀⠀⠀⠀⠸⡌⣵⡀⢳⡇⠀⠀⠀⠀⠀⠀⢹⡀
⡇⠀⠇⠀⠀⡇⡸⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠮⢧⣀⣻⢂⠀⠀⠀⠀⠀⠀⢧
⣇⠀⢠⠀⠀⢳⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡎⣆⠀⠀⠀⠀⠀⠘
⢻⠀⠈⠰⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠘⢮⣧⡀⠀⠀⠀⠀
⠸⡆⠀⠀⠇⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠆⠀⠀⠀⠀⠀⠀⠀⠙⠳⣄⡀⢢⡀
<3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
7252 KB |
Output is correct |
2 |
Correct |
3 ms |
7252 KB |
Output is correct |
3 |
Correct |
4 ms |
7252 KB |
Output is correct |
4 |
Correct |
4 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7636 KB |
Output is correct |
6 |
Correct |
4 ms |
7636 KB |
Output is correct |
7 |
Correct |
4 ms |
7636 KB |
Output is correct |
8 |
Correct |
4 ms |
7636 KB |
Output is correct |
9 |
Correct |
133 ms |
36920 KB |
Output is correct |
10 |
Correct |
182 ms |
43992 KB |
Output is correct |
11 |
Correct |
171 ms |
43236 KB |
Output is correct |
12 |
Correct |
187 ms |
45544 KB |
Output is correct |
13 |
Correct |
181 ms |
44100 KB |
Output is correct |
14 |
Correct |
161 ms |
36612 KB |
Output is correct |
15 |
Correct |
555 ms |
50180 KB |
Output is correct |
16 |
Correct |
497 ms |
48296 KB |
Output is correct |
17 |
Correct |
509 ms |
52292 KB |
Output is correct |
18 |
Correct |
482 ms |
49592 KB |
Output is correct |
19 |
Correct |
119 ms |
18624 KB |
Output is correct |
20 |
Correct |
491 ms |
50084 KB |
Output is correct |
21 |
Correct |
488 ms |
48572 KB |
Output is correct |
22 |
Correct |
505 ms |
51676 KB |
Output is correct |
23 |
Correct |
473 ms |
49708 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
7252 KB |
Output is correct |
2 |
Correct |
3 ms |
7252 KB |
Output is correct |
3 |
Correct |
254 ms |
41480 KB |
Output is correct |
4 |
Correct |
252 ms |
46832 KB |
Output is correct |
5 |
Correct |
325 ms |
46028 KB |
Output is correct |
6 |
Correct |
273 ms |
46724 KB |
Output is correct |
7 |
Correct |
251 ms |
46464 KB |
Output is correct |
8 |
Correct |
242 ms |
45104 KB |
Output is correct |
9 |
Correct |
254 ms |
46124 KB |
Output is correct |
10 |
Correct |
246 ms |
44700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
7252 KB |
Output is correct |
2 |
Correct |
3 ms |
7252 KB |
Output is correct |
3 |
Correct |
4 ms |
7252 KB |
Output is correct |
4 |
Correct |
4 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7636 KB |
Output is correct |
6 |
Correct |
4 ms |
7636 KB |
Output is correct |
7 |
Correct |
4 ms |
7636 KB |
Output is correct |
8 |
Correct |
4 ms |
7636 KB |
Output is correct |
9 |
Correct |
4 ms |
7252 KB |
Output is correct |
10 |
Correct |
4 ms |
7636 KB |
Output is correct |
11 |
Correct |
4 ms |
7616 KB |
Output is correct |
12 |
Correct |
4 ms |
7636 KB |
Output is correct |
13 |
Correct |
6 ms |
7612 KB |
Output is correct |
14 |
Correct |
4 ms |
7584 KB |
Output is correct |
15 |
Correct |
5 ms |
7648 KB |
Output is correct |
16 |
Correct |
4 ms |
7660 KB |
Output is correct |
17 |
Correct |
4 ms |
7616 KB |
Output is correct |
18 |
Correct |
4 ms |
7636 KB |
Output is correct |
19 |
Correct |
4 ms |
7508 KB |
Output is correct |
20 |
Correct |
4 ms |
7636 KB |
Output is correct |
21 |
Correct |
4 ms |
7636 KB |
Output is correct |
22 |
Correct |
4 ms |
7508 KB |
Output is correct |
23 |
Correct |
4 ms |
7624 KB |
Output is correct |
24 |
Correct |
4 ms |
7764 KB |
Output is correct |
25 |
Correct |
4 ms |
7760 KB |
Output is correct |
26 |
Correct |
5 ms |
7736 KB |
Output is correct |
27 |
Correct |
6 ms |
7636 KB |
Output is correct |
28 |
Correct |
4 ms |
7636 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7252 KB |
Output is correct |
2 |
Correct |
3 ms |
7252 KB |
Output is correct |
3 |
Correct |
3 ms |
7252 KB |
Output is correct |
4 |
Correct |
4 ms |
7252 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7636 KB |
Output is correct |
7 |
Correct |
4 ms |
7636 KB |
Output is correct |
8 |
Correct |
4 ms |
7636 KB |
Output is correct |
9 |
Correct |
4 ms |
7636 KB |
Output is correct |
10 |
Correct |
133 ms |
36920 KB |
Output is correct |
11 |
Correct |
182 ms |
43992 KB |
Output is correct |
12 |
Correct |
171 ms |
43236 KB |
Output is correct |
13 |
Correct |
187 ms |
45544 KB |
Output is correct |
14 |
Correct |
181 ms |
44100 KB |
Output is correct |
15 |
Correct |
4 ms |
7636 KB |
Output is correct |
16 |
Correct |
4 ms |
7616 KB |
Output is correct |
17 |
Correct |
4 ms |
7636 KB |
Output is correct |
18 |
Correct |
6 ms |
7612 KB |
Output is correct |
19 |
Correct |
4 ms |
7584 KB |
Output is correct |
20 |
Correct |
5 ms |
7648 KB |
Output is correct |
21 |
Correct |
4 ms |
7660 KB |
Output is correct |
22 |
Correct |
4 ms |
7616 KB |
Output is correct |
23 |
Correct |
4 ms |
7636 KB |
Output is correct |
24 |
Correct |
4 ms |
7508 KB |
Output is correct |
25 |
Correct |
4 ms |
7636 KB |
Output is correct |
26 |
Correct |
4 ms |
7636 KB |
Output is correct |
27 |
Correct |
4 ms |
7508 KB |
Output is correct |
28 |
Correct |
4 ms |
7624 KB |
Output is correct |
29 |
Correct |
4 ms |
7764 KB |
Output is correct |
30 |
Correct |
4 ms |
7760 KB |
Output is correct |
31 |
Correct |
5 ms |
7736 KB |
Output is correct |
32 |
Correct |
6 ms |
7636 KB |
Output is correct |
33 |
Correct |
4 ms |
7636 KB |
Output is correct |
34 |
Correct |
15 ms |
12372 KB |
Output is correct |
35 |
Correct |
184 ms |
47032 KB |
Output is correct |
36 |
Correct |
227 ms |
45844 KB |
Output is correct |
37 |
Correct |
170 ms |
44952 KB |
Output is correct |
38 |
Correct |
157 ms |
43956 KB |
Output is correct |
39 |
Correct |
135 ms |
43460 KB |
Output is correct |
40 |
Correct |
120 ms |
40428 KB |
Output is correct |
41 |
Correct |
177 ms |
46584 KB |
Output is correct |
42 |
Correct |
210 ms |
46884 KB |
Output is correct |
43 |
Correct |
157 ms |
45116 KB |
Output is correct |
44 |
Correct |
130 ms |
44748 KB |
Output is correct |
45 |
Correct |
117 ms |
40040 KB |
Output is correct |
46 |
Correct |
189 ms |
45384 KB |
Output is correct |
47 |
Correct |
141 ms |
43492 KB |
Output is correct |
48 |
Correct |
136 ms |
42824 KB |
Output is correct |
49 |
Correct |
50 ms |
16616 KB |
Output is correct |
50 |
Correct |
43 ms |
16556 KB |
Output is correct |
51 |
Correct |
100 ms |
34308 KB |
Output is correct |
52 |
Correct |
187 ms |
49032 KB |
Output is correct |
53 |
Correct |
157 ms |
49272 KB |
Output is correct |
54 |
Correct |
206 ms |
52336 KB |
Output is correct |
55 |
Correct |
159 ms |
45740 KB |
Output is correct |
56 |
Correct |
155 ms |
47988 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
7252 KB |
Output is correct |
2 |
Correct |
3 ms |
7252 KB |
Output is correct |
3 |
Correct |
4 ms |
7252 KB |
Output is correct |
4 |
Correct |
4 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7636 KB |
Output is correct |
6 |
Correct |
4 ms |
7636 KB |
Output is correct |
7 |
Correct |
4 ms |
7636 KB |
Output is correct |
8 |
Correct |
4 ms |
7636 KB |
Output is correct |
9 |
Correct |
133 ms |
36920 KB |
Output is correct |
10 |
Correct |
182 ms |
43992 KB |
Output is correct |
11 |
Correct |
171 ms |
43236 KB |
Output is correct |
12 |
Correct |
187 ms |
45544 KB |
Output is correct |
13 |
Correct |
181 ms |
44100 KB |
Output is correct |
14 |
Correct |
161 ms |
36612 KB |
Output is correct |
15 |
Correct |
555 ms |
50180 KB |
Output is correct |
16 |
Correct |
497 ms |
48296 KB |
Output is correct |
17 |
Correct |
509 ms |
52292 KB |
Output is correct |
18 |
Correct |
482 ms |
49592 KB |
Output is correct |
19 |
Correct |
254 ms |
41480 KB |
Output is correct |
20 |
Correct |
252 ms |
46832 KB |
Output is correct |
21 |
Correct |
325 ms |
46028 KB |
Output is correct |
22 |
Correct |
273 ms |
46724 KB |
Output is correct |
23 |
Correct |
251 ms |
46464 KB |
Output is correct |
24 |
Correct |
242 ms |
45104 KB |
Output is correct |
25 |
Correct |
254 ms |
46124 KB |
Output is correct |
26 |
Correct |
246 ms |
44700 KB |
Output is correct |
27 |
Correct |
4 ms |
7636 KB |
Output is correct |
28 |
Correct |
4 ms |
7616 KB |
Output is correct |
29 |
Correct |
4 ms |
7636 KB |
Output is correct |
30 |
Correct |
6 ms |
7612 KB |
Output is correct |
31 |
Correct |
4 ms |
7584 KB |
Output is correct |
32 |
Correct |
5 ms |
7648 KB |
Output is correct |
33 |
Correct |
4 ms |
7660 KB |
Output is correct |
34 |
Correct |
4 ms |
7616 KB |
Output is correct |
35 |
Correct |
4 ms |
7636 KB |
Output is correct |
36 |
Correct |
15 ms |
12372 KB |
Output is correct |
37 |
Correct |
184 ms |
47032 KB |
Output is correct |
38 |
Correct |
227 ms |
45844 KB |
Output is correct |
39 |
Correct |
170 ms |
44952 KB |
Output is correct |
40 |
Correct |
157 ms |
43956 KB |
Output is correct |
41 |
Correct |
135 ms |
43460 KB |
Output is correct |
42 |
Correct |
120 ms |
40428 KB |
Output is correct |
43 |
Correct |
177 ms |
46584 KB |
Output is correct |
44 |
Correct |
210 ms |
46884 KB |
Output is correct |
45 |
Correct |
157 ms |
45116 KB |
Output is correct |
46 |
Correct |
130 ms |
44748 KB |
Output is correct |
47 |
Correct |
30 ms |
12344 KB |
Output is correct |
48 |
Correct |
484 ms |
50112 KB |
Output is correct |
49 |
Correct |
606 ms |
49284 KB |
Output is correct |
50 |
Correct |
495 ms |
48684 KB |
Output is correct |
51 |
Correct |
523 ms |
48060 KB |
Output is correct |
52 |
Correct |
386 ms |
45624 KB |
Output is correct |
53 |
Correct |
256 ms |
37028 KB |
Output is correct |
54 |
Correct |
559 ms |
50456 KB |
Output is correct |
55 |
Correct |
464 ms |
50488 KB |
Output is correct |
56 |
Correct |
563 ms |
49376 KB |
Output is correct |
57 |
Correct |
360 ms |
48940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7252 KB |
Output is correct |
2 |
Correct |
3 ms |
7252 KB |
Output is correct |
3 |
Correct |
3 ms |
7252 KB |
Output is correct |
4 |
Correct |
4 ms |
7252 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7636 KB |
Output is correct |
7 |
Correct |
4 ms |
7636 KB |
Output is correct |
8 |
Correct |
4 ms |
7636 KB |
Output is correct |
9 |
Correct |
4 ms |
7636 KB |
Output is correct |
10 |
Correct |
133 ms |
36920 KB |
Output is correct |
11 |
Correct |
182 ms |
43992 KB |
Output is correct |
12 |
Correct |
171 ms |
43236 KB |
Output is correct |
13 |
Correct |
187 ms |
45544 KB |
Output is correct |
14 |
Correct |
181 ms |
44100 KB |
Output is correct |
15 |
Correct |
161 ms |
36612 KB |
Output is correct |
16 |
Correct |
555 ms |
50180 KB |
Output is correct |
17 |
Correct |
497 ms |
48296 KB |
Output is correct |
18 |
Correct |
509 ms |
52292 KB |
Output is correct |
19 |
Correct |
482 ms |
49592 KB |
Output is correct |
20 |
Correct |
254 ms |
41480 KB |
Output is correct |
21 |
Correct |
252 ms |
46832 KB |
Output is correct |
22 |
Correct |
325 ms |
46028 KB |
Output is correct |
23 |
Correct |
273 ms |
46724 KB |
Output is correct |
24 |
Correct |
251 ms |
46464 KB |
Output is correct |
25 |
Correct |
242 ms |
45104 KB |
Output is correct |
26 |
Correct |
254 ms |
46124 KB |
Output is correct |
27 |
Correct |
246 ms |
44700 KB |
Output is correct |
28 |
Correct |
4 ms |
7636 KB |
Output is correct |
29 |
Correct |
4 ms |
7616 KB |
Output is correct |
30 |
Correct |
4 ms |
7636 KB |
Output is correct |
31 |
Correct |
6 ms |
7612 KB |
Output is correct |
32 |
Correct |
4 ms |
7584 KB |
Output is correct |
33 |
Correct |
5 ms |
7648 KB |
Output is correct |
34 |
Correct |
4 ms |
7660 KB |
Output is correct |
35 |
Correct |
4 ms |
7616 KB |
Output is correct |
36 |
Correct |
4 ms |
7636 KB |
Output is correct |
37 |
Correct |
15 ms |
12372 KB |
Output is correct |
38 |
Correct |
184 ms |
47032 KB |
Output is correct |
39 |
Correct |
227 ms |
45844 KB |
Output is correct |
40 |
Correct |
170 ms |
44952 KB |
Output is correct |
41 |
Correct |
157 ms |
43956 KB |
Output is correct |
42 |
Correct |
135 ms |
43460 KB |
Output is correct |
43 |
Correct |
120 ms |
40428 KB |
Output is correct |
44 |
Correct |
177 ms |
46584 KB |
Output is correct |
45 |
Correct |
210 ms |
46884 KB |
Output is correct |
46 |
Correct |
157 ms |
45116 KB |
Output is correct |
47 |
Correct |
130 ms |
44748 KB |
Output is correct |
48 |
Correct |
30 ms |
12344 KB |
Output is correct |
49 |
Correct |
484 ms |
50112 KB |
Output is correct |
50 |
Correct |
606 ms |
49284 KB |
Output is correct |
51 |
Correct |
495 ms |
48684 KB |
Output is correct |
52 |
Correct |
523 ms |
48060 KB |
Output is correct |
53 |
Correct |
386 ms |
45624 KB |
Output is correct |
54 |
Correct |
256 ms |
37028 KB |
Output is correct |
55 |
Correct |
559 ms |
50456 KB |
Output is correct |
56 |
Correct |
464 ms |
50488 KB |
Output is correct |
57 |
Correct |
563 ms |
49376 KB |
Output is correct |
58 |
Correct |
360 ms |
48940 KB |
Output is correct |
59 |
Correct |
119 ms |
18624 KB |
Output is correct |
60 |
Correct |
491 ms |
50084 KB |
Output is correct |
61 |
Correct |
488 ms |
48572 KB |
Output is correct |
62 |
Correct |
505 ms |
51676 KB |
Output is correct |
63 |
Correct |
473 ms |
49708 KB |
Output is correct |
64 |
Correct |
4 ms |
7508 KB |
Output is correct |
65 |
Correct |
4 ms |
7636 KB |
Output is correct |
66 |
Correct |
4 ms |
7636 KB |
Output is correct |
67 |
Correct |
4 ms |
7508 KB |
Output is correct |
68 |
Correct |
4 ms |
7624 KB |
Output is correct |
69 |
Correct |
4 ms |
7764 KB |
Output is correct |
70 |
Correct |
4 ms |
7760 KB |
Output is correct |
71 |
Correct |
5 ms |
7736 KB |
Output is correct |
72 |
Correct |
6 ms |
7636 KB |
Output is correct |
73 |
Correct |
4 ms |
7636 KB |
Output is correct |
74 |
Correct |
117 ms |
40040 KB |
Output is correct |
75 |
Correct |
189 ms |
45384 KB |
Output is correct |
76 |
Correct |
141 ms |
43492 KB |
Output is correct |
77 |
Correct |
136 ms |
42824 KB |
Output is correct |
78 |
Correct |
50 ms |
16616 KB |
Output is correct |
79 |
Correct |
43 ms |
16556 KB |
Output is correct |
80 |
Correct |
100 ms |
34308 KB |
Output is correct |
81 |
Correct |
187 ms |
49032 KB |
Output is correct |
82 |
Correct |
157 ms |
49272 KB |
Output is correct |
83 |
Correct |
206 ms |
52336 KB |
Output is correct |
84 |
Correct |
159 ms |
45740 KB |
Output is correct |
85 |
Correct |
155 ms |
47988 KB |
Output is correct |
86 |
Correct |
67 ms |
20604 KB |
Output is correct |
87 |
Correct |
566 ms |
48992 KB |
Output is correct |
88 |
Correct |
560 ms |
49112 KB |
Output is correct |
89 |
Correct |
300 ms |
44720 KB |
Output is correct |
90 |
Correct |
135 ms |
20756 KB |
Output is correct |
91 |
Correct |
164 ms |
22904 KB |
Output is correct |
92 |
Correct |
259 ms |
37908 KB |
Output is correct |
93 |
Correct |
552 ms |
52820 KB |
Output is correct |
94 |
Correct |
350 ms |
52928 KB |
Output is correct |
95 |
Correct |
534 ms |
56292 KB |
Output is correct |
96 |
Correct |
500 ms |
48448 KB |
Output is correct |
97 |
Correct |
347 ms |
49720 KB |
Output is correct |