#include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e18;
bool cmp (int a, int b) {
int A = 0, B = 0;
for (int i=0;i<20;i++) if (a & (1<<i)) A++;
for (int i=0;i<20;i++) if (b & (1<<i)) B++;
return A < B;
}
signed main() {
ios::sync_with_stdio(0); cin.tie(0);
int n, m;
cin >> n >> m;
int N = (1<<m);
pair<int,int> mn[N][2];
int sum[m], a[n+1][m];
for (int i=0;i<m;i++) sum[i] = 0;
for (int i=0;i<N;i++) {
mn[i][0] = {-1, 0}, mn[i][1] = {-1, 0};
for (int j=0;j<m;j++) if (i & (1<<j)) mn[i][0].second++, mn[i][1].second++;
}
for (int i=1;i<=n;i++) {
int cur = 0;
for (int j=0;j<m;j++) {
cin >> a[i][j];
cur += (!a[i][j]) * (1<<j);
sum[j] += a[i][j];
}
if (mn[cur][0].first==-1) mn[cur][0] = {i, 0};
else if (mn[cur][1].first==-1) mn[cur][1] = {i, 0};
}
vector<int> order(N);
for (int i=0;i<N;i++) {
order[i] = i;
}
sort(order.rbegin(), order.rend(), cmp);
for (int u:order) {
for (int i=0;i<m;i++) if (!(u & (1<<i))) {
int v = (u | (1<<i));
int id = mn[v][0].first;
if (id!=-1 && id!=mn[u][0].first && id!=mn[u][1].first) {
if (mn[u][0].first==-1) mn[u][0] = {mn[v][0].first, 0};
else if (mn[u][1].first==-1) mn[u][1] = {mn[v][0].first, 0};
}
id = mn[v][1].first;
if (id!=-1 && id!=mn[u][0].first && id!=mn[u][1].first) {
if (mn[u][0].first==-1) mn[u][0] = {mn[v][1].first, 0};
else if (mn[u][1].first==-1) mn[u][1] = {mn[v][1].first, 0};
}
}
}
// for (int i=0;i<N;i++) if (mn[i][0].second==0) {
// cout << mn[i][0].first << endl;
// for (int j=0;j<m;j++) cout << (bool)(i & (1<<j)); cout << endl;
// }
reverse(order.begin(), order.end());
for (int u:order) {
vector<pair<int,int>> vec;
for (int i=0;i<m;i++) if (u & (1<<i)) {
int v = u - (1<<i);
// if (u==1473) {
// for (int j=0;j<m;j++) cout << (bool)(v & (1<<j)); cout << endl;
// }
for (auto [id, val]:mn[v]) if (id!=-1) vec.push_back({val+1, id});
}
sort(vec.begin(), vec.end());
for (auto [val, id]:vec) {
// if (u==1473) cout << id << " " << val << endl;
if (id!=-1 && id!=mn[u][0].first && id!=mn[u][1].first) {
if (mn[u][0].first==-1) mn[u][0] = {id, val};
else if (mn[u][1].first==-1) mn[u][1] = {id, val};
}
}
}
int lim = n/2;
for (int i=1;i<=n;i++) {
int ans = 0, u = 0;
for (int j=0;j<m;j++) {
int cur = sum[j]-a[i][j];
if (cur >= lim) ans++;
if (cur==lim) u += (1<<j);
}
if (mn[u][0].first!=i) ans -= mn[u][0].second;
else ans -= mn[u][1].second;
// for (int j=0;j<m;j++) cout << (bool)(u & (1<<j)); cout << endl;
// cout << mn[u][0].first << " " << mn[u][0].second << endl;
// cout << mn[u][1].first << " " << mn[u][1].second << endl;
cout << ans << "\n";
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
4 ms |
612 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1303 ms |
41300 KB |
Output is correct |
6 |
Correct |
1235 ms |
41296 KB |
Output is correct |
7 |
Correct |
1506 ms |
41456 KB |
Output is correct |
8 |
Correct |
1579 ms |
41492 KB |
Output is correct |
9 |
Correct |
1668 ms |
41300 KB |
Output is correct |
10 |
Correct |
1509 ms |
41304 KB |
Output is correct |
11 |
Correct |
1687 ms |
41436 KB |
Output is correct |
12 |
Correct |
1682 ms |
41552 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
472 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
456 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
344 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
13 ms |
972 KB |
Output is correct |
42 |
Correct |
15 ms |
860 KB |
Output is correct |
43 |
Correct |
16 ms |
860 KB |
Output is correct |
44 |
Correct |
15 ms |
860 KB |
Output is correct |
45 |
Correct |
16 ms |
1116 KB |
Output is correct |
46 |
Correct |
132 ms |
5464 KB |
Output is correct |
47 |
Correct |
155 ms |
5464 KB |
Output is correct |
48 |
Correct |
162 ms |
5464 KB |
Output is correct |
49 |
Correct |
147 ms |
5472 KB |
Output is correct |
50 |
Correct |
156 ms |
5468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
4 ms |
612 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1303 ms |
41300 KB |
Output is correct |
6 |
Correct |
1235 ms |
41296 KB |
Output is correct |
7 |
Correct |
1506 ms |
41456 KB |
Output is correct |
8 |
Correct |
1579 ms |
41492 KB |
Output is correct |
9 |
Correct |
1668 ms |
41300 KB |
Output is correct |
10 |
Correct |
1509 ms |
41304 KB |
Output is correct |
11 |
Correct |
1687 ms |
41436 KB |
Output is correct |
12 |
Correct |
1682 ms |
41552 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
472 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
456 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
344 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
13 ms |
972 KB |
Output is correct |
42 |
Correct |
15 ms |
860 KB |
Output is correct |
43 |
Correct |
16 ms |
860 KB |
Output is correct |
44 |
Correct |
15 ms |
860 KB |
Output is correct |
45 |
Correct |
16 ms |
1116 KB |
Output is correct |
46 |
Correct |
132 ms |
5464 KB |
Output is correct |
47 |
Correct |
155 ms |
5464 KB |
Output is correct |
48 |
Correct |
162 ms |
5464 KB |
Output is correct |
49 |
Correct |
147 ms |
5472 KB |
Output is correct |
50 |
Correct |
156 ms |
5468 KB |
Output is correct |
51 |
Correct |
1214 ms |
42320 KB |
Output is correct |
52 |
Correct |
1234 ms |
42228 KB |
Output is correct |
53 |
Correct |
1411 ms |
42084 KB |
Output is correct |
54 |
Correct |
1566 ms |
42092 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
165 ms |
6096 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
37 ms |
6924 KB |
Output is correct |
3 |
Correct |
35 ms |
6796 KB |
Output is correct |
4 |
Correct |
27 ms |
3920 KB |
Output is correct |
5 |
Correct |
39 ms |
6740 KB |
Output is correct |
6 |
Correct |
36 ms |
3740 KB |
Output is correct |
7 |
Correct |
49 ms |
6740 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
37 ms |
6924 KB |
Output is correct |
3 |
Correct |
35 ms |
6796 KB |
Output is correct |
4 |
Correct |
27 ms |
3920 KB |
Output is correct |
5 |
Correct |
39 ms |
6740 KB |
Output is correct |
6 |
Correct |
36 ms |
3740 KB |
Output is correct |
7 |
Correct |
49 ms |
6740 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
155 ms |
30344 KB |
Output is correct |
21 |
Correct |
145 ms |
27464 KB |
Output is correct |
22 |
Correct |
139 ms |
27476 KB |
Output is correct |
23 |
Correct |
128 ms |
30528 KB |
Output is correct |
24 |
Correct |
127 ms |
30288 KB |
Output is correct |
25 |
Correct |
147 ms |
30288 KB |
Output is correct |
26 |
Correct |
163 ms |
30292 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
456 KB |
Output is correct |
31 |
Correct |
1 ms |
504 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
388 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
344 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
37 ms |
6924 KB |
Output is correct |
3 |
Correct |
35 ms |
6796 KB |
Output is correct |
4 |
Correct |
27 ms |
3920 KB |
Output is correct |
5 |
Correct |
39 ms |
6740 KB |
Output is correct |
6 |
Correct |
36 ms |
3740 KB |
Output is correct |
7 |
Correct |
49 ms |
6740 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
155 ms |
30344 KB |
Output is correct |
21 |
Correct |
145 ms |
27464 KB |
Output is correct |
22 |
Correct |
139 ms |
27476 KB |
Output is correct |
23 |
Correct |
128 ms |
30528 KB |
Output is correct |
24 |
Correct |
127 ms |
30288 KB |
Output is correct |
25 |
Correct |
147 ms |
30288 KB |
Output is correct |
26 |
Correct |
163 ms |
30292 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
456 KB |
Output is correct |
31 |
Correct |
1 ms |
504 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
388 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
344 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
4 ms |
604 KB |
Output is correct |
47 |
Correct |
264 ms |
42776 KB |
Output is correct |
48 |
Correct |
216 ms |
39528 KB |
Output is correct |
49 |
Correct |
202 ms |
39512 KB |
Output is correct |
50 |
Correct |
192 ms |
43160 KB |
Output is correct |
51 |
Correct |
183 ms |
42576 KB |
Output is correct |
52 |
Correct |
220 ms |
42784 KB |
Output is correct |
53 |
Correct |
234 ms |
42832 KB |
Output is correct |
54 |
Correct |
14 ms |
856 KB |
Output is correct |
55 |
Correct |
15 ms |
860 KB |
Output is correct |
56 |
Correct |
16 ms |
1116 KB |
Output is correct |
57 |
Correct |
14 ms |
860 KB |
Output is correct |
58 |
Correct |
15 ms |
980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
37 ms |
6924 KB |
Output is correct |
3 |
Correct |
35 ms |
6796 KB |
Output is correct |
4 |
Correct |
27 ms |
3920 KB |
Output is correct |
5 |
Correct |
39 ms |
6740 KB |
Output is correct |
6 |
Correct |
36 ms |
3740 KB |
Output is correct |
7 |
Correct |
49 ms |
6740 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
155 ms |
30344 KB |
Output is correct |
21 |
Correct |
145 ms |
27464 KB |
Output is correct |
22 |
Correct |
139 ms |
27476 KB |
Output is correct |
23 |
Correct |
128 ms |
30528 KB |
Output is correct |
24 |
Correct |
127 ms |
30288 KB |
Output is correct |
25 |
Correct |
147 ms |
30288 KB |
Output is correct |
26 |
Correct |
163 ms |
30292 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
456 KB |
Output is correct |
31 |
Correct |
1 ms |
504 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
388 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
344 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
4 ms |
604 KB |
Output is correct |
47 |
Correct |
264 ms |
42776 KB |
Output is correct |
48 |
Correct |
216 ms |
39528 KB |
Output is correct |
49 |
Correct |
202 ms |
39512 KB |
Output is correct |
50 |
Correct |
192 ms |
43160 KB |
Output is correct |
51 |
Correct |
183 ms |
42576 KB |
Output is correct |
52 |
Correct |
220 ms |
42784 KB |
Output is correct |
53 |
Correct |
234 ms |
42832 KB |
Output is correct |
54 |
Correct |
14 ms |
856 KB |
Output is correct |
55 |
Correct |
15 ms |
860 KB |
Output is correct |
56 |
Correct |
16 ms |
1116 KB |
Output is correct |
57 |
Correct |
14 ms |
860 KB |
Output is correct |
58 |
Correct |
15 ms |
980 KB |
Output is correct |
59 |
Correct |
292 ms |
50808 KB |
Output is correct |
60 |
Correct |
259 ms |
24916 KB |
Output is correct |
61 |
Correct |
274 ms |
26188 KB |
Output is correct |
62 |
Correct |
273 ms |
26924 KB |
Output is correct |
63 |
Correct |
310 ms |
50552 KB |
Output is correct |
64 |
Correct |
418 ms |
55892 KB |
Output is correct |
65 |
Correct |
410 ms |
55852 KB |
Output is correct |
66 |
Correct |
340 ms |
56400 KB |
Output is correct |
67 |
Correct |
332 ms |
55968 KB |
Output is correct |
68 |
Correct |
408 ms |
56248 KB |
Output is correct |
69 |
Correct |
405 ms |
56148 KB |
Output is correct |
70 |
Correct |
133 ms |
5468 KB |
Output is correct |
71 |
Correct |
147 ms |
5580 KB |
Output is correct |
72 |
Correct |
161 ms |
5468 KB |
Output is correct |
73 |
Correct |
144 ms |
5468 KB |
Output is correct |
74 |
Correct |
160 ms |
5580 KB |
Output is correct |
75 |
Correct |
164 ms |
5976 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
4 ms |
612 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1303 ms |
41300 KB |
Output is correct |
6 |
Correct |
1235 ms |
41296 KB |
Output is correct |
7 |
Correct |
1506 ms |
41456 KB |
Output is correct |
8 |
Correct |
1579 ms |
41492 KB |
Output is correct |
9 |
Correct |
1668 ms |
41300 KB |
Output is correct |
10 |
Correct |
1509 ms |
41304 KB |
Output is correct |
11 |
Correct |
1687 ms |
41436 KB |
Output is correct |
12 |
Correct |
1682 ms |
41552 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
344 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
472 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
456 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
344 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
344 KB |
Output is correct |
41 |
Correct |
13 ms |
972 KB |
Output is correct |
42 |
Correct |
15 ms |
860 KB |
Output is correct |
43 |
Correct |
16 ms |
860 KB |
Output is correct |
44 |
Correct |
15 ms |
860 KB |
Output is correct |
45 |
Correct |
16 ms |
1116 KB |
Output is correct |
46 |
Correct |
132 ms |
5464 KB |
Output is correct |
47 |
Correct |
155 ms |
5464 KB |
Output is correct |
48 |
Correct |
162 ms |
5464 KB |
Output is correct |
49 |
Correct |
147 ms |
5472 KB |
Output is correct |
50 |
Correct |
156 ms |
5468 KB |
Output is correct |
51 |
Correct |
1214 ms |
42320 KB |
Output is correct |
52 |
Correct |
1234 ms |
42228 KB |
Output is correct |
53 |
Correct |
1411 ms |
42084 KB |
Output is correct |
54 |
Correct |
1566 ms |
42092 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
165 ms |
6096 KB |
Output is correct |
57 |
Correct |
1 ms |
344 KB |
Output is correct |
58 |
Correct |
37 ms |
6924 KB |
Output is correct |
59 |
Correct |
35 ms |
6796 KB |
Output is correct |
60 |
Correct |
27 ms |
3920 KB |
Output is correct |
61 |
Correct |
39 ms |
6740 KB |
Output is correct |
62 |
Correct |
36 ms |
3740 KB |
Output is correct |
63 |
Correct |
49 ms |
6740 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
1 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
1 ms |
344 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
155 ms |
30344 KB |
Output is correct |
77 |
Correct |
145 ms |
27464 KB |
Output is correct |
78 |
Correct |
139 ms |
27476 KB |
Output is correct |
79 |
Correct |
128 ms |
30528 KB |
Output is correct |
80 |
Correct |
127 ms |
30288 KB |
Output is correct |
81 |
Correct |
147 ms |
30288 KB |
Output is correct |
82 |
Correct |
163 ms |
30292 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
456 KB |
Output is correct |
87 |
Correct |
1 ms |
504 KB |
Output is correct |
88 |
Correct |
1 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
348 KB |
Output is correct |
91 |
Correct |
1 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
348 KB |
Output is correct |
93 |
Correct |
0 ms |
344 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
1 ms |
388 KB |
Output is correct |
99 |
Correct |
1 ms |
348 KB |
Output is correct |
100 |
Correct |
1 ms |
344 KB |
Output is correct |
101 |
Correct |
1 ms |
348 KB |
Output is correct |
102 |
Correct |
4 ms |
604 KB |
Output is correct |
103 |
Correct |
264 ms |
42776 KB |
Output is correct |
104 |
Correct |
216 ms |
39528 KB |
Output is correct |
105 |
Correct |
202 ms |
39512 KB |
Output is correct |
106 |
Correct |
192 ms |
43160 KB |
Output is correct |
107 |
Correct |
183 ms |
42576 KB |
Output is correct |
108 |
Correct |
220 ms |
42784 KB |
Output is correct |
109 |
Correct |
234 ms |
42832 KB |
Output is correct |
110 |
Correct |
14 ms |
856 KB |
Output is correct |
111 |
Correct |
15 ms |
860 KB |
Output is correct |
112 |
Correct |
16 ms |
1116 KB |
Output is correct |
113 |
Correct |
14 ms |
860 KB |
Output is correct |
114 |
Correct |
15 ms |
980 KB |
Output is correct |
115 |
Correct |
292 ms |
50808 KB |
Output is correct |
116 |
Correct |
259 ms |
24916 KB |
Output is correct |
117 |
Correct |
274 ms |
26188 KB |
Output is correct |
118 |
Correct |
273 ms |
26924 KB |
Output is correct |
119 |
Correct |
310 ms |
50552 KB |
Output is correct |
120 |
Correct |
418 ms |
55892 KB |
Output is correct |
121 |
Correct |
410 ms |
55852 KB |
Output is correct |
122 |
Correct |
340 ms |
56400 KB |
Output is correct |
123 |
Correct |
332 ms |
55968 KB |
Output is correct |
124 |
Correct |
408 ms |
56248 KB |
Output is correct |
125 |
Correct |
405 ms |
56148 KB |
Output is correct |
126 |
Correct |
133 ms |
5468 KB |
Output is correct |
127 |
Correct |
147 ms |
5580 KB |
Output is correct |
128 |
Correct |
161 ms |
5468 KB |
Output is correct |
129 |
Correct |
144 ms |
5468 KB |
Output is correct |
130 |
Correct |
160 ms |
5580 KB |
Output is correct |
131 |
Correct |
164 ms |
5976 KB |
Output is correct |
132 |
Correct |
1650 ms |
100996 KB |
Output is correct |
133 |
Correct |
1791 ms |
100712 KB |
Output is correct |
134 |
Correct |
1735 ms |
100944 KB |
Output is correct |
135 |
Correct |
1855 ms |
100944 KB |
Output is correct |
136 |
Correct |
1907 ms |
100872 KB |
Output is correct |
137 |
Correct |
1028 ms |
77260 KB |
Output is correct |
138 |
Correct |
1064 ms |
77516 KB |
Output is correct |
139 |
Correct |
1460 ms |
101208 KB |
Output is correct |
140 |
Correct |
1467 ms |
100868 KB |
Output is correct |
141 |
Correct |
1928 ms |
100716 KB |
Output is correct |
142 |
Correct |
2001 ms |
100948 KB |
Output is correct |