답안 #842467

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
842467 2023-09-02T23:22:17 Z omeganot 봉쇄 시간 (IOI23_closing) C++17
75 / 100
1000 ms 578448 KB
#include <bits/stdc++.h>

using namespace std;

using ll = long long;
const int MOD = 1E9 + 7;
const int INF = 1E9; const ll INFLL = 1E18;

void dfs(int x, vector<vector<array<int, 2>>>& adj, vector<ll>& w, int p) {
	for(array<int, 2> i : adj[x]) {
		if(i[0] != p) {
			w[i[0]] = w[x] + i[1];
			dfs(i[0], adj, w, x);
		}
	}
}

vector<array<ll, 4>> merge(vector<array<ll, 4>> dp, vector<array<ll, 4>> dp2) {
	vector<array<ll, 4>> dp3(dp.size() + dp2.size() - 1, {INFLL, INFLL, INFLL, INFLL});
	for(int i = 0; i < dp.size(); i++) {
		for(int j = 0; j < dp2.size(); j++) {
			for(int k = 0; k < 4; k++) {
				if(dp[i][k] == INFLL) {
					continue;
				}
				for(int l = 0; l < 4; l++) {
					if((k & l) == l) {
						dp3[i + j][k] = min(dp3[i + j][k], dp[i][k] + dp2[j][l]);
					}
				}
			}
		}
	}
	return dp3;
}

vector<array<ll, 4>> merge2(vector<array<ll, 4>> dp, vector<array<ll, 4>> dp2) {
	vector<array<ll, 4>> dp3(dp.size() + dp2.size() - 1, {INFLL, INFLL, INFLL, INFLL});
	for(int i = 0; i < dp.size(); i++) {
		for(int j = 0; j < dp2.size(); j++) {
			for(int k = 0; k < 4; k++) {
				if(dp[i][k] == INFLL) {
					continue;
				}
				for(int l = 0; l < 4; l++) {
					if((k & 1) >= (l & 1) && (l & 2) >= (k & 2)) {
						dp3[i + j][k] = min(dp3[i + j][k], dp[i][k] + dp2[j][l]);
					}
				}
			}
		}
	}
	return dp3;
}

void dfs2(int x, vector<vector<array<int, 2>>>& adj, vector<ll>& wX, vector<ll>& wY, vector<vector<array<ll, 4>>>& dp, int p) {
	array<int, 4> force = {0, 0, 0, 0};
	if(p != -1) {
		force[1] = 1; force[3] = 1;
		if(wY[p] < wY[x]) {
			force[2] = 2; force[3] |= 2;
		}
	}
	dp[x].resize(3); dp[x][0] = {0, INFLL, INFLL, INFLL}; dp[x][1] = {INFLL, wX[x], wY[x], INFLL}; dp[x][2] = {INFLL, INFLL, INFLL, max(wX[x], wY[x])};
	for(array<int, 2> i : adj[x]) {
		if(i[0] != p) {
			dfs2(i[0], adj, wX, wY, dp, x);
			if(wY[i[0]] >= wY[x]) {
				dp[x] = merge(dp[x], dp[i[0]]);
			} else {
				dp[x] = merge2(dp[x], dp[i[0]]);
			}
		}
	}
}

int max_score(int N, int X, int Y, ll K, vector<int> U, vector<int> V, vector<int> W) {
	vector<vector<array<int, 2>>> adj(N);
	for(int i = 0; i + 1 < N; i++) {
		adj[U[i]].push_back({V[i], W[i]});
		adj[V[i]].push_back({U[i], W[i]});
	}
	vector<ll> wX(N + 1); vector<ll> wY(N + 1);
	dfs(X, adj, wX, -1); dfs(Y, adj, wY, -1);
	vector<vector<array<ll, 4>>> dp(N);
	dfs2(X, adj, wX, wY, dp, -1);
	for(int i = 2 * N; i >= 2; i--) {
		if(min(dp[X][i][1], dp[X][i][3]) <= K) {
			return i;
		} 
	}
	return 0;
}

Compilation message

