답안 #1074746

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1074746 2024-08-25T13:35:45 Z socpite Uplifting Excursion (BOI22_vault) C++17
80 / 100
590 ms 37248 KB
#include<bits/stdc++.h>
using namespace std;

const long long INF = 1e18;
const int maxn = 105;

long long A[2*maxn], inp[2*maxn];

int bs_A[2*maxn][65];

long long dp[maxn][4*maxn*maxn];
long long tmp[4*maxn*maxn];

int main(){
	int m;
	long long L;
	cin >> m >> L;
	for(int i = 0; i <= 2*m; i++)cin >> A[i];
	if(L < 0){
		L*=-1;
		for(int i = 1; i <= m; i++)swap(A[m-i], A[m+i]);
	}
	for(int i = 0; i <= 2*m; i++){
		if(i == m)continue;
		for(int j = 0; j <= 60; j++){
			if(A[i] == 0)break;
			bs_A[i][j] = A[i]&1 ? 1 : 2;
			A[i] = (A[i]-1)/2;
		}
	}
	int sum = m*(m+1)*2;
	memset(dp, -1, sizeof(dp));
	dp[1][sum] = 0;
	for(int b = 0; b <= 60; b++){
		for(int i = 1; i <= m; i++){
			for(int j = 0; j <= 2*sum; j++){
				if(dp[i][j] == -1)continue;
				for(int p_val = 0; p_val <= bs_A[m+i][b]; p_val++){
					for(int n_val = 0; n_val <= bs_A[m-i][b]; n_val++){
						int nw = j + (p_val - n_val)*i;
						long long cost = p_val + n_val;
						cost <<= b;
						assert(0 <= nw && nw <= 2*sum);
						dp[i+1][nw] = max(dp[i+1][nw], dp[i][j] + cost);
					}
				}
			}
		}
		for(int j = 0; j <= 2*sum; j++)tmp[j] = -1; 
		for(int i = 0; i <= 2*sum; i++){
			if(((i&1)^(sum&1)) != ((L>>b)&1))continue;
			int ri = i - sum, pos;
			if(ri < 0)pos = (ri-1)/2 + sum;
			else pos = ri/2 + sum;
			assert(pos >= 0 && pos <= 2*sum);
			tmp[pos] = max(tmp[pos], dp[m+1][i]);
		}
		for(int i = 2; i <= m+1; i++){
			for(int j = 0; j <= 2*sum; j++)dp[i][j] = -1;
		}
		for(int i = 0; i <= 2*sum; i++)dp[1][i] = tmp[i];
	}
	if(dp[1][sum] == -1)cout << "impossible";
	else cout << dp[1][sum] + A[m];
}
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 36700 KB Output is correct
2 Correct 14 ms 36664 KB Output is correct
3 Correct 12 ms 36700 KB Output is correct
4 Correct 12 ms 36700 KB Output is correct
5 Correct 58 ms 36772 KB Output is correct
6 Correct 59 ms 36700 KB Output is correct
7 Correct 60 ms 36696 KB Output is correct
8 Correct 54 ms 36700 KB Output is correct
9 Correct 58 ms 36696 KB Output is correct
10 Correct 49 ms 36660 KB Output is correct
11 Correct 50 ms 36700 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 36700 KB Output is correct
2 Correct 14 ms 36664 KB Output is correct
3 Correct 12 ms 36700 KB Output is correct
4 Correct 12 ms 36700 KB Output is correct
5 Correct 58 ms 36772 KB Output is correct
6 Correct 59 ms 36700 KB Output is correct
7 Correct 60 ms 36696 KB Output is correct
8 Correct 54 ms 36700 KB Output is correct
9 Correct 58 ms 36696 KB Output is correct
10 Correct 49 ms 36660 KB Output is correct
11 Correct 50 ms 36700 KB Output is correct
12 Correct 12 ms 36440 KB Output is correct
13 Correct 16 ms 36952 KB Output is correct
14 Correct 13 ms 36700 KB Output is correct
15 Correct 13 ms 36468 KB Output is correct
16 Correct 64 ms 36716 KB Output is correct
17 Correct 55 ms 36700 KB Output is correct
18 Correct 51 ms 36772 KB Output is correct
19 Correct 55 ms 36700 KB Output is correct
20 Correct 58 ms 36568 KB Output is correct
21 Correct 49 ms 36700 KB Output is correct
22 Correct 49 ms 36752 KB Output is correct
23 Correct 403 ms 36952 KB Output is correct
24 Correct 408 ms 36944 KB Output is correct
25 Correct 352 ms 36956 KB Output is correct
26 Correct 484 ms 37000 KB Output is correct
27 Correct 456 ms 37204 KB Output is correct
28 Correct 339 ms 36988 KB Output is correct
29 Correct 347 ms 36944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 36700 KB Output is correct
2 Correct 25 ms 36732 KB Output is correct
3 Correct 25 ms 36700 KB Output is correct
4 Correct 24 ms 36700 KB Output is correct
5 Correct 24 ms 36520 KB Output is correct
6 Correct 23 ms 36700 KB Output is correct
7 Correct 22 ms 36700 KB Output is correct
8 Correct 22 ms 36616 KB Output is correct
9 Correct 22 ms 36700 KB Output is correct
10 Correct 23 ms 36700 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 36700 KB Output is correct
2 Correct 25 ms 36732 KB Output is correct
3 Correct 25 ms 36700 KB Output is correct
4 Correct 24 ms 36700 KB Output is correct
5 Correct 24 ms 36520 KB Output is correct
6 Correct 23 ms 36700 KB Output is correct
7 Correct 22 ms 36700 KB Output is correct
8 Correct 22 ms 36616 KB Output is correct
9 Correct 22 ms 36700 KB Output is correct
10 Correct 23 ms 36700 KB Output is correct
11 Correct 14 ms 36444 KB Output is correct
12 Correct 14 ms 36580 KB Output is correct
13 Correct 13 ms 36444 KB Output is correct
14 Correct 14 ms 36552 KB Output is correct
15 Correct 24 ms 36532 KB Output is correct
16 Correct 23 ms 36700 KB Output is correct
17 Correct 24 ms 36584 KB Output is correct
18 Correct 25 ms 36700 KB Output is correct
19 Correct 23 ms 36696 KB Output is correct
20 Correct 24 ms 36700 KB Output is correct
21 Correct 22 ms 36572 KB Output is correct
22 Correct 27 ms 36696 KB Output is correct
23 Correct 23 ms 36700 KB Output is correct
24 Correct 28 ms 36728 KB Output is correct
25 Correct 23 ms 36700 KB Output is correct
26 Correct 28 ms 36700 KB Output is correct
27 Correct 25 ms 36664 KB Output is correct
28 Correct 28 ms 36700 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 36700 KB Output is correct
2 Correct 25 ms 36732 KB Output is correct
3 Correct 25 ms 36700 KB Output is correct
4 Correct 24 ms 36700 KB Output is correct
5 Correct 24 ms 36520 KB Output is correct
6 Correct 23 ms 36700 KB Output is correct
7 Correct 22 ms 36700 KB Output is correct
8 Correct 22 ms 36616 KB Output is correct
9 Correct 22 ms 36700 KB Output is correct
10 Correct 23 ms 36700 KB Output is correct
11 Correct 14 ms 36696 KB Output is correct
12 Correct 24 ms 36952 KB Output is correct
13 Correct 22 ms 36700 KB Output is correct
14 Correct 23 ms 36700 KB Output is correct
15 Correct 30 ms 36696 KB Output is correct
16 Correct 28 ms 36700 KB Output is correct
17 Correct 28 ms 36700 KB Output is correct
18 Correct 22 ms 36700 KB Output is correct
19 Correct 24 ms 36700 KB Output is correct
20 Correct 24 ms 36700 KB Output is correct
21 Correct 51 ms 36768 KB Output is correct
22 Correct 51 ms 36748 KB Output is correct
23 Correct 62 ms 36776 KB Output is correct
24 Correct 55 ms 36700 KB Output is correct
25 Correct 59 ms 36700 KB Output is correct
26 Correct 68 ms 36700 KB Output is correct
27 Correct 77 ms 36704 KB Output is correct
28 Correct 57 ms 36696 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 36700 KB Output is correct
2 Correct 14 ms 36664 KB Output is correct
3 Correct 12 ms 36700 KB Output is correct
4 Correct 12 ms 36700 KB Output is correct
5 Correct 58 ms 36772 KB Output is correct
6 Correct 59 ms 36700 KB Output is correct
7 Correct 60 ms 36696 KB Output is correct
8 Correct 54 ms 36700 KB Output is correct
9 Correct 58 ms 36696 KB Output is correct
10 Correct 49 ms 36660 KB Output is correct
11 Correct 50 ms 36700 KB Output is correct
12 Correct 14 ms 36700 KB Output is correct
13 Correct 25 ms 36732 KB Output is correct
14 Correct 25 ms 36700 KB Output is correct
15 Correct 24 ms 36700 KB Output is correct
16 Correct 24 ms 36520 KB Output is correct
17 Correct 23 ms 36700 KB Output is correct
18 Correct 22 ms 36700 KB Output is correct
19 Correct 22 ms 36616 KB Output is correct
20 Correct 22 ms 36700 KB Output is correct
21 Correct 23 ms 36700 KB Output is correct
22 Correct 14 ms 36444 KB Output is correct
23 Correct 14 ms 36580 KB Output is correct
24 Correct 13 ms 36444 KB Output is correct
25 Correct 14 ms 36552 KB Output is correct
26 Correct 24 ms 36532 KB Output is correct
27 Correct 23 ms 36700 KB Output is correct
28 Correct 24 ms 36584 KB Output is correct
29 Correct 25 ms 36700 KB Output is correct
30 Correct 23 ms 36696 KB Output is correct
31 Correct 24 ms 36700 KB Output is correct
32 Correct 22 ms 36572 KB Output is correct
33 Correct 27 ms 36696 KB Output is correct
34 Correct 23 ms 36700 KB Output is correct
35 Correct 28 ms 36728 KB Output is correct
36 Correct 23 ms 36700 KB Output is correct
37 Correct 28 ms 36700 KB Output is correct
38 Correct 25 ms 36664 KB Output is correct
39 Correct 28 ms 36700 KB Output is correct
40 Correct 14 ms 36696 KB Output is correct
41 Correct 24 ms 36952 KB Output is correct
42 Correct 22 ms 36700 KB Output is correct
43 Correct 23 ms 36700 KB Output is correct
44 Correct 30 ms 36696 KB Output is correct
45 Correct 28 ms 36700 KB Output is correct
46 Correct 28 ms 36700 KB Output is correct
47 Correct 22 ms 36700 KB Output is correct
48 Correct 24 ms 36700 KB Output is correct
49 Correct 24 ms 36700 KB Output is correct
50 Correct 51 ms 36768 KB Output is correct
51 Correct 51 ms 36748 KB Output is correct
52 Correct 62 ms 36776 KB Output is correct
53 Correct 55 ms 36700 KB Output is correct
54 Correct 59 ms 36700 KB Output is correct
55 Correct 68 ms 36700 KB Output is correct
56 Correct 77 ms 36704 KB Output is correct
57 Correct 57 ms 36696 KB Output is correct
58 Correct 13 ms 36600 KB Output is correct
59 Correct 13 ms 36476 KB Output is correct
60 Correct 13 ms 36608 KB Output is correct
61 Correct 14 ms 36568 KB Output is correct
62 Correct 66 ms 36696 KB Output is correct
63 Correct 57 ms 36700 KB Output is correct
64 Correct 53 ms 36700 KB Output is correct
65 Correct 60 ms 36700 KB Output is correct
66 Correct 78 ms 36740 KB Output is correct
67 Correct 51 ms 36700 KB Output is correct
68 Correct 51 ms 36700 KB Output is correct
69 Correct 36 ms 36700 KB Output is correct
70 Correct 26 ms 36696 KB Output is correct
71 Correct 25 ms 36724 KB Output is correct
72 Correct 25 ms 36728 KB Output is correct
73 Correct 32 ms 36720 KB Output is correct
74 Correct 23 ms 36700 KB Output is correct
75 Correct 25 ms 36604 KB Output is correct
76 Correct 22 ms 36700 KB Output is correct
77 Correct 23 ms 36696 KB Output is correct
78 Correct 32 ms 36696 KB Output is correct
79 Correct 32 ms 36696 KB Output is correct
80 Correct 27 ms 36700 KB Output is correct
81 Correct 37 ms 36696 KB Output is correct
82 Correct 27 ms 36696 KB Output is correct
83 Correct 62 ms 36700 KB Output is correct
84 Correct 57 ms 36700 KB Output is correct
85 Correct 63 ms 36700 KB Output is correct
86 Correct 63 ms 36700 KB Output is correct
87 Correct 59 ms 36700 KB Output is correct
88 Correct 58 ms 36696 KB Output is correct
89 Correct 67 ms 36696 KB Output is correct
90 Correct 74 ms 36696 KB Output is correct
91 Correct 71 ms 36696 KB Output is correct
92 Correct 74 ms 36700 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 36700 KB Output is correct
2 Correct 25 ms 36732 KB Output is correct
3 Correct 25 ms 36700 KB Output is correct
4 Correct 24 ms 36700 KB Output is correct
5 Correct 24 ms 36520 KB Output is correct
6 Correct 23 ms 36700 KB Output is correct
7 Correct 22 ms 36700 KB Output is correct
8 Correct 22 ms 36616 KB Output is correct
9 Correct 22 ms 36700 KB Output is correct
10 Correct 23 ms 36700 KB Output is correct
11 Correct 14 ms 36696 KB Output is correct
12 Correct 24 ms 36952 KB Output is correct
13 Correct 22 ms 36700 KB Output is correct
14 Correct 23 ms 36700 KB Output is correct
15 Correct 30 ms 36696 KB Output is correct
16 Correct 28 ms 36700 KB Output is correct
17 Correct 28 ms 36700 KB Output is correct
18 Correct 22 ms 36700 KB Output is correct
19 Correct 24 ms 36700 KB Output is correct
20 Correct 24 ms 36700 KB Output is correct
21 Correct 51 ms 36768 KB Output is correct
22 Correct 51 ms 36748 KB Output is correct
23 Correct 62 ms 36776 KB Output is correct
24 Correct 55 ms 36700 KB Output is correct
25 Correct 59 ms 36700 KB Output is correct
26 Correct 68 ms 36700 KB Output is correct
27 Correct 77 ms 36704 KB Output is correct
28 Correct 57 ms 36696 KB Output is correct
29 Correct 15 ms 36600 KB Output is correct
30 Correct 24 ms 36700 KB Output is correct
31 Correct 23 ms 36688 KB Output is correct
32 Correct 25 ms 36700 KB Output is correct
33 Correct 24 ms 36700 KB Output is correct
34 Correct 25 ms 36532 KB Output is correct
35 Correct 25 ms 36700 KB Output is correct
36 Correct 25 ms 36700 KB Output is correct
37 Correct 23 ms 36700 KB Output is correct
38 Correct 26 ms 36700 KB Output is correct
39 Correct 53 ms 36696 KB Output is correct
40 Correct 68 ms 36748 KB Output is correct
41 Correct 61 ms 36760 KB Output is correct
42 Correct 55 ms 36764 KB Output is correct
43 Correct 58 ms 36696 KB Output is correct
44 Correct 61 ms 36696 KB Output is correct
45 Correct 61 ms 36760 KB Output is correct
46 Correct 61 ms 36700 KB Output is correct
47 Correct 386 ms 36956 KB Output is correct
48 Correct 372 ms 36988 KB Output is correct
49 Correct 417 ms 36956 KB Output is correct
50 Correct 391 ms 36952 KB Output is correct
51 Correct 412 ms 36912 KB Output is correct
52 Correct 437 ms 37200 KB Output is correct
53 Correct 396 ms 36956 KB Output is correct
54 Correct 400 ms 37020 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 36700 KB Output is correct
2 Correct 14 ms 36664 KB Output is correct
3 Correct 12 ms 36700 KB Output is correct
4 Correct 12 ms 36700 KB Output is correct
5 Correct 58 ms 36772 KB Output is correct
6 Correct 59 ms 36700 KB Output is correct
7 Correct 60 ms 36696 KB Output is correct
8 Correct 54 ms 36700 KB Output is correct
9 Correct 58 ms 36696 KB Output is correct
10 Correct 49 ms 36660 KB Output is correct
11 Correct 50 ms 36700 KB Output is correct
12 Correct 12 ms 36440 KB Output is correct
13 Correct 16 ms 36952 KB Output is correct
14 Correct 13 ms 36700 KB Output is correct
15 Correct 13 ms 36468 KB Output is correct
16 Correct 64 ms 36716 KB Output is correct
17 Correct 55 ms 36700 KB Output is correct
18 Correct 51 ms 36772 KB Output is correct
19 Correct 55 ms 36700 KB Output is correct
20 Correct 58 ms 36568 KB Output is correct
21 Correct 49 ms 36700 KB Output is correct
22 Correct 49 ms 36752 KB Output is correct
23 Correct 403 ms 36952 KB Output is correct
24 Correct 408 ms 36944 KB Output is correct
25 Correct 352 ms 36956 KB Output is correct
26 Correct 484 ms 37000 KB Output is correct
27 Correct 456 ms 37204 KB Output is correct
28 Correct 339 ms 36988 KB Output is correct
29 Correct 347 ms 36944 KB Output is correct
30 Correct 14 ms 36700 KB Output is correct
31 Correct 25 ms 36732 KB Output is correct
32 Correct 25 ms 36700 KB Output is correct
33 Correct 24 ms 36700 KB Output is correct
34 Correct 24 ms 36520 KB Output is correct
35 Correct 23 ms 36700 KB Output is correct
36 Correct 22 ms 36700 KB Output is correct
37 Correct 22 ms 36616 KB Output is correct
38 Correct 22 ms 36700 KB Output is correct
39 Correct 23 ms 36700 KB Output is correct
40 Correct 14 ms 36444 KB Output is correct
41 Correct 14 ms 36580 KB Output is correct
42 Correct 13 ms 36444 KB Output is correct
43 Correct 14 ms 36552 KB Output is correct
44 Correct 24 ms 36532 KB Output is correct
45 Correct 23 ms 36700 KB Output is correct
46 Correct 24 ms 36584 KB Output is correct
47 Correct 25 ms 36700 KB Output is correct
48 Correct 23 ms 36696 KB Output is correct
49 Correct 24 ms 36700 KB Output is correct
50 Correct 22 ms 36572 KB Output is correct
51 Correct 27 ms 36696 KB Output is correct
52 Correct 23 ms 36700 KB Output is correct
53 Correct 28 ms 36728 KB Output is correct
54 Correct 23 ms 36700 KB Output is correct
55 Correct 28 ms 36700 KB Output is correct
56 Correct 25 ms 36664 KB Output is correct
57 Correct 28 ms 36700 KB Output is correct
58 Correct 14 ms 36696 KB Output is correct
59 Correct 24 ms 36952 KB Output is correct
60 Correct 22 ms 36700 KB Output is correct
61 Correct 23 ms 36700 KB Output is correct
62 Correct 30 ms 36696 KB Output is correct
63 Correct 28 ms 36700 KB Output is correct
64 Correct 28 ms 36700 KB Output is correct
65 Correct 22 ms 36700 KB Output is correct
66 Correct 24 ms 36700 KB Output is correct
67 Correct 24 ms 36700 KB Output is correct
68 Correct 51 ms 36768 KB Output is correct
69 Correct 51 ms 36748 KB Output is correct
70 Correct 62 ms 36776 KB Output is correct
71 Correct 55 ms 36700 KB Output is correct
72 Correct 59 ms 36700 KB Output is correct
73 Correct 68 ms 36700 KB Output is correct
74 Correct 77 ms 36704 KB Output is correct
75 Correct 57 ms 36696 KB Output is correct
76 Correct 13 ms 36600 KB Output is correct
77 Correct 13 ms 36476 KB Output is correct
78 Correct 13 ms 36608 KB Output is correct
79 Correct 14 ms 36568 KB Output is correct
80 Correct 66 ms 36696 KB Output is correct
81 Correct 57 ms 36700 KB Output is correct
82 Correct 53 ms 36700 KB Output is correct
83 Correct 60 ms 36700 KB Output is correct
84 Correct 78 ms 36740 KB Output is correct
85 Correct 51 ms 36700 KB Output is correct
86 Correct 51 ms 36700 KB Output is correct
87 Correct 36 ms 36700 KB Output is correct
88 Correct 26 ms 36696 KB Output is correct
89 Correct 25 ms 36724 KB Output is correct
90 Correct 25 ms 36728 KB Output is correct
91 Correct 32 ms 36720 KB Output is correct
92 Correct 23 ms 36700 KB Output is correct
93 Correct 25 ms 36604 KB Output is correct
94 Correct 22 ms 36700 KB Output is correct
95 Correct 23 ms 36696 KB Output is correct
96 Correct 32 ms 36696 KB Output is correct
97 Correct 32 ms 36696 KB Output is correct
98 Correct 27 ms 36700 KB Output is correct
99 Correct 37 ms 36696 KB Output is correct
100 Correct 27 ms 36696 KB Output is correct
101 Correct 62 ms 36700 KB Output is correct
102 Correct 57 ms 36700 KB Output is correct
103 Correct 63 ms 36700 KB Output is correct
104 Correct 63 ms 36700 KB Output is correct
105 Correct 59 ms 36700 KB Output is correct
106 Correct 58 ms 36696 KB Output is correct
107 Correct 67 ms 36696 KB Output is correct
108 Correct 74 ms 36696 KB Output is correct
109 Correct 71 ms 36696 KB Output is correct
110 Correct 74 ms 36700 KB Output is correct
111 Correct 15 ms 36600 KB Output is correct
112 Correct 24 ms 36700 KB Output is correct
113 Correct 23 ms 36688 KB Output is correct
114 Correct 25 ms 36700 KB Output is correct
115 Correct 24 ms 36700 KB Output is correct
116 Correct 25 ms 36532 KB Output is correct
117 Correct 25 ms 36700 KB Output is correct
118 Correct 25 ms 36700 KB Output is correct
119 Correct 23 ms 36700 KB Output is correct
120 Correct 26 ms 36700 KB Output is correct
121 Correct 53 ms 36696 KB Output is correct
122 Correct 68 ms 36748 KB Output is correct
123 Correct 61 ms 36760 KB Output is correct
124 Correct 55 ms 36764 KB Output is correct
125 Correct 58 ms 36696 KB Output is correct
126 Correct 61 ms 36696 KB Output is correct
127 Correct 61 ms 36760 KB Output is correct
128 Correct 61 ms 36700 KB Output is correct
129 Correct 386 ms 36956 KB Output is correct
130 Correct 372 ms 36988 KB Output is correct
131 Correct 417 ms 36956 KB Output is correct
132 Correct 391 ms 36952 KB Output is correct
133 Correct 412 ms 36912 KB Output is correct
134 Correct 437 ms 37200 KB Output is correct
135 Correct 396 ms 36956 KB Output is correct
136 Correct 400 ms 37020 KB Output is correct
137 Correct 16 ms 36440 KB Output is correct
138 Correct 16 ms 36440 KB Output is correct
139 Correct 14 ms 36472 KB Output is correct
140 Correct 14 ms 36696 KB Output is correct
141 Correct 66 ms 36700 KB Output is correct
142 Correct 58 ms 36700 KB Output is correct
143 Correct 56 ms 36696 KB Output is correct
144 Correct 60 ms 36776 KB Output is correct
145 Correct 62 ms 36700 KB Output is correct
146 Correct 55 ms 36752 KB Output is correct
147 Correct 55 ms 36748 KB Output is correct
148 Correct 456 ms 36948 KB Output is correct
149 Correct 446 ms 37036 KB Output is correct
150 Correct 435 ms 36944 KB Output is correct
151 Correct 454 ms 37248 KB Output is correct
152 Correct 440 ms 36944 KB Output is correct
153 Correct 389 ms 37060 KB Output is correct
154 Correct 372 ms 37008 KB Output is correct
155 Correct 40 ms 36696 KB Output is correct
156 Correct 26 ms 36700 KB Output is correct
157 Correct 32 ms 36700 KB Output is correct
158 Correct 37 ms 36696 KB Output is correct
159 Correct 24 ms 36700 KB Output is correct
160 Correct 24 ms 36700 KB Output is correct
161 Correct 24 ms 36700 KB Output is correct
162 Correct 24 ms 36700 KB Output is correct
163 Correct 25 ms 36700 KB Output is correct
164 Correct 63 ms 36760 KB Output is correct
165 Correct 57 ms 36696 KB Output is correct
166 Correct 70 ms 36764 KB Output is correct
167 Correct 80 ms 36700 KB Output is correct
168 Correct 64 ms 36792 KB Output is correct
169 Correct 59 ms 36696 KB Output is correct
170 Correct 31 ms 36696 KB Output is correct
171 Correct 25 ms 36700 KB Output is correct
172 Correct 27 ms 36700 KB Output is correct
173 Correct 26 ms 36696 KB Output is correct
174 Correct 27 ms 36700 KB Output is correct
175 Correct 72 ms 36948 KB Output is correct
176 Correct 76 ms 36696 KB Output is correct
177 Correct 68 ms 36768 KB Output is correct
178 Correct 76 ms 36700 KB Output is correct
179 Correct 423 ms 36956 KB Output is correct
180 Correct 423 ms 36956 KB Output is correct
181 Correct 432 ms 37012 KB Output is correct
182 Correct 506 ms 37020 KB Output is correct
183 Correct 427 ms 36952 KB Output is correct
184 Correct 430 ms 36944 KB Output is correct
185 Correct 548 ms 37036 KB Output is correct
186 Correct 590 ms 37204 KB Output is correct
187 Correct 525 ms 37040 KB Output is correct
188 Correct 524 ms 37032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 36700 KB Output is correct
2 Correct 25 ms 36732 KB Output is correct
3 Correct 25 ms 36700 KB Output is correct
4 Correct 24 ms 36700 KB Output is correct
5 Correct 24 ms 36520 KB Output is correct
6 Correct 23 ms 36700 KB Output is correct
7 Correct 22 ms 36700 KB Output is correct
8 Correct 22 ms 36616 KB Output is correct
9 Correct 22 ms 36700 KB Output is correct
10 Correct 23 ms 36700 KB Output is correct
11 Correct 14 ms 36696 KB Output is correct
12 Correct 24 ms 36952 KB Output is correct
13 Correct 22 ms 36700 KB Output is correct
14 Correct 23 ms 36700 KB Output is correct
15 Correct 30 ms 36696 KB Output is correct
16 Correct 28 ms 36700 KB Output is correct
17 Correct 28 ms 36700 KB Output is correct
18 Correct 22 ms 36700 KB Output is correct
19 Correct 24 ms 36700 KB Output is correct
20 Correct 24 ms 36700 KB Output is correct
21 Correct 51 ms 36768 KB Output is correct
22 Correct 51 ms 36748 KB Output is correct
23 Correct 62 ms 36776 KB Output is correct
24 Correct 55 ms 36700 KB Output is correct
25 Correct 59 ms 36700 KB Output is correct
26 Correct 68 ms 36700 KB Output is correct
27 Correct 77 ms 36704 KB Output is correct
28 Correct 57 ms 36696 KB Output is correct
29 Correct 15 ms 36600 KB Output is correct
30 Correct 24 ms 36700 KB Output is correct
31 Correct 23 ms 36688 KB Output is correct
32 Correct 25 ms 36700 KB Output is correct
33 Correct 24 ms 36700 KB Output is correct
34 Correct 25 ms 36532 KB Output is correct
35 Correct 25 ms 36700 KB Output is correct
36 Correct 25 ms 36700 KB Output is correct
37 Correct 23 ms 36700 KB Output is correct
38 Correct 26 ms 36700 KB Output is correct
39 Correct 53 ms 36696 KB Output is correct
40 Correct 68 ms 36748 KB Output is correct
41 Correct 61 ms 36760 KB Output is correct
42 Correct 55 ms 36764 KB Output is correct
43 Correct 58 ms 36696 KB Output is correct
44 Correct 61 ms 36696 KB Output is correct
45 Correct 61 ms 36760 KB Output is correct
46 Correct 61 ms 36700 KB Output is correct
47 Correct 386 ms 36956 KB Output is correct
48 Correct 372 ms 36988 KB Output is correct
49 Correct 417 ms 36956 KB Output is correct
50 Correct 391 ms 36952 KB Output is correct
51 Correct 412 ms 36912 KB Output is correct
52 Correct 437 ms 37200 KB Output is correct
53 Correct 396 ms 36956 KB Output is correct
54 Correct 400 ms 37020 KB Output is correct
55 Correct 17 ms 36700 KB Output is correct
56 Correct 24 ms 36704 KB Output is correct
57 Correct 25 ms 36700 KB Output is correct
58 Correct 24 ms 36700 KB Output is correct
59 Correct 26 ms 36700 KB Output is correct
60 Correct 33 ms 36700 KB Output is correct
61 Correct 28 ms 36700 KB Output is correct
62 Correct 22 ms 36700 KB Output is correct
63 Correct 24 ms 36736 KB Output is correct
64 Correct 26 ms 36700 KB Output is correct
65 Correct 53 ms 36700 KB Output is correct
66 Correct 54 ms 36696 KB Output is correct
67 Correct 69 ms 36760 KB Output is correct
68 Correct 58 ms 36764 KB Output is correct
69 Correct 59 ms 36696 KB Output is correct
70 Correct 69 ms 36764 KB Output is correct
71 Correct 60 ms 36764 KB Output is correct
72 Correct 63 ms 36760 KB Output is correct
73 Correct 341 ms 36952 KB Output is correct
74 Correct 384 ms 36948 KB Output is correct
75 Correct 433 ms 36952 KB Output is correct
76 Correct 381 ms 36956 KB Output is correct
77 Correct 436 ms 36956 KB Output is correct
78 Correct 405 ms 36952 KB Output is correct
79 Correct 412 ms 36944 KB Output is correct
80 Correct 382 ms 36956 KB Output is correct
81 Runtime error 1 ms 348 KB Execution killed with signal 11
82 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 36700 KB Output is correct
2 Correct 14 ms 36664 KB Output is correct
3 Correct 12 ms 36700 KB Output is correct
4 Correct 12 ms 36700 KB Output is correct
5 Correct 58 ms 36772 KB Output is correct
6 Correct 59 ms 36700 KB Output is correct
7 Correct 60 ms 36696 KB Output is correct
8 Correct 54 ms 36700 KB Output is correct
9 Correct 58 ms 36696 KB Output is correct
10 Correct 49 ms 36660 KB Output is correct
11 Correct 50 ms 36700 KB Output is correct
12 Correct 12 ms 36440 KB Output is correct
13 Correct 16 ms 36952 KB Output is correct
14 Correct 13 ms 36700 KB Output is correct
15 Correct 13 ms 36468 KB Output is correct
16 Correct 64 ms 36716 KB Output is correct
17 Correct 55 ms 36700 KB Output is correct
18 Correct 51 ms 36772 KB Output is correct
19 Correct 55 ms 36700 KB Output is correct
20 Correct 58 ms 36568 KB Output is correct
21 Correct 49 ms 36700 KB Output is correct
22 Correct 49 ms 36752 KB Output is correct
23 Correct 403 ms 36952 KB Output is correct
24 Correct 408 ms 36944 KB Output is correct
25 Correct 352 ms 36956 KB Output is correct
26 Correct 484 ms 37000 KB Output is correct
27 Correct 456 ms 37204 KB Output is correct
28 Correct 339 ms 36988 KB Output is correct
29 Correct 347 ms 36944 KB Output is correct
30 Correct 14 ms 36700 KB Output is correct
31 Correct 25 ms 36732 KB Output is correct
32 Correct 25 ms 36700 KB Output is correct
33 Correct 24 ms 36700 KB Output is correct
34 Correct 24 ms 36520 KB Output is correct
35 Correct 23 ms 36700 KB Output is correct
36 Correct 22 ms 36700 KB Output is correct
37 Correct 22 ms 36616 KB Output is correct
38 Correct 22 ms 36700 KB Output is correct
39 Correct 23 ms 36700 KB Output is correct
40 Correct 14 ms 36444 KB Output is correct
41 Correct 14 ms 36580 KB Output is correct
42 Correct 13 ms 36444 KB Output is correct
43 Correct 14 ms 36552 KB Output is correct
44 Correct 24 ms 36532 KB Output is correct
45 Correct 23 ms 36700 KB Output is correct
46 Correct 24 ms 36584 KB Output is correct
47 Correct 25 ms 36700 KB Output is correct
48 Correct 23 ms 36696 KB Output is correct
49 Correct 24 ms 36700 KB Output is correct
50 Correct 22 ms 36572 KB Output is correct
51 Correct 27 ms 36696 KB Output is correct
52 Correct 23 ms 36700 KB Output is correct
53 Correct 28 ms 36728 KB Output is correct
54 Correct 23 ms 36700 KB Output is correct
55 Correct 28 ms 36700 KB Output is correct
56 Correct 25 ms 36664 KB Output is correct
57 Correct 28 ms 36700 KB Output is correct
58 Correct 14 ms 36696 KB Output is correct
59 Correct 24 ms 36952 KB Output is correct
60 Correct 22 ms 36700 KB Output is correct
61 Correct 23 ms 36700 KB Output is correct
62 Correct 30 ms 36696 KB Output is correct
63 Correct 28 ms 36700 KB Output is correct
64 Correct 28 ms 36700 KB Output is correct
65 Correct 22 ms 36700 KB Output is correct
66 Correct 24 ms 36700 KB Output is correct
67 Correct 24 ms 36700 KB Output is correct
68 Correct 51 ms 36768 KB Output is correct
69 Correct 51 ms 36748 KB Output is correct
70 Correct 62 ms 36776 KB Output is correct
71 Correct 55 ms 36700 KB Output is correct
72 Correct 59 ms 36700 KB Output is correct
73 Correct 68 ms 36700 KB Output is correct
74 Correct 77 ms 36704 KB Output is correct
75 Correct 57 ms 36696 KB Output is correct
76 Correct 13 ms 36600 KB Output is correct
77 Correct 13 ms 36476 KB Output is correct
78 Correct 13 ms 36608 KB Output is correct
79 Correct 14 ms 36568 KB Output is correct
80 Correct 66 ms 36696 KB Output is correct
81 Correct 57 ms 36700 KB Output is correct
82 Correct 53 ms 36700 KB Output is correct
83 Correct 60 ms 36700 KB Output is correct
84 Correct 78 ms 36740 KB Output is correct
85 Correct 51 ms 36700 KB Output is correct
86 Correct 51 ms 36700 KB Output is correct
87 Correct 36 ms 36700 KB Output is correct
88 Correct 26 ms 36696 KB Output is correct
89 Correct 25 ms 36724 KB Output is correct
90 Correct 25 ms 36728 KB Output is correct
91 Correct 32 ms 36720 KB Output is correct
92 Correct 23 ms 36700 KB Output is correct
93 Correct 25 ms 36604 KB Output is correct
94 Correct 22 ms 36700 KB Output is correct
95 Correct 23 ms 36696 KB Output is correct
96 Correct 32 ms 36696 KB Output is correct
97 Correct 32 ms 36696 KB Output is correct
98 Correct 27 ms 36700 KB Output is correct
99 Correct 37 ms 36696 KB Output is correct
100 Correct 27 ms 36696 KB Output is correct
101 Correct 62 ms 36700 KB Output is correct
102 Correct 57 ms 36700 KB Output is correct
103 Correct 63 ms 36700 KB Output is correct
104 Correct 63 ms 36700 KB Output is correct
105 Correct 59 ms 36700 KB Output is correct
106 Correct 58 ms 36696 KB Output is correct
107 Correct 67 ms 36696 KB Output is correct
108 Correct 74 ms 36696 KB Output is correct
109 Correct 71 ms 36696 KB Output is correct
110 Correct 74 ms 36700 KB Output is correct
111 Correct 15 ms 36600 KB Output is correct
112 Correct 24 ms 36700 KB Output is correct
113 Correct 23 ms 36688 KB Output is correct
114 Correct 25 ms 36700 KB Output is correct
115 Correct 24 ms 36700 KB Output is correct
116 Correct 25 ms 36532 KB Output is correct
117 Correct 25 ms 36700 KB Output is correct
118 Correct 25 ms 36700 KB Output is correct
119 Correct 23 ms 36700 KB Output is correct
120 Correct 26 ms 36700 KB Output is correct
121 Correct 53 ms 36696 KB Output is correct
122 Correct 68 ms 36748 KB Output is correct
123 Correct 61 ms 36760 KB Output is correct
124 Correct 55 ms 36764 KB Output is correct
125 Correct 58 ms 36696 KB Output is correct
126 Correct 61 ms 36696 KB Output is correct
127 Correct 61 ms 36760 KB Output is correct
128 Correct 61 ms 36700 KB Output is correct
129 Correct 386 ms 36956 KB Output is correct
130 Correct 372 ms 36988 KB Output is correct
131 Correct 417 ms 36956 KB Output is correct
132 Correct 391 ms 36952 KB Output is correct
133 Correct 412 ms 36912 KB Output is correct
134 Correct 437 ms 37200 KB Output is correct
135 Correct 396 ms 36956 KB Output is correct
136 Correct 400 ms 37020 KB Output is correct
137 Correct 16 ms 36440 KB Output is correct
138 Correct 16 ms 36440 KB Output is correct
139 Correct 14 ms 36472 KB Output is correct
140 Correct 14 ms 36696 KB Output is correct
141 Correct 66 ms 36700 KB Output is correct
142 Correct 58 ms 36700 KB Output is correct
143 Correct 56 ms 36696 KB Output is correct
144 Correct 60 ms 36776 KB Output is correct
145 Correct 62 ms 36700 KB Output is correct
146 Correct 55 ms 36752 KB Output is correct
147 Correct 55 ms 36748 KB Output is correct
148 Correct 456 ms 36948 KB Output is correct
149 Correct 446 ms 37036 KB Output is correct
150 Correct 435 ms 36944 KB Output is correct
151 Correct 454 ms 37248 KB Output is correct
152 Correct 440 ms 36944 KB Output is correct
153 Correct 389 ms 37060 KB Output is correct
154 Correct 372 ms 37008 KB Output is correct
155 Correct 40 ms 36696 KB Output is correct
156 Correct 26 ms 36700 KB Output is correct
157 Correct 32 ms 36700 KB Output is correct
158 Correct 37 ms 36696 KB Output is correct
159 Correct 24 ms 36700 KB Output is correct
160 Correct 24 ms 36700 KB Output is correct
161 Correct 24 ms 36700 KB Output is correct
162 Correct 24 ms 36700 KB Output is correct
163 Correct 25 ms 36700 KB Output is correct
164 Correct 63 ms 36760 KB Output is correct
165 Correct 57 ms 36696 KB Output is correct
166 Correct 70 ms 36764 KB Output is correct
167 Correct 80 ms 36700 KB Output is correct
168 Correct 64 ms 36792 KB Output is correct
169 Correct 59 ms 36696 KB Output is correct
170 Correct 31 ms 36696 KB Output is correct
171 Correct 25 ms 36700 KB Output is correct
172 Correct 27 ms 36700 KB Output is correct
173 Correct 26 ms 36696 KB Output is correct
174 Correct 27 ms 36700 KB Output is correct
175 Correct 72 ms 36948 KB Output is correct
176 Correct 76 ms 36696 KB Output is correct
177 Correct 68 ms 36768 KB Output is correct
178 Correct 76 ms 36700 KB Output is correct
179 Correct 423 ms 36956 KB Output is correct
180 Correct 423 ms 36956 KB Output is correct
181 Correct 432 ms 37012 KB Output is correct
182 Correct 506 ms 37020 KB Output is correct
183 Correct 427 ms 36952 KB Output is correct
184 Correct 430 ms 36944 KB Output is correct
185 Correct 548 ms 37036 KB Output is correct
186 Correct 590 ms 37204 KB Output is correct
187 Correct 525 ms 37040 KB Output is correct
188 Correct 524 ms 37032 KB Output is correct
189 Correct 17 ms 36700 KB Output is correct
190 Correct 24 ms 36704 KB Output is correct
191 Correct 25 ms 36700 KB Output is correct
192 Correct 24 ms 36700 KB Output is correct
193 Correct 26 ms 36700 KB Output is correct
194 Correct 33 ms 36700 KB Output is correct
195 Correct 28 ms 36700 KB Output is correct
196 Correct 22 ms 36700 KB Output is correct
197 Correct 24 ms 36736 KB Output is correct
198 Correct 26 ms 36700 KB Output is correct
199 Correct 53 ms 36700 KB Output is correct
200 Correct 54 ms 36696 KB Output is correct
201 Correct 69 ms 36760 KB Output is correct
202 Correct 58 ms 36764 KB Output is correct
203 Correct 59 ms 36696 KB Output is correct
204 Correct 69 ms 36764 KB Output is correct
205 Correct 60 ms 36764 KB Output is correct
206 Correct 63 ms 36760 KB Output is correct
207 Correct 341 ms 36952 KB Output is correct
208 Correct 384 ms 36948 KB Output is correct
209 Correct 433 ms 36952 KB Output is correct
210 Correct 381 ms 36956 KB Output is correct
211 Correct 436 ms 36956 KB Output is correct
212 Correct 405 ms 36952 KB Output is correct
213 Correct 412 ms 36944 KB Output is correct
214 Correct 382 ms 36956 KB Output is correct
215 Runtime error 1 ms 348 KB Execution killed with signal 11
216 Halted 0 ms 0 KB -