#include <bits/stdc++.h>
using namespace std;
const int MAX_M = 20;
using bits = bitset<MAX_M>;
vector<bits> votes;
list<int> submasks[(1 << MAX_M)];
vector<pair<int, int>> surmasks[(1 << MAX_M)];
void add(list<int> l[], bits mask, int sl) {
list<int>& lst = l[mask.to_ulong()];
if(lst.size() >= 2) return;
if(lst.empty()) {
lst.push_back(sl);
return;
}
if(lst.back() != sl) {
lst.push_back(sl);
return;
}
}
void add(vector<pair<int, int>> l[], bits mask, pair<int, int> sl) {
vector<pair<int, int>>& lst = l[mask.to_ulong()];
for(int i = 0;i < (int)lst.size();i++) {
if(lst[i].second == sl.second) {
lst[i].first = max(sl.first, lst[i].first);
return;
}
if(lst[i].first < sl.first) {
swap(lst[i], sl);
}
}
lst.push_back(sl);
if(lst.size() > 2) lst.pop_back();
}
int main() {
int N, M;
cin >> N >> M;
vector<int> nbVotes(MAX_M, 0);
for(int i = 0;i < N;i++) {
bits v;
for(int j = 0;j < M;j++) {
int ok;
cin >> ok;
v[j] = ok;
nbVotes[j] += ok;
}
votes.push_back(v);
add(submasks, bits((1 << M) - 1) ^ v, i);
}
for(int j = 0;j < M;j++) {
for(int m = 0;m < (1 << MAX_M);m++) {
bits mask_false = m;
if(mask_false[j]) continue;
bits mask_true = m;
mask_true[j] = true;
for(int sol : submasks[mask_true.to_ulong()])
add(submasks, mask_false, sol);
}
}
/*for(int m = 0;m < (1 << MAX_M);m++) {
if(!submasks[m].empty()) {
cout << bits(m) << " ";
for(int sl : submasks[m]) {
cout << sl << " ";
}
cout << endl;
}
}*/
for(int m = 0;m < (1 << MAX_M);m++) {
if(!submasks[m].empty()) {
for(int sl : submasks[m]) {
surmasks[m].push_back({bits(m).count(), sl});
}
}
}
for(int j = 0;j < M;j++) {
for(int m = 0;m < (1 << MAX_M);m++) {
bits mask_false = m;
if(mask_false[j]) continue;
bits mask_true = m;
mask_true[j] = true;
for(pair<int, int> sol : surmasks[mask_false.to_ulong()])
add(surmasks, mask_true, sol);
}
}
/*for(int m = 0;m < (1 << 3);m++) {
if(!surmasks[m].empty()) {
cout << bits(m) << " ";
for(pair<int, int> sl : surmasks[m]) {
cout << "{" << sl.first << "," << sl.second << "}" << " ";
}
cout << endl;
}
}*/
for(int i = 0;i < N;i++) {
bits imps;
int nbOks = 0;
for(int j = 0;j < M;j++) {
if(nbVotes[j] - (int)votes[i][j] < N / 2) {
}
else if(nbVotes[j] - (int)votes[i][j] > N / 2) {
nbOks++;
}
else {
imps[j] = true;
}
}
for(pair<int, int> m : surmasks[imps.to_ulong()]) {
if(m.second != i) {
cout << nbOks + m.first << endl;
break;
}
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
49528 KB |
Output is correct |
2 |
Correct |
82 ms |
49652 KB |
Output is correct |
3 |
Correct |
44 ms |
49536 KB |
Output is correct |
4 |
Correct |
41 ms |
49528 KB |
Output is correct |
5 |
Correct |
296 ms |
129532 KB |
Output is correct |
6 |
Correct |
170 ms |
82312 KB |
Output is correct |
7 |
Correct |
284 ms |
99164 KB |
Output is correct |
8 |
Correct |
305 ms |
100684 KB |
Output is correct |
9 |
Correct |
491 ms |
118232 KB |
Output is correct |
10 |
Correct |
299 ms |
98512 KB |
Output is correct |
11 |
Correct |
344 ms |
100760 KB |
Output is correct |
12 |
Correct |
518 ms |
117448 KB |
Output is correct |
13 |
Correct |
29 ms |
49492 KB |
Output is correct |
14 |
Correct |
30 ms |
49492 KB |
Output is correct |
15 |
Correct |
33 ms |
49468 KB |
Output is correct |
16 |
Correct |
39 ms |
49536 KB |
Output is correct |
17 |
Correct |
38 ms |
49548 KB |
Output is correct |
18 |
Correct |
33 ms |
49492 KB |
Output is correct |
19 |
Correct |
39 ms |
49524 KB |
Output is correct |
20 |
Correct |
36 ms |
49524 KB |
Output is correct |
21 |
Correct |
34 ms |
49552 KB |
Output is correct |
22 |
Correct |
75 ms |
49556 KB |
Output is correct |
23 |
Correct |
37 ms |
49548 KB |
Output is correct |
24 |
Correct |
43 ms |
49536 KB |
Output is correct |
25 |
Correct |
60 ms |
49536 KB |
Output is correct |
26 |
Correct |
59 ms |
49540 KB |
Output is correct |
27 |
Correct |
70 ms |
49540 KB |
Output is correct |
28 |
Correct |
69 ms |
49564 KB |
Output is correct |
29 |
Correct |
84 ms |
49580 KB |
Output is correct |
30 |
Correct |
76 ms |
49616 KB |
Output is correct |
31 |
Correct |
83 ms |
49676 KB |
Output is correct |
32 |
Correct |
39 ms |
49528 KB |
Output is correct |
33 |
Correct |
45 ms |
49540 KB |
Output is correct |
34 |
Correct |
55 ms |
49532 KB |
Output is correct |
35 |
Correct |
60 ms |
49548 KB |
Output is correct |
36 |
Correct |
64 ms |
49540 KB |
Output is correct |
37 |
Correct |
71 ms |
49548 KB |
Output is correct |
38 |
Correct |
70 ms |
49536 KB |
Output is correct |
39 |
Correct |
77 ms |
49592 KB |
Output is correct |
40 |
Correct |
90 ms |
49672 KB |
Output is correct |
41 |
Correct |
91 ms |
50696 KB |
Output is correct |
42 |
Correct |
88 ms |
50252 KB |
Output is correct |
43 |
Correct |
87 ms |
50396 KB |
Output is correct |
44 |
Correct |
87 ms |
50300 KB |
Output is correct |
45 |
Correct |
111 ms |
50432 KB |
Output is correct |
46 |
Correct |
130 ms |
59488 KB |
Output is correct |
47 |
Correct |
111 ms |
55464 KB |
Output is correct |
48 |
Correct |
116 ms |
56192 KB |
Output is correct |
49 |
Correct |
115 ms |
55756 KB |
Output is correct |
50 |
Correct |
121 ms |
56716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
49528 KB |
Output is correct |
2 |
Correct |
82 ms |
49652 KB |
Output is correct |
3 |
Correct |
44 ms |
49536 KB |
Output is correct |
4 |
Correct |
41 ms |
49528 KB |
Output is correct |
5 |
Correct |
296 ms |
129532 KB |
Output is correct |
6 |
Correct |
170 ms |
82312 KB |
Output is correct |
7 |
Correct |
284 ms |
99164 KB |
Output is correct |
8 |
Correct |
305 ms |
100684 KB |
Output is correct |
9 |
Correct |
491 ms |
118232 KB |
Output is correct |
10 |
Correct |
299 ms |
98512 KB |
Output is correct |
11 |
Correct |
344 ms |
100760 KB |
Output is correct |
12 |
Correct |
518 ms |
117448 KB |
Output is correct |
13 |
Correct |
29 ms |
49492 KB |
Output is correct |
14 |
Correct |
30 ms |
49492 KB |
Output is correct |
15 |
Correct |
33 ms |
49468 KB |
Output is correct |
16 |
Correct |
39 ms |
49536 KB |
Output is correct |
17 |
Correct |
38 ms |
49548 KB |
Output is correct |
18 |
Correct |
33 ms |
49492 KB |
Output is correct |
19 |
Correct |
39 ms |
49524 KB |
Output is correct |
20 |
Correct |
36 ms |
49524 KB |
Output is correct |
21 |
Correct |
34 ms |
49552 KB |
Output is correct |
22 |
Correct |
75 ms |
49556 KB |
Output is correct |
23 |
Correct |
37 ms |
49548 KB |
Output is correct |
24 |
Correct |
43 ms |
49536 KB |
Output is correct |
25 |
Correct |
60 ms |
49536 KB |
Output is correct |
26 |
Correct |
59 ms |
49540 KB |
Output is correct |
27 |
Correct |
70 ms |
49540 KB |
Output is correct |
28 |
Correct |
69 ms |
49564 KB |
Output is correct |
29 |
Correct |
84 ms |
49580 KB |
Output is correct |
30 |
Correct |
76 ms |
49616 KB |
Output is correct |
31 |
Correct |
83 ms |
49676 KB |
Output is correct |
32 |
Correct |
39 ms |
49528 KB |
Output is correct |
33 |
Correct |
45 ms |
49540 KB |
Output is correct |
34 |
Correct |
55 ms |
49532 KB |
Output is correct |
35 |
Correct |
60 ms |
49548 KB |
Output is correct |
36 |
Correct |
64 ms |
49540 KB |
Output is correct |
37 |
Correct |
71 ms |
49548 KB |
Output is correct |
38 |
Correct |
70 ms |
49536 KB |
Output is correct |
39 |
Correct |
77 ms |
49592 KB |
Output is correct |
40 |
Correct |
90 ms |
49672 KB |
Output is correct |
41 |
Correct |
91 ms |
50696 KB |
Output is correct |
42 |
Correct |
88 ms |
50252 KB |
Output is correct |
43 |
Correct |
87 ms |
50396 KB |
Output is correct |
44 |
Correct |
87 ms |
50300 KB |
Output is correct |
45 |
Correct |
111 ms |
50432 KB |
Output is correct |
46 |
Correct |
130 ms |
59488 KB |
Output is correct |
47 |
Correct |
111 ms |
55464 KB |
Output is correct |
48 |
Correct |
116 ms |
56192 KB |
Output is correct |
49 |
Correct |
115 ms |
55756 KB |
Output is correct |
50 |
Correct |
121 ms |
56716 KB |
Output is correct |
51 |
Correct |
187 ms |
82476 KB |
Output is correct |
52 |
Correct |
347 ms |
148272 KB |
Output is correct |
53 |
Correct |
778 ms |
163692 KB |
Output is correct |
54 |
Correct |
687 ms |
153396 KB |
Output is correct |
55 |
Correct |
38 ms |
49484 KB |
Output is correct |
56 |
Correct |
197 ms |
63572 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
39 ms |
49528 KB |
Output is correct |
2 |
Correct |
404 ms |
54900 KB |
Output is correct |
3 |
Correct |
440 ms |
54840 KB |
Output is correct |
4 |
Correct |
379 ms |
54264 KB |
Output is correct |
5 |
Correct |
405 ms |
54928 KB |
Output is correct |
6 |
Correct |
420 ms |
54348 KB |
Output is correct |
7 |
Correct |
464 ms |
54868 KB |
Output is correct |
8 |
Correct |
32 ms |
49584 KB |
Output is correct |
9 |
Correct |
31 ms |
49528 KB |
Output is correct |
10 |
Correct |
39 ms |
49496 KB |
Output is correct |
11 |
Correct |
35 ms |
49424 KB |
Output is correct |
12 |
Correct |
36 ms |
49492 KB |
Output is correct |
13 |
Correct |
31 ms |
49528 KB |
Output is correct |
14 |
Correct |
33 ms |
49552 KB |
Output is correct |
15 |
Correct |
33 ms |
49540 KB |
Output is correct |
16 |
Correct |
34 ms |
49492 KB |
Output is correct |
17 |
Correct |
38 ms |
49552 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
39 ms |
49528 KB |
Output is correct |
2 |
Correct |
404 ms |
54900 KB |
Output is correct |
3 |
Correct |
440 ms |
54840 KB |
Output is correct |
4 |
Correct |
379 ms |
54264 KB |
Output is correct |
5 |
Correct |
405 ms |
54928 KB |
Output is correct |
6 |
Correct |
420 ms |
54348 KB |
Output is correct |
7 |
Correct |
464 ms |
54868 KB |
Output is correct |
8 |
Correct |
32 ms |
49584 KB |
Output is correct |
9 |
Correct |
31 ms |
49528 KB |
Output is correct |
10 |
Correct |
39 ms |
49496 KB |
Output is correct |
11 |
Correct |
35 ms |
49424 KB |
Output is correct |
12 |
Correct |
36 ms |
49492 KB |
Output is correct |
13 |
Correct |
31 ms |
49528 KB |
Output is correct |
14 |
Correct |
33 ms |
49552 KB |
Output is correct |
15 |
Correct |
33 ms |
49540 KB |
Output is correct |
16 |
Correct |
34 ms |
49492 KB |
Output is correct |
17 |
Correct |
38 ms |
49552 KB |
Output is correct |
18 |
Correct |
39 ms |
49532 KB |
Output is correct |
19 |
Correct |
41 ms |
49488 KB |
Output is correct |
20 |
Correct |
807 ms |
59088 KB |
Output is correct |
21 |
Correct |
726 ms |
58620 KB |
Output is correct |
22 |
Correct |
733 ms |
58552 KB |
Output is correct |
23 |
Correct |
758 ms |
59120 KB |
Output is correct |
24 |
Correct |
783 ms |
59088 KB |
Output is correct |
25 |
Correct |
750 ms |
59148 KB |
Output is correct |
26 |
Correct |
760 ms |
59088 KB |
Output is correct |
27 |
Correct |
88 ms |
49692 KB |
Output is correct |
28 |
Correct |
36 ms |
49524 KB |
Output is correct |
29 |
Correct |
42 ms |
49524 KB |
Output is correct |
30 |
Correct |
53 ms |
49552 KB |
Output is correct |
31 |
Correct |
65 ms |
49492 KB |
Output is correct |
32 |
Correct |
71 ms |
49428 KB |
Output is correct |
33 |
Correct |
66 ms |
49564 KB |
Output is correct |
34 |
Correct |
99 ms |
49532 KB |
Output is correct |
35 |
Correct |
87 ms |
49620 KB |
Output is correct |
36 |
Correct |
78 ms |
49584 KB |
Output is correct |
37 |
Correct |
43 ms |
49532 KB |
Output is correct |
38 |
Correct |
43 ms |
49532 KB |
Output is correct |
39 |
Correct |
55 ms |
49492 KB |
Output is correct |
40 |
Correct |
71 ms |
49536 KB |
Output is correct |
41 |
Correct |
66 ms |
49436 KB |
Output is correct |
42 |
Correct |
70 ms |
49508 KB |
Output is correct |
43 |
Correct |
75 ms |
49544 KB |
Output is correct |
44 |
Correct |
79 ms |
49552 KB |
Output is correct |
45 |
Correct |
90 ms |
49580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
39 ms |
49528 KB |
Output is correct |
2 |
Correct |
404 ms |
54900 KB |
Output is correct |
3 |
Correct |
440 ms |
54840 KB |
Output is correct |
4 |
Correct |
379 ms |
54264 KB |
Output is correct |
5 |
Correct |
405 ms |
54928 KB |
Output is correct |
6 |
Correct |
420 ms |
54348 KB |
Output is correct |
7 |
Correct |
464 ms |
54868 KB |
Output is correct |
8 |
Correct |
32 ms |
49584 KB |
Output is correct |
9 |
Correct |
31 ms |
49528 KB |
Output is correct |
10 |
Correct |
39 ms |
49496 KB |
Output is correct |
11 |
Correct |
35 ms |
49424 KB |
Output is correct |
12 |
Correct |
36 ms |
49492 KB |
Output is correct |
13 |
Correct |
31 ms |
49528 KB |
Output is correct |
14 |
Correct |
33 ms |
49552 KB |
Output is correct |
15 |
Correct |
33 ms |
49540 KB |
Output is correct |
16 |
Correct |
34 ms |
49492 KB |
Output is correct |
17 |
Correct |
38 ms |
49552 KB |
Output is correct |
18 |
Correct |
39 ms |
49532 KB |
Output is correct |
19 |
Correct |
41 ms |
49488 KB |
Output is correct |
20 |
Correct |
807 ms |
59088 KB |
Output is correct |
21 |
Correct |
726 ms |
58620 KB |
Output is correct |
22 |
Correct |
733 ms |
58552 KB |
Output is correct |
23 |
Correct |
758 ms |
59120 KB |
Output is correct |
24 |
Correct |
783 ms |
59088 KB |
Output is correct |
25 |
Correct |
750 ms |
59148 KB |
Output is correct |
26 |
Correct |
760 ms |
59088 KB |
Output is correct |
27 |
Correct |
88 ms |
49692 KB |
Output is correct |
28 |
Correct |
36 ms |
49524 KB |
Output is correct |
29 |
Correct |
42 ms |
49524 KB |
Output is correct |
30 |
Correct |
53 ms |
49552 KB |
Output is correct |
31 |
Correct |
65 ms |
49492 KB |
Output is correct |
32 |
Correct |
71 ms |
49428 KB |
Output is correct |
33 |
Correct |
66 ms |
49564 KB |
Output is correct |
34 |
Correct |
99 ms |
49532 KB |
Output is correct |
35 |
Correct |
87 ms |
49620 KB |
Output is correct |
36 |
Correct |
78 ms |
49584 KB |
Output is correct |
37 |
Correct |
43 ms |
49532 KB |
Output is correct |
38 |
Correct |
43 ms |
49532 KB |
Output is correct |
39 |
Correct |
55 ms |
49492 KB |
Output is correct |
40 |
Correct |
71 ms |
49536 KB |
Output is correct |
41 |
Correct |
66 ms |
49436 KB |
Output is correct |
42 |
Correct |
70 ms |
49508 KB |
Output is correct |
43 |
Correct |
75 ms |
49544 KB |
Output is correct |
44 |
Correct |
79 ms |
49552 KB |
Output is correct |
45 |
Correct |
90 ms |
49580 KB |
Output is correct |
46 |
Correct |
83 ms |
49724 KB |
Output is correct |
47 |
Correct |
927 ms |
62296 KB |
Output is correct |
48 |
Correct |
889 ms |
60960 KB |
Output is correct |
49 |
Correct |
911 ms |
60892 KB |
Output is correct |
50 |
Correct |
906 ms |
61428 KB |
Output is correct |
51 |
Correct |
936 ms |
62220 KB |
Output is correct |
52 |
Correct |
954 ms |
62568 KB |
Output is correct |
53 |
Correct |
905 ms |
62956 KB |
Output is correct |
54 |
Correct |
91 ms |
50716 KB |
Output is correct |
55 |
Correct |
95 ms |
50292 KB |
Output is correct |
56 |
Correct |
87 ms |
50392 KB |
Output is correct |
57 |
Correct |
87 ms |
50308 KB |
Output is correct |
58 |
Correct |
86 ms |
50436 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
39 ms |
49528 KB |
Output is correct |
2 |
Correct |
404 ms |
54900 KB |
Output is correct |
3 |
Correct |
440 ms |
54840 KB |
Output is correct |
4 |
Correct |
379 ms |
54264 KB |
Output is correct |
5 |
Correct |
405 ms |
54928 KB |
Output is correct |
6 |
Correct |
420 ms |
54348 KB |
Output is correct |
7 |
Correct |
464 ms |
54868 KB |
Output is correct |
8 |
Correct |
32 ms |
49584 KB |
Output is correct |
9 |
Correct |
31 ms |
49528 KB |
Output is correct |
10 |
Correct |
39 ms |
49496 KB |
Output is correct |
11 |
Correct |
35 ms |
49424 KB |
Output is correct |
12 |
Correct |
36 ms |
49492 KB |
Output is correct |
13 |
Correct |
31 ms |
49528 KB |
Output is correct |
14 |
Correct |
33 ms |
49552 KB |
Output is correct |
15 |
Correct |
33 ms |
49540 KB |
Output is correct |
16 |
Correct |
34 ms |
49492 KB |
Output is correct |
17 |
Correct |
38 ms |
49552 KB |
Output is correct |
18 |
Correct |
39 ms |
49532 KB |
Output is correct |
19 |
Correct |
41 ms |
49488 KB |
Output is correct |
20 |
Correct |
807 ms |
59088 KB |
Output is correct |
21 |
Correct |
726 ms |
58620 KB |
Output is correct |
22 |
Correct |
733 ms |
58552 KB |
Output is correct |
23 |
Correct |
758 ms |
59120 KB |
Output is correct |
24 |
Correct |
783 ms |
59088 KB |
Output is correct |
25 |
Correct |
750 ms |
59148 KB |
Output is correct |
26 |
Correct |
760 ms |
59088 KB |
Output is correct |
27 |
Correct |
88 ms |
49692 KB |
Output is correct |
28 |
Correct |
36 ms |
49524 KB |
Output is correct |
29 |
Correct |
42 ms |
49524 KB |
Output is correct |
30 |
Correct |
53 ms |
49552 KB |
Output is correct |
31 |
Correct |
65 ms |
49492 KB |
Output is correct |
32 |
Correct |
71 ms |
49428 KB |
Output is correct |
33 |
Correct |
66 ms |
49564 KB |
Output is correct |
34 |
Correct |
99 ms |
49532 KB |
Output is correct |
35 |
Correct |
87 ms |
49620 KB |
Output is correct |
36 |
Correct |
78 ms |
49584 KB |
Output is correct |
37 |
Correct |
43 ms |
49532 KB |
Output is correct |
38 |
Correct |
43 ms |
49532 KB |
Output is correct |
39 |
Correct |
55 ms |
49492 KB |
Output is correct |
40 |
Correct |
71 ms |
49536 KB |
Output is correct |
41 |
Correct |
66 ms |
49436 KB |
Output is correct |
42 |
Correct |
70 ms |
49508 KB |
Output is correct |
43 |
Correct |
75 ms |
49544 KB |
Output is correct |
44 |
Correct |
79 ms |
49552 KB |
Output is correct |
45 |
Correct |
90 ms |
49580 KB |
Output is correct |
46 |
Correct |
83 ms |
49724 KB |
Output is correct |
47 |
Correct |
927 ms |
62296 KB |
Output is correct |
48 |
Correct |
889 ms |
60960 KB |
Output is correct |
49 |
Correct |
911 ms |
60892 KB |
Output is correct |
50 |
Correct |
906 ms |
61428 KB |
Output is correct |
51 |
Correct |
936 ms |
62220 KB |
Output is correct |
52 |
Correct |
954 ms |
62568 KB |
Output is correct |
53 |
Correct |
905 ms |
62956 KB |
Output is correct |
54 |
Correct |
91 ms |
50716 KB |
Output is correct |
55 |
Correct |
95 ms |
50292 KB |
Output is correct |
56 |
Correct |
87 ms |
50392 KB |
Output is correct |
57 |
Correct |
87 ms |
50308 KB |
Output is correct |
58 |
Correct |
86 ms |
50436 KB |
Output is correct |
59 |
Correct |
1041 ms |
67860 KB |
Output is correct |
60 |
Correct |
601 ms |
69196 KB |
Output is correct |
61 |
Correct |
640 ms |
70004 KB |
Output is correct |
62 |
Correct |
637 ms |
70292 KB |
Output is correct |
63 |
Correct |
1130 ms |
68572 KB |
Output is correct |
64 |
Correct |
1101 ms |
74464 KB |
Output is correct |
65 |
Correct |
1167 ms |
74676 KB |
Output is correct |
66 |
Correct |
1006 ms |
66860 KB |
Output is correct |
67 |
Correct |
1004 ms |
74672 KB |
Output is correct |
68 |
Correct |
1196 ms |
77776 KB |
Output is correct |
69 |
Correct |
1237 ms |
78000 KB |
Output is correct |
70 |
Correct |
131 ms |
59592 KB |
Output is correct |
71 |
Correct |
109 ms |
55460 KB |
Output is correct |
72 |
Correct |
130 ms |
56132 KB |
Output is correct |
73 |
Correct |
113 ms |
55776 KB |
Output is correct |
74 |
Correct |
125 ms |
56708 KB |
Output is correct |
75 |
Correct |
182 ms |
63548 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
49528 KB |
Output is correct |
2 |
Correct |
82 ms |
49652 KB |
Output is correct |
3 |
Correct |
44 ms |
49536 KB |
Output is correct |
4 |
Correct |
41 ms |
49528 KB |
Output is correct |
5 |
Correct |
296 ms |
129532 KB |
Output is correct |
6 |
Correct |
170 ms |
82312 KB |
Output is correct |
7 |
Correct |
284 ms |
99164 KB |
Output is correct |
8 |
Correct |
305 ms |
100684 KB |
Output is correct |
9 |
Correct |
491 ms |
118232 KB |
Output is correct |
10 |
Correct |
299 ms |
98512 KB |
Output is correct |
11 |
Correct |
344 ms |
100760 KB |
Output is correct |
12 |
Correct |
518 ms |
117448 KB |
Output is correct |
13 |
Correct |
29 ms |
49492 KB |
Output is correct |
14 |
Correct |
30 ms |
49492 KB |
Output is correct |
15 |
Correct |
33 ms |
49468 KB |
Output is correct |
16 |
Correct |
39 ms |
49536 KB |
Output is correct |
17 |
Correct |
38 ms |
49548 KB |
Output is correct |
18 |
Correct |
33 ms |
49492 KB |
Output is correct |
19 |
Correct |
39 ms |
49524 KB |
Output is correct |
20 |
Correct |
36 ms |
49524 KB |
Output is correct |
21 |
Correct |
34 ms |
49552 KB |
Output is correct |
22 |
Correct |
75 ms |
49556 KB |
Output is correct |
23 |
Correct |
37 ms |
49548 KB |
Output is correct |
24 |
Correct |
43 ms |
49536 KB |
Output is correct |
25 |
Correct |
60 ms |
49536 KB |
Output is correct |
26 |
Correct |
59 ms |
49540 KB |
Output is correct |
27 |
Correct |
70 ms |
49540 KB |
Output is correct |
28 |
Correct |
69 ms |
49564 KB |
Output is correct |
29 |
Correct |
84 ms |
49580 KB |
Output is correct |
30 |
Correct |
76 ms |
49616 KB |
Output is correct |
31 |
Correct |
83 ms |
49676 KB |
Output is correct |
32 |
Correct |
39 ms |
49528 KB |
Output is correct |
33 |
Correct |
45 ms |
49540 KB |
Output is correct |
34 |
Correct |
55 ms |
49532 KB |
Output is correct |
35 |
Correct |
60 ms |
49548 KB |
Output is correct |
36 |
Correct |
64 ms |
49540 KB |
Output is correct |
37 |
Correct |
71 ms |
49548 KB |
Output is correct |
38 |
Correct |
70 ms |
49536 KB |
Output is correct |
39 |
Correct |
77 ms |
49592 KB |
Output is correct |
40 |
Correct |
90 ms |
49672 KB |
Output is correct |
41 |
Correct |
91 ms |
50696 KB |
Output is correct |
42 |
Correct |
88 ms |
50252 KB |
Output is correct |
43 |
Correct |
87 ms |
50396 KB |
Output is correct |
44 |
Correct |
87 ms |
50300 KB |
Output is correct |
45 |
Correct |
111 ms |
50432 KB |
Output is correct |
46 |
Correct |
130 ms |
59488 KB |
Output is correct |
47 |
Correct |
111 ms |
55464 KB |
Output is correct |
48 |
Correct |
116 ms |
56192 KB |
Output is correct |
49 |
Correct |
115 ms |
55756 KB |
Output is correct |
50 |
Correct |
121 ms |
56716 KB |
Output is correct |
51 |
Correct |
187 ms |
82476 KB |
Output is correct |
52 |
Correct |
347 ms |
148272 KB |
Output is correct |
53 |
Correct |
778 ms |
163692 KB |
Output is correct |
54 |
Correct |
687 ms |
153396 KB |
Output is correct |
55 |
Correct |
38 ms |
49484 KB |
Output is correct |
56 |
Correct |
197 ms |
63572 KB |
Output is correct |
57 |
Correct |
39 ms |
49528 KB |
Output is correct |
58 |
Correct |
404 ms |
54900 KB |
Output is correct |
59 |
Correct |
440 ms |
54840 KB |
Output is correct |
60 |
Correct |
379 ms |
54264 KB |
Output is correct |
61 |
Correct |
405 ms |
54928 KB |
Output is correct |
62 |
Correct |
420 ms |
54348 KB |
Output is correct |
63 |
Correct |
464 ms |
54868 KB |
Output is correct |
64 |
Correct |
32 ms |
49584 KB |
Output is correct |
65 |
Correct |
31 ms |
49528 KB |
Output is correct |
66 |
Correct |
39 ms |
49496 KB |
Output is correct |
67 |
Correct |
35 ms |
49424 KB |
Output is correct |
68 |
Correct |
36 ms |
49492 KB |
Output is correct |
69 |
Correct |
31 ms |
49528 KB |
Output is correct |
70 |
Correct |
33 ms |
49552 KB |
Output is correct |
71 |
Correct |
33 ms |
49540 KB |
Output is correct |
72 |
Correct |
34 ms |
49492 KB |
Output is correct |
73 |
Correct |
38 ms |
49552 KB |
Output is correct |
74 |
Correct |
39 ms |
49532 KB |
Output is correct |
75 |
Correct |
41 ms |
49488 KB |
Output is correct |
76 |
Correct |
807 ms |
59088 KB |
Output is correct |
77 |
Correct |
726 ms |
58620 KB |
Output is correct |
78 |
Correct |
733 ms |
58552 KB |
Output is correct |
79 |
Correct |
758 ms |
59120 KB |
Output is correct |
80 |
Correct |
783 ms |
59088 KB |
Output is correct |
81 |
Correct |
750 ms |
59148 KB |
Output is correct |
82 |
Correct |
760 ms |
59088 KB |
Output is correct |
83 |
Correct |
88 ms |
49692 KB |
Output is correct |
84 |
Correct |
36 ms |
49524 KB |
Output is correct |
85 |
Correct |
42 ms |
49524 KB |
Output is correct |
86 |
Correct |
53 ms |
49552 KB |
Output is correct |
87 |
Correct |
65 ms |
49492 KB |
Output is correct |
88 |
Correct |
71 ms |
49428 KB |
Output is correct |
89 |
Correct |
66 ms |
49564 KB |
Output is correct |
90 |
Correct |
99 ms |
49532 KB |
Output is correct |
91 |
Correct |
87 ms |
49620 KB |
Output is correct |
92 |
Correct |
78 ms |
49584 KB |
Output is correct |
93 |
Correct |
43 ms |
49532 KB |
Output is correct |
94 |
Correct |
43 ms |
49532 KB |
Output is correct |
95 |
Correct |
55 ms |
49492 KB |
Output is correct |
96 |
Correct |
71 ms |
49536 KB |
Output is correct |
97 |
Correct |
66 ms |
49436 KB |
Output is correct |
98 |
Correct |
70 ms |
49508 KB |
Output is correct |
99 |
Correct |
75 ms |
49544 KB |
Output is correct |
100 |
Correct |
79 ms |
49552 KB |
Output is correct |
101 |
Correct |
90 ms |
49580 KB |
Output is correct |
102 |
Correct |
83 ms |
49724 KB |
Output is correct |
103 |
Correct |
927 ms |
62296 KB |
Output is correct |
104 |
Correct |
889 ms |
60960 KB |
Output is correct |
105 |
Correct |
911 ms |
60892 KB |
Output is correct |
106 |
Correct |
906 ms |
61428 KB |
Output is correct |
107 |
Correct |
936 ms |
62220 KB |
Output is correct |
108 |
Correct |
954 ms |
62568 KB |
Output is correct |
109 |
Correct |
905 ms |
62956 KB |
Output is correct |
110 |
Correct |
91 ms |
50716 KB |
Output is correct |
111 |
Correct |
95 ms |
50292 KB |
Output is correct |
112 |
Correct |
87 ms |
50392 KB |
Output is correct |
113 |
Correct |
87 ms |
50308 KB |
Output is correct |
114 |
Correct |
86 ms |
50436 KB |
Output is correct |
115 |
Correct |
1041 ms |
67860 KB |
Output is correct |
116 |
Correct |
601 ms |
69196 KB |
Output is correct |
117 |
Correct |
640 ms |
70004 KB |
Output is correct |
118 |
Correct |
637 ms |
70292 KB |
Output is correct |
119 |
Correct |
1130 ms |
68572 KB |
Output is correct |
120 |
Correct |
1101 ms |
74464 KB |
Output is correct |
121 |
Correct |
1167 ms |
74676 KB |
Output is correct |
122 |
Correct |
1006 ms |
66860 KB |
Output is correct |
123 |
Correct |
1004 ms |
74672 KB |
Output is correct |
124 |
Correct |
1196 ms |
77776 KB |
Output is correct |
125 |
Correct |
1237 ms |
78000 KB |
Output is correct |
126 |
Correct |
131 ms |
59592 KB |
Output is correct |
127 |
Correct |
109 ms |
55460 KB |
Output is correct |
128 |
Correct |
130 ms |
56132 KB |
Output is correct |
129 |
Correct |
113 ms |
55776 KB |
Output is correct |
130 |
Correct |
125 ms |
56708 KB |
Output is correct |
131 |
Correct |
182 ms |
63548 KB |
Output is correct |
132 |
Correct |
2032 ms |
184368 KB |
Output is correct |
133 |
Correct |
1991 ms |
184236 KB |
Output is correct |
134 |
Correct |
2152 ms |
184428 KB |
Output is correct |
135 |
Correct |
2021 ms |
152812 KB |
Output is correct |
136 |
Correct |
1969 ms |
168524 KB |
Output is correct |
137 |
Correct |
1504 ms |
111708 KB |
Output is correct |
138 |
Correct |
1536 ms |
112376 KB |
Output is correct |
139 |
Correct |
1250 ms |
97432 KB |
Output is correct |
140 |
Correct |
1346 ms |
162736 KB |
Output is correct |
141 |
Correct |
2241 ms |
186084 KB |
Output is correct |
142 |
Correct |
2288 ms |
186324 KB |
Output is correct |