답안 #983688

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
983688 2024-05-15T23:13:43 Z gustavo_d Jelly Flavours (IOI20_jelly) C++17
44 / 100
1065 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 <= 1e8) {
		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 3 ms 2136 KB Output is correct
2 Correct 14 ms 8696 KB Output is correct
3 Correct 16 ms 9052 KB Output is correct
4 Correct 25 ms 12124 KB Output is correct
5 Correct 18 ms 9564 KB Output is correct
6 Correct 12 ms 7772 KB Output is correct
7 Correct 19 ms 10800 KB Output is correct
8 Correct 11 ms 7768 KB Output is correct
9 Correct 19 ms 10052 KB Output is correct
10 Correct 23 ms 11864 KB Output is correct
11 Correct 2 ms 1372 KB Output is correct
12 Correct 4 ms 2140 KB Output is correct
13 Correct 15 ms 8540 KB Output is correct
14 Correct 15 ms 9092 KB Output is correct
15 Correct 24 ms 12124 KB Output is correct
16 Correct 18 ms 9564 KB Output is correct
17 Correct 12 ms 7772 KB Output is correct
18 Correct 19 ms 10796 KB Output is correct
19 Correct 12 ms 7772 KB Output is correct
20 Correct 19 ms 9820 KB Output is correct
21 Correct 4 ms 2140 KB Output is correct
22 Correct 24 ms 11612 KB Output is correct
23 Correct 4 ms 2136 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 3 ms 1828 KB Output is correct
26 Correct 3 ms 1628 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 3 ms 2140 KB Output is correct
29 Correct 3 ms 1884 KB Output is correct
30 Correct 3 ms 2204 KB Output is correct
31 Correct 3 ms 1628 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 3 ms 1880 KB Output is correct
34 Correct 3 ms 1628 KB Output is correct
35 Correct 2 ms 1116 KB Output is correct
36 Correct 4 ms 2140 KB Output is correct
37 Correct 3 ms 1884 KB Output is correct
38 Correct 3 ms 1968 KB Output is correct
39 Correct 3 ms 1848 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 8540 KB Output is correct
43 Correct 14 ms 9052 KB Output is correct
44 Correct 24 ms 12124 KB Output is correct
45 Correct 18 ms 9560 KB Output is correct
46 Correct 12 ms 7772 KB Output is correct
47 Correct 19 ms 10588 KB Output is correct
48 Correct 12 ms 8028 KB Output is correct
49 Correct 20 ms 9820 KB Output is correct
50 Correct 23 ms 11612 KB Output is correct
51 Correct 4 ms 2140 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 3 ms 1628 KB Output is correct
54 Correct 3 ms 1780 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 1884 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 2396 KB Output is correct
62 Correct 14 ms 8704 KB Output is correct
63 Correct 15 ms 9048 KB Output is correct
64 Correct 24 ms 12120 KB Output is correct
65 Correct 20 ms 9568 KB Output is correct
66 Correct 12 ms 7772 KB Output is correct
67 Correct 19 ms 10584 KB Output is correct
68 Correct 11 ms 7772 KB Output is correct
69 Correct 19 ms 9820 KB Output is correct
70 Correct 24 ms 11608 KB Output is correct
71 Correct 4 ms 2140 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 3 ms 1624 KB Output is correct
74 Correct 3 ms 1596 KB Output is correct
75 Correct 2 ms 1240 KB Output is correct
76 Correct 4 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 1624 KB Output is correct
80 Correct 2 ms 1372 KB Output is correct
81 Correct 3 ms 2272 KB Output is correct
82 Correct 15 ms 8704 KB Output is correct
83 Correct 15 ms 9052 KB Output is correct
84 Correct 25 ms 12124 KB Output is correct
85 Correct 18 ms 9716 KB Output is correct
86 Correct 12 ms 7772 KB Output is correct
87 Correct 19 ms 10588 KB Output is correct
88 Correct 12 ms 7772 KB Output is correct
89 Correct 20 ms 10052 KB Output is correct
90 Correct 26 ms 11616 KB Output is correct
91 Correct 4 ms 2140 KB Output is correct
92 Correct 0 ms 348 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 3 ms 2140 KB Output is correct
97 Correct 3 ms 1884 KB Output is correct
98 Correct 4 ms 2136 KB Output is correct
99 Correct 3 ms 1624 KB Output is correct
100 Correct 2 ms 1372 KB Output is correct
101 Correct 4 ms 2268 KB Output is correct
102 Correct 16 ms 8536 KB Output is correct
103 Correct 15 ms 9052 KB Output is correct
104 Correct 24 ms 12124 KB Output is correct
105 Correct 19 ms 9560 KB Output is correct
106 Correct 12 ms 7768 KB Output is correct
107 Correct 19 ms 10796 KB Output is correct
108 Correct 12 ms 7768 KB Output is correct
109 Correct 19 ms 9820 KB Output is correct
110 Correct 23 ms 11864 KB Output is correct
111 Correct 4 ms 2140 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 1448 KB Output is correct
115 Correct 2 ms 1112 KB Output is correct
116 Correct 3 ms 2260 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 1880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 2136 KB Output is correct
2 Correct 14 ms 8696 KB Output is correct
3 Correct 16 ms 9052 KB Output is correct
4 Correct 25 ms 12124 KB Output is correct
5 Correct 18 ms 9564 KB Output is correct
6 Correct 12 ms 7772 KB Output is correct
7 Correct 19 ms 10800 KB Output is correct
8 Correct 11 ms 7768 KB Output is correct
9 Correct 19 ms 10052 KB Output is correct
10 Correct 23 ms 11864 KB Output is correct
11 Correct 2 ms 1372 KB Output is correct
12 Correct 4 ms 2140 KB Output is correct
13 Correct 15 ms 8540 KB Output is correct
14 Correct 15 ms 9092 KB Output is correct
15 Correct 24 ms 12124 KB Output is correct
16 Correct 18 ms 9564 KB Output is correct
17 Correct 12 ms 7772 KB Output is correct
18 Correct 19 ms 10796 KB Output is correct
19 Correct 12 ms 7772 KB Output is correct
20 Correct 19 ms 9820 KB Output is correct
21 Correct 4 ms 2140 KB Output is correct
22 Correct 24 ms 11612 KB Output is correct
23 Correct 4 ms 2136 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 3 ms 1828 KB Output is correct
26 Correct 3 ms 1628 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 3 ms 2140 KB Output is correct
29 Correct 3 ms 1884 KB Output is correct
30 Correct 3 ms 2204 KB Output is correct
31 Correct 3 ms 1628 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 3 ms 1880 KB Output is correct
34 Correct 3 ms 1628 KB Output is correct
35 Correct 2 ms 1116 KB Output is correct
36 Correct 4 ms 2140 KB Output is correct
37 Correct 3 ms 1884 KB Output is correct
38 Correct 3 ms 1968 KB Output is correct
39 Correct 3 ms 1848 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 8540 KB Output is correct
43 Correct 14 ms 9052 KB Output is correct
44 Correct 24 ms 12124 KB Output is correct
45 Correct 18 ms 9560 KB Output is correct
46 Correct 12 ms 7772 KB Output is correct
47 Correct 19 ms 10588 KB Output is correct
48 Correct 12 ms 8028 KB Output is correct
49 Correct 20 ms 9820 KB Output is correct
50 Correct 23 ms 11612 KB Output is correct
51 Correct 4 ms 2140 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 3 ms 1628 KB Output is correct
54 Correct 3 ms 1780 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 1884 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 2396 KB Output is correct
62 Correct 14 ms 8704 KB Output is correct
63 Correct 15 ms 9048 KB Output is correct
64 Correct 24 ms 12120 KB Output is correct
65 Correct 20 ms 9568 KB Output is correct
66 Correct 12 ms 7772 KB Output is correct
67 Correct 19 ms 10584 KB Output is correct
68 Correct 11 ms 7772 KB Output is correct
69 Correct 19 ms 9820 KB Output is correct
70 Correct 24 ms 11608 KB Output is correct
71 Correct 4 ms 2140 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 3 ms 1624 KB Output is correct
74 Correct 3 ms 1596 KB Output is correct
75 Correct 2 ms 1240 KB Output is correct
76 Correct 4 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 1624 KB Output is correct
80 Correct 2 ms 1372 KB Output is correct
81 Correct 3 ms 2272 KB Output is correct
82 Correct 15 ms 8704 KB Output is correct
83 Correct 15 ms 9052 KB Output is correct
84 Correct 25 ms 12124 KB Output is correct
85 Correct 18 ms 9716 KB Output is correct
86 Correct 12 ms 7772 KB Output is correct
87 Correct 19 ms 10588 KB Output is correct
88 Correct 12 ms 7772 KB Output is correct
89 Correct 20 ms 10052 KB Output is correct
90 Correct 26 ms 11616 KB Output is correct
91 Correct 4 ms 2140 KB Output is correct
92 Correct 0 ms 348 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 3 ms 2140 KB Output is correct
97 Correct 3 ms 1884 KB Output is correct
98 Correct 4 ms 2136 KB Output is correct
99 Correct 3 ms 1624 KB Output is correct
100 Correct 2 ms 1372 KB Output is correct
101 Correct 4 ms 2268 KB Output is correct
102 Correct 16 ms 8536 KB Output is correct
103 Correct 15 ms 9052 KB Output is correct
104 Correct 24 ms 12124 KB Output is correct
105 Correct 19 ms 9560 KB Output is correct
106 Correct 12 ms 7768 KB Output is correct
107 Correct 19 ms 10796 KB Output is correct
108 Correct 12 ms 7768 KB Output is correct
109 Correct 19 ms 9820 KB Output is correct
110 Correct 23 ms 11864 KB Output is correct
111 Correct 4 ms 2140 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 1448 KB Output is correct
115 Correct 2 ms 1112 KB Output is correct
116 Correct 3 ms 2260 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 1880 KB Output is correct
120 Correct 18 ms 9560 KB Output is correct
121 Correct 295 ms 150716 KB Output is correct
122 Correct 313 ms 158488 KB Output is correct
123 Correct 335 ms 141136 KB Output is correct
124 Correct 378 ms 157008 KB Output is correct
125 Correct 296 ms 152836 KB Output is correct
126 Correct 329 ms 175064 KB Output is correct
127 Correct 278 ms 148560 KB Output is correct
128 Correct 469 ms 191644 KB Output is correct
129 Correct 346 ms 145488 KB Output is correct
130 Correct 15 ms 7512 KB Output is correct
131 Correct 0 ms 348 KB Output is correct
132 Correct 21 ms 10948 KB Output is correct
133 Correct 3 ms 1628 KB Output is correct
134 Correct 16 ms 6940 KB Output is correct
135 Correct 40 ms 19544 KB Output is correct
136 Correct 36 ms 20572 KB Output is correct
137 Correct 24 ms 13660 KB Output is correct
138 Correct 51 ms 22400 KB Output is correct
139 Correct 18 ms 10076 KB Output is correct
140 Correct 17 ms 9708 KB Output is correct
141 Correct 291 ms 150708 KB Output is correct
142 Correct 307 ms 158292 KB Output is correct
143 Correct 341 ms 141176 KB Output is correct
144 Correct 381 ms 157036 KB Output is correct
145 Correct 293 ms 153032 KB Output is correct
146 Correct 330 ms 175060 KB Output is correct
147 Correct 278 ms 148564 KB Output is correct
148 Correct 461 ms 191812 KB Output is correct
149 Correct 352 ms 145544 KB Output is correct
150 Correct 14 ms 7516 KB Output is correct
151 Correct 1 ms 348 KB Output is correct
152 Correct 21 ms 10952 KB Output is correct
153 Correct 3 ms 1628 KB Output is correct
154 Correct 16 ms 6948 KB Output is correct
155 Correct 39 ms 19544 KB Output is correct
156 Correct 36 ms 20544 KB Output is correct
157 Correct 22 ms 13656 KB Output is correct
158 Correct 51 ms 22408 KB Output is correct
159 Correct 20 ms 10064 KB Output is correct
160 Correct 16 ms 9648 KB Output is correct
161 Correct 292 ms 150652 KB Output is correct
162 Correct 307 ms 158288 KB Output is correct
163 Correct 343 ms 141396 KB Output is correct
164 Correct 371 ms 156784 KB Output is correct
165 Correct 296 ms 153036 KB Output is correct
166 Correct 328 ms 174932 KB Output is correct
167 Correct 277 ms 148420 KB Output is correct
168 Correct 451 ms 191812 KB Output is correct
169 Correct 347 ms 145552 KB Output is correct
170 Correct 14 ms 7516 KB Output is correct
171 Correct 0 ms 348 KB Output is correct
172 Correct 21 ms 10952 KB Output is correct
173 Correct 3 ms 1624 KB Output is correct
174 Correct 15 ms 6944 KB Output is correct
175 Correct 39 ms 19796 KB Output is correct
176 Correct 36 ms 20572 KB Output is correct
177 Correct 22 ms 13404 KB Output is correct
178 Correct 51 ms 22616 KB Output is correct
179 Correct 18 ms 10072 KB Output is correct
180 Correct 14 ms 9564 KB Output is correct
181 Correct 290 ms 150724 KB Output is correct
182 Correct 304 ms 158292 KB Output is correct
183 Correct 344 ms 141140 KB Output is correct
184 Correct 384 ms 156788 KB Output is correct
185 Correct 292 ms 153032 KB Output is correct
186 Correct 330 ms 174932 KB Output is correct
187 Correct 277 ms 148536 KB Output is correct
188 Correct 455 ms 191572 KB Output is correct
189 Correct 351 ms 145488 KB Output is correct
190 Correct 14 ms 7516 KB Output is correct
191 Correct 1 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 6948 KB Output is correct
195 Correct 38 ms 19544 KB Output is correct
196 Correct 37 ms 20572 KB Output is correct
197 Correct 23 ms 13400 KB Output is correct
198 Correct 50 ms 22364 KB Output is correct
199 Correct 19 ms 10072 KB Output is correct
200 Correct 17 ms 9564 KB Output is correct
201 Correct 289 ms 150612 KB Output is correct
202 Correct 306 ms 158288 KB Output is correct
203 Correct 339 ms 141176 KB Output is correct
204 Correct 376 ms 156536 KB Output is correct
205 Correct 289 ms 152868 KB Output is correct
206 Correct 332 ms 175060 KB Output is correct
207 Correct 279 ms 148604 KB Output is correct
208 Correct 455 ms 191812 KB Output is correct
209 Correct 356 ms 145540 KB Output is correct
210 Correct 14 ms 7512 KB Output is correct
211 Correct 1 ms 348 KB Output is correct
212 Correct 20 ms 10844 KB Output is correct
213 Correct 3 ms 1628 KB Output is correct
214 Correct 16 ms 6952 KB Output is correct
215 Correct 39 ms 19548 KB Output is correct
216 Correct 36 ms 20568 KB Output is correct
217 Correct 22 ms 13404 KB Output is correct
218 Correct 51 ms 22400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 185 ms 182196 KB Output is correct
2 Correct 299 ms 283764 KB Output is correct
3 Correct 81 ms 74580 KB Output is correct
4 Correct 115 ms 111520 KB Output is correct
5 Correct 843 ms 750952 KB Output is correct
6 Correct 1038 ms 953740 KB Output is correct
7 Correct 965 ms 924588 KB Output is correct
8 Correct 179 ms 176976 KB Output is correct
9 Correct 1022 ms 978516 KB Output is correct
10 Correct 426 ms 398420 KB Output is correct
11 Correct 898 ms 856100 KB Output is correct
12 Correct 703 ms 674384 KB Output is correct
13 Correct 658 ms 592468 KB Output is correct
14 Correct 205 ms 186460 KB Output is correct
15 Correct 704 ms 677732 KB Output is correct
16 Correct 684 ms 651288 KB Output is correct
17 Correct 730 ms 686932 KB Output is correct
18 Correct 771 ms 737624 KB Output is correct
19 Correct 605 ms 578384 KB Output is correct
20 Correct 185 ms 184148 KB Output is correct
21 Correct 199 ms 182356 KB Output is correct
22 Correct 284 ms 283728 KB Output is correct
23 Correct 81 ms 74708 KB Output is correct
24 Correct 142 ms 111440 KB Output is correct
25 Correct 782 ms 750924 KB Output is correct
26 Correct 995 ms 953424 KB Output is correct
27 Correct 944 ms 924908 KB Output is correct
28 Correct 184 ms 176728 KB Output is correct
29 Correct 1000 ms 978156 KB Output is correct
30 Correct 414 ms 398384 KB Output is correct
31 Correct 903 ms 856156 KB Output is correct
32 Correct 714 ms 674640 KB Output is correct
33 Correct 648 ms 592536 KB Output is correct
34 Correct 192 ms 186452 KB Output is correct
35 Correct 707 ms 677828 KB Output is correct
36 Correct 692 ms 651348 KB Output is correct
37 Correct 726 ms 686972 KB Output is correct
38 Correct 783 ms 737620 KB Output is correct
39 Correct 628 ms 578384 KB Output is correct
40 Correct 185 ms 184404 KB Output is correct
41 Correct 186 ms 182172 KB Output is correct
42 Correct 292 ms 283720 KB Output is correct
43 Correct 80 ms 74712 KB Output is correct
44 Correct 118 ms 111516 KB Output is correct
45 Correct 833 ms 750864 KB Output is correct
46 Correct 989 ms 953840 KB Output is correct
47 Correct 996 ms 924752 KB Output is correct
48 Correct 180 ms 177012 KB Output is correct
49 Correct 1065 ms 978148 KB Output is correct
50 Correct 433 ms 398168 KB Output is correct
51 Correct 900 ms 856220 KB Output is correct
52 Correct 715 ms 674464 KB Output is correct
53 Correct 669 ms 592404 KB Output is correct
54 Correct 188 ms 186448 KB Output is correct
55 Correct 702 ms 677968 KB Output is correct
56 Correct 686 ms 651496 KB Output is correct
57 Correct 724 ms 687024 KB Output is correct
58 Correct 785 ms 737524 KB Output is correct
59 Correct 636 ms 578572 KB Output is correct
60 Correct 191 ms 184148 KB Output is correct
61 Correct 196 ms 182356 KB Output is correct
62 Correct 283 ms 283832 KB Output is correct
63 Correct 98 ms 74576 KB Output is correct
64 Correct 116 ms 111444 KB Output is correct
65 Correct 770 ms 750796 KB Output is correct
66 Correct 998 ms 953824 KB Output is correct
67 Correct 977 ms 924752 KB Output is correct
68 Correct 190 ms 177156 KB Output is correct
69 Correct 984 ms 978208 KB Output is correct
70 Correct 425 ms 398336 KB Output is correct
71 Correct 911 ms 856240 KB Output is correct
72 Correct 719 ms 674424 KB Output is correct
73 Correct 665 ms 592400 KB Output is correct
74 Correct 195 ms 186412 KB Output is correct
75 Correct 740 ms 677820 KB Output is correct
76 Correct 687 ms 651300 KB Output is correct
77 Correct 729 ms 687264 KB Output is correct
78 Correct 779 ms 737620 KB Output is correct
79 Correct 614 ms 578768 KB Output is correct
80 Correct 190 ms 184116 KB Output is correct
81 Correct 188 ms 182248 KB Output is correct
82 Correct 301 ms 283860 KB Output is correct
83 Correct 79 ms 74712 KB Output is correct
84 Correct 123 ms 111316 KB Output is correct
85 Correct 778 ms 750908 KB Output is correct
86 Correct 973 ms 953476 KB Output is correct
87 Correct 960 ms 924756 KB Output is correct
88 Correct 178 ms 176984 KB Output is correct
89 Correct 981 ms 978256 KB Output is correct
90 Correct 424 ms 398220 KB Output is correct
91 Correct 912 ms 856144 KB Output is correct
92 Correct 699 ms 674388 KB Output is correct
93 Correct 691 ms 592464 KB Output is correct
94 Correct 190 ms 186460 KB Output is correct
95 Correct 700 ms 677712 KB Output is correct
96 Correct 671 ms 651344 KB Output is correct
97 Correct 733 ms 686928 KB Output is correct
98 Correct 777 ms 737676 KB Output is correct
99 Correct 617 ms 578672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1043 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 867 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 2136 KB Output is correct
2 Correct 14 ms 8696 KB Output is correct
3 Correct 16 ms 9052 KB Output is correct
4 Correct 25 ms 12124 KB Output is correct
5 Correct 18 ms 9564 KB Output is correct
6 Correct 12 ms 7772 KB Output is correct
7 Correct 19 ms 10800 KB Output is correct
8 Correct 11 ms 7768 KB Output is correct
9 Correct 19 ms 10052 KB Output is correct
10 Correct 23 ms 11864 KB Output is correct
11 Correct 2 ms 1372 KB Output is correct
12 Correct 4 ms 2140 KB Output is correct
13 Correct 15 ms 8540 KB Output is correct
14 Correct 15 ms 9092 KB Output is correct
15 Correct 24 ms 12124 KB Output is correct
16 Correct 18 ms 9564 KB Output is correct
17 Correct 12 ms 7772 KB Output is correct
18 Correct 19 ms 10796 KB Output is correct
19 Correct 12 ms 7772 KB Output is correct
20 Correct 19 ms 9820 KB Output is correct
21 Correct 4 ms 2140 KB Output is correct
22 Correct 24 ms 11612 KB Output is correct
23 Correct 4 ms 2136 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 3 ms 1828 KB Output is correct
26 Correct 3 ms 1628 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 3 ms 2140 KB Output is correct
29 Correct 3 ms 1884 KB Output is correct
30 Correct 3 ms 2204 KB Output is correct
31 Correct 3 ms 1628 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 3 ms 1880 KB Output is correct
34 Correct 3 ms 1628 KB Output is correct
35 Correct 2 ms 1116 KB Output is correct
36 Correct 4 ms 2140 KB Output is correct
37 Correct 3 ms 1884 KB Output is correct
38 Correct 3 ms 1968 KB Output is correct
39 Correct 3 ms 1848 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 8540 KB Output is correct
43 Correct 14 ms 9052 KB Output is correct
44 Correct 24 ms 12124 KB Output is correct
45 Correct 18 ms 9560 KB Output is correct
46 Correct 12 ms 7772 KB Output is correct
47 Correct 19 ms 10588 KB Output is correct
48 Correct 12 ms 8028 KB Output is correct
49 Correct 20 ms 9820 KB Output is correct
50 Correct 23 ms 11612 KB Output is correct
51 Correct 4 ms 2140 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 3 ms 1628 KB Output is correct
54 Correct 3 ms 1780 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 1884 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 2396 KB Output is correct
62 Correct 14 ms 8704 KB Output is correct
63 Correct 15 ms 9048 KB Output is correct
64 Correct 24 ms 12120 KB Output is correct
65 Correct 20 ms 9568 KB Output is correct
66 Correct 12 ms 7772 KB Output is correct
67 Correct 19 ms 10584 KB Output is correct
68 Correct 11 ms 7772 KB Output is correct
69 Correct 19 ms 9820 KB Output is correct
70 Correct 24 ms 11608 KB Output is correct
71 Correct 4 ms 2140 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 3 ms 1624 KB Output is correct
74 Correct 3 ms 1596 KB Output is correct
75 Correct 2 ms 1240 KB Output is correct
76 Correct 4 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 1624 KB Output is correct
80 Correct 2 ms 1372 KB Output is correct
81 Correct 3 ms 2272 KB Output is correct
82 Correct 15 ms 8704 KB Output is correct
83 Correct 15 ms 9052 KB Output is correct
84 Correct 25 ms 12124 KB Output is correct
85 Correct 18 ms 9716 KB Output is correct
86 Correct 12 ms 7772 KB Output is correct
87 Correct 19 ms 10588 KB Output is correct
88 Correct 12 ms 7772 KB Output is correct
89 Correct 20 ms 10052 KB Output is correct
90 Correct 26 ms 11616 KB Output is correct
91 Correct 4 ms 2140 KB Output is correct
92 Correct 0 ms 348 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 3 ms 2140 KB Output is correct
97 Correct 3 ms 1884 KB Output is correct
98 Correct 4 ms 2136 KB Output is correct
99 Correct 3 ms 1624 KB Output is correct
100 Correct 2 ms 1372 KB Output is correct
101 Correct 4 ms 2268 KB Output is correct
102 Correct 16 ms 8536 KB Output is correct
103 Correct 15 ms 9052 KB Output is correct
104 Correct 24 ms 12124 KB Output is correct
105 Correct 19 ms 9560 KB Output is correct
106 Correct 12 ms 7768 KB Output is correct
107 Correct 19 ms 10796 KB Output is correct
108 Correct 12 ms 7768 KB Output is correct
109 Correct 19 ms 9820 KB Output is correct
110 Correct 23 ms 11864 KB Output is correct
111 Correct 4 ms 2140 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 1448 KB Output is correct
115 Correct 2 ms 1112 KB Output is correct
116 Correct 3 ms 2260 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 1880 KB Output is correct
120 Correct 18 ms 9560 KB Output is correct
121 Correct 295 ms 150716 KB Output is correct
122 Correct 313 ms 158488 KB Output is correct
123 Correct 335 ms 141136 KB Output is correct
124 Correct 378 ms 157008 KB Output is correct
125 Correct 296 ms 152836 KB Output is correct
126 Correct 329 ms 175064 KB Output is correct
127 Correct 278 ms 148560 KB Output is correct
128 Correct 469 ms 191644 KB Output is correct
129 Correct 346 ms 145488 KB Output is correct
130 Correct 15 ms 7512 KB Output is correct
131 Correct 0 ms 348 KB Output is correct
132 Correct 21 ms 10948 KB Output is correct
133 Correct 3 ms 1628 KB Output is correct
134 Correct 16 ms 6940 KB Output is correct
135 Correct 40 ms 19544 KB Output is correct
136 Correct 36 ms 20572 KB Output is correct
137 Correct 24 ms 13660 KB Output is correct
138 Correct 51 ms 22400 KB Output is correct
139 Correct 18 ms 10076 KB Output is correct
140 Correct 17 ms 9708 KB Output is correct
141 Correct 291 ms 150708 KB Output is correct
142 Correct 307 ms 158292 KB Output is correct
143 Correct 341 ms 141176 KB Output is correct
144 Correct 381 ms 157036 KB Output is correct
145 Correct 293 ms 153032 KB Output is correct
146 Correct 330 ms 175060 KB Output is correct
147 Correct 278 ms 148564 KB Output is correct
148 Correct 461 ms 191812 KB Output is correct
149 Correct 352 ms 145544 KB Output is correct
150 Correct 14 ms 7516 KB Output is correct
151 Correct 1 ms 348 KB Output is correct
152 Correct 21 ms 10952 KB Output is correct
153 Correct 3 ms 1628 KB Output is correct
154 Correct 16 ms 6948 KB Output is correct
155 Correct 39 ms 19544 KB Output is correct
156 Correct 36 ms 20544 KB Output is correct
157 Correct 22 ms 13656 KB Output is correct
158 Correct 51 ms 22408 KB Output is correct
159 Correct 20 ms 10064 KB Output is correct
160 Correct 16 ms 9648 KB Output is correct
161 Correct 292 ms 150652 KB Output is correct
162 Correct 307 ms 158288 KB Output is correct
163 Correct 343 ms 141396 KB Output is correct
164 Correct 371 ms 156784 KB Output is correct
165 Correct 296 ms 153036 KB Output is correct
166 Correct 328 ms 174932 KB Output is correct
167 Correct 277 ms 148420 KB Output is correct
168 Correct 451 ms 191812 KB Output is correct
169 Correct 347 ms 145552 KB Output is correct
170 Correct 14 ms 7516 KB Output is correct
171 Correct 0 ms 348 KB Output is correct
172 Correct 21 ms 10952 KB Output is correct
173 Correct 3 ms 1624 KB Output is correct
174 Correct 15 ms 6944 KB Output is correct
175 Correct 39 ms 19796 KB Output is correct
176 Correct 36 ms 20572 KB Output is correct
177 Correct 22 ms 13404 KB Output is correct
178 Correct 51 ms 22616 KB Output is correct
179 Correct 18 ms 10072 KB Output is correct
180 Correct 14 ms 9564 KB Output is correct
181 Correct 290 ms 150724 KB Output is correct
182 Correct 304 ms 158292 KB Output is correct
183 Correct 344 ms 141140 KB Output is correct
184 Correct 384 ms 156788 KB Output is correct
185 Correct 292 ms 153032 KB Output is correct
186 Correct 330 ms 174932 KB Output is correct
187 Correct 277 ms 148536 KB Output is correct
188 Correct 455 ms 191572 KB Output is correct
189 Correct 351 ms 145488 KB Output is correct
190 Correct 14 ms 7516 KB Output is correct
191 Correct 1 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 6948 KB Output is correct
195 Correct 38 ms 19544 KB Output is correct
196 Correct 37 ms 20572 KB Output is correct
197 Correct 23 ms 13400 KB Output is correct
198 Correct 50 ms 22364 KB Output is correct
199 Correct 19 ms 10072 KB Output is correct
200 Correct 17 ms 9564 KB Output is correct
201 Correct 289 ms 150612 KB Output is correct
202 Correct 306 ms 158288 KB Output is correct
203 Correct 339 ms 141176 KB Output is correct
204 Correct 376 ms 156536 KB Output is correct
205 Correct 289 ms 152868 KB Output is correct
206 Correct 332 ms 175060 KB Output is correct
207 Correct 279 ms 148604 KB Output is correct
208 Correct 455 ms 191812 KB Output is correct
209 Correct 356 ms 145540 KB Output is correct
210 Correct 14 ms 7512 KB Output is correct
211 Correct 1 ms 348 KB Output is correct
212 Correct 20 ms 10844 KB Output is correct
213 Correct 3 ms 1628 KB Output is correct
214 Correct 16 ms 6952 KB Output is correct
215 Correct 39 ms 19548 KB Output is correct
216 Correct 36 ms 20568 KB Output is correct
217 Correct 22 ms 13404 KB Output is correct
218 Correct 51 ms 22400 KB Output is correct
219 Correct 185 ms 182196 KB Output is correct
220 Correct 299 ms 283764 KB Output is correct
221 Correct 81 ms 74580 KB Output is correct
222 Correct 115 ms 111520 KB Output is correct
223 Correct 843 ms 750952 KB Output is correct
224 Correct 1038 ms 953740 KB Output is correct
225 Correct 965 ms 924588 KB Output is correct
226 Correct 179 ms 176976 KB Output is correct
227 Correct 1022 ms 978516 KB Output is correct
228 Correct 426 ms 398420 KB Output is correct
229 Correct 898 ms 856100 KB Output is correct
230 Correct 703 ms 674384 KB Output is correct
231 Correct 658 ms 592468 KB Output is correct
232 Correct 205 ms 186460 KB Output is correct
233 Correct 704 ms 677732 KB Output is correct
234 Correct 684 ms 651288 KB Output is correct
235 Correct 730 ms 686932 KB Output is correct
236 Correct 771 ms 737624 KB Output is correct
237 Correct 605 ms 578384 KB Output is correct
238 Correct 185 ms 184148 KB Output is correct
239 Correct 199 ms 182356 KB Output is correct
240 Correct 284 ms 283728 KB Output is correct
241 Correct 81 ms 74708 KB Output is correct
242 Correct 142 ms 111440 KB Output is correct
243 Correct 782 ms 750924 KB Output is correct
244 Correct 995 ms 953424 KB Output is correct
245 Correct 944 ms 924908 KB Output is correct
246 Correct 184 ms 176728 KB Output is correct
247 Correct 1000 ms 978156 KB Output is correct
248 Correct 414 ms 398384 KB Output is correct
249 Correct 903 ms 856156 KB Output is correct
250 Correct 714 ms 674640 KB Output is correct
251 Correct 648 ms 592536 KB Output is correct
252 Correct 192 ms 186452 KB Output is correct
253 Correct 707 ms 677828 KB Output is correct
254 Correct 692 ms 651348 KB Output is correct
255 Correct 726 ms 686972 KB Output is correct
256 Correct 783 ms 737620 KB Output is correct
257 Correct 628 ms 578384 KB Output is correct
258 Correct 185 ms 184404 KB Output is correct
259 Correct 186 ms 182172 KB Output is correct
260 Correct 292 ms 283720 KB Output is correct
261 Correct 80 ms 74712 KB Output is correct
262 Correct 118 ms 111516 KB Output is correct
263 Correct 833 ms 750864 KB Output is correct
264 Correct 989 ms 953840 KB Output is correct
265 Correct 996 ms 924752 KB Output is correct
266 Correct 180 ms 177012 KB Output is correct
267 Correct 1065 ms 978148 KB Output is correct
268 Correct 433 ms 398168 KB Output is correct
269 Correct 900 ms 856220 KB Output is correct
270 Correct 715 ms 674464 KB Output is correct
271 Correct 669 ms 592404 KB Output is correct
272 Correct 188 ms 186448 KB Output is correct
273 Correct 702 ms 677968 KB Output is correct
274 Correct 686 ms 651496 KB Output is correct
275 Correct 724 ms 687024 KB Output is correct
276 Correct 785 ms 737524 KB Output is correct
277 Correct 636 ms 578572 KB Output is correct
278 Correct 191 ms 184148 KB Output is correct
279 Correct 196 ms 182356 KB Output is correct
280 Correct 283 ms 283832 KB Output is correct
281 Correct 98 ms 74576 KB Output is correct
282 Correct 116 ms 111444 KB Output is correct
283 Correct 770 ms 750796 KB Output is correct
284 Correct 998 ms 953824 KB Output is correct
285 Correct 977 ms 924752 KB Output is correct
286 Correct 190 ms 177156 KB Output is correct
287 Correct 984 ms 978208 KB Output is correct
288 Correct 425 ms 398336 KB Output is correct
289 Correct 911 ms 856240 KB Output is correct
290 Correct 719 ms 674424 KB Output is correct
291 Correct 665 ms 592400 KB Output is correct
292 Correct 195 ms 186412 KB Output is correct
293 Correct 740 ms 677820 KB Output is correct
294 Correct 687 ms 651300 KB Output is correct
295 Correct 729 ms 687264 KB Output is correct
296 Correct 779 ms 737620 KB Output is correct
297 Correct 614 ms 578768 KB Output is correct
298 Correct 190 ms 184116 KB Output is correct
299 Correct 188 ms 182248 KB Output is correct
300 Correct 301 ms 283860 KB Output is correct
301 Correct 79 ms 74712 KB Output is correct
302 Correct 123 ms 111316 KB Output is correct
303 Correct 778 ms 750908 KB Output is correct
304 Correct 973 ms 953476 KB Output is correct
305 Correct 960 ms 924756 KB Output is correct
306 Correct 178 ms 176984 KB Output is correct
307 Correct 981 ms 978256 KB Output is correct
308 Correct 424 ms 398220 KB Output is correct
309 Correct 912 ms 856144 KB Output is correct
310 Correct 699 ms 674388 KB Output is correct
311 Correct 691 ms 592464 KB Output is correct
312 Correct 190 ms 186460 KB Output is correct
313 Correct 700 ms 677712 KB Output is correct
314 Correct 671 ms 651344 KB Output is correct
315 Correct 733 ms 686928 KB Output is correct
316 Correct 777 ms 737676 KB Output is correct
317 Correct 617 ms 578672 KB Output is correct
318 Runtime error 1043 ms 2097152 KB Execution killed with signal 9
319 Halted 0 ms 0 KB -