Submission #1064196

# Submission time Handle Problem Language Result Execution time Memory
1064196 2024-08-18T10:14:40 Z AmirAli_H1 Closing Time (IOI23_closing) C++17
100 / 100
154 ms 47304 KB
// In the name of Allah

#include <bits/stdc++.h>
#include "closing.h"
using namespace std;

typedef			long long				ll;
typedef			pair<int, int>			pii;
typedef			pair<ll, ll>			pll;

#define			F						first
#define			S						second
#define			endl					'\n'
#define			sep						' '
#define			pb						push_back
#define			Mp						make_pair
#define			all(x)					(x).begin(),(x).end()
#define			len(x)					((ll) (x).size())

const int maxn = 4e5 + 7;

int n, u1, u2; ll R;
vector<pll> adj[maxn];
ll val[maxn], val1[maxn], val2[maxn];
ll sm1[maxn], sm2[maxn], mn1[maxn], mn2[maxn];
vector<ll> ls1; vector<pll> ls2;

void dfs(int v, int p = -1) {
	for (auto f : adj[v]) {
		int u = f.F; ll w = f.S;
		if (u == p) continue;
		val[u] = val[v] + w;
		dfs(u, v);
	}
}

int cal(ll R) {
	sort(all(ls1)); sort(all(ls2));
	
	for (int i = 0; i < len(ls1); i++) {
		if (i == 0) sm1[i] = ls1[i];
		else sm1[i] = sm1[i - 1] + ls1[i];
	}
	for (int i = 1; i <= len(ls2); i++) {
		sm2[i] = sm2[i - 1] + ls2[i - 1].F;
	}
	
	for (int i = 0; i < len(ls2); i++) {
		mn1[i] = ls2[i].S - ls2[i].F; mn2[i] = ls2[i].S;
	}
	for (int i = 1; i < len(ls2); i++) mn1[i] = min(mn1[i], mn1[i - 1]);
	for (int i = len(ls2) - 2; i >= 0; i--) mn2[i] = min(mn2[i], mn2[i + 1]);
	
	int ans = 0;
	for (int i = 0; i <= 2 * len(ls2); i++) {
		int x = i, j = i / 2;
		if (i % 2 == 0) {
			ll w = R - sm2[j];
			if (w >= 0) {
				x += upper_bound(sm1, sm1 + len(ls1), w) - sm1;
				ans = max(ans, x);
			}
		}
		else {
			ll wx = min(mn1[j] + ls2[j].F, mn2[j]);
			ll w = R - sm2[j] - wx;
			if (w >= 0) {
				x += upper_bound(sm1, sm1 + len(ls1), w) - sm1;
				ans = max(ans, x);
			}
		}
	}
	
	return ans;
}

