/*
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,fma,bmi,bmi2,sse4.2,popcnt,lzcnt")
*/
#include <bits/stdc++.h>
#define taskname ""
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define i64 long long
#define isz(x) (int)x.size()
using namespace std;
void solve() {
int n, m;
cin >> n >> m;
vector<int> cnt(m);
vector<vector<int>> a(n, vector<int>(m));
vector<pair<pair<int, int>, pair<int, int>>> dp(1 << m, {{-1, -1}, {-1, -1}});
auto upd = [&](int msk, pair<int, int> val) -> void {
if (val.second == dp[msk].first.second or val.second == dp[msk].second.second) return;
if (dp[msk].first.first < val.first) dp[msk].first = val;
else if (dp[msk].second.first < val.first) dp[msk].second = val;
};
for (int i = 0; i < n; ++i) {
int msk = 0;
for (int j = 0; j < m; ++j) {
cin >> a[i][j];
cnt[j] += (a[i][j] ? 1 : -1);
if (not a[i][j]) msk |= 1 << j;
}
// cout << msk << " " << __builtin_popcount(msk) << " " << i << endl;
upd(msk, {__builtin_popcount(msk), i});
}
for (int msk = (1 << m) - 1; msk >= 0; --msk) {
for (int i = 0; i < m; ++i) if (msk >> i & 1) {
upd(msk ^ (1 << i), {dp[msk].first.first - 1, dp[msk].first.second});
upd(msk ^ (1 << i), {dp[msk].second.first - 1, dp[msk].second.second});
}
}
for (int i = 0; i < m; ++i) for (int msk = 0; msk < 1 << m; ++msk) if (msk >> i & 1) {
int omsk = msk ^ (1 << i);
upd(msk, dp[omsk].first);
upd(msk, dp[omsk].second);
}
// for (int i = 0; i < 1 << m; ++i) {
// cout << i << ":\n";
// cout << "{" << dp[i].first.first << ", " << dp[i].first.second << "}" << "\n";
// cout << "{" << dp[i].second.first << ", " << dp[i].second.second << "}" << "\n";
// }
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cnt[j] -= (a[i][j] ? 1 : -1);
}
int needed_msk = 0;
for (int j = 0; j < m; ++j) {
if (cnt[j] == 0 or cnt[j] == 1) needed_msk |= (1 << j);
}
int needed_idx = (dp[needed_msk].first.second != i ? dp[needed_msk].first.second : dp[needed_msk].second.second);
assert(needed_idx != -1);
for (int j = 0; j < m; ++j) {
cnt[j] -= (a[needed_idx][j] ? 1 : -1);
}
int res = 0;
for (int j = 0; j < m; ++j) if (cnt[j] > 0) ++res;
cout << res << "\n";
for (int j = 0; j < m; ++j) {
cnt[j] += (a[needed_idx][j] ? 1 : -1);
cnt[j] += (a[i][j] ? 1 : -1);
}
}
}
signed main() {
#ifndef CDuongg
if (fopen(taskname".inp", "r"))
assert(freopen(taskname".inp", "r", stdin)), assert(freopen(taskname".out", "w", stdout));
#else
freopen("bai3.inp", "r", stdin);
freopen("bai3.out", "w", stdout);
auto start = chrono::high_resolution_clock::now();
#endif
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1; //cin >> t;
while(t--) solve();
#ifdef CDuongg
auto end = chrono::high_resolution_clock::now();
cout << "\n"; for(int i = 1; i <= 100; ++i) cout << '=';
cout << "\nExecution time: " << chrono::duration_cast<chrono::milliseconds> (end - start).count() << "[ms]" << endl;
#endif
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
99 ms |
16732 KB |
Output is correct |
6 |
Correct |
89 ms |
16732 KB |
Output is correct |
7 |
Correct |
97 ms |
16728 KB |
Output is correct |
8 |
Correct |
96 ms |
16728 KB |
Output is correct |
9 |
Correct |
144 ms |
16732 KB |
Output is correct |
10 |
Correct |
92 ms |
16732 KB |
Output is correct |
11 |
Correct |
103 ms |
16728 KB |
Output is correct |
12 |
Correct |
139 ms |
16732 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 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 |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 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 |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 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 |
2 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
11 ms |
2396 KB |
Output is correct |
47 |
Correct |
11 ms |
2396 KB |
Output is correct |
48 |
Correct |
12 ms |
2396 KB |
Output is correct |
49 |
Correct |
11 ms |
2396 KB |
Output is correct |
50 |
Correct |
12 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
99 ms |
16732 KB |
Output is correct |
6 |
Correct |
89 ms |
16732 KB |
Output is correct |
7 |
Correct |
97 ms |
16728 KB |
Output is correct |
8 |
Correct |
96 ms |
16728 KB |
Output is correct |
9 |
Correct |
144 ms |
16732 KB |
Output is correct |
10 |
Correct |
92 ms |
16732 KB |
Output is correct |
11 |
Correct |
103 ms |
16728 KB |
Output is correct |
12 |
Correct |
139 ms |
16732 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 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 |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 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 |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 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 |
2 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
11 ms |
2396 KB |
Output is correct |
47 |
Correct |
11 ms |
2396 KB |
Output is correct |
48 |
Correct |
12 ms |
2396 KB |
Output is correct |
49 |
Correct |
11 ms |
2396 KB |
Output is correct |
50 |
Correct |
12 ms |
2396 KB |
Output is correct |
51 |
Correct |
94 ms |
17244 KB |
Output is correct |
52 |
Correct |
97 ms |
17244 KB |
Output is correct |
53 |
Correct |
134 ms |
17240 KB |
Output is correct |
54 |
Correct |
161 ms |
17336 KB |
Output is correct |
55 |
Correct |
1 ms |
600 KB |
Output is correct |
56 |
Correct |
24 ms |
2904 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
47 ms |
17260 KB |
Output is correct |
3 |
Correct |
47 ms |
17252 KB |
Output is correct |
4 |
Correct |
38 ms |
17236 KB |
Output is correct |
5 |
Correct |
50 ms |
17408 KB |
Output is correct |
6 |
Correct |
40 ms |
17492 KB |
Output is correct |
7 |
Correct |
58 ms |
17232 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
352 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
47 ms |
17260 KB |
Output is correct |
3 |
Correct |
47 ms |
17252 KB |
Output is correct |
4 |
Correct |
38 ms |
17236 KB |
Output is correct |
5 |
Correct |
50 ms |
17408 KB |
Output is correct |
6 |
Correct |
40 ms |
17492 KB |
Output is correct |
7 |
Correct |
58 ms |
17232 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
352 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
159 ms |
22128 KB |
Output is correct |
21 |
Correct |
184 ms |
22100 KB |
Output is correct |
22 |
Correct |
146 ms |
22104 KB |
Output is correct |
23 |
Correct |
142 ms |
22356 KB |
Output is correct |
24 |
Correct |
139 ms |
22332 KB |
Output is correct |
25 |
Correct |
150 ms |
22100 KB |
Output is correct |
26 |
Correct |
172 ms |
22100 KB |
Output is correct |
27 |
Correct |
0 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 |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
388 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
47 ms |
17260 KB |
Output is correct |
3 |
Correct |
47 ms |
17252 KB |
Output is correct |
4 |
Correct |
38 ms |
17236 KB |
Output is correct |
5 |
Correct |
50 ms |
17408 KB |
Output is correct |
6 |
Correct |
40 ms |
17492 KB |
Output is correct |
7 |
Correct |
58 ms |
17232 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
352 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
159 ms |
22128 KB |
Output is correct |
21 |
Correct |
184 ms |
22100 KB |
Output is correct |
22 |
Correct |
146 ms |
22104 KB |
Output is correct |
23 |
Correct |
142 ms |
22356 KB |
Output is correct |
24 |
Correct |
139 ms |
22332 KB |
Output is correct |
25 |
Correct |
150 ms |
22100 KB |
Output is correct |
26 |
Correct |
172 ms |
22100 KB |
Output is correct |
27 |
Correct |
0 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 |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
388 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
239 ms |
27052 KB |
Output is correct |
48 |
Correct |
211 ms |
27216 KB |
Output is correct |
49 |
Correct |
207 ms |
26964 KB |
Output is correct |
50 |
Correct |
184 ms |
27500 KB |
Output is correct |
51 |
Correct |
180 ms |
27052 KB |
Output is correct |
52 |
Correct |
204 ms |
26960 KB |
Output is correct |
53 |
Correct |
237 ms |
27320 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
2 ms |
604 KB |
Output is correct |
57 |
Correct |
2 ms |
604 KB |
Output is correct |
58 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
47 ms |
17260 KB |
Output is correct |
3 |
Correct |
47 ms |
17252 KB |
Output is correct |
4 |
Correct |
38 ms |
17236 KB |
Output is correct |
5 |
Correct |
50 ms |
17408 KB |
Output is correct |
6 |
Correct |
40 ms |
17492 KB |
Output is correct |
7 |
Correct |
58 ms |
17232 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
352 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
159 ms |
22128 KB |
Output is correct |
21 |
Correct |
184 ms |
22100 KB |
Output is correct |
22 |
Correct |
146 ms |
22104 KB |
Output is correct |
23 |
Correct |
142 ms |
22356 KB |
Output is correct |
24 |
Correct |
139 ms |
22332 KB |
Output is correct |
25 |
Correct |
150 ms |
22100 KB |
Output is correct |
26 |
Correct |
172 ms |
22100 KB |
Output is correct |
27 |
Correct |
0 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 |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
388 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
239 ms |
27052 KB |
Output is correct |
48 |
Correct |
211 ms |
27216 KB |
Output is correct |
49 |
Correct |
207 ms |
26964 KB |
Output is correct |
50 |
Correct |
184 ms |
27500 KB |
Output is correct |
51 |
Correct |
180 ms |
27052 KB |
Output is correct |
52 |
Correct |
204 ms |
26960 KB |
Output is correct |
53 |
Correct |
237 ms |
27320 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
2 ms |
604 KB |
Output is correct |
57 |
Correct |
2 ms |
604 KB |
Output is correct |
58 |
Correct |
2 ms |
604 KB |
Output is correct |
59 |
Correct |
231 ms |
32772 KB |
Output is correct |
60 |
Correct |
131 ms |
14416 KB |
Output is correct |
61 |
Correct |
134 ms |
19284 KB |
Output is correct |
62 |
Correct |
143 ms |
19792 KB |
Output is correct |
63 |
Correct |
305 ms |
41808 KB |
Output is correct |
64 |
Correct |
297 ms |
43604 KB |
Output is correct |
65 |
Correct |
327 ms |
43604 KB |
Output is correct |
66 |
Correct |
232 ms |
43860 KB |
Output is correct |
67 |
Correct |
223 ms |
43508 KB |
Output is correct |
68 |
Correct |
282 ms |
43604 KB |
Output is correct |
69 |
Correct |
317 ms |
43772 KB |
Output is correct |
70 |
Correct |
11 ms |
2396 KB |
Output is correct |
71 |
Correct |
11 ms |
2396 KB |
Output is correct |
72 |
Correct |
12 ms |
2392 KB |
Output is correct |
73 |
Correct |
11 ms |
2396 KB |
Output is correct |
74 |
Correct |
12 ms |
2392 KB |
Output is correct |
75 |
Correct |
23 ms |
2908 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
99 ms |
16732 KB |
Output is correct |
6 |
Correct |
89 ms |
16732 KB |
Output is correct |
7 |
Correct |
97 ms |
16728 KB |
Output is correct |
8 |
Correct |
96 ms |
16728 KB |
Output is correct |
9 |
Correct |
144 ms |
16732 KB |
Output is correct |
10 |
Correct |
92 ms |
16732 KB |
Output is correct |
11 |
Correct |
103 ms |
16728 KB |
Output is correct |
12 |
Correct |
139 ms |
16732 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 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 |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 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 |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 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 |
2 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
11 ms |
2396 KB |
Output is correct |
47 |
Correct |
11 ms |
2396 KB |
Output is correct |
48 |
Correct |
12 ms |
2396 KB |
Output is correct |
49 |
Correct |
11 ms |
2396 KB |
Output is correct |
50 |
Correct |
12 ms |
2396 KB |
Output is correct |
51 |
Correct |
94 ms |
17244 KB |
Output is correct |
52 |
Correct |
97 ms |
17244 KB |
Output is correct |
53 |
Correct |
134 ms |
17240 KB |
Output is correct |
54 |
Correct |
161 ms |
17336 KB |
Output is correct |
55 |
Correct |
1 ms |
600 KB |
Output is correct |
56 |
Correct |
24 ms |
2904 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
47 ms |
17260 KB |
Output is correct |
59 |
Correct |
47 ms |
17252 KB |
Output is correct |
60 |
Correct |
38 ms |
17236 KB |
Output is correct |
61 |
Correct |
50 ms |
17408 KB |
Output is correct |
62 |
Correct |
40 ms |
17492 KB |
Output is correct |
63 |
Correct |
58 ms |
17232 KB |
Output is correct |
64 |
Correct |
0 ms |
344 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
1 ms |
352 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
604 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
159 ms |
22128 KB |
Output is correct |
77 |
Correct |
184 ms |
22100 KB |
Output is correct |
78 |
Correct |
146 ms |
22104 KB |
Output is correct |
79 |
Correct |
142 ms |
22356 KB |
Output is correct |
80 |
Correct |
139 ms |
22332 KB |
Output is correct |
81 |
Correct |
150 ms |
22100 KB |
Output is correct |
82 |
Correct |
172 ms |
22100 KB |
Output is correct |
83 |
Correct |
0 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 |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
388 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
1 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
348 KB |
Output is correct |
93 |
Correct |
0 ms |
348 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
344 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
239 ms |
27052 KB |
Output is correct |
104 |
Correct |
211 ms |
27216 KB |
Output is correct |
105 |
Correct |
207 ms |
26964 KB |
Output is correct |
106 |
Correct |
184 ms |
27500 KB |
Output is correct |
107 |
Correct |
180 ms |
27052 KB |
Output is correct |
108 |
Correct |
204 ms |
26960 KB |
Output is correct |
109 |
Correct |
237 ms |
27320 KB |
Output is correct |
110 |
Correct |
2 ms |
600 KB |
Output is correct |
111 |
Correct |
2 ms |
604 KB |
Output is correct |
112 |
Correct |
2 ms |
604 KB |
Output is correct |
113 |
Correct |
2 ms |
604 KB |
Output is correct |
114 |
Correct |
2 ms |
604 KB |
Output is correct |
115 |
Correct |
231 ms |
32772 KB |
Output is correct |
116 |
Correct |
131 ms |
14416 KB |
Output is correct |
117 |
Correct |
134 ms |
19284 KB |
Output is correct |
118 |
Correct |
143 ms |
19792 KB |
Output is correct |
119 |
Correct |
305 ms |
41808 KB |
Output is correct |
120 |
Correct |
297 ms |
43604 KB |
Output is correct |
121 |
Correct |
327 ms |
43604 KB |
Output is correct |
122 |
Correct |
232 ms |
43860 KB |
Output is correct |
123 |
Correct |
223 ms |
43508 KB |
Output is correct |
124 |
Correct |
282 ms |
43604 KB |
Output is correct |
125 |
Correct |
317 ms |
43772 KB |
Output is correct |
126 |
Correct |
11 ms |
2396 KB |
Output is correct |
127 |
Correct |
11 ms |
2396 KB |
Output is correct |
128 |
Correct |
12 ms |
2392 KB |
Output is correct |
129 |
Correct |
11 ms |
2396 KB |
Output is correct |
130 |
Correct |
12 ms |
2392 KB |
Output is correct |
131 |
Correct |
23 ms |
2908 KB |
Output is correct |
132 |
Correct |
477 ms |
64592 KB |
Output is correct |
133 |
Correct |
446 ms |
64336 KB |
Output is correct |
134 |
Correct |
498 ms |
64596 KB |
Output is correct |
135 |
Correct |
493 ms |
64592 KB |
Output is correct |
136 |
Correct |
533 ms |
64492 KB |
Output is correct |
137 |
Correct |
409 ms |
55556 KB |
Output is correct |
138 |
Correct |
394 ms |
55892 KB |
Output is correct |
139 |
Correct |
351 ms |
64600 KB |
Output is correct |
140 |
Correct |
337 ms |
64248 KB |
Output is correct |
141 |
Correct |
481 ms |
64360 KB |
Output is correct |
142 |
Correct |
578 ms |
64852 KB |
Output is correct |