#include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define ff first
#define ss second
#define pb push_back
const int mxN = 3e5 + 1;
int a[mxN];
int freq[20];
int n, m;
int dpf[(1 << 20)]; // 0 if no, pos if have 1, -1 if have 2+
pii dpb[(1 << 20)]; // {first to have 1, first to have 2+}
int popcount(int x) {
return bitset<32>(x).count();
}
void init() {
}
void solve() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
bool temp;
cin >> temp;
if (temp) {
a[i] |= (1 << j);
freq[j]++;
}
}
}
for (int i = 1; i <= n; i++) {
if (dpf[a[i]] == 0) dpf[a[i]] = i;
else dpf[a[i]] = -1;
}
for (int bit = 0; bit < m; bit++) {
for (int msk = 0; msk < (1 << m); msk++) {
if (msk & (1 << bit)) {
int prev = (msk ^ (1 << bit));
if (dpf[prev] == -1) dpf[msk] = -1;
else if (dpf[prev] != 0) {
if (dpf[msk] != 0) dpf[msk] = -1;
else dpf[msk] = dpf[prev];
}
}
}
}
for (int msk = 0; msk < (1 << m); msk++) {
if (dpf[msk] == -1) dpb[msk] = {msk, msk};
else if (dpf[msk] != 0) dpb[msk] = {msk, -1};
else dpb[msk] = {-1, -1};
}
for (int bit = m - 1; bit >= 0; bit--) {
for (int msk = 0; msk < (1 << m); msk++) {
if (popcount(msk) != bit) continue;
for (int i = 0; i < m; i++) {
if (msk & (1 << i)) continue;
int prev = (msk ^ (1 << i));
if (dpb[prev].ff != -1) {
// try to update 2
if (dpf[dpb[prev].ff] != dpf[dpb[msk].ff]) {
// take larger one
if (popcount(dpb[prev].ff) > popcount(dpb[msk].ff)) {
if (popcount(dpb[prev].ff) < popcount(dpb[msk].ss)) {
dpb[msk].ss = dpb[prev].ff;
}
} else {
if (popcount(dpb[msk].ff) < popcount(dpb[msk].ss)) {
dpb[msk].ss = dpb[msk].ff;
}
}
}
// update only 1
if (popcount(dpb[prev].ff) < popcount(dpb[msk].ff)) {
dpb[msk].ff = dpb[prev].ff;
}
}
if (dpb[prev].ss != -1) {
if (popcount(dpb[prev].ss) < popcount(dpb[msk].ff)) {
dpb[msk].ff = dpb[prev].ff;
}
if (popcount(dpb[prev].ss) < popcount(dpb[msk].ss)) {
dpb[msk].ss = dpb[prev].ss;
}
}
}
if (popcount(dpb[msk].ss) < popcount(dpb[msk].ff)) {
dpb[msk].ff = dpb[msk].ss;
}
}
}
for (int i = 1; i <= n; i++) {
int ans = 0;
int tar = 0;
for (int j = 0; j < m; j++) {
int cnt = freq[j] - bool(a[i] & (1 << j));
if (cnt > (n / 2)) ans++;
else if (cnt == (n / 2)) tar |= (1 << j);
}
tar ^= ((1 << m) - 1);
// tar[j] = 1: have or not have doesn't matter; else matters
// cerr << tar << ' ' << dpb[tar].ff << ' ' << dpb[tar].ss << endl;
int add = 0;
if (dpb[tar].ff != -1 && dpf[dpb[tar].ff] != i) {
add = max(add, m - popcount(dpb[tar].ff));
}
if (dpb[tar].ss != -1) {
add = max(add, m - popcount(dpb[tar].ss));
}
ans += add;
cout << ans << endl;
}
}
int32_t main() {
ios::sync_with_stdio(0); cin.tie(0);
init(); solve();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
286 ms |
10576 KB |
Output is correct |
6 |
Correct |
276 ms |
8532 KB |
Output is correct |
7 |
Correct |
301 ms |
9932 KB |
Output is correct |
8 |
Correct |
338 ms |
10116 KB |
Output is correct |
9 |
Correct |
362 ms |
12500 KB |
Output is correct |
10 |
Correct |
317 ms |
9812 KB |
Output is correct |
11 |
Correct |
335 ms |
11500 KB |
Output is correct |
12 |
Correct |
356 ms |
12372 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
0 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
328 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
0 ms |
324 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
0 ms |
340 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
324 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
0 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
284 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
4 ms |
468 KB |
Output is correct |
42 |
Correct |
4 ms |
468 KB |
Output is correct |
43 |
Correct |
4 ms |
536 KB |
Output is correct |
44 |
Correct |
4 ms |
468 KB |
Output is correct |
45 |
Correct |
4 ms |
452 KB |
Output is correct |
46 |
Correct |
31 ms |
1620 KB |
Output is correct |
47 |
Correct |
34 ms |
1644 KB |
Output is correct |
48 |
Correct |
36 ms |
1720 KB |
Output is correct |
49 |
Correct |
34 ms |
1620 KB |
Output is correct |
50 |
Correct |
35 ms |
1876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
286 ms |
10576 KB |
Output is correct |
6 |
Correct |
276 ms |
8532 KB |
Output is correct |
7 |
Correct |
301 ms |
9932 KB |
Output is correct |
8 |
Correct |
338 ms |
10116 KB |
Output is correct |
9 |
Correct |
362 ms |
12500 KB |
Output is correct |
10 |
Correct |
317 ms |
9812 KB |
Output is correct |
11 |
Correct |
335 ms |
11500 KB |
Output is correct |
12 |
Correct |
356 ms |
12372 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
0 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
328 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
0 ms |
324 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
0 ms |
340 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
324 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
0 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
284 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
4 ms |
468 KB |
Output is correct |
42 |
Correct |
4 ms |
468 KB |
Output is correct |
43 |
Correct |
4 ms |
536 KB |
Output is correct |
44 |
Correct |
4 ms |
468 KB |
Output is correct |
45 |
Correct |
4 ms |
452 KB |
Output is correct |
46 |
Correct |
31 ms |
1620 KB |
Output is correct |
47 |
Correct |
34 ms |
1644 KB |
Output is correct |
48 |
Correct |
36 ms |
1720 KB |
Output is correct |
49 |
Correct |
34 ms |
1620 KB |
Output is correct |
50 |
Correct |
35 ms |
1876 KB |
Output is correct |
51 |
Correct |
281 ms |
8668 KB |
Output is correct |
52 |
Correct |
275 ms |
12756 KB |
Output is correct |
53 |
Correct |
304 ms |
12752 KB |
Output is correct |
54 |
Correct |
322 ms |
12728 KB |
Output is correct |
55 |
Correct |
4 ms |
340 KB |
Output is correct |
56 |
Correct |
39 ms |
1876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
329 ms |
3228 KB |
Output is correct |
3 |
Correct |
322 ms |
2000 KB |
Output is correct |
4 |
Correct |
308 ms |
2680 KB |
Output is correct |
5 |
Correct |
323 ms |
3184 KB |
Output is correct |
6 |
Correct |
314 ms |
2680 KB |
Output is correct |
7 |
Correct |
333 ms |
3148 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
0 ms |
328 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
4 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
329 ms |
3228 KB |
Output is correct |
3 |
Correct |
322 ms |
2000 KB |
Output is correct |
4 |
Correct |
308 ms |
2680 KB |
Output is correct |
5 |
Correct |
323 ms |
3184 KB |
Output is correct |
6 |
Correct |
314 ms |
2680 KB |
Output is correct |
7 |
Correct |
333 ms |
3148 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
0 ms |
328 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
4 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
467 ms |
7980 KB |
Output is correct |
21 |
Correct |
444 ms |
7364 KB |
Output is correct |
22 |
Correct |
451 ms |
7356 KB |
Output is correct |
23 |
Correct |
468 ms |
8144 KB |
Output is correct |
24 |
Correct |
540 ms |
6772 KB |
Output is correct |
25 |
Correct |
463 ms |
7896 KB |
Output is correct |
26 |
Correct |
521 ms |
8004 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
0 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
324 KB |
Output is correct |
32 |
Correct |
0 ms |
324 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
328 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
0 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
0 ms |
340 KB |
Output is correct |
42 |
Correct |
0 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
329 ms |
3228 KB |
Output is correct |
3 |
Correct |
322 ms |
2000 KB |
Output is correct |
4 |
Correct |
308 ms |
2680 KB |
Output is correct |
5 |
Correct |
323 ms |
3184 KB |
Output is correct |
6 |
Correct |
314 ms |
2680 KB |
Output is correct |
7 |
Correct |
333 ms |
3148 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
0 ms |
328 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
4 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
467 ms |
7980 KB |
Output is correct |
21 |
Correct |
444 ms |
7364 KB |
Output is correct |
22 |
Correct |
451 ms |
7356 KB |
Output is correct |
23 |
Correct |
468 ms |
8144 KB |
Output is correct |
24 |
Correct |
540 ms |
6772 KB |
Output is correct |
25 |
Correct |
463 ms |
7896 KB |
Output is correct |
26 |
Correct |
521 ms |
8004 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
0 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
324 KB |
Output is correct |
32 |
Correct |
0 ms |
324 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
328 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
0 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
0 ms |
340 KB |
Output is correct |
42 |
Correct |
0 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
1 ms |
332 KB |
Output is correct |
47 |
Correct |
534 ms |
10468 KB |
Output is correct |
48 |
Correct |
520 ms |
9804 KB |
Output is correct |
49 |
Correct |
515 ms |
9740 KB |
Output is correct |
50 |
Correct |
504 ms |
10628 KB |
Output is correct |
51 |
Correct |
496 ms |
9292 KB |
Output is correct |
52 |
Correct |
515 ms |
10408 KB |
Output is correct |
53 |
Correct |
528 ms |
10744 KB |
Output is correct |
54 |
Correct |
4 ms |
468 KB |
Output is correct |
55 |
Correct |
4 ms |
512 KB |
Output is correct |
56 |
Correct |
4 ms |
468 KB |
Output is correct |
57 |
Correct |
4 ms |
468 KB |
Output is correct |
58 |
Correct |
4 ms |
468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
329 ms |
3228 KB |
Output is correct |
3 |
Correct |
322 ms |
2000 KB |
Output is correct |
4 |
Correct |
308 ms |
2680 KB |
Output is correct |
5 |
Correct |
323 ms |
3184 KB |
Output is correct |
6 |
Correct |
314 ms |
2680 KB |
Output is correct |
7 |
Correct |
333 ms |
3148 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
0 ms |
328 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
4 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
467 ms |
7980 KB |
Output is correct |
21 |
Correct |
444 ms |
7364 KB |
Output is correct |
22 |
Correct |
451 ms |
7356 KB |
Output is correct |
23 |
Correct |
468 ms |
8144 KB |
Output is correct |
24 |
Correct |
540 ms |
6772 KB |
Output is correct |
25 |
Correct |
463 ms |
7896 KB |
Output is correct |
26 |
Correct |
521 ms |
8004 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
0 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
324 KB |
Output is correct |
32 |
Correct |
0 ms |
324 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
328 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
332 KB |
Output is correct |
37 |
Correct |
0 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
0 ms |
340 KB |
Output is correct |
42 |
Correct |
0 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
1 ms |
332 KB |
Output is correct |
47 |
Correct |
534 ms |
10468 KB |
Output is correct |
48 |
Correct |
520 ms |
9804 KB |
Output is correct |
49 |
Correct |
515 ms |
9740 KB |
Output is correct |
50 |
Correct |
504 ms |
10628 KB |
Output is correct |
51 |
Correct |
496 ms |
9292 KB |
Output is correct |
52 |
Correct |
515 ms |
10408 KB |
Output is correct |
53 |
Correct |
528 ms |
10744 KB |
Output is correct |
54 |
Correct |
4 ms |
468 KB |
Output is correct |
55 |
Correct |
4 ms |
512 KB |
Output is correct |
56 |
Correct |
4 ms |
468 KB |
Output is correct |
57 |
Correct |
4 ms |
468 KB |
Output is correct |
58 |
Correct |
4 ms |
468 KB |
Output is correct |
59 |
Correct |
571 ms |
12452 KB |
Output is correct |
60 |
Correct |
252 ms |
6476 KB |
Output is correct |
61 |
Correct |
268 ms |
6720 KB |
Output is correct |
62 |
Correct |
276 ms |
6924 KB |
Output is correct |
63 |
Correct |
580 ms |
12300 KB |
Output is correct |
64 |
Correct |
637 ms |
13692 KB |
Output is correct |
65 |
Correct |
621 ms |
13740 KB |
Output is correct |
66 |
Correct |
582 ms |
13264 KB |
Output is correct |
67 |
Correct |
553 ms |
12340 KB |
Output is correct |
68 |
Correct |
594 ms |
13596 KB |
Output is correct |
69 |
Correct |
643 ms |
13900 KB |
Output is correct |
70 |
Correct |
30 ms |
1632 KB |
Output is correct |
71 |
Correct |
34 ms |
1648 KB |
Output is correct |
72 |
Correct |
47 ms |
1724 KB |
Output is correct |
73 |
Correct |
34 ms |
1620 KB |
Output is correct |
74 |
Correct |
35 ms |
1876 KB |
Output is correct |
75 |
Correct |
55 ms |
1876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
286 ms |
10576 KB |
Output is correct |
6 |
Correct |
276 ms |
8532 KB |
Output is correct |
7 |
Correct |
301 ms |
9932 KB |
Output is correct |
8 |
Correct |
338 ms |
10116 KB |
Output is correct |
9 |
Correct |
362 ms |
12500 KB |
Output is correct |
10 |
Correct |
317 ms |
9812 KB |
Output is correct |
11 |
Correct |
335 ms |
11500 KB |
Output is correct |
12 |
Correct |
356 ms |
12372 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
0 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
328 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
0 ms |
324 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
0 ms |
340 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
324 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
0 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
284 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
4 ms |
468 KB |
Output is correct |
42 |
Correct |
4 ms |
468 KB |
Output is correct |
43 |
Correct |
4 ms |
536 KB |
Output is correct |
44 |
Correct |
4 ms |
468 KB |
Output is correct |
45 |
Correct |
4 ms |
452 KB |
Output is correct |
46 |
Correct |
31 ms |
1620 KB |
Output is correct |
47 |
Correct |
34 ms |
1644 KB |
Output is correct |
48 |
Correct |
36 ms |
1720 KB |
Output is correct |
49 |
Correct |
34 ms |
1620 KB |
Output is correct |
50 |
Correct |
35 ms |
1876 KB |
Output is correct |
51 |
Correct |
281 ms |
8668 KB |
Output is correct |
52 |
Correct |
275 ms |
12756 KB |
Output is correct |
53 |
Correct |
304 ms |
12752 KB |
Output is correct |
54 |
Correct |
322 ms |
12728 KB |
Output is correct |
55 |
Correct |
4 ms |
340 KB |
Output is correct |
56 |
Correct |
39 ms |
1876 KB |
Output is correct |
57 |
Correct |
0 ms |
340 KB |
Output is correct |
58 |
Correct |
329 ms |
3228 KB |
Output is correct |
59 |
Correct |
322 ms |
2000 KB |
Output is correct |
60 |
Correct |
308 ms |
2680 KB |
Output is correct |
61 |
Correct |
323 ms |
3184 KB |
Output is correct |
62 |
Correct |
314 ms |
2680 KB |
Output is correct |
63 |
Correct |
333 ms |
3148 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
1 ms |
340 KB |
Output is correct |
67 |
Correct |
0 ms |
328 KB |
Output is correct |
68 |
Correct |
1 ms |
340 KB |
Output is correct |
69 |
Correct |
1 ms |
340 KB |
Output is correct |
70 |
Correct |
0 ms |
212 KB |
Output is correct |
71 |
Correct |
1 ms |
340 KB |
Output is correct |
72 |
Correct |
1 ms |
340 KB |
Output is correct |
73 |
Correct |
4 ms |
340 KB |
Output is correct |
74 |
Correct |
0 ms |
340 KB |
Output is correct |
75 |
Correct |
1 ms |
340 KB |
Output is correct |
76 |
Correct |
467 ms |
7980 KB |
Output is correct |
77 |
Correct |
444 ms |
7364 KB |
Output is correct |
78 |
Correct |
451 ms |
7356 KB |
Output is correct |
79 |
Correct |
468 ms |
8144 KB |
Output is correct |
80 |
Correct |
540 ms |
6772 KB |
Output is correct |
81 |
Correct |
463 ms |
7896 KB |
Output is correct |
82 |
Correct |
521 ms |
8004 KB |
Output is correct |
83 |
Correct |
1 ms |
340 KB |
Output is correct |
84 |
Correct |
1 ms |
340 KB |
Output is correct |
85 |
Correct |
0 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
340 KB |
Output is correct |
87 |
Correct |
1 ms |
324 KB |
Output is correct |
88 |
Correct |
0 ms |
324 KB |
Output is correct |
89 |
Correct |
1 ms |
340 KB |
Output is correct |
90 |
Correct |
1 ms |
328 KB |
Output is correct |
91 |
Correct |
1 ms |
340 KB |
Output is correct |
92 |
Correct |
1 ms |
332 KB |
Output is correct |
93 |
Correct |
0 ms |
340 KB |
Output is correct |
94 |
Correct |
1 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
1 ms |
340 KB |
Output is correct |
97 |
Correct |
0 ms |
340 KB |
Output is correct |
98 |
Correct |
0 ms |
340 KB |
Output is correct |
99 |
Correct |
1 ms |
340 KB |
Output is correct |
100 |
Correct |
1 ms |
340 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
1 ms |
332 KB |
Output is correct |
103 |
Correct |
534 ms |
10468 KB |
Output is correct |
104 |
Correct |
520 ms |
9804 KB |
Output is correct |
105 |
Correct |
515 ms |
9740 KB |
Output is correct |
106 |
Correct |
504 ms |
10628 KB |
Output is correct |
107 |
Correct |
496 ms |
9292 KB |
Output is correct |
108 |
Correct |
515 ms |
10408 KB |
Output is correct |
109 |
Correct |
528 ms |
10744 KB |
Output is correct |
110 |
Correct |
4 ms |
468 KB |
Output is correct |
111 |
Correct |
4 ms |
512 KB |
Output is correct |
112 |
Correct |
4 ms |
468 KB |
Output is correct |
113 |
Correct |
4 ms |
468 KB |
Output is correct |
114 |
Correct |
4 ms |
468 KB |
Output is correct |
115 |
Correct |
571 ms |
12452 KB |
Output is correct |
116 |
Correct |
252 ms |
6476 KB |
Output is correct |
117 |
Correct |
268 ms |
6720 KB |
Output is correct |
118 |
Correct |
276 ms |
6924 KB |
Output is correct |
119 |
Correct |
580 ms |
12300 KB |
Output is correct |
120 |
Correct |
637 ms |
13692 KB |
Output is correct |
121 |
Correct |
621 ms |
13740 KB |
Output is correct |
122 |
Correct |
582 ms |
13264 KB |
Output is correct |
123 |
Correct |
553 ms |
12340 KB |
Output is correct |
124 |
Correct |
594 ms |
13596 KB |
Output is correct |
125 |
Correct |
643 ms |
13900 KB |
Output is correct |
126 |
Correct |
30 ms |
1632 KB |
Output is correct |
127 |
Correct |
34 ms |
1648 KB |
Output is correct |
128 |
Correct |
47 ms |
1724 KB |
Output is correct |
129 |
Correct |
34 ms |
1620 KB |
Output is correct |
130 |
Correct |
35 ms |
1876 KB |
Output is correct |
131 |
Correct |
55 ms |
1876 KB |
Output is correct |
132 |
Correct |
934 ms |
26368 KB |
Output is correct |
133 |
Correct |
916 ms |
26244 KB |
Output is correct |
134 |
Correct |
933 ms |
26400 KB |
Output is correct |
135 |
Correct |
1024 ms |
26224 KB |
Output is correct |
136 |
Correct |
1123 ms |
26388 KB |
Output is correct |
137 |
Correct |
783 ms |
19424 KB |
Output is correct |
138 |
Correct |
768 ms |
19680 KB |
Output is correct |
139 |
Correct |
881 ms |
22368 KB |
Output is correct |
140 |
Correct |
832 ms |
24828 KB |
Output is correct |
141 |
Correct |
951 ms |
26020 KB |
Output is correct |
142 |
Correct |
1016 ms |
26400 KB |
Output is correct |