closing.cpp: In function 'std::vector<std::array<long long int, 4> > merge(std::vector<std::array<long long int, 4> >, std::vector<std::array<long long int, 4> >)':
closing.cpp:20:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<long long int, 4> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |  for(int i = 0; i < dp.size(); i++) {
      |                 ~~^~~~~~~~~~~
closing.cpp:21:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<long long int, 4> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |   for(int j = 0; j < dp2.size(); j++) {
      |                  ~~^~~~~~~~~~~~
closing.cpp: In function 'std::vector<std::array<long long int, 4> > merge2(std::vector<std::array<long long int, 4> >, std::vector<std::array<long long int, 4> >)':
closing.cpp:39:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<long long int, 4> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   39 |  for(int i = 0; i < dp.size(); i++) {
      |                 ~~^~~~~~~~~~~
closing.cpp:40:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<long long int, 4> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   40 |   for(int j = 0; j < dp2.size(); j++) {
      |                  ~~^~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1039 ms 578448 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 1 ms 600 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 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 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 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 1 ms 600 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 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 1 ms 348 KB Output is correct
12 Correct 1 ms 864 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 8 ms 5468 KB Output is correct
20 Correct 9 ms 6492 KB Output is correct
21 Correct 9 ms 5544 KB Output is correct
22 Correct 11 ms 8284 KB Output is correct
23 Correct 11 ms 8284 KB Output is correct
24 Correct 11 ms 8284 KB Output is correct
# 결과 실행 시간 메모리 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 1 ms 600 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 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 1 ms 348 KB Output is correct
12 Correct 1 ms 864 KB Output is correct
13 Correct 1 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 8 ms 5468 KB Output is correct
20 Correct 9 ms 6492 KB Output is correct
21 Correct 9 ms 5544 KB Output is correct
22 Correct 11 ms 8284 KB Output is correct
23 Correct 11 ms 8284 KB Output is correct
24 Correct 11 ms 8284 KB Output is correct
25 Correct 6 ms 604 KB Output is correct
26 Correct 284 ms 163436 KB Output is correct
27 Correct 226 ms 143236 KB Output is correct
28 Correct 296 ms 249984 KB Output is correct
29 Correct 266 ms 187472 KB Output is correct
30 Correct 212 ms 125784 KB Output is correct
31 Correct 327 ms 285588 KB Output is correct
32 Correct 333 ms 285460 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 1 ms 600 KB Output is correct
6 Correct 0 ms 348 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 348 KB Output is correct
12 Correct 0 ms 348 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 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 344 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
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 1 ms 600 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 1 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 1 ms 348 KB Output is correct
13 Correct 1 ms 864 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 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
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 0 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 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 1 ms 604 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 1 ms 860 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 604 KB Output is correct
47 Correct 1 ms 344 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 1 ms 600 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 1 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 1 ms 348 KB Output is correct
13 Correct 1 ms 864 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 8 ms 5468 KB Output is correct
21 Correct 9 ms 6492 KB Output is correct
22 Correct 9 ms 5544 KB Output is correct
23 Correct 11 ms 8284 KB Output is correct
24 Correct 11 ms 8284 KB Output is correct
25 Correct 11 ms 8284 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 0 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 344 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 1 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 1 ms 604 KB Output is correct
47 Correct 1 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 1 ms 860 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 1 ms 604 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 1 ms 344 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 1 ms 344 KB Output is correct
58 Correct 1 ms 348 KB Output is correct
59 Correct 2 ms 348 KB Output is correct
60 Correct 3 ms 708 KB Output is correct
61 Correct 3 ms 736 KB Output is correct
62 Correct 3 ms 768 KB Output is correct
63 Correct 5 ms 1116 KB Output is correct
64 Correct 6 ms 1628 KB Output is correct
65 Correct 5 ms 1372 KB Output is correct
66 Correct 5 ms 1216 KB Output is correct
67 Correct 6 ms 1368 KB Output is correct
68 Correct 11 ms 12380 KB Output is correct
69 Correct 13 ms 12380 KB Output is correct
70 Correct 8 ms 4828 KB Output is correct
71 Correct 7 ms 5980 KB Output is correct
72 Correct 6 ms 1116 KB Output is correct
73 Correct 4 ms 860 KB Output is correct
74 Correct 4 ms 604 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 1 ms 600 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 1 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 1 ms 348 KB Output is correct
13 Correct 1 ms 864 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 8 ms 5468 KB Output is correct
21 Correct 9 ms 6492 KB Output is correct
22 Correct 9 ms 5544 KB Output is correct
23 Correct 11 ms 8284 KB Output is correct
24 Correct 11 ms 8284 KB Output is correct
25 Correct 11 ms 8284 KB Output is correct
26 Correct 6 ms 604 KB Output is correct
27 Correct 284 ms 163436 KB Output is correct
28 Correct 226 ms 143236 KB Output is correct
29 Correct 296 ms 249984 KB Output is correct
30 Correct 266 ms 187472 KB Output is correct
31 Correct 212 ms 125784 KB Output is correct
32 Correct 327 ms 285588 KB Output is correct
33 Correct 333 ms 285460 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 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 344 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 1 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 1 ms 604 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 1 ms 348 KB Output is correct
57 Correct 1 ms 348 KB Output is correct
58 Correct 1 ms 860 KB Output is correct
59 Correct 1 ms 348 KB Output is correct
60 Correct 1 ms 604 KB Output is correct
61 Correct 1 ms 604 KB Output is correct
62 Correct 1 ms 344 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 344 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 2 ms 348 KB Output is correct
68 Correct 3 ms 708 KB Output is correct
69 Correct 3 ms 736 KB Output is correct
70 Correct 3 ms 768 KB Output is correct
71 Correct 5 ms 1116 KB Output is correct
72 Correct 6 ms 1628 KB Output is correct
73 Correct 5 ms 1372 KB Output is correct
74 Correct 5 ms 1216 KB Output is correct
75 Correct 6 ms 1368 KB Output is correct
76 Correct 11 ms 12380 KB Output is correct
77 Correct 13 ms 12380 KB Output is correct
78 Correct 8 ms 4828 KB Output is correct
79 Correct 7 ms 5980 KB Output is correct
80 Correct 6 ms 1116 KB Output is correct
81 Correct 4 ms 860 KB Output is correct
82 Correct 4 ms 604 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 6 ms 348 KB Output is correct
85 Correct 19 ms 792 KB Output is correct
86 Correct 15 ms 1016 KB Output is correct
87 Correct 16 ms 780 KB Output is correct
88 Correct 17 ms 784 KB Output is correct
89 Correct 168 ms 16936 KB Output is correct
90 Correct 141 ms 12872 KB Output is correct
91 Correct 199 ms 31220 KB Output is correct
92 Correct 164 ms 21312 KB Output is correct
93 Correct 178 ms 25960 KB Output is correct
94 Correct 353 ms 386696 KB Output is correct
95 Correct 380 ms 432688 KB Output is correct
96 Correct 272 ms 215928 KB Output is correct
97 Correct 271 ms 173420 KB Output is correct
98 Correct 178 ms 5372 KB Output is correct
99 Correct 165 ms 5148 KB Output is correct
100 Correct 92 ms 2476 KB Output is correct
101 Correct 26 ms 1104 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 1 ms 600 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 1 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 1 ms 348 KB Output is correct
13 Correct 1 ms 864 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 8 ms 5468 KB Output is correct
21 Correct 9 ms 6492 KB Output is correct
22 Correct 9 ms 5544 KB Output is correct
23 Correct 11 ms 8284 KB Output is correct
24 Correct 11 ms 8284 KB Output is correct
25 Correct 11 ms 8284 KB Output is correct
26 Correct 6 ms 604 KB Output is correct
27 Correct 284 ms 163436 KB Output is correct
28 Correct 226 ms 143236 KB Output is correct
29 Correct 296 ms 249984 KB Output is correct
30 Correct 266 ms 187472 KB Output is correct
31 Correct 212 ms 125784 KB Output is correct
32 Correct 327 ms 285588 KB Output is correct
33 Correct 333 ms 285460 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 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 344 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 1 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 1 ms 604 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 1 ms 348 KB Output is correct
57 Correct 1 ms 348 KB Output is correct
58 Correct 1 ms 860 KB Output is correct
59 Correct 1 ms 348 KB Output is correct
60 Correct 1 ms 604 KB Output is correct
61 Correct 1 ms 604 KB Output is correct
62 Correct 1 ms 344 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 344 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 2 ms 348 KB Output is correct
68 Correct 3 ms 708 KB Output is correct
69 Correct 3 ms 736 KB Output is correct
70 Correct 3 ms 768 KB Output is correct
71 Correct 5 ms 1116 KB Output is correct
72 Correct 6 ms 1628 KB Output is correct
73 Correct 5 ms 1372 KB Output is correct
74 Correct 5 ms 1216 KB Output is correct
75 Correct 6 ms 1368 KB Output is correct
76 Correct 11 ms 12380 KB Output is correct
77 Correct 13 ms 12380 KB Output is correct
78 Correct 8 ms 4828 KB Output is correct
79 Correct 7 ms 5980 KB Output is correct
80 Correct 6 ms 1116 KB Output is correct
81 Correct 4 ms 860 KB Output is correct
82 Correct 4 ms 604 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 6 ms 348 KB Output is correct
85 Correct 19 ms 792 KB Output is correct
86 Correct 15 ms 1016 KB Output is correct
87 Correct 16 ms 780 KB Output is correct
88 Correct 17 ms 784 KB Output is correct
89 Correct 168 ms 16936 KB Output is correct
90 Correct 141 ms 12872 KB Output is correct
91 Correct 199 ms 31220 KB Output is correct
92 Correct 164 ms 21312 KB Output is correct
93 Correct 178 ms 25960 KB Output is correct
94 Correct 353 ms 386696 KB Output is correct
95 Correct 380 ms 432688 KB Output is correct
96 Correct 272 ms 215928 KB Output is correct
97 Correct 271 ms 173420 KB Output is correct
98 Correct 178 ms 5372 KB Output is correct
99 Correct 165 ms 5148 KB Output is correct
100 Correct 92 ms 2476 KB Output is correct
101 Correct 26 ms 1104 KB Output is correct
102 Correct 587 ms 3408 KB Output is correct
103 Execution timed out 1054 ms 3772 KB Time limit exceeded
104 Halted 0 ms 0 KB -