답안 #983690

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
983690 2024-05-15T23:17:22 Z gustavo_d Jelly Flavours (IOI20_jelly) C++17
44 / 100
1438 ms 2097152 KB
#include "jelly.h"
#include <bits/stdc++.h>
using namespace std;

int find_maximum_unique(int x, int y, std::vector<int> a, std::vector<int> b) {
	int n = a.size();

	if (n*x*y <= 5e7+100) {
		vector<vector<vector<int>>> dp(n+1, vector<vector<int>> (x+1, vector<int> (y+1, 0)));
		for (int i=1; i<=n; i++) {
			for (int xi=0; xi<=x; xi++) {
				for (int yi=0; yi<=y; yi++) {
					// não compra e pega o xi ou yi menor
					dp[i][xi][yi] = max(0, dp[i][xi != 0 ? xi-1 : 0][yi]);
					dp[i][xi][yi] = max(dp[i][xi][yi], dp[i][xi][yi != 0 ? yi-1 : 0]);
					// não compra o i
					dp[i][xi][yi] = max(dp[i][xi][yi], dp[i-1][xi][yi]);
					// compra na a
					if (xi >= a[i-1]) dp[i][xi][yi] = max(dp[i][xi][yi], dp[i-1][xi-a[i-1]][yi] + 1);
					// compra na b
					if (yi >= b[i-1]) dp[i][xi][yi] = max(dp[i][xi][yi], dp[i-1][xi][yi-b[i-1]] + 1);
				}
			}
		}
		return dp[n][x][y];
	} else {
		int cnt = 0, i=0;
		sort(a.begin(), a.end());
		for (; i<n; i++, cnt++) { // acha primeiro que não pode comprar
			if (x < a[i]) break;
			x -= a[i];
		}
		for (; i<n; i++, cnt++) {
			if (y<b[i]) break;
			y-=b[i];
		}

		return cnt;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 2140 KB Output is correct
2 Correct 14 ms 8700 KB Output is correct
3 Correct 14 ms 9048 KB Output is correct
4 Correct 24 ms 12132 KB Output is correct
5 Correct 18 ms 9564 KB Output is correct
6 Correct 12 ms 7772 KB Output is correct
7 Correct 20 ms 10796 KB Output is correct
8 Correct 11 ms 7772 KB Output is correct
9 Correct 20 ms 9820 KB Output is correct
10 Correct 23 ms 11608 KB Output is correct
11 Correct 3 ms 1372 KB Output is correct
12 Correct 4 ms 2140 KB Output is correct
13 Correct 15 ms 8796 KB Output is correct
14 Correct 15 ms 9052 KB Output is correct
15 Correct 25 ms 12092 KB Output is correct
16 Correct 19 ms 9560 KB Output is correct
17 Correct 12 ms 7772 KB Output is correct
18 Correct 19 ms 10800 KB Output is correct
19 Correct 13 ms 7772 KB Output is correct
20 Correct 20 ms 9820 KB Output is correct
21 Correct 4 ms 2136 KB Output is correct
22 Correct 24 ms 11612 KB Output is correct
23 Correct 3 ms 2140 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 3 ms 1628 KB Output is correct
26 Correct 3 ms 1672 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 3 ms 2124 KB Output is correct
29 Correct 3 ms 1884 KB Output is correct
30 Correct 3 ms 2336 KB Output is correct
31 Correct 3 ms 1628 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 3 ms 1624 KB Output is correct
34 Correct 3 ms 1628 KB Output is correct
35 Correct 2 ms 1116 KB Output is correct
36 Correct 3 ms 2140 KB Output is correct
37 Correct 3 ms 2140 KB Output is correct
38 Correct 3 ms 2140 KB Output is correct
39 Correct 3 ms 1628 KB Output is correct
40 Correct 2 ms 1372 KB Output is correct
41 Correct 3 ms 2140 KB Output is correct
42 Correct 14 ms 8856 KB Output is correct
43 Correct 15 ms 9052 KB Output is correct
44 Correct 24 ms 12124 KB Output is correct
45 Correct 18 ms 9564 KB Output is correct
46 Correct 12 ms 7768 KB Output is correct
47 Correct 19 ms 10588 KB Output is correct
48 Correct 11 ms 7772 KB Output is correct
49 Correct 19 ms 10048 KB Output is correct
50 Correct 23 ms 11612 KB Output is correct
51 Correct 4 ms 2140 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 3 ms 1624 KB Output is correct
54 Correct 3 ms 1628 KB Output is correct
55 Correct 2 ms 1112 KB Output is correct
56 Correct 3 ms 2140 KB Output is correct
57 Correct 3 ms 1944 KB Output is correct
58 Correct 3 ms 2140 KB Output is correct
59 Correct 3 ms 1628 KB Output is correct
60 Correct 2 ms 1372 KB Output is correct
61 Correct 4 ms 2140 KB Output is correct
62 Correct 15 ms 8884 KB Output is correct
63 Correct 14 ms 9096 KB Output is correct
64 Correct 23 ms 12124 KB Output is correct
65 Correct 18 ms 9564 KB Output is correct
66 Correct 12 ms 7768 KB Output is correct
67 Correct 19 ms 10584 KB Output is correct
68 Correct 12 ms 7768 KB Output is correct
69 Correct 20 ms 9820 KB Output is correct
70 Correct 24 ms 11856 KB Output is correct
71 Correct 4 ms 2356 KB Output is correct
72 Correct 1 ms 348 KB Output is correct
73 Correct 3 ms 1624 KB Output is correct
74 Correct 3 ms 1628 KB Output is correct
75 Correct 2 ms 1116 KB Output is correct
76 Correct 3 ms 2140 KB Output is correct
77 Correct 3 ms 1884 KB Output is correct
78 Correct 3 ms 2140 KB Output is correct
79 Correct 3 ms 1628 KB Output is correct
80 Correct 2 ms 1372 KB Output is correct
81 Correct 3 ms 2136 KB Output is correct
82 Correct 14 ms 8540 KB Output is correct
83 Correct 14 ms 9052 KB Output is correct
84 Correct 24 ms 12124 KB Output is correct
85 Correct 18 ms 9564 KB Output is correct
86 Correct 12 ms 7820 KB Output is correct
87 Correct 20 ms 10792 KB Output is correct
88 Correct 12 ms 8028 KB Output is correct
89 Correct 19 ms 9820 KB Output is correct
90 Correct 23 ms 11868 KB Output is correct
91 Correct 3 ms 2140 KB Output is correct
92 Correct 0 ms 440 KB Output is correct
93 Correct 3 ms 1628 KB Output is correct
94 Correct 3 ms 1628 KB Output is correct
95 Correct 2 ms 1116 KB Output is correct
96 Correct 4 ms 2140 KB Output is correct
97 Correct 3 ms 1884 KB Output is correct
98 Correct 3 ms 2140 KB Output is correct
99 Correct 3 ms 1628 KB Output is correct
100 Correct 3 ms 1368 KB Output is correct
101 Correct 4 ms 2140 KB Output is correct
102 Correct 15 ms 8536 KB Output is correct
103 Correct 14 ms 9052 KB Output is correct
104 Correct 24 ms 12124 KB Output is correct
105 Correct 19 ms 9564 KB Output is correct
106 Correct 12 ms 7772 KB Output is correct
107 Correct 19 ms 10588 KB Output is correct
108 Correct 12 ms 7772 KB Output is correct
109 Correct 19 ms 9816 KB Output is correct
110 Correct 24 ms 11868 KB Output is correct
111 Correct 4 ms 2136 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 3 ms 1628 KB Output is correct
114 Correct 3 ms 1628 KB Output is correct
115 Correct 2 ms 1116 KB Output is correct
116 Correct 3 ms 2256 KB Output is correct
117 Correct 3 ms 1884 KB Output is correct
118 Correct 3 ms 2204 KB Output is correct
119 Correct 3 ms 1628 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 2140 KB Output is correct
2 Correct 14 ms 8700 KB Output is correct
3 Correct 14 ms 9048 KB Output is correct
4 Correct 24 ms 12132 KB Output is correct
5 Correct 18 ms 9564 KB Output is correct
6 Correct 12 ms 7772 KB Output is correct
7 Correct 20 ms 10796 KB Output is correct
8 Correct 11 ms 7772 KB Output is correct
9 Correct 20 ms 9820 KB Output is correct
10 Correct 23 ms 11608 KB Output is correct
11 Correct 3 ms 1372 KB Output is correct
12 Correct 4 ms 2140 KB Output is correct
13 Correct 15 ms 8796 KB Output is correct
14 Correct 15 ms 9052 KB Output is correct
15 Correct 25 ms 12092 KB Output is correct
16 Correct 19 ms 9560 KB Output is correct
17 Correct 12 ms 7772 KB Output is correct
18 Correct 19 ms 10800 KB Output is correct
19 Correct 13 ms 7772 KB Output is correct
20 Correct 20 ms 9820 KB Output is correct
21 Correct 4 ms 2136 KB Output is correct
22 Correct 24 ms 11612 KB Output is correct
23 Correct 3 ms 2140 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 3 ms 1628 KB Output is correct
26 Correct 3 ms 1672 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 3 ms 2124 KB Output is correct
29 Correct 3 ms 1884 KB Output is correct
30 Correct 3 ms 2336 KB Output is correct
31 Correct 3 ms 1628 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 3 ms 1624 KB Output is correct
34 Correct 3 ms 1628 KB Output is correct
35 Correct 2 ms 1116 KB Output is correct
36 Correct 3 ms 2140 KB Output is correct
37 Correct 3 ms 2140 KB Output is correct
38 Correct 3 ms 2140 KB Output is correct
39 Correct 3 ms 1628 KB Output is correct
40 Correct 2 ms 1372 KB Output is correct
41 Correct 3 ms 2140 KB Output is correct
42 Correct 14 ms 8856 KB Output is correct
43 Correct 15 ms 9052 KB Output is correct
44 Correct 24 ms 12124 KB Output is correct
45 Correct 18 ms 9564 KB Output is correct
46 Correct 12 ms 7768 KB Output is correct
47 Correct 19 ms 10588 KB Output is correct
48 Correct 11 ms 7772 KB Output is correct
49 Correct 19 ms 10048 KB Output is correct
50 Correct 23 ms 11612 KB Output is correct
51 Correct 4 ms 2140 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 3 ms 1624 KB Output is correct
54 Correct 3 ms 1628 KB Output is correct
55 Correct 2 ms 1112 KB Output is correct
56 Correct 3 ms 2140 KB Output is correct
57 Correct 3 ms 1944 KB Output is correct
58 Correct 3 ms 2140 KB Output is correct
59 Correct 3 ms 1628 KB Output is correct
60 Correct 2 ms 1372 KB Output is correct
61 Correct 4 ms 2140 KB Output is correct
62 Correct 15 ms 8884 KB Output is correct
63 Correct 14 ms 9096 KB Output is correct
64 Correct 23 ms 12124 KB Output is correct
65 Correct 18 ms 9564 KB Output is correct
66 Correct 12 ms 7768 KB Output is correct
67 Correct 19 ms 10584 KB Output is correct
68 Correct 12 ms 7768 KB Output is correct
69 Correct 20 ms 9820 KB Output is correct
70 Correct 24 ms 11856 KB Output is correct
71 Correct 4 ms 2356 KB Output is correct
72 Correct 1 ms 348 KB Output is correct
73 Correct 3 ms 1624 KB Output is correct
74 Correct 3 ms 1628 KB Output is correct
75 Correct 2 ms 1116 KB Output is correct
76 Correct 3 ms 2140 KB Output is correct
77 Correct 3 ms 1884 KB Output is correct
78 Correct 3 ms 2140 KB Output is correct
79 Correct 3 ms 1628 KB Output is correct
80 Correct 2 ms 1372 KB Output is correct
81 Correct 3 ms 2136 KB Output is correct
82 Correct 14 ms 8540 KB Output is correct
83 Correct 14 ms 9052 KB Output is correct
84 Correct 24 ms 12124 KB Output is correct
85 Correct 18 ms 9564 KB Output is correct
86 Correct 12 ms 7820 KB Output is correct
87 Correct 20 ms 10792 KB Output is correct
88 Correct 12 ms 8028 KB Output is correct
89 Correct 19 ms 9820 KB Output is correct
90 Correct 23 ms 11868 KB Output is correct
91 Correct 3 ms 2140 KB Output is correct
92 Correct 0 ms 440 KB Output is correct
93 Correct 3 ms 1628 KB Output is correct
94 Correct 3 ms 1628 KB Output is correct
95 Correct 2 ms 1116 KB Output is correct
96 Correct 4 ms 2140 KB Output is correct
97 Correct 3 ms 1884 KB Output is correct
98 Correct 3 ms 2140 KB Output is correct
99 Correct 3 ms 1628 KB Output is correct
100 Correct 3 ms 1368 KB Output is correct
101 Correct 4 ms 2140 KB Output is correct
102 Correct 15 ms 8536 KB Output is correct
103 Correct 14 ms 9052 KB Output is correct
104 Correct 24 ms 12124 KB Output is correct
105 Correct 19 ms 9564 KB Output is correct
106 Correct 12 ms 7772 KB Output is correct
107 Correct 19 ms 10588 KB Output is correct
108 Correct 12 ms 7772 KB Output is correct
109 Correct 19 ms 9816 KB Output is correct
110 Correct 24 ms 11868 KB Output is correct
111 Correct 4 ms 2136 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 3 ms 1628 KB Output is correct
114 Correct 3 ms 1628 KB Output is correct
115 Correct 2 ms 1116 KB Output is correct
116 Correct 3 ms 2256 KB Output is correct
117 Correct 3 ms 1884 KB Output is correct
118 Correct 3 ms 2204 KB Output is correct
119 Correct 3 ms 1628 KB Output is correct
120 Correct 14 ms 9564 KB Output is correct
121 Correct 294 ms 150720 KB Output is correct
122 Correct 312 ms 158548 KB Output is correct
123 Correct 340 ms 141240 KB Output is correct
124 Correct 383 ms 156780 KB Output is correct
125 Correct 291 ms 153028 KB Output is correct
126 Correct 327 ms 175064 KB Output is correct
127 Correct 288 ms 148820 KB Output is correct
128 Correct 451 ms 191812 KB Output is correct
129 Correct 352 ms 145536 KB Output is correct
130 Correct 14 ms 7512 KB Output is correct
131 Correct 0 ms 344 KB Output is correct
132 Correct 20 ms 10948 KB Output is correct
133 Correct 3 ms 1624 KB Output is correct
134 Correct 15 ms 6748 KB Output is correct
135 Correct 38 ms 19548 KB Output is correct
136 Correct 37 ms 20572 KB Output is correct
137 Correct 22 ms 13404 KB Output is correct
138 Correct 51 ms 22404 KB Output is correct
139 Correct 18 ms 10072 KB Output is correct
140 Correct 14 ms 9560 KB Output is correct
141 Correct 294 ms 150708 KB Output is correct
142 Correct 306 ms 158496 KB Output is correct
143 Correct 342 ms 140980 KB Output is correct
144 Correct 382 ms 156552 KB Output is correct
145 Correct 292 ms 153032 KB Output is correct
146 Correct 330 ms 175444 KB Output is correct
147 Correct 283 ms 148604 KB Output is correct
148 Correct 456 ms 191772 KB Output is correct
149 Correct 352 ms 145544 KB Output is correct
150 Correct 14 ms 7516 KB Output is correct
151 Correct 0 ms 344 KB Output is correct
152 Correct 20 ms 10956 KB Output is correct
153 Correct 3 ms 1372 KB Output is correct
154 Correct 16 ms 6748 KB Output is correct
155 Correct 39 ms 19768 KB Output is correct
156 Correct 38 ms 20868 KB Output is correct
157 Correct 22 ms 13400 KB Output is correct
158 Correct 49 ms 22360 KB Output is correct
159 Correct 18 ms 10076 KB Output is correct
160 Correct 14 ms 9560 KB Output is correct
161 Correct 287 ms 150612 KB Output is correct
162 Correct 305 ms 158548 KB Output is correct
163 Correct 336 ms 141184 KB Output is correct
164 Correct 377 ms 156780 KB Output is correct
165 Correct 294 ms 153028 KB Output is correct
166 Correct 328 ms 175060 KB Output is correct
167 Correct 278 ms 148440 KB Output is correct
168 Correct 461 ms 191808 KB Output is correct
169 Correct 354 ms 145548 KB Output is correct
170 Correct 14 ms 7516 KB Output is correct
171 Correct 1 ms 348 KB Output is correct
172 Correct 21 ms 10844 KB Output is correct
173 Correct 3 ms 1628 KB Output is correct
174 Correct 15 ms 6940 KB Output is correct
175 Correct 38 ms 19548 KB Output is correct
176 Correct 37 ms 20616 KB Output is correct
177 Correct 22 ms 13400 KB Output is correct
178 Correct 50 ms 22364 KB Output is correct
179 Correct 18 ms 10076 KB Output is correct
180 Correct 15 ms 9464 KB Output is correct
181 Correct 289 ms 150716 KB Output is correct
182 Correct 310 ms 158484 KB Output is correct
183 Correct 338 ms 141176 KB Output is correct
184 Correct 377 ms 156856 KB Output is correct
185 Correct 299 ms 153032 KB Output is correct
186 Correct 334 ms 174888 KB Output is correct
187 Correct 280 ms 148612 KB Output is correct
188 Correct 454 ms 191820 KB Output is correct
189 Correct 355 ms 145548 KB Output is correct
190 Correct 14 ms 7512 KB Output is correct
191 Correct 0 ms 348 KB Output is correct
192 Correct 21 ms 10844 KB Output is correct
193 Correct 3 ms 1628 KB Output is correct
194 Correct 16 ms 6944 KB Output is correct
195 Correct 38 ms 19548 KB Output is correct
196 Correct 36 ms 20568 KB Output is correct
197 Correct 22 ms 13404 KB Output is correct
198 Correct 52 ms 22360 KB Output is correct
199 Correct 18 ms 10072 KB Output is correct
200 Correct 15 ms 9708 KB Output is correct
201 Correct 294 ms 150720 KB Output is correct
202 Correct 303 ms 158484 KB Output is correct
203 Correct 341 ms 141392 KB Output is correct
204 Correct 381 ms 156756 KB Output is correct
205 Correct 292 ms 153036 KB Output is correct
206 Correct 331 ms 175240 KB Output is correct
207 Correct 282 ms 148604 KB Output is correct
208 Correct 453 ms 191812 KB Output is correct
209 Correct 357 ms 145540 KB Output is correct
210 Correct 14 ms 7512 KB Output is correct
211 Correct 1 ms 440 KB Output is correct
212 Correct 21 ms 10948 KB Output is correct
213 Correct 4 ms 1624 KB Output is correct
214 Correct 16 ms 6944 KB Output is correct
215 Correct 38 ms 19764 KB Output is correct
216 Correct 36 ms 20568 KB Output is correct
217 Correct 23 ms 13520 KB Output is correct
218 Correct 51 ms 22212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 186 ms 182252 KB Output is correct
2 Correct 296 ms 283688 KB Output is correct
3 Correct 82 ms 74580 KB Output is correct
4 Correct 115 ms 111440 KB Output is correct
5 Correct 784 ms 750924 KB Output is correct
6 Correct 994 ms 953388 KB Output is correct
7 Correct 960 ms 924876 KB Output is correct
8 Correct 182 ms 176976 KB Output is correct
9 Correct 1438 ms 978144 KB Output is correct
10 Correct 417 ms 398216 KB Output is correct
11 Correct 887 ms 856152 KB Output is correct
12 Correct 707 ms 674536 KB Output is correct
13 Correct 658 ms 592580 KB Output is correct
14 Correct 189 ms 186328 KB Output is correct
15 Correct 708 ms 677772 KB Output is correct
16 Correct 694 ms 651352 KB Output is correct
17 Correct 717 ms 687220 KB Output is correct
18 Correct 774 ms 737876 KB Output is correct
19 Correct 643 ms 578568 KB Output is correct
20 Correct 191 ms 184144 KB Output is correct
21 Correct 188 ms 182308 KB Output is correct
22 Correct 291 ms 283764 KB Output is correct
23 Correct 79 ms 74712 KB Output is correct
24 Correct 114 ms 111524 KB Output is correct
25 Correct 769 ms 750932 KB Output is correct
26 Correct 999 ms 953924 KB Output is correct
27 Correct 980 ms 924832 KB Output is correct
28 Correct 184 ms 176996 KB Output is correct
29 Correct 980 ms 978256 KB Output is correct
30 Correct 415 ms 398164 KB Output is correct
31 Correct 879 ms 856036 KB Output is correct
32 Correct 722 ms 674484 KB Output is correct
33 Correct 652 ms 592696 KB Output is correct
34 Correct 186 ms 186320 KB Output is correct
35 Correct 693 ms 677772 KB Output is correct
36 Correct 679 ms 651604 KB Output is correct
37 Correct 716 ms 687048 KB Output is correct
38 Correct 755 ms 737588 KB Output is correct
39 Correct 625 ms 578812 KB Output is correct
40 Correct 189 ms 184300 KB Output is correct
41 Correct 184 ms 182144 KB Output is correct
42 Correct 284 ms 283764 KB Output is correct
43 Correct 95 ms 74576 KB Output is correct
44 Correct 127 ms 111312 KB Output is correct
45 Correct 796 ms 750776 KB Output is correct
46 Correct 1033 ms 953444 KB Output is correct
47 Correct 1029 ms 924660 KB Output is correct
48 Correct 191 ms 176980 KB Output is correct
49 Correct 1052 ms 978332 KB Output is correct
50 Correct 436 ms 398196 KB Output is correct
51 Correct 957 ms 856004 KB Output is correct
52 Correct 741 ms 674248 KB Output is correct
53 Correct 702 ms 592340 KB Output is correct
54 Correct 202 ms 186312 KB Output is correct
55 Correct 778 ms 677648 KB Output is correct
56 Correct 700 ms 651232 KB Output is correct
57 Correct 756 ms 687156 KB Output is correct
58 Correct 828 ms 737616 KB Output is correct
59 Correct 630 ms 578568 KB Output is correct
60 Correct 196 ms 184300 KB Output is correct
61 Correct 196 ms 182444 KB Output is correct
62 Correct 302 ms 283560 KB Output is correct
63 Correct 80 ms 74720 KB Output is correct
64 Correct 127 ms 111568 KB Output is correct
65 Correct 812 ms 750868 KB Output is correct
66 Correct 1043 ms 953552 KB Output is correct
67 Correct 996 ms 924616 KB Output is correct
68 Correct 193 ms 176732 KB Output is correct
69 Correct 1043 ms 978304 KB Output is correct
70 Correct 447 ms 398476 KB Output is correct
71 Correct 950 ms 856100 KB Output is correct
72 Correct 733 ms 674384 KB Output is correct
73 Correct 675 ms 592304 KB Output is correct
74 Correct 198 ms 186540 KB Output is correct
75 Correct 733 ms 677724 KB Output is correct
76 Correct 724 ms 651392 KB Output is correct
77 Correct 756 ms 687024 KB Output is correct
78 Correct 797 ms 737524 KB Output is correct
79 Correct 628 ms 578724 KB Output is correct
80 Correct 184 ms 184148 KB Output is correct
81 Correct 190 ms 182352 KB Output is correct
82 Correct 288 ms 283564 KB Output is correct
83 Correct 81 ms 74692 KB Output is correct
84 Correct 114 ms 111440 KB Output is correct
85 Correct 788 ms 750692 KB Output is correct
86 Correct 983 ms 953404 KB Output is correct
87 Correct 946 ms 924756 KB Output is correct
88 Correct 185 ms 177180 KB Output is correct
89 Correct 983 ms 978192 KB Output is correct
90 Correct 438 ms 398160 KB Output is correct
91 Correct 880 ms 856252 KB Output is correct
92 Correct 713 ms 674300 KB Output is correct
93 Correct 655 ms 592468 KB Output is correct
94 Correct 189 ms 186452 KB Output is correct
95 Correct 697 ms 677856 KB Output is correct
96 Correct 678 ms 651384 KB Output is correct
97 Correct 715 ms 687112 KB Output is correct
98 Correct 778 ms 737488 KB Output is correct
99 Correct 622 ms 578384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 891 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 892 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 2140 KB Output is correct
2 Correct 14 ms 8700 KB Output is correct
3 Correct 14 ms 9048 KB Output is correct
4 Correct 24 ms 12132 KB Output is correct
5 Correct 18 ms 9564 KB Output is correct
6 Correct 12 ms 7772 KB Output is correct
7 Correct 20 ms 10796 KB Output is correct
8 Correct 11 ms 7772 KB Output is correct
9 Correct 20 ms 9820 KB Output is correct
10 Correct 23 ms 11608 KB Output is correct
11 Correct 3 ms 1372 KB Output is correct
12 Correct 4 ms 2140 KB Output is correct
13 Correct 15 ms 8796 KB Output is correct
14 Correct 15 ms 9052 KB Output is correct
15 Correct 25 ms 12092 KB Output is correct
16 Correct 19 ms 9560 KB Output is correct
17 Correct 12 ms 7772 KB Output is correct
18 Correct 19 ms 10800 KB Output is correct
19 Correct 13 ms 7772 KB Output is correct
20 Correct 20 ms 9820 KB Output is correct
21 Correct 4 ms 2136 KB Output is correct
22 Correct 24 ms 11612 KB Output is correct
23 Correct 3 ms 2140 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 3 ms 1628 KB Output is correct
26 Correct 3 ms 1672 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 3 ms 2124 KB Output is correct
29 Correct 3 ms 1884 KB Output is correct
30 Correct 3 ms 2336 KB Output is correct
31 Correct 3 ms 1628 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 3 ms 1624 KB Output is correct
34 Correct 3 ms 1628 KB Output is correct
35 Correct 2 ms 1116 KB Output is correct
36 Correct 3 ms 2140 KB Output is correct
37 Correct 3 ms 2140 KB Output is correct
38 Correct 3 ms 2140 KB Output is correct
39 Correct 3 ms 1628 KB Output is correct
40 Correct 2 ms 1372 KB Output is correct
41 Correct 3 ms 2140 KB Output is correct
42 Correct 14 ms 8856 KB Output is correct
43 Correct 15 ms 9052 KB Output is correct
44 Correct 24 ms 12124 KB Output is correct
45 Correct 18 ms 9564 KB Output is correct
46 Correct 12 ms 7768 KB Output is correct
47 Correct 19 ms 10588 KB Output is correct
48 Correct 11 ms 7772 KB Output is correct
49 Correct 19 ms 10048 KB Output is correct
50 Correct 23 ms 11612 KB Output is correct
51 Correct 4 ms 2140 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 3 ms 1624 KB Output is correct
54 Correct 3 ms 1628 KB Output is correct
55 Correct 2 ms 1112 KB Output is correct
56 Correct 3 ms 2140 KB Output is correct
57 Correct 3 ms 1944 KB Output is correct
58 Correct 3 ms 2140 KB Output is correct
59 Correct 3 ms 1628 KB Output is correct
60 Correct 2 ms 1372 KB Output is correct
61 Correct 4 ms 2140 KB Output is correct
62 Correct 15 ms 8884 KB Output is correct
63 Correct 14 ms 9096 KB Output is correct
64 Correct 23 ms 12124 KB Output is correct
65 Correct 18 ms 9564 KB Output is correct
66 Correct 12 ms 7768 KB Output is correct
67 Correct 19 ms 10584 KB Output is correct
68 Correct 12 ms 7768 KB Output is correct
69 Correct 20 ms 9820 KB Output is correct
70 Correct 24 ms 11856 KB Output is correct
71 Correct 4 ms 2356 KB Output is correct
72 Correct 1 ms 348 KB Output is correct
73 Correct 3 ms 1624 KB Output is correct
74 Correct 3 ms 1628 KB Output is correct
75 Correct 2 ms 1116 KB Output is correct
76 Correct 3 ms 2140 KB Output is correct
77 Correct 3 ms 1884 KB Output is correct
78 Correct 3 ms 2140 KB Output is correct
79 Correct 3 ms 1628 KB Output is correct
80 Correct 2 ms 1372 KB Output is correct
81 Correct 3 ms 2136 KB Output is correct
82 Correct 14 ms 8540 KB Output is correct
83 Correct 14 ms 9052 KB Output is correct
84 Correct 24 ms 12124 KB Output is correct
85 Correct 18 ms 9564 KB Output is correct
86 Correct 12 ms 7820 KB Output is correct
87 Correct 20 ms 10792 KB Output is correct
88 Correct 12 ms 8028 KB Output is correct
89 Correct 19 ms 9820 KB Output is correct
90 Correct 23 ms 11868 KB Output is correct
91 Correct 3 ms 2140 KB Output is correct
92 Correct 0 ms 440 KB Output is correct
93 Correct 3 ms 1628 KB Output is correct
94 Correct 3 ms 1628 KB Output is correct
95 Correct 2 ms 1116 KB Output is correct
96 Correct 4 ms 2140 KB Output is correct
97 Correct 3 ms 1884 KB Output is correct
98 Correct 3 ms 2140 KB Output is correct
99 Correct 3 ms 1628 KB Output is correct
100 Correct 3 ms 1368 KB Output is correct
101 Correct 4 ms 2140 KB Output is correct
102 Correct 15 ms 8536 KB Output is correct
103 Correct 14 ms 9052 KB Output is correct
104 Correct 24 ms 12124 KB Output is correct
105 Correct 19 ms 9564 KB Output is correct
106 Correct 12 ms 7772 KB Output is correct
107 Correct 19 ms 10588 KB Output is correct
108 Correct 12 ms 7772 KB Output is correct
109 Correct 19 ms 9816 KB Output is correct
110 Correct 24 ms 11868 KB Output is correct
111 Correct 4 ms 2136 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 3 ms 1628 KB Output is correct
114 Correct 3 ms 1628 KB Output is correct
115 Correct 2 ms 1116 KB Output is correct
116 Correct 3 ms 2256 KB Output is correct
117 Correct 3 ms 1884 KB Output is correct
118 Correct 3 ms 2204 KB Output is correct
119 Correct 3 ms 1628 KB Output is correct
120 Correct 14 ms 9564 KB Output is correct
121 Correct 294 ms 150720 KB Output is correct
122 Correct 312 ms 158548 KB Output is correct
123 Correct 340 ms 141240 KB Output is correct
124 Correct 383 ms 156780 KB Output is correct
125 Correct 291 ms 153028 KB Output is correct
126 Correct 327 ms 175064 KB Output is correct
127 Correct 288 ms 148820 KB Output is correct
128 Correct 451 ms 191812 KB Output is correct
129 Correct 352 ms 145536 KB Output is correct
130 Correct 14 ms 7512 KB Output is correct
131 Correct 0 ms 344 KB Output is correct
132 Correct 20 ms 10948 KB Output is correct
133 Correct 3 ms 1624 KB Output is correct
134 Correct 15 ms 6748 KB Output is correct
135 Correct 38 ms 19548 KB Output is correct
136 Correct 37 ms 20572 KB Output is correct
137 Correct 22 ms 13404 KB Output is correct
138 Correct 51 ms 22404 KB Output is correct
139 Correct 18 ms 10072 KB Output is correct
140 Correct 14 ms 9560 KB Output is correct
141 Correct 294 ms 150708 KB Output is correct
142 Correct 306 ms 158496 KB Output is correct
143 Correct 342 ms 140980 KB Output is correct
144 Correct 382 ms 156552 KB Output is correct
145 Correct 292 ms 153032 KB Output is correct
146 Correct 330 ms 175444 KB Output is correct
147 Correct 283 ms 148604 KB Output is correct
148 Correct 456 ms 191772 KB Output is correct
149 Correct 352 ms 145544 KB Output is correct
150 Correct 14 ms 7516 KB Output is correct
151 Correct 0 ms 344 KB Output is correct
152 Correct 20 ms 10956 KB Output is correct
153 Correct 3 ms 1372 KB Output is correct
154 Correct 16 ms 6748 KB Output is correct
155 Correct 39 ms 19768 KB Output is correct
156 Correct 38 ms 20868 KB Output is correct
157 Correct 22 ms 13400 KB Output is correct
158 Correct 49 ms 22360 KB Output is correct
159 Correct 18 ms 10076 KB Output is correct
160 Correct 14 ms 9560 KB Output is correct
161 Correct 287 ms 150612 KB Output is correct
162 Correct 305 ms 158548 KB Output is correct
163 Correct 336 ms 141184 KB Output is correct
164 Correct 377 ms 156780 KB Output is correct
165 Correct 294 ms 153028 KB Output is correct
166 Correct 328 ms 175060 KB Output is correct
167 Correct 278 ms 148440 KB Output is correct
168 Correct 461 ms 191808 KB Output is correct
169 Correct 354 ms 145548 KB Output is correct
170 Correct 14 ms 7516 KB Output is correct
171 Correct 1 ms 348 KB Output is correct
172 Correct 21 ms 10844 KB Output is correct
173 Correct 3 ms 1628 KB Output is correct
174 Correct 15 ms 6940 KB Output is correct
175 Correct 38 ms 19548 KB Output is correct
176 Correct 37 ms 20616 KB Output is correct
177 Correct 22 ms 13400 KB Output is correct
178 Correct 50 ms 22364 KB Output is correct
179 Correct 18 ms 10076 KB Output is correct
180 Correct 15 ms 9464 KB Output is correct
181 Correct 289 ms 150716 KB Output is correct
182 Correct 310 ms 158484 KB Output is correct
183 Correct 338 ms 141176 KB Output is correct
184 Correct 377 ms 156856 KB Output is correct
185 Correct 299 ms 153032 KB Output is correct
186 Correct 334 ms 174888 KB Output is correct
187 Correct 280 ms 148612 KB Output is correct
188 Correct 454 ms 191820 KB Output is correct
189 Correct 355 ms 145548 KB Output is correct
190 Correct 14 ms 7512 KB Output is correct
191 Correct 0 ms 348 KB Output is correct
192 Correct 21 ms 10844 KB Output is correct
193 Correct 3 ms 1628 KB Output is correct
194 Correct 16 ms 6944 KB Output is correct
195 Correct 38 ms 19548 KB Output is correct
196 Correct 36 ms 20568 KB Output is correct
197 Correct 22 ms 13404 KB Output is correct
198 Correct 52 ms 22360 KB Output is correct
199 Correct 18 ms 10072 KB Output is correct
200 Correct 15 ms 9708 KB Output is correct
201 Correct 294 ms 150720 KB Output is correct
202 Correct 303 ms 158484 KB Output is correct
203 Correct 341 ms 141392 KB Output is correct
204 Correct 381 ms 156756 KB Output is correct
205 Correct 292 ms 153036 KB Output is correct
206 Correct 331 ms 175240 KB Output is correct
207 Correct 282 ms 148604 KB Output is correct
208 Correct 453 ms 191812 KB Output is correct
209 Correct 357 ms 145540 KB Output is correct
210 Correct 14 ms 7512 KB Output is correct
211 Correct 1 ms 440 KB Output is correct
212 Correct 21 ms 10948 KB Output is correct
213 Correct 4 ms 1624 KB Output is correct
214 Correct 16 ms 6944 KB Output is correct
215 Correct 38 ms 19764 KB Output is correct
216 Correct 36 ms 20568 KB Output is correct
217 Correct 23 ms 13520 KB Output is correct
218 Correct 51 ms 22212 KB Output is correct
219 Correct 186 ms 182252 KB Output is correct
220 Correct 296 ms 283688 KB Output is correct
221 Correct 82 ms 74580 KB Output is correct
222 Correct 115 ms 111440 KB Output is correct
223 Correct 784 ms 750924 KB Output is correct
224 Correct 994 ms 953388 KB Output is correct
225 Correct 960 ms 924876 KB Output is correct
226 Correct 182 ms 176976 KB Output is correct
227 Correct 1438 ms 978144 KB Output is correct
228 Correct 417 ms 398216 KB Output is correct
229 Correct 887 ms 856152 KB Output is correct
230 Correct 707 ms 674536 KB Output is correct
231 Correct 658 ms 592580 KB Output is correct
232 Correct 189 ms 186328 KB Output is correct
233 Correct 708 ms 677772 KB Output is correct
234 Correct 694 ms 651352 KB Output is correct
235 Correct 717 ms 687220 KB Output is correct
236 Correct 774 ms 737876 KB Output is correct
237 Correct 643 ms 578568 KB Output is correct
238 Correct 191 ms 184144 KB Output is correct
239 Correct 188 ms 182308 KB Output is correct
240 Correct 291 ms 283764 KB Output is correct
241 Correct 79 ms 74712 KB Output is correct
242 Correct 114 ms 111524 KB Output is correct
243 Correct 769 ms 750932 KB Output is correct
244 Correct 999 ms 953924 KB Output is correct
245 Correct 980 ms 924832 KB Output is correct
246 Correct 184 ms 176996 KB Output is correct
247 Correct 980 ms 978256 KB Output is correct
248 Correct 415 ms 398164 KB Output is correct
249 Correct 879 ms 856036 KB Output is correct
250 Correct 722 ms 674484 KB Output is correct
251 Correct 652 ms 592696 KB Output is correct
252 Correct 186 ms 186320 KB Output is correct
253 Correct 693 ms 677772 KB Output is correct
254 Correct 679 ms 651604 KB Output is correct
255 Correct 716 ms 687048 KB Output is correct
256 Correct 755 ms 737588 KB Output is correct
257 Correct 625 ms 578812 KB Output is correct
258 Correct 189 ms 184300 KB Output is correct
259 Correct 184 ms 182144 KB Output is correct
260 Correct 284 ms 283764 KB Output is correct
261 Correct 95 ms 74576 KB Output is correct
262 Correct 127 ms 111312 KB Output is correct
263 Correct 796 ms 750776 KB Output is correct
264 Correct 1033 ms 953444 KB Output is correct
265 Correct 1029 ms 924660 KB Output is correct
266 Correct 191 ms 176980 KB Output is correct
267 Correct 1052 ms 978332 KB Output is correct
268 Correct 436 ms 398196 KB Output is correct
269 Correct 957 ms 856004 KB Output is correct
270 Correct 741 ms 674248 KB Output is correct
271 Correct 702 ms 592340 KB Output is correct
272 Correct 202 ms 186312 KB Output is correct
273 Correct 778 ms 677648 KB Output is correct
274 Correct 700 ms 651232 KB Output is correct
275 Correct 756 ms 687156 KB Output is correct
276 Correct 828 ms 737616 KB Output is correct
277 Correct 630 ms 578568 KB Output is correct
278 Correct 196 ms 184300 KB Output is correct
279 Correct 196 ms 182444 KB Output is correct
280 Correct 302 ms 283560 KB Output is correct
281 Correct 80 ms 74720 KB Output is correct
282 Correct 127 ms 111568 KB Output is correct
283 Correct 812 ms 750868 KB Output is correct
284 Correct 1043 ms 953552 KB Output is correct
285 Correct 996 ms 924616 KB Output is correct
286 Correct 193 ms 176732 KB Output is correct
287 Correct 1043 ms 978304 KB Output is correct
288 Correct 447 ms 398476 KB Output is correct
289 Correct 950 ms 856100 KB Output is correct
290 Correct 733 ms 674384 KB Output is correct
291 Correct 675 ms 592304 KB Output is correct
292 Correct 198 ms 186540 KB Output is correct
293 Correct 733 ms 677724 KB Output is correct
294 Correct 724 ms 651392 KB Output is correct
295 Correct 756 ms 687024 KB Output is correct
296 Correct 797 ms 737524 KB Output is correct
297 Correct 628 ms 578724 KB Output is correct
298 Correct 184 ms 184148 KB Output is correct
299 Correct 190 ms 182352 KB Output is correct
300 Correct 288 ms 283564 KB Output is correct
301 Correct 81 ms 74692 KB Output is correct
302 Correct 114 ms 111440 KB Output is correct
303 Correct 788 ms 750692 KB Output is correct
304 Correct 983 ms 953404 KB Output is correct
305 Correct 946 ms 924756 KB Output is correct
306 Correct 185 ms 177180 KB Output is correct
307 Correct 983 ms 978192 KB Output is correct
308 Correct 438 ms 398160 KB Output is correct
309 Correct 880 ms 856252 KB Output is correct
310 Correct 713 ms 674300 KB Output is correct
311 Correct 655 ms 592468 KB Output is correct
312 Correct 189 ms 186452 KB Output is correct
313 Correct 697 ms 677856 KB Output is correct
314 Correct 678 ms 651384 KB Output is correct
315 Correct 715 ms 687112 KB Output is correct
316 Correct 778 ms 737488 KB Output is correct
317 Correct 622 ms 578384 KB Output is correct
318 Runtime error 891 ms 2097152 KB Execution killed with signal 9
319 Halted 0 ms 0 KB -