int max_score(int N, int X, int Y, long long K, vector<int> U, vector<int> V, vector<int> W) {
	n = N; u1 = X; u2 = Y; R = K;
	for (int i = 0; i < n; i++) adj[i].clear();
	
	for (int i = 0; i < n - 1; i++) {
		int u = U[i], v = V[i]; ll w = W[i];
		adj[u].pb(Mp(v, w)); adj[v].pb(Mp(u, w));
	}
	
	val[u1] = 0; dfs(u1);
	for (int i = 0; i < n; i++) val1[i] = val[i];
	
	val[u2] = 0; dfs(u2);
	for (int i = 0; i < n; i++) val2[i] = val[i];
	
	for (int i = 0; i < n; i++) {
		if (2 * min(val1[i], val2[i]) <= max(val1[i], val2[i])) {
			ls1.pb(min(val1[i], val2[i]));
			ls1.pb(max(val1[i], val2[i]) - min(val1[i], val2[i]));
		}
		else {
			ls2.pb(Mp(max(val1[i], val2[i]), min(val1[i], val2[i])));
		}
	}
	
	int ans = 0;
	
	ls1.clear(); ls2.clear();
	for (int i = 0; i < n; i++) {
		ls1.pb(min(val1[i], val2[i]));
	}
	ans = max(ans, cal(R));
	
	ls1.clear(); ls2.clear();
	int x = 0; ll valx = R;
	for (int i = 0; i < n; i++) {
		if (val1[i] + val2[i] == val1[u2]) {
			valx -= min(val1[i], val2[i]); x++;
			ls1.pb(max(val1[i], val2[i]) - min(val1[i], val2[i]));
		}
		else {
			if (2 * min(val1[i], val2[i]) <= max(val1[i], val2[i])) {
				ls1.pb(min(val1[i], val2[i]));
				ls1.pb(max(val1[i], val2[i]) - min(val1[i], val2[i]));
			}
			else {
				ls2.pb(Mp(max(val1[i], val2[i]), min(val1[i], val2[i])));
			}
		}
	}
	if (valx >= 0) ans = max(ans, x + cal(valx));
	
	return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 103 ms 40552 KB Output is correct
2 Correct 119 ms 43496 KB Output is correct
3 Correct 52 ms 15288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9816 KB Output is correct
2 Correct 4 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9816 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 5 ms 9820 KB Output is correct
9 Correct 4 ms 9840 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9816 KB Output is correct
2 Correct 4 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9816 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 5 ms 9820 KB Output is correct
9 Correct 4 ms 9840 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 6 ms 9820 KB Output is correct
16 Correct 4 ms 9820 KB Output is correct
17 Correct 5 ms 9820 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9820 KB Output is correct
20 Correct 4 ms 9820 KB Output is correct
21 Correct 6 ms 9868 KB Output is correct
22 Correct 4 ms 9820 KB Output is correct
23 Correct 5 ms 9820 KB Output is correct
24 Correct 5 ms 9816 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9816 KB Output is correct
2 Correct 4 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9816 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 5 ms 9820 KB Output is correct
9 Correct 4 ms 9840 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 6 ms 9820 KB Output is correct
16 Correct 4 ms 9820 KB Output is correct
17 Correct 5 ms 9820 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9820 KB Output is correct
20 Correct 4 ms 9820 KB Output is correct
21 Correct 6 ms 9868 KB Output is correct
22 Correct 4 ms 9820 KB Output is correct
23 Correct 5 ms 9820 KB Output is correct
24 Correct 5 ms 9816 KB Output is correct
25 Correct 6 ms 9852 KB Output is correct
26 Correct 6 ms 10436 KB Output is correct
27 Correct 5 ms 10368 KB Output is correct
28 Correct 6 ms 10332 KB Output is correct
29 Correct 5 ms 10332 KB Output is correct
30 Correct 5 ms 10332 KB Output is correct
31 Correct 5 ms 10332 KB Output is correct
32 Correct 5 ms 10328 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
2 Correct 4 ms 9816 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9820 KB Output is correct
7 Correct 4 ms 9744 KB Output is correct
8 Correct 4 ms 9752 KB Output is correct
9 Correct 4 ms 9820 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 5 ms 9820 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9708 KB Output is correct
16 Correct 4 ms 9816 KB Output is correct
17 Correct 4 ms 9836 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9892 KB Output is correct
20 Correct 4 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 4 ms 9820 KB Output is correct
23 Correct 4 ms 9820 KB Output is correct
24 Correct 5 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
2 Correct 4 ms 9816 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9820 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 4 ms 9816 KB Output is correct
9 Correct 5 ms 9820 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9840 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9820 KB Output is correct
16 Correct 6 ms 9820 KB Output is correct
17 Correct 4 ms 9820 KB Output is correct
18 Correct 5 ms 9820 KB Output is correct
19 Correct 4 ms 9744 KB Output is correct
20 Correct 4 ms 9752 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 4 ms 9840 KB Output is correct
23 Correct 5 ms 9820 KB Output is correct
24 Correct 4 ms 9820 KB Output is correct
25 Correct 4 ms 9820 KB Output is correct
26 Correct 4 ms 9820 KB Output is correct
27 Correct 4 ms 9708 KB Output is correct
28 Correct 4 ms 9816 KB Output is correct
29 Correct 4 ms 9836 KB Output is correct
30 Correct 4 ms 9820 KB Output is correct
31 Correct 4 ms 9892 KB Output is correct
32 Correct 4 ms 9820 KB Output is correct
33 Correct 4 ms 9820 KB Output is correct
34 Correct 4 ms 9820 KB Output is correct
35 Correct 4 ms 9820 KB Output is correct
36 Correct 5 ms 9820 KB Output is correct
37 Correct 7 ms 9820 KB Output is correct
38 Correct 4 ms 9820 KB Output is correct
39 Correct 4 ms 9816 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 5 ms 9820 KB Output is correct
42 Correct 4 ms 9820 KB Output is correct
43 Correct 4 ms 9820 KB Output is correct
44 Correct 4 ms 9816 KB Output is correct
45 Correct 4 ms 9820 KB Output is correct
46 Correct 4 ms 9816 KB Output is correct
47 Correct 4 ms 9732 KB Output is correct
48 Correct 4 ms 9720 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
2 Correct 4 ms 9816 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9820 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 4 ms 9816 KB Output is correct
9 Correct 5 ms 9820 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9840 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9820 KB Output is correct
16 Correct 6 ms 9820 KB Output is correct
17 Correct 4 ms 9820 KB Output is correct
18 Correct 5 ms 9820 KB Output is correct
19 Correct 4 ms 9820 KB Output is correct
20 Correct 4 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 6 ms 9868 KB Output is correct
23 Correct 4 ms 9820 KB Output is correct
24 Correct 5 ms 9820 KB Output is correct
25 Correct 5 ms 9816 KB Output is correct
26 Correct 4 ms 9744 KB Output is correct
27 Correct 4 ms 9752 KB Output is correct
28 Correct 4 ms 9820 KB Output is correct
29 Correct 4 ms 9840 KB Output is correct
30 Correct 5 ms 9820 KB Output is correct
31 Correct 4 ms 9820 KB Output is correct
32 Correct 4 ms 9820 KB Output is correct
33 Correct 4 ms 9820 KB Output is correct
34 Correct 4 ms 9708 KB Output is correct
35 Correct 4 ms 9816 KB Output is correct
36 Correct 4 ms 9836 KB Output is correct
37 Correct 4 ms 9820 KB Output is correct
38 Correct 4 ms 9892 KB Output is correct
39 Correct 4 ms 9820 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 4 ms 9820 KB Output is correct
42 Correct 4 ms 9820 KB Output is correct
43 Correct 5 ms 9820 KB Output is correct
44 Correct 7 ms 9820 KB Output is correct
45 Correct 4 ms 9820 KB Output is correct
46 Correct 4 ms 9816 KB Output is correct
47 Correct 4 ms 9820 KB Output is correct
48 Correct 5 ms 9820 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
51 Correct 4 ms 9816 KB Output is correct
52 Correct 4 ms 9820 KB Output is correct
53 Correct 4 ms 9816 KB Output is correct
54 Correct 4 ms 9732 KB Output is correct
55 Correct 4 ms 9720 KB Output is correct
56 Correct 4 ms 9820 KB Output is correct
57 Correct 4 ms 9820 KB Output is correct
58 Correct 4 ms 9820 KB Output is correct
59 Correct 4 ms 9844 KB Output is correct
60 Correct 4 ms 9820 KB Output is correct
61 Correct 4 ms 9820 KB Output is correct
62 Correct 6 ms 10076 KB Output is correct
63 Correct 5 ms 9820 KB Output is correct
64 Correct 4 ms 9820 KB Output is correct
65 Correct 4 ms 9820 KB Output is correct
66 Correct 4 ms 9820 KB Output is correct
67 Correct 4 ms 9820 KB Output is correct
68 Correct 4 ms 9820 KB Output is correct
69 Correct 4 ms 9832 KB Output is correct
70 Correct 4 ms 9940 KB Output is correct
71 Correct 4 ms 9820 KB Output is correct
72 Correct 5 ms 9848 KB Output is correct
73 Correct 5 ms 9820 KB Output is correct
74 Correct 5 ms 9844 KB Output is correct
75 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
2 Correct 4 ms 9816 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9820 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 4 ms 9816 KB Output is correct
9 Correct 5 ms 9820 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9840 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9820 KB Output is correct
16 Correct 6 ms 9820 KB Output is correct
17 Correct 4 ms 9820 KB Output is correct
18 Correct 5 ms 9820 KB Output is correct
19 Correct 4 ms 9820 KB Output is correct
20 Correct 4 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 6 ms 9868 KB Output is correct
23 Correct 4 ms 9820 KB Output is correct
24 Correct 5 ms 9820 KB Output is correct
25 Correct 5 ms 9816 KB Output is correct
26 Correct 6 ms 9852 KB Output is correct
27 Correct 6 ms 10436 KB Output is correct
28 Correct 5 ms 10368 KB Output is correct
29 Correct 6 ms 10332 KB Output is correct
30 Correct 5 ms 10332 KB Output is correct
31 Correct 5 ms 10332 KB Output is correct
32 Correct 5 ms 10332 KB Output is correct
33 Correct 5 ms 10328 KB Output is correct
34 Correct 4 ms 9744 KB Output is correct
35 Correct 4 ms 9752 KB Output is correct
36 Correct 4 ms 9820 KB Output is correct
37 Correct 4 ms 9840 KB Output is correct
38 Correct 5 ms 9820 KB Output is correct
39 Correct 4 ms 9820 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 4 ms 9820 KB Output is correct
42 Correct 4 ms 9708 KB Output is correct
43 Correct 4 ms 9816 KB Output is correct
44 Correct 4 ms 9836 KB Output is correct
45 Correct 4 ms 9820 KB Output is correct
46 Correct 4 ms 9892 KB Output is correct
47 Correct 4 ms 9820 KB Output is correct
48 Correct 4 ms 9820 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
51 Correct 5 ms 9820 KB Output is correct
52 Correct 7 ms 9820 KB Output is correct
53 Correct 4 ms 9820 KB Output is correct
54 Correct 4 ms 9816 KB Output is correct
55 Correct 4 ms 9820 KB Output is correct
56 Correct 5 ms 9820 KB Output is correct
57 Correct 4 ms 9820 KB Output is correct
58 Correct 4 ms 9820 KB Output is correct
59 Correct 4 ms 9816 KB Output is correct
60 Correct 4 ms 9820 KB Output is correct
61 Correct 4 ms 9816 KB Output is correct
62 Correct 4 ms 9732 KB Output is correct
63 Correct 4 ms 9720 KB Output is correct
64 Correct 4 ms 9820 KB Output is correct
65 Correct 4 ms 9820 KB Output is correct
66 Correct 4 ms 9820 KB Output is correct
67 Correct 4 ms 9844 KB Output is correct
68 Correct 4 ms 9820 KB Output is correct
69 Correct 4 ms 9820 KB Output is correct
70 Correct 6 ms 10076 KB Output is correct
71 Correct 5 ms 9820 KB Output is correct
72 Correct 4 ms 9820 KB Output is correct
73 Correct 4 ms 9820 KB Output is correct
74 Correct 4 ms 9820 KB Output is correct
75 Correct 4 ms 9820 KB Output is correct
76 Correct 4 ms 9820 KB Output is correct
77 Correct 4 ms 9832 KB Output is correct
78 Correct 4 ms 9940 KB Output is correct
79 Correct 4 ms 9820 KB Output is correct
80 Correct 5 ms 9848 KB Output is correct
81 Correct 5 ms 9820 KB Output is correct
82 Correct 5 ms 9844 KB Output is correct
83 Correct 4 ms 9820 KB Output is correct
84 Correct 5 ms 9820 KB Output is correct
85 Correct 6 ms 9816 KB Output is correct
86 Correct 4 ms 9820 KB Output is correct
87 Correct 7 ms 9820 KB Output is correct
88 Correct 5 ms 9820 KB Output is correct
89 Correct 7 ms 10368 KB Output is correct
90 Correct 5 ms 10328 KB Output is correct
91 Correct 6 ms 10332 KB Output is correct
92 Correct 5 ms 10364 KB Output is correct
93 Correct 5 ms 10332 KB Output is correct
94 Correct 6 ms 10332 KB Output is correct
95 Correct 5 ms 10332 KB Output is correct
96 Correct 5 ms 10332 KB Output is correct
97 Correct 5 ms 10136 KB Output is correct
98 Correct 5 ms 10332 KB Output is correct
99 Correct 5 ms 10360 KB Output is correct
100 Correct 5 ms 10076 KB Output is correct
101 Correct 6 ms 10076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
2 Correct 4 ms 9816 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9820 KB Output is correct
6 Correct 4 ms 9820 KB Output is correct
7 Correct 4 ms 9816 KB Output is correct
8 Correct 4 ms 9816 KB Output is correct
9 Correct 5 ms 9820 KB Output is correct
10 Correct 4 ms 9840 KB Output is correct
11 Correct 4 ms 9840 KB Output is correct
12 Correct 4 ms 9820 KB Output is correct
13 Correct 4 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9820 KB Output is correct
16 Correct 6 ms 9820 KB Output is correct
17 Correct 4 ms 9820 KB Output is correct
18 Correct 5 ms 9820 KB Output is correct
19 Correct 4 ms 9820 KB Output is correct
20 Correct 4 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 6 ms 9868 KB Output is correct
23 Correct 4 ms 9820 KB Output is correct
24 Correct 5 ms 9820 KB Output is correct
25 Correct 5 ms 9816 KB Output is correct
26 Correct 6 ms 9852 KB Output is correct
27 Correct 6 ms 10436 KB Output is correct
28 Correct 5 ms 10368 KB Output is correct
29 Correct 6 ms 10332 KB Output is correct
30 Correct 5 ms 10332 KB Output is correct
31 Correct 5 ms 10332 KB Output is correct
32 Correct 5 ms 10332 KB Output is correct
33 Correct 5 ms 10328 KB Output is correct
34 Correct 4 ms 9744 KB Output is correct
35 Correct 4 ms 9752 KB Output is correct
36 Correct 4 ms 9820 KB Output is correct
37 Correct 4 ms 9840 KB Output is correct
38 Correct 5 ms 9820 KB Output is correct
39 Correct 4 ms 9820 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 4 ms 9820 KB Output is correct
42 Correct 4 ms 9708 KB Output is correct
43 Correct 4 ms 9816 KB Output is correct
44 Correct 4 ms 9836 KB Output is correct
45 Correct 4 ms 9820 KB Output is correct
46 Correct 4 ms 9892 KB Output is correct
47 Correct 4 ms 9820 KB Output is correct
48 Correct 4 ms 9820 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
51 Correct 5 ms 9820 KB Output is correct
52 Correct 7 ms 9820 KB Output is correct
53 Correct 4 ms 9820 KB Output is correct
54 Correct 4 ms 9816 KB Output is correct
55 Correct 4 ms 9820 KB Output is correct
56 Correct 5 ms 9820 KB Output is correct
57 Correct 4 ms 9820 KB Output is correct
58 Correct 4 ms 9820 KB Output is correct
59 Correct 4 ms 9816 KB Output is correct
60 Correct 4 ms 9820 KB Output is correct
61 Correct 4 ms 9816 KB Output is correct
62 Correct 4 ms 9732 KB Output is correct
63 Correct 4 ms 9720 KB Output is correct
64 Correct 4 ms 9820 KB Output is correct
65 Correct 4 ms 9820 KB Output is correct
66 Correct 4 ms 9820 KB Output is correct
67 Correct 4 ms 9844 KB Output is correct
68 Correct 4 ms 9820 KB Output is correct
69 Correct 4 ms 9820 KB Output is correct
70 Correct 6 ms 10076 KB Output is correct
71 Correct 5 ms 9820 KB Output is correct
72 Correct 4 ms 9820 KB Output is correct
73 Correct 4 ms 9820 KB Output is correct
74 Correct 4 ms 9820 KB Output is correct
75 Correct 4 ms 9820 KB Output is correct
76 Correct 4 ms 9820 KB Output is correct
77 Correct 4 ms 9832 KB Output is correct
78 Correct 4 ms 9940 KB Output is correct
79 Correct 4 ms 9820 KB Output is correct
80 Correct 5 ms 9848 KB Output is correct
81 Correct 5 ms 9820 KB Output is correct
82 Correct 5 ms 9844 KB Output is correct
83 Correct 4 ms 9820 KB Output is correct
84 Correct 5 ms 9820 KB Output is correct
85 Correct 6 ms 9816 KB Output is correct
86 Correct 4 ms 9820 KB Output is correct
87 Correct 7 ms 9820 KB Output is correct
88 Correct 5 ms 9820 KB Output is correct
89 Correct 7 ms 10368 KB Output is correct
90 Correct 5 ms 10328 KB Output is correct
91 Correct 6 ms 10332 KB Output is correct
92 Correct 5 ms 10364 KB Output is correct
93 Correct 5 ms 10332 KB Output is correct
94 Correct 6 ms 10332 KB Output is correct
95 Correct 5 ms 10332 KB Output is correct
96 Correct 5 ms 10332 KB Output is correct
97 Correct 5 ms 10136 KB Output is correct
98 Correct 5 ms 10332 KB Output is correct
99 Correct 5 ms 10360 KB Output is correct
100 Correct 5 ms 10076 KB Output is correct
101 Correct 6 ms 10076 KB Output is correct
102 Correct 57 ms 14936 KB Output is correct
103 Correct 63 ms 15132 KB Output is correct
104 Correct 126 ms 42996 KB Output is correct
105 Correct 71 ms 17008 KB Output is correct
106 Correct 80 ms 16588 KB Output is correct
107 Correct 57 ms 35516 KB Output is correct
108 Correct 61 ms 36240 KB Output is correct
109 Correct 69 ms 41028 KB Output is correct
110 Correct 145 ms 46780 KB Output is correct
111 Correct 90 ms 47304 KB Output is correct
112 Correct 130 ms 46064 KB Output is correct
113 Correct 115 ms 40592 KB Output is correct
114 Correct 121 ms 45240 KB Output is correct
115 Correct 88 ms 41840 KB Output is correct
116 Correct 125 ms 46912 KB Output is correct
117 Correct 119 ms 39884 KB Output is correct
118 Correct 154 ms 46280 KB Output is correct
119 Correct 77 ms 20528 KB Output is correct
120 Correct 56 ms 14420 KB Output is correct