답안 #1074751

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

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

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

int bs_A[2*maxn][65];

long long dp[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[sum] = 0;
	for(int b = 0; b <= 60; b++){
		for(int i = 1; i <= m; i++){
			memset(tmp, -1, sizeof(tmp));
			for(int j = 0; j <= 2*sum; j++){
				if(dp[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);
						tmp[nw] = max(tmp[nw], dp[j] + cost);
					}
				}
			}
			memcpy(dp, tmp, sizeof(dp));
		}
		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[i]);
		}
		for(int i = 0; i <= 2*sum; i++)dp[i] = tmp[i];
	}
	if(dp[sum] == -1)cout << "impossible";
	else cout << dp[sum] + A[m];
}
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 6232 KB Output is correct
2 Correct 33 ms 6244 KB Output is correct
3 Correct 14 ms 6236 KB Output is correct
4 Correct 110 ms 6076 KB Output is correct
5 Correct 549 ms 6276 KB Output is correct
6 Correct 553 ms 6236 KB Output is correct
7 Correct 558 ms 6232 KB Output is correct
8 Correct 544 ms 6272 KB Output is correct
9 Correct 563 ms 6236 KB Output is correct
10 Correct 536 ms 6232 KB Output is correct
11 Correct 539 ms 6236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 6232 KB Output is correct
2 Correct 33 ms 6244 KB Output is correct
3 Correct 14 ms 6236 KB Output is correct
4 Correct 110 ms 6076 KB Output is correct
5 Correct 549 ms 6276 KB Output is correct
6 Correct 553 ms 6236 KB Output is correct
7 Correct 558 ms 6232 KB Output is correct
8 Correct 544 ms 6272 KB Output is correct
9 Correct 563 ms 6236 KB Output is correct
10 Correct 536 ms 6232 KB Output is correct
11 Correct 539 ms 6236 KB Output is correct
12 Correct 25 ms 6236 KB Output is correct
13 Correct 35 ms 6108 KB Output is correct
14 Correct 13 ms 6248 KB Output is correct
15 Correct 109 ms 6236 KB Output is correct
16 Correct 557 ms 6232 KB Output is correct
17 Correct 572 ms 6232 KB Output is correct
18 Correct 556 ms 6272 KB Output is correct
19 Correct 570 ms 6272 KB Output is correct
20 Correct 583 ms 6236 KB Output is correct
21 Correct 538 ms 6236 KB Output is correct
22 Correct 541 ms 6232 KB Output is correct
23 Correct 1355 ms 6304 KB Output is correct
24 Correct 1372 ms 6296 KB Output is correct
25 Correct 1356 ms 6296 KB Output is correct
26 Correct 1352 ms 6236 KB Output is correct
27 Correct 1352 ms 6236 KB Output is correct
28 Correct 1278 ms 6248 KB Output is correct
29 Correct 1320 ms 6232 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 6232 KB Output is correct
2 Correct 337 ms 6232 KB Output is correct
3 Correct 321 ms 6236 KB Output is correct
4 Correct 320 ms 6236 KB Output is correct
5 Correct 324 ms 6236 KB Output is correct
6 Correct 323 ms 6236 KB Output is correct
7 Correct 317 ms 6248 KB Output is correct
8 Correct 325 ms 6248 KB Output is correct
9 Correct 325 ms 6232 KB Output is correct
10 Correct 327 ms 6236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 6232 KB Output is correct
2 Correct 337 ms 6232 KB Output is correct
3 Correct 321 ms 6236 KB Output is correct
4 Correct 320 ms 6236 KB Output is correct
5 Correct 324 ms 6236 KB Output is correct
6 Correct 323 ms 6236 KB Output is correct
7 Correct 317 ms 6248 KB Output is correct
8 Correct 325 ms 6248 KB Output is correct
9 Correct 325 ms 6232 KB Output is correct
10 Correct 327 ms 6236 KB Output is correct
11 Correct 25 ms 6236 KB Output is correct
12 Correct 36 ms 6236 KB Output is correct
13 Correct 13 ms 6264 KB Output is correct
14 Correct 105 ms 6232 KB Output is correct
15 Correct 322 ms 6232 KB Output is correct
16 Correct 317 ms 6236 KB Output is correct
17 Correct 327 ms 6260 KB Output is correct
18 Correct 319 ms 6232 KB Output is correct
19 Correct 316 ms 6232 KB Output is correct
20 Correct 310 ms 6236 KB Output is correct
21 Correct 331 ms 6236 KB Output is correct
22 Correct 320 ms 6252 KB Output is correct
23 Correct 334 ms 6232 KB Output is correct
24 Correct 329 ms 6236 KB Output is correct
25 Correct 316 ms 6236 KB Output is correct
26 Correct 321 ms 6232 KB Output is correct
27 Correct 337 ms 6236 KB Output is correct
28 Correct 318 ms 6264 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 6232 KB Output is correct
2 Correct 337 ms 6232 KB Output is correct
3 Correct 321 ms 6236 KB Output is correct
4 Correct 320 ms 6236 KB Output is correct
5 Correct 324 ms 6236 KB Output is correct
6 Correct 323 ms 6236 KB Output is correct
7 Correct 317 ms 6248 KB Output is correct
8 Correct 325 ms 6248 KB Output is correct
9 Correct 325 ms 6232 KB Output is correct
10 Correct 327 ms 6236 KB Output is correct
11 Correct 107 ms 6236 KB Output is correct
12 Correct 331 ms 6252 KB Output is correct
13 Correct 314 ms 6304 KB Output is correct
14 Correct 316 ms 6256 KB Output is correct
15 Correct 316 ms 6260 KB Output is correct
16 Correct 320 ms 6232 KB Output is correct
17 Correct 322 ms 6232 KB Output is correct
18 Correct 321 ms 6236 KB Output is correct
19 Correct 324 ms 6256 KB Output is correct
20 Correct 339 ms 6236 KB Output is correct
21 Correct 579 ms 6076 KB Output is correct
22 Correct 567 ms 6236 KB Output is correct
23 Correct 586 ms 6076 KB Output is correct
24 Correct 569 ms 6260 KB Output is correct
25 Correct 590 ms 6232 KB Output is correct
26 Correct 556 ms 6488 KB Output is correct
27 Correct 555 ms 6060 KB Output is correct
28 Correct 555 ms 6232 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 6232 KB Output is correct
2 Correct 33 ms 6244 KB Output is correct
3 Correct 14 ms 6236 KB Output is correct
4 Correct 110 ms 6076 KB Output is correct
5 Correct 549 ms 6276 KB Output is correct
6 Correct 553 ms 6236 KB Output is correct
7 Correct 558 ms 6232 KB Output is correct
8 Correct 544 ms 6272 KB Output is correct
9 Correct 563 ms 6236 KB Output is correct
10 Correct 536 ms 6232 KB Output is correct
11 Correct 539 ms 6236 KB Output is correct
12 Correct 108 ms 6232 KB Output is correct
13 Correct 337 ms 6232 KB Output is correct
14 Correct 321 ms 6236 KB Output is correct
15 Correct 320 ms 6236 KB Output is correct
16 Correct 324 ms 6236 KB Output is correct
17 Correct 323 ms 6236 KB Output is correct
18 Correct 317 ms 6248 KB Output is correct
19 Correct 325 ms 6248 KB Output is correct
20 Correct 325 ms 6232 KB Output is correct
21 Correct 327 ms 6236 KB Output is correct
22 Correct 25 ms 6236 KB Output is correct
23 Correct 36 ms 6236 KB Output is correct
24 Correct 13 ms 6264 KB Output is correct
25 Correct 105 ms 6232 KB Output is correct
26 Correct 322 ms 6232 KB Output is correct
27 Correct 317 ms 6236 KB Output is correct
28 Correct 327 ms 6260 KB Output is correct
29 Correct 319 ms 6232 KB Output is correct
30 Correct 316 ms 6232 KB Output is correct
31 Correct 310 ms 6236 KB Output is correct
32 Correct 331 ms 6236 KB Output is correct
33 Correct 320 ms 6252 KB Output is correct
34 Correct 334 ms 6232 KB Output is correct
35 Correct 329 ms 6236 KB Output is correct
36 Correct 316 ms 6236 KB Output is correct
37 Correct 321 ms 6232 KB Output is correct
38 Correct 337 ms 6236 KB Output is correct
39 Correct 318 ms 6264 KB Output is correct
40 Correct 107 ms 6236 KB Output is correct
41 Correct 331 ms 6252 KB Output is correct
42 Correct 314 ms 6304 KB Output is correct
43 Correct 316 ms 6256 KB Output is correct
44 Correct 316 ms 6260 KB Output is correct
45 Correct 320 ms 6232 KB Output is correct
46 Correct 322 ms 6232 KB Output is correct
47 Correct 321 ms 6236 KB Output is correct
48 Correct 324 ms 6256 KB Output is correct
49 Correct 339 ms 6236 KB Output is correct
50 Correct 579 ms 6076 KB Output is correct
51 Correct 567 ms 6236 KB Output is correct
52 Correct 586 ms 6076 KB Output is correct
53 Correct 569 ms 6260 KB Output is correct
54 Correct 590 ms 6232 KB Output is correct
55 Correct 556 ms 6488 KB Output is correct
56 Correct 555 ms 6060 KB Output is correct
57 Correct 555 ms 6232 KB Output is correct
58 Correct 25 ms 6232 KB Output is correct
59 Correct 34 ms 6236 KB Output is correct
60 Correct 13 ms 6236 KB Output is correct
61 Correct 106 ms 6248 KB Output is correct
62 Correct 552 ms 6236 KB Output is correct
63 Correct 555 ms 6232 KB Output is correct
64 Correct 558 ms 6232 KB Output is correct
65 Correct 550 ms 6236 KB Output is correct
66 Correct 579 ms 6484 KB Output is correct
67 Correct 567 ms 6236 KB Output is correct
68 Correct 544 ms 6232 KB Output is correct
69 Correct 318 ms 6236 KB Output is correct
70 Correct 319 ms 6252 KB Output is correct
71 Correct 324 ms 6252 KB Output is correct
72 Correct 313 ms 6256 KB Output is correct
73 Correct 315 ms 6232 KB Output is correct
74 Correct 322 ms 6480 KB Output is correct
75 Correct 315 ms 6252 KB Output is correct
76 Correct 323 ms 6256 KB Output is correct
77 Correct 318 ms 6232 KB Output is correct
78 Correct 321 ms 6256 KB Output is correct
79 Correct 320 ms 6232 KB Output is correct
80 Correct 327 ms 6232 KB Output is correct
81 Correct 318 ms 6236 KB Output is correct
82 Correct 338 ms 6236 KB Output is correct
83 Correct 572 ms 6264 KB Output is correct
84 Correct 558 ms 6236 KB Output is correct
85 Correct 555 ms 6256 KB Output is correct
86 Correct 550 ms 6280 KB Output is correct
87 Correct 549 ms 6256 KB Output is correct
88 Correct 564 ms 6232 KB Output is correct
89 Correct 549 ms 6276 KB Output is correct
90 Correct 576 ms 6268 KB Output is correct
91 Correct 563 ms 6232 KB Output is correct
92 Correct 561 ms 6272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 6232 KB Output is correct
2 Correct 337 ms 6232 KB Output is correct
3 Correct 321 ms 6236 KB Output is correct
4 Correct 320 ms 6236 KB Output is correct
5 Correct 324 ms 6236 KB Output is correct
6 Correct 323 ms 6236 KB Output is correct
7 Correct 317 ms 6248 KB Output is correct
8 Correct 325 ms 6248 KB Output is correct
9 Correct 325 ms 6232 KB Output is correct
10 Correct 327 ms 6236 KB Output is correct
11 Correct 107 ms 6236 KB Output is correct
12 Correct 331 ms 6252 KB Output is correct
13 Correct 314 ms 6304 KB Output is correct
14 Correct 316 ms 6256 KB Output is correct
15 Correct 316 ms 6260 KB Output is correct
16 Correct 320 ms 6232 KB Output is correct
17 Correct 322 ms 6232 KB Output is correct
18 Correct 321 ms 6236 KB Output is correct
19 Correct 324 ms 6256 KB Output is correct
20 Correct 339 ms 6236 KB Output is correct
21 Correct 579 ms 6076 KB Output is correct
22 Correct 567 ms 6236 KB Output is correct
23 Correct 586 ms 6076 KB Output is correct
24 Correct 569 ms 6260 KB Output is correct
25 Correct 590 ms 6232 KB Output is correct
26 Correct 556 ms 6488 KB Output is correct
27 Correct 555 ms 6060 KB Output is correct
28 Correct 555 ms 6232 KB Output is correct
29 Correct 108 ms 6232 KB Output is correct
30 Correct 321 ms 6236 KB Output is correct
31 Correct 326 ms 6252 KB Output is correct
32 Correct 317 ms 6236 KB Output is correct
33 Correct 317 ms 6236 KB Output is correct
34 Correct 313 ms 6232 KB Output is correct
35 Correct 329 ms 6232 KB Output is correct
36 Correct 311 ms 6236 KB Output is correct
37 Correct 315 ms 6236 KB Output is correct
38 Correct 314 ms 6076 KB Output is correct
39 Correct 546 ms 6236 KB Output is correct
40 Correct 557 ms 6256 KB Output is correct
41 Correct 557 ms 6260 KB Output is correct
42 Correct 560 ms 6232 KB Output is correct
43 Correct 587 ms 6260 KB Output is correct
44 Correct 566 ms 6236 KB Output is correct
45 Correct 566 ms 6256 KB Output is correct
46 Correct 568 ms 6236 KB Output is correct
47 Correct 1253 ms 6236 KB Output is correct
48 Correct 1314 ms 6232 KB Output is correct
49 Correct 1297 ms 6232 KB Output is correct
50 Correct 1298 ms 6276 KB Output is correct
51 Correct 1314 ms 6236 KB Output is correct
52 Correct 1321 ms 6272 KB Output is correct
53 Correct 1319 ms 6276 KB Output is correct
54 Correct 1318 ms 6236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 6232 KB Output is correct
2 Correct 33 ms 6244 KB Output is correct
3 Correct 14 ms 6236 KB Output is correct
4 Correct 110 ms 6076 KB Output is correct
5 Correct 549 ms 6276 KB Output is correct
6 Correct 553 ms 6236 KB Output is correct
7 Correct 558 ms 6232 KB Output is correct
8 Correct 544 ms 6272 KB Output is correct
9 Correct 563 ms 6236 KB Output is correct
10 Correct 536 ms 6232 KB Output is correct
11 Correct 539 ms 6236 KB Output is correct
12 Correct 25 ms 6236 KB Output is correct
13 Correct 35 ms 6108 KB Output is correct
14 Correct 13 ms 6248 KB Output is correct
15 Correct 109 ms 6236 KB Output is correct
16 Correct 557 ms 6232 KB Output is correct
17 Correct 572 ms 6232 KB Output is correct
18 Correct 556 ms 6272 KB Output is correct
19 Correct 570 ms 6272 KB Output is correct
20 Correct 583 ms 6236 KB Output is correct
21 Correct 538 ms 6236 KB Output is correct
22 Correct 541 ms 6232 KB Output is correct
23 Correct 1355 ms 6304 KB Output is correct
24 Correct 1372 ms 6296 KB Output is correct
25 Correct 1356 ms 6296 KB Output is correct
26 Correct 1352 ms 6236 KB Output is correct
27 Correct 1352 ms 6236 KB Output is correct
28 Correct 1278 ms 6248 KB Output is correct
29 Correct 1320 ms 6232 KB Output is correct
30 Correct 108 ms 6232 KB Output is correct
31 Correct 337 ms 6232 KB Output is correct
32 Correct 321 ms 6236 KB Output is correct
33 Correct 320 ms 6236 KB Output is correct
34 Correct 324 ms 6236 KB Output is correct
35 Correct 323 ms 6236 KB Output is correct
36 Correct 317 ms 6248 KB Output is correct
37 Correct 325 ms 6248 KB Output is correct
38 Correct 325 ms 6232 KB Output is correct
39 Correct 327 ms 6236 KB Output is correct
40 Correct 25 ms 6236 KB Output is correct
41 Correct 36 ms 6236 KB Output is correct
42 Correct 13 ms 6264 KB Output is correct
43 Correct 105 ms 6232 KB Output is correct
44 Correct 322 ms 6232 KB Output is correct
45 Correct 317 ms 6236 KB Output is correct
46 Correct 327 ms 6260 KB Output is correct
47 Correct 319 ms 6232 KB Output is correct
48 Correct 316 ms 6232 KB Output is correct
49 Correct 310 ms 6236 KB Output is correct
50 Correct 331 ms 6236 KB Output is correct
51 Correct 320 ms 6252 KB Output is correct
52 Correct 334 ms 6232 KB Output is correct
53 Correct 329 ms 6236 KB Output is correct
54 Correct 316 ms 6236 KB Output is correct
55 Correct 321 ms 6232 KB Output is correct
56 Correct 337 ms 6236 KB Output is correct
57 Correct 318 ms 6264 KB Output is correct
58 Correct 107 ms 6236 KB Output is correct
59 Correct 331 ms 6252 KB Output is correct
60 Correct 314 ms 6304 KB Output is correct
61 Correct 316 ms 6256 KB Output is correct
62 Correct 316 ms 6260 KB Output is correct
63 Correct 320 ms 6232 KB Output is correct
64 Correct 322 ms 6232 KB Output is correct
65 Correct 321 ms 6236 KB Output is correct
66 Correct 324 ms 6256 KB Output is correct
67 Correct 339 ms 6236 KB Output is correct
68 Correct 579 ms 6076 KB Output is correct
69 Correct 567 ms 6236 KB Output is correct
70 Correct 586 ms 6076 KB Output is correct
71 Correct 569 ms 6260 KB Output is correct
72 Correct 590 ms 6232 KB Output is correct
73 Correct 556 ms 6488 KB Output is correct
74 Correct 555 ms 6060 KB Output is correct
75 Correct 555 ms 6232 KB Output is correct
76 Correct 25 ms 6232 KB Output is correct
77 Correct 34 ms 6236 KB Output is correct
78 Correct 13 ms 6236 KB Output is correct
79 Correct 106 ms 6248 KB Output is correct
80 Correct 552 ms 6236 KB Output is correct
81 Correct 555 ms 6232 KB Output is correct
82 Correct 558 ms 6232 KB Output is correct
83 Correct 550 ms 6236 KB Output is correct
84 Correct 579 ms 6484 KB Output is correct
85 Correct 567 ms 6236 KB Output is correct
86 Correct 544 ms 6232 KB Output is correct
87 Correct 318 ms 6236 KB Output is correct
88 Correct 319 ms 6252 KB Output is correct
89 Correct 324 ms 6252 KB Output is correct
90 Correct 313 ms 6256 KB Output is correct
91 Correct 315 ms 6232 KB Output is correct
92 Correct 322 ms 6480 KB Output is correct
93 Correct 315 ms 6252 KB Output is correct
94 Correct 323 ms 6256 KB Output is correct
95 Correct 318 ms 6232 KB Output is correct
96 Correct 321 ms 6256 KB Output is correct
97 Correct 320 ms 6232 KB Output is correct
98 Correct 327 ms 6232 KB Output is correct
99 Correct 318 ms 6236 KB Output is correct
100 Correct 338 ms 6236 KB Output is correct
101 Correct 572 ms 6264 KB Output is correct
102 Correct 558 ms 6236 KB Output is correct
103 Correct 555 ms 6256 KB Output is correct
104 Correct 550 ms 6280 KB Output is correct
105 Correct 549 ms 6256 KB Output is correct
106 Correct 564 ms 6232 KB Output is correct
107 Correct 549 ms 6276 KB Output is correct
108 Correct 576 ms 6268 KB Output is correct
109 Correct 563 ms 6232 KB Output is correct
110 Correct 561 ms 6272 KB Output is correct
111 Correct 108 ms 6232 KB Output is correct
112 Correct 321 ms 6236 KB Output is correct
113 Correct 326 ms 6252 KB Output is correct
114 Correct 317 ms 6236 KB Output is correct
115 Correct 317 ms 6236 KB Output is correct
116 Correct 313 ms 6232 KB Output is correct
117 Correct 329 ms 6232 KB Output is correct
118 Correct 311 ms 6236 KB Output is correct
119 Correct 315 ms 6236 KB Output is correct
120 Correct 314 ms 6076 KB Output is correct
121 Correct 546 ms 6236 KB Output is correct
122 Correct 557 ms 6256 KB Output is correct
123 Correct 557 ms 6260 KB Output is correct
124 Correct 560 ms 6232 KB Output is correct
125 Correct 587 ms 6260 KB Output is correct
126 Correct 566 ms 6236 KB Output is correct
127 Correct 566 ms 6256 KB Output is correct
128 Correct 568 ms 6236 KB Output is correct
129 Correct 1253 ms 6236 KB Output is correct
130 Correct 1314 ms 6232 KB Output is correct
131 Correct 1297 ms 6232 KB Output is correct
132 Correct 1298 ms 6276 KB Output is correct
133 Correct 1314 ms 6236 KB Output is correct
134 Correct 1321 ms 6272 KB Output is correct
135 Correct 1319 ms 6276 KB Output is correct
136 Correct 1318 ms 6236 KB Output is correct
137 Correct 24 ms 6232 KB Output is correct
138 Correct 34 ms 6236 KB Output is correct
139 Correct 13 ms 6236 KB Output is correct
140 Correct 107 ms 6236 KB Output is correct
141 Correct 592 ms 6236 KB Output is correct
142 Correct 555 ms 6044 KB Output is correct
143 Correct 565 ms 6276 KB Output is correct
144 Correct 580 ms 6272 KB Output is correct
145 Correct 578 ms 6236 KB Output is correct
146 Correct 554 ms 6244 KB Output is correct
147 Correct 532 ms 6248 KB Output is correct
148 Correct 1314 ms 6236 KB Output is correct
149 Correct 1382 ms 6232 KB Output is correct
150 Correct 1323 ms 6304 KB Output is correct
151 Correct 1403 ms 6236 KB Output is correct
152 Correct 1327 ms 6232 KB Output is correct
153 Correct 1288 ms 6236 KB Output is correct
154 Correct 1316 ms 6252 KB Output is correct
155 Correct 324 ms 6236 KB Output is correct
156 Correct 318 ms 6232 KB Output is correct
157 Correct 319 ms 6232 KB Output is correct
158 Correct 316 ms 6480 KB Output is correct
159 Correct 308 ms 6236 KB Output is correct
160 Correct 321 ms 6232 KB Output is correct
161 Correct 317 ms 6232 KB Output is correct
162 Correct 321 ms 6236 KB Output is correct
163 Correct 311 ms 6260 KB Output is correct
164 Correct 544 ms 6232 KB Output is correct
165 Correct 550 ms 6260 KB Output is correct
166 Correct 548 ms 6236 KB Output is correct
167 Correct 555 ms 6260 KB Output is correct
168 Correct 583 ms 6232 KB Output is correct
169 Correct 578 ms 6236 KB Output is correct
170 Correct 329 ms 6480 KB Output is correct
171 Correct 321 ms 6232 KB Output is correct
172 Correct 328 ms 6484 KB Output is correct
173 Correct 330 ms 6232 KB Output is correct
174 Correct 327 ms 6232 KB Output is correct
175 Correct 581 ms 6236 KB Output is correct
176 Correct 590 ms 6236 KB Output is correct
177 Correct 566 ms 6272 KB Output is correct
178 Correct 568 ms 6232 KB Output is correct
179 Correct 1344 ms 6276 KB Output is correct
180 Correct 1376 ms 6236 KB Output is correct
181 Correct 1423 ms 6276 KB Output is correct
182 Correct 1326 ms 6232 KB Output is correct
183 Correct 1379 ms 6236 KB Output is correct
184 Correct 1328 ms 6236 KB Output is correct
185 Correct 1476 ms 6300 KB Output is correct
186 Correct 1440 ms 6232 KB Output is correct
187 Correct 1399 ms 6232 KB Output is correct
188 Correct 1405 ms 6304 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 6232 KB Output is correct
2 Correct 337 ms 6232 KB Output is correct
3 Correct 321 ms 6236 KB Output is correct
4 Correct 320 ms 6236 KB Output is correct
5 Correct 324 ms 6236 KB Output is correct
6 Correct 323 ms 6236 KB Output is correct
7 Correct 317 ms 6248 KB Output is correct
8 Correct 325 ms 6248 KB Output is correct
9 Correct 325 ms 6232 KB Output is correct
10 Correct 327 ms 6236 KB Output is correct
11 Correct 107 ms 6236 KB Output is correct
12 Correct 331 ms 6252 KB Output is correct
13 Correct 314 ms 6304 KB Output is correct
14 Correct 316 ms 6256 KB Output is correct
15 Correct 316 ms 6260 KB Output is correct
16 Correct 320 ms 6232 KB Output is correct
17 Correct 322 ms 6232 KB Output is correct
18 Correct 321 ms 6236 KB Output is correct
19 Correct 324 ms 6256 KB Output is correct
20 Correct 339 ms 6236 KB Output is correct
21 Correct 579 ms 6076 KB Output is correct
22 Correct 567 ms 6236 KB Output is correct
23 Correct 586 ms 6076 KB Output is correct
24 Correct 569 ms 6260 KB Output is correct
25 Correct 590 ms 6232 KB Output is correct
26 Correct 556 ms 6488 KB Output is correct
27 Correct 555 ms 6060 KB Output is correct
28 Correct 555 ms 6232 KB Output is correct
29 Correct 108 ms 6232 KB Output is correct
30 Correct 321 ms 6236 KB Output is correct
31 Correct 326 ms 6252 KB Output is correct
32 Correct 317 ms 6236 KB Output is correct
33 Correct 317 ms 6236 KB Output is correct
34 Correct 313 ms 6232 KB Output is correct
35 Correct 329 ms 6232 KB Output is correct
36 Correct 311 ms 6236 KB Output is correct
37 Correct 315 ms 6236 KB Output is correct
38 Correct 314 ms 6076 KB Output is correct
39 Correct 546 ms 6236 KB Output is correct
40 Correct 557 ms 6256 KB Output is correct
41 Correct 557 ms 6260 KB Output is correct
42 Correct 560 ms 6232 KB Output is correct
43 Correct 587 ms 6260 KB Output is correct
44 Correct 566 ms 6236 KB Output is correct
45 Correct 566 ms 6256 KB Output is correct
46 Correct 568 ms 6236 KB Output is correct
47 Correct 1253 ms 6236 KB Output is correct
48 Correct 1314 ms 6232 KB Output is correct
49 Correct 1297 ms 6232 KB Output is correct
50 Correct 1298 ms 6276 KB Output is correct
51 Correct 1314 ms 6236 KB Output is correct
52 Correct 1321 ms 6272 KB Output is correct
53 Correct 1319 ms 6276 KB Output is correct
54 Correct 1318 ms 6236 KB Output is correct
55 Correct 108 ms 6220 KB Output is correct
56 Correct 320 ms 6232 KB Output is correct
57 Correct 316 ms 6488 KB Output is correct
58 Correct 332 ms 6236 KB Output is correct
59 Correct 332 ms 6232 KB Output is correct
60 Correct 322 ms 6232 KB Output is correct
61 Correct 319 ms 6244 KB Output is correct
62 Correct 322 ms 6236 KB Output is correct
63 Correct 321 ms 6232 KB Output is correct
64 Correct 317 ms 6232 KB Output is correct
65 Correct 584 ms 6236 KB Output is correct
66 Correct 539 ms 6236 KB Output is correct
67 Correct 563 ms 6260 KB Output is correct
68 Correct 581 ms 6232 KB Output is correct
69 Correct 560 ms 6260 KB Output is correct
70 Correct 578 ms 6236 KB Output is correct
71 Correct 577 ms 6236 KB Output is correct
72 Correct 585 ms 6236 KB Output is correct
73 Correct 1384 ms 6252 KB Output is correct
74 Correct 1361 ms 6236 KB Output is correct
75 Correct 1383 ms 6284 KB Output is correct
76 Correct 1344 ms 6232 KB Output is correct
77 Correct 1397 ms 6272 KB Output is correct
78 Correct 1377 ms 6276 KB Output is correct
79 Correct 1349 ms 6236 KB Output is correct
80 Correct 1344 ms 6280 KB Output is correct
81 Execution timed out 5033 ms 6232 KB Time limit exceeded
82 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 6232 KB Output is correct
2 Correct 33 ms 6244 KB Output is correct
3 Correct 14 ms 6236 KB Output is correct
4 Correct 110 ms 6076 KB Output is correct
5 Correct 549 ms 6276 KB Output is correct
6 Correct 553 ms 6236 KB Output is correct
7 Correct 558 ms 6232 KB Output is correct
8 Correct 544 ms 6272 KB Output is correct
9 Correct 563 ms 6236 KB Output is correct
10 Correct 536 ms 6232 KB Output is correct
11 Correct 539 ms 6236 KB Output is correct
12 Correct 25 ms 6236 KB Output is correct
13 Correct 35 ms 6108 KB Output is correct
14 Correct 13 ms 6248 KB Output is correct
15 Correct 109 ms 6236 KB Output is correct
16 Correct 557 ms 6232 KB Output is correct
17 Correct 572 ms 6232 KB Output is correct
18 Correct 556 ms 6272 KB Output is correct
19 Correct 570 ms 6272 KB Output is correct
20 Correct 583 ms 6236 KB Output is correct
21 Correct 538 ms 6236 KB Output is correct
22 Correct 541 ms 6232 KB Output is correct
23 Correct 1355 ms 6304 KB Output is correct
24 Correct 1372 ms 6296 KB Output is correct
25 Correct 1356 ms 6296 KB Output is correct
26 Correct 1352 ms 6236 KB Output is correct
27 Correct 1352 ms 6236 KB Output is correct
28 Correct 1278 ms 6248 KB Output is correct
29 Correct 1320 ms 6232 KB Output is correct
30 Correct 108 ms 6232 KB Output is correct
31 Correct 337 ms 6232 KB Output is correct
32 Correct 321 ms 6236 KB Output is correct
33 Correct 320 ms 6236 KB Output is correct
34 Correct 324 ms 6236 KB Output is correct
35 Correct 323 ms 6236 KB Output is correct
36 Correct 317 ms 6248 KB Output is correct
37 Correct 325 ms 6248 KB Output is correct
38 Correct 325 ms 6232 KB Output is correct
39 Correct 327 ms 6236 KB Output is correct
40 Correct 25 ms 6236 KB Output is correct
41 Correct 36 ms 6236 KB Output is correct
42 Correct 13 ms 6264 KB Output is correct
43 Correct 105 ms 6232 KB Output is correct
44 Correct 322 ms 6232 KB Output is correct
45 Correct 317 ms 6236 KB Output is correct
46 Correct 327 ms 6260 KB Output is correct
47 Correct 319 ms 6232 KB Output is correct
48 Correct 316 ms 6232 KB Output is correct
49 Correct 310 ms 6236 KB Output is correct
50 Correct 331 ms 6236 KB Output is correct
51 Correct 320 ms 6252 KB Output is correct
52 Correct 334 ms 6232 KB Output is correct
53 Correct 329 ms 6236 KB Output is correct
54 Correct 316 ms 6236 KB Output is correct
55 Correct 321 ms 6232 KB Output is correct
56 Correct 337 ms 6236 KB Output is correct
57 Correct 318 ms 6264 KB Output is correct
58 Correct 107 ms 6236 KB Output is correct
59 Correct 331 ms 6252 KB Output is correct
60 Correct 314 ms 6304 KB Output is correct
61 Correct 316 ms 6256 KB Output is correct
62 Correct 316 ms 6260 KB Output is correct
63 Correct 320 ms 6232 KB Output is correct
64 Correct 322 ms 6232 KB Output is correct
65 Correct 321 ms 6236 KB Output is correct
66 Correct 324 ms 6256 KB Output is correct
67 Correct 339 ms 6236 KB Output is correct
68 Correct 579 ms 6076 KB Output is correct
69 Correct 567 ms 6236 KB Output is correct
70 Correct 586 ms 6076 KB Output is correct
71 Correct 569 ms 6260 KB Output is correct
72 Correct 590 ms 6232 KB Output is correct
73 Correct 556 ms 6488 KB Output is correct
74 Correct 555 ms 6060 KB Output is correct
75 Correct 555 ms 6232 KB Output is correct
76 Correct 25 ms 6232 KB Output is correct
77 Correct 34 ms 6236 KB Output is correct
78 Correct 13 ms 6236 KB Output is correct
79 Correct 106 ms 6248 KB Output is correct
80 Correct 552 ms 6236 KB Output is correct
81 Correct 555 ms 6232 KB Output is correct
82 Correct 558 ms 6232 KB Output is correct
83 Correct 550 ms 6236 KB Output is correct
84 Correct 579 ms 6484 KB Output is correct
85 Correct 567 ms 6236 KB Output is correct
86 Correct 544 ms 6232 KB Output is correct
87 Correct 318 ms 6236 KB Output is correct
88 Correct 319 ms 6252 KB Output is correct
89 Correct 324 ms 6252 KB Output is correct
90 Correct 313 ms 6256 KB Output is correct
91 Correct 315 ms 6232 KB Output is correct
92 Correct 322 ms 6480 KB Output is correct
93 Correct 315 ms 6252 KB Output is correct
94 Correct 323 ms 6256 KB Output is correct
95 Correct 318 ms 6232 KB Output is correct
96 Correct 321 ms 6256 KB Output is correct
97 Correct 320 ms 6232 KB Output is correct
98 Correct 327 ms 6232 KB Output is correct
99 Correct 318 ms 6236 KB Output is correct
100 Correct 338 ms 6236 KB Output is correct
101 Correct 572 ms 6264 KB Output is correct
102 Correct 558 ms 6236 KB Output is correct
103 Correct 555 ms 6256 KB Output is correct
104 Correct 550 ms 6280 KB Output is correct
105 Correct 549 ms 6256 KB Output is correct
106 Correct 564 ms 6232 KB Output is correct
107 Correct 549 ms 6276 KB Output is correct
108 Correct 576 ms 6268 KB Output is correct
109 Correct 563 ms 6232 KB Output is correct
110 Correct 561 ms 6272 KB Output is correct
111 Correct 108 ms 6232 KB Output is correct
112 Correct 321 ms 6236 KB Output is correct
113 Correct 326 ms 6252 KB Output is correct
114 Correct 317 ms 6236 KB Output is correct
115 Correct 317 ms 6236 KB Output is correct
116 Correct 313 ms 6232 KB Output is correct
117 Correct 329 ms 6232 KB Output is correct
118 Correct 311 ms 6236 KB Output is correct
119 Correct 315 ms 6236 KB Output is correct
120 Correct 314 ms 6076 KB Output is correct
121 Correct 546 ms 6236 KB Output is correct
122 Correct 557 ms 6256 KB Output is correct
123 Correct 557 ms 6260 KB Output is correct
124 Correct 560 ms 6232 KB Output is correct
125 Correct 587 ms 6260 KB Output is correct
126 Correct 566 ms 6236 KB Output is correct
127 Correct 566 ms 6256 KB Output is correct
128 Correct 568 ms 6236 KB Output is correct
129 Correct 1253 ms 6236 KB Output is correct
130 Correct 1314 ms 6232 KB Output is correct
131 Correct 1297 ms 6232 KB Output is correct
132 Correct 1298 ms 6276 KB Output is correct
133 Correct 1314 ms 6236 KB Output is correct
134 Correct 1321 ms 6272 KB Output is correct
135 Correct 1319 ms 6276 KB Output is correct
136 Correct 1318 ms 6236 KB Output is correct
137 Correct 24 ms 6232 KB Output is correct
138 Correct 34 ms 6236 KB Output is correct
139 Correct 13 ms 6236 KB Output is correct
140 Correct 107 ms 6236 KB Output is correct
141 Correct 592 ms 6236 KB Output is correct
142 Correct 555 ms 6044 KB Output is correct
143 Correct 565 ms 6276 KB Output is correct
144 Correct 580 ms 6272 KB Output is correct
145 Correct 578 ms 6236 KB Output is correct
146 Correct 554 ms 6244 KB Output is correct
147 Correct 532 ms 6248 KB Output is correct
148 Correct 1314 ms 6236 KB Output is correct
149 Correct 1382 ms 6232 KB Output is correct
150 Correct 1323 ms 6304 KB Output is correct
151 Correct 1403 ms 6236 KB Output is correct
152 Correct 1327 ms 6232 KB Output is correct
153 Correct 1288 ms 6236 KB Output is correct
154 Correct 1316 ms 6252 KB Output is correct
155 Correct 324 ms 6236 KB Output is correct
156 Correct 318 ms 6232 KB Output is correct
157 Correct 319 ms 6232 KB Output is correct
158 Correct 316 ms 6480 KB Output is correct
159 Correct 308 ms 6236 KB Output is correct
160 Correct 321 ms 6232 KB Output is correct
161 Correct 317 ms 6232 KB Output is correct
162 Correct 321 ms 6236 KB Output is correct
163 Correct 311 ms 6260 KB Output is correct
164 Correct 544 ms 6232 KB Output is correct
165 Correct 550 ms 6260 KB Output is correct
166 Correct 548 ms 6236 KB Output is correct
167 Correct 555 ms 6260 KB Output is correct
168 Correct 583 ms 6232 KB Output is correct
169 Correct 578 ms 6236 KB Output is correct
170 Correct 329 ms 6480 KB Output is correct
171 Correct 321 ms 6232 KB Output is correct
172 Correct 328 ms 6484 KB Output is correct
173 Correct 330 ms 6232 KB Output is correct
174 Correct 327 ms 6232 KB Output is correct
175 Correct 581 ms 6236 KB Output is correct
176 Correct 590 ms 6236 KB Output is correct
177 Correct 566 ms 6272 KB Output is correct
178 Correct 568 ms 6232 KB Output is correct
179 Correct 1344 ms 6276 KB Output is correct
180 Correct 1376 ms 6236 KB Output is correct
181 Correct 1423 ms 6276 KB Output is correct
182 Correct 1326 ms 6232 KB Output is correct
183 Correct 1379 ms 6236 KB Output is correct
184 Correct 1328 ms 6236 KB Output is correct
185 Correct 1476 ms 6300 KB Output is correct
186 Correct 1440 ms 6232 KB Output is correct
187 Correct 1399 ms 6232 KB Output is correct
188 Correct 1405 ms 6304 KB Output is correct
189 Correct 108 ms 6220 KB Output is correct
190 Correct 320 ms 6232 KB Output is correct
191 Correct 316 ms 6488 KB Output is correct
192 Correct 332 ms 6236 KB Output is correct
193 Correct 332 ms 6232 KB Output is correct
194 Correct 322 ms 6232 KB Output is correct
195 Correct 319 ms 6244 KB Output is correct
196 Correct 322 ms 6236 KB Output is correct
197 Correct 321 ms 6232 KB Output is correct
198 Correct 317 ms 6232 KB Output is correct
199 Correct 584 ms 6236 KB Output is correct
200 Correct 539 ms 6236 KB Output is correct
201 Correct 563 ms 6260 KB Output is correct
202 Correct 581 ms 6232 KB Output is correct
203 Correct 560 ms 6260 KB Output is correct
204 Correct 578 ms 6236 KB Output is correct
205 Correct 577 ms 6236 KB Output is correct
206 Correct 585 ms 6236 KB Output is correct
207 Correct 1384 ms 6252 KB Output is correct
208 Correct 1361 ms 6236 KB Output is correct
209 Correct 1383 ms 6284 KB Output is correct
210 Correct 1344 ms 6232 KB Output is correct
211 Correct 1397 ms 6272 KB Output is correct
212 Correct 1377 ms 6276 KB Output is correct
213 Correct 1349 ms 6236 KB Output is correct
214 Correct 1344 ms 6280 KB Output is correct
215 Execution timed out 5033 ms 6232 KB Time limit exceeded
216 Halted 0 ms 0 KB -