Submission #1042891

# Submission time Handle Problem Language Result Execution time Memory
1042891 2024-08-03T14:07:49 Z 42kangaroo Closing Time (IOI23_closing) C++17
100 / 100
143 ms 47220 KB
#include "closing.h"
#include "bits/stdc++.h"

#define ll long long
using namespace std;

struct Ed {
	ll to, w;
};

bool operator<(const Ed &l, const Ed &r) {
	return l.w > r.w;
}

using g_t = vector<vector<Ed>>;

void diDfs(int n, ll d, g_t &g, vector<ll> &di) {
	if (di[n] != -1) return;
	di[n] = d;
	for (auto e: g[n]) {
		diDfs(e.to, d + e.w, g, di);
	}
}

bool markdfs(int n, int p, int y, g_t &g, vector<bool> &ma) {
	if (n == y) return ma[n] = true;
	for (auto e: g[n]) {
		if (e.to == p) continue;
		if (markdfs(e.to, n, y, g, ma)) return ma[n] = true;
	}
	return false;
}

struct Score {
	ll med, mi, nu;
};

bool operator<(const Score& l, const Score& r) {
	return tie(l.med, l.mi) < tie(r.med, r.mi);
}

int max_score(int N, int X, int Y, long long K,
              std::vector<int> U, std::vector<int> V, std::vector<int> W) {
	g_t g(N);
	for (int i = 0; i < N - 1; ++i) {
		g[U[i]].push_back({V[i], W[i]});
		g[V[i]].push_back({U[i], W[i]});
	}
	array<vector<ll>, 2> dist;
	dist.fill(vector<ll>(N, -1));
	diDfs(X, 0, g, dist[0]);
	diDfs(Y, 0, g, dist[1]);
	int nuWithout = 0;
	vector<bool> vis(N, false);
	priority_queue<pair<Ed, bool>> q;
	q.push({{X, 0}, false});
	q.push({{Y, 0}, true});
	ll kC = K;
	while (!q.empty()) {
		auto [ed, com] = q.top();
		q.pop();
		if (vis[ed.to]) continue;
		if (kC < ed.w) break;
		kC -= ed.w;
		nuWithout++;
		vis[ed.to] = true;
		for (auto e: g[ed.to]) {
			q.push({{e.to, dist[com][e.to]}, com});
		}
	}
	vector<bool> ma(N, false);
	markdfs(X, X, Y, g, ma);
	int nuW = 0;
	vector<Score> pos;
	for (int i = 0; i < N; ++i) {
		if (ma[i]) {
			K -= min(dist[0][i], dist[1][i]);
			nuW++;
			if (dist[0][i] == dist[1][i]) nuW++;
			else pos.push_back({2 * (max(dist[0][i], dist[1][i]) - min(dist[0][i], dist[1][i])),
			                    2 * (max(dist[0][i], dist[1][i]) - min(dist[0][i], dist[1][i])), 1});
		} else {
			bool co = dist[0][i] > dist[1][i];
			if (dist[co][i] < dist[!co][i] - dist[co][i]) {
				pos.push_back({2*dist[co][i], 2*dist[co][i], 1});
				pos.push_back({2*(dist[!co][i] - dist[co][i]), 2*(dist[!co][i] - dist[co][i]), 1});
			} else {
				pos.push_back({dist[!co][i], 2*dist[co][i], 2});
			}
		}
	}
	if (K < 0) return nuWithout;
	K *= 2;
	std::sort(pos.begin(), pos.end());
	int laO = 0;
	for (int i = 0; i < pos.size(); ++i) {
		if (pos[i].med*pos[i].nu > K) {
			if (K + laO >= pos[i].med*2 && pos[i].nu == 2) {
				nuW++;
				K -= pos[i].med*2 - laO;
				laO = 0;
			}
			if (pos[i].mi <= K) {
				nuW++;
				K -= pos[i].mi;
			}
		} else {
			if (pos[i].nu == 1) laO = pos[i].med;
			K -= pos[i].med*pos[i].nu;
			nuW+=pos[i].nu;
		}
	}
	return max(nuW, nuWithout);
}

bool workDfs(int n, int p, bool up, g_t& g, int in) {
	if (!up && (in & (1 << n))) return false;
	for (auto e: g[n]) {
		if (e.to == p) continue;
		if (!workDfs(e.to, n, up && (in & (1 << n)), g, in)) return false;
	}
	return true;
}

int max_score2(int N, int X, int Y, long long K,
              std::vector<int> U, std::vector<int> V, std::vector<int> W) {
	g_t g(N);
	for (int i = 0; i < N - 1; ++i) {
		g[U[i]].push_back({V[i], W[i]});
		g[V[i]].push_back({U[i], W[i]});
	}
	array<vector<ll>, 2> dist;
	dist.fill(vector<ll>(N, -1));
	diDfs(X, 0, g, dist[0]);
	diDfs(Y, 0, g, dist[1]);
	int be = 2;
	for (int i = 0; i < 1 << 2*N; ++i) {
		ll su = 0;
		for (int j = 0; j < N; ++j) {
			if ((i & (1 << j)) && (i & (1 << (j + N)))) {
				su += max(dist[0][j], dist[1][j]);
			} else if (i & (1 << j)) su += dist[0][j];
			else if(i & (1 << (j + N))) su += dist[1][j];
		}
		if (su > K) continue;
		if (workDfs(X, X, true, g, i) && workDfs(Y, Y, true, g, i >> N)) be = max(be, __builtin_popcount(i));
	}
	return be;
}

Compilation message

closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:96:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Score>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   96 |  for (int i = 0; i < pos.size(); ++i) {
      |                  ~~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 440 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 83 ms 44476 KB Output is correct
2 Correct 90 ms 44720 KB Output is correct
3 Correct 54 ms 5456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 436 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 436 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 352 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 436 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 440 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 1 ms 352 KB Output is correct
24 Correct 0 ms 352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 436 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 352 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 436 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 440 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 1 ms 352 KB Output is correct
24 Correct 0 ms 352 KB Output is correct
25 Correct 1 ms 352 KB Output is correct
26 Correct 1 ms 1120 KB Output is correct
27 Correct 1 ms 864 KB Output is correct
28 Correct 1 ms 1116 KB Output is correct
29 Correct 1 ms 1112 KB Output is correct
30 Correct 1 ms 860 KB Output is correct
31 Correct 1 ms 1116 KB Output is correct
32 Correct 1 ms 1024 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 352 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 436 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 352 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 436 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 352 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 344 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 440 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 436 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 352 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 436 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 344 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 1 ms 352 KB Output is correct
25 Correct 0 ms 352 KB Output is correct
26 Correct 0 ms 352 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 440 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 1 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 1 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 1 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 1 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 1 ms 604 KB Output is correct
75 Correct 0 ms 352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 436 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 352 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 436 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 344 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 1 ms 352 KB Output is correct
25 Correct 0 ms 352 KB Output is correct
26 Correct 1 ms 352 KB Output is correct
27 Correct 1 ms 1120 KB Output is correct
28 Correct 1 ms 864 KB Output is correct
29 Correct 1 ms 1116 KB Output is correct
30 Correct 1 ms 1112 KB Output is correct
31 Correct 1 ms 860 KB Output is correct
32 Correct 1 ms 1116 KB Output is correct
33 Correct 1 ms 1024 KB Output is correct
34 Correct 0 ms 352 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 344 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 440 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 1 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 1 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 1 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 1 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 1 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 1 ms 604 KB Output is correct
83 Correct 0 ms 352 KB Output is correct
84 Correct 1 ms 352 KB Output is correct
85 Correct 1 ms 568 KB Output is correct
86 Correct 1 ms 352 KB Output is correct
87 Correct 1 ms 356 KB Output is correct
88 Correct 1 ms 360 KB Output is correct
89 Correct 2 ms 868 KB Output is correct
90 Correct 1 ms 776 KB Output is correct
91 Correct 2 ms 864 KB Output is correct
92 Correct 1 ms 868 KB Output is correct
93 Correct 1 ms 872 KB Output is correct
94 Correct 2 ms 1128 KB Output is correct
95 Correct 2 ms 1124 KB Output is correct
96 Correct 1 ms 972 KB Output is correct
97 Correct 2 ms 1116 KB Output is correct
98 Correct 2 ms 860 KB Output is correct
99 Correct 2 ms 860 KB Output is correct
100 Correct 1 ms 868 KB Output is correct
101 Correct 2 ms 360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 436 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 352 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 436 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 344 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 1 ms 352 KB Output is correct
25 Correct 0 ms 352 KB Output is correct
26 Correct 1 ms 352 KB Output is correct
27 Correct 1 ms 1120 KB Output is correct
28 Correct 1 ms 864 KB Output is correct
29 Correct 1 ms 1116 KB Output is correct
30 Correct 1 ms 1112 KB Output is correct
31 Correct 1 ms 860 KB Output is correct
32 Correct 1 ms 1116 KB Output is correct
33 Correct 1 ms 1024 KB Output is correct
34 Correct 0 ms 352 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 344 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 440 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 1 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 1 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 1 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 1 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 1 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 1 ms 604 KB Output is correct
83 Correct 0 ms 352 KB Output is correct
84 Correct 1 ms 352 KB Output is correct
85 Correct 1 ms 568 KB Output is correct
86 Correct 1 ms 352 KB Output is correct
87 Correct 1 ms 356 KB Output is correct
88 Correct 1 ms 360 KB Output is correct
89 Correct 2 ms 868 KB Output is correct
90 Correct 1 ms 776 KB Output is correct
91 Correct 2 ms 864 KB Output is correct
92 Correct 1 ms 868 KB Output is correct
93 Correct 1 ms 872 KB Output is correct
94 Correct 2 ms 1128 KB Output is correct
95 Correct 2 ms 1124 KB Output is correct
96 Correct 1 ms 972 KB Output is correct
97 Correct 2 ms 1116 KB Output is correct
98 Correct 2 ms 860 KB Output is correct
99 Correct 2 ms 860 KB Output is correct
100 Correct 1 ms 868 KB Output is correct
101 Correct 2 ms 360 KB Output is correct
102 Correct 69 ms 5552 KB Output is correct
103 Correct 65 ms 5464 KB Output is correct
104 Correct 143 ms 46416 KB Output is correct
105 Correct 68 ms 6800 KB Output is correct
106 Correct 81 ms 6812 KB Output is correct
107 Correct 80 ms 46256 KB Output is correct
108 Correct 83 ms 47220 KB Output is correct
109 Correct 54 ms 43152 KB Output is correct
110 Correct 130 ms 33788 KB Output is correct
111 Correct 84 ms 40932 KB Output is correct
112 Correct 111 ms 34592 KB Output is correct
113 Correct 89 ms 33920 KB Output is correct
114 Correct 90 ms 35168 KB Output is correct
115 Correct 84 ms 47200 KB Output is correct
116 Correct 104 ms 38520 KB Output is correct
117 Correct 114 ms 45948 KB Output is correct
118 Correct 125 ms 37172 KB Output is correct
119 Correct 97 ms 9692 KB Output is correct
120 Correct 75 ms 5000 KB Output is correct