#include <bits/stdc++.h>
using namespace std;
#define ll int
#define pll pair<int, int>
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
const ll N = 2e6 + 100;
const ll inf = 1e9;
const ll mod = 1e9 + 7;
const ll block = 350;
ll n,m;
ll a[N][21], res[N], cnt[N];
void to_thic_cau(){
cin >> n >> 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].S = dp[msk].F, dp[msk].first = val;
else if (dp[msk].second.first < val.first) dp[msk].second = val;
};
for(int i = 1; i <= n;i++){
ll msk = 0;
for(int j = 0; j < m;j++){
cin >> a[i][j];
if(a[i][j] == 1) cnt[j]++;
else cnt[j]--, msk |= (1 << j);
}
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 nxt_msk = msk ^ (1 << i);
upd(msk, dp[nxt_msk].first);
upd(msk, dp[nxt_msk].second);
}
for (int i = 1; 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);
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()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
ll tc = 1;
//cin >> tc;
while(tc--) to_thic_cau();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
114 ms |
16712 KB |
Output is correct |
6 |
Correct |
99 ms |
16732 KB |
Output is correct |
7 |
Correct |
116 ms |
16728 KB |
Output is correct |
8 |
Correct |
120 ms |
16848 KB |
Output is correct |
9 |
Correct |
146 ms |
16732 KB |
Output is correct |
10 |
Correct |
99 ms |
16728 KB |
Output is correct |
11 |
Correct |
116 ms |
16732 KB |
Output is correct |
12 |
Correct |
143 ms |
16728 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 |
1 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 |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 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 |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 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 |
3 ms |
604 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
3 ms |
604 KB |
Output is correct |
44 |
Correct |
3 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
14 ms |
2396 KB |
Output is correct |
47 |
Correct |
13 ms |
2396 KB |
Output is correct |
48 |
Correct |
13 ms |
2396 KB |
Output is correct |
49 |
Correct |
11 ms |
2396 KB |
Output is correct |
50 |
Correct |
19 ms |
2392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
114 ms |
16712 KB |
Output is correct |
6 |
Correct |
99 ms |
16732 KB |
Output is correct |
7 |
Correct |
116 ms |
16728 KB |
Output is correct |
8 |
Correct |
120 ms |
16848 KB |
Output is correct |
9 |
Correct |
146 ms |
16732 KB |
Output is correct |
10 |
Correct |
99 ms |
16728 KB |
Output is correct |
11 |
Correct |
116 ms |
16732 KB |
Output is correct |
12 |
Correct |
143 ms |
16728 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 |
1 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 |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 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 |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 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 |
3 ms |
604 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
3 ms |
604 KB |
Output is correct |
44 |
Correct |
3 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
14 ms |
2396 KB |
Output is correct |
47 |
Correct |
13 ms |
2396 KB |
Output is correct |
48 |
Correct |
13 ms |
2396 KB |
Output is correct |
49 |
Correct |
11 ms |
2396 KB |
Output is correct |
50 |
Correct |
19 ms |
2392 KB |
Output is correct |
51 |
Correct |
111 ms |
17244 KB |
Output is correct |
52 |
Correct |
127 ms |
17240 KB |
Output is correct |
53 |
Correct |
146 ms |
17248 KB |
Output is correct |
54 |
Correct |
191 ms |
17256 KB |
Output is correct |
55 |
Correct |
1 ms |
600 KB |
Output is correct |
56 |
Correct |
27 ms |
2652 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
48 ms |
26652 KB |
Output is correct |
3 |
Correct |
57 ms |
26820 KB |
Output is correct |
4 |
Correct |
44 ms |
26196 KB |
Output is correct |
5 |
Correct |
87 ms |
26672 KB |
Output is correct |
6 |
Correct |
37 ms |
26176 KB |
Output is correct |
7 |
Correct |
51 ms |
26752 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 |
1 ms |
600 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 |
0 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
48 ms |
26652 KB |
Output is correct |
3 |
Correct |
57 ms |
26820 KB |
Output is correct |
4 |
Correct |
44 ms |
26196 KB |
Output is correct |
5 |
Correct |
87 ms |
26672 KB |
Output is correct |
6 |
Correct |
37 ms |
26176 KB |
Output is correct |
7 |
Correct |
51 ms |
26752 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 |
1 ms |
600 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 |
0 ms |
348 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 |
154 ms |
31572 KB |
Output is correct |
21 |
Correct |
177 ms |
30800 KB |
Output is correct |
22 |
Correct |
148 ms |
30800 KB |
Output is correct |
23 |
Correct |
175 ms |
31824 KB |
Output is correct |
24 |
Correct |
144 ms |
31372 KB |
Output is correct |
25 |
Correct |
155 ms |
31568 KB |
Output is correct |
26 |
Correct |
183 ms |
31372 KB |
Output is correct |
27 |
Correct |
1 ms |
600 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 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 |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
48 ms |
26652 KB |
Output is correct |
3 |
Correct |
57 ms |
26820 KB |
Output is correct |
4 |
Correct |
44 ms |
26196 KB |
Output is correct |
5 |
Correct |
87 ms |
26672 KB |
Output is correct |
6 |
Correct |
37 ms |
26176 KB |
Output is correct |
7 |
Correct |
51 ms |
26752 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 |
1 ms |
600 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 |
0 ms |
348 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 |
154 ms |
31572 KB |
Output is correct |
21 |
Correct |
177 ms |
30800 KB |
Output is correct |
22 |
Correct |
148 ms |
30800 KB |
Output is correct |
23 |
Correct |
175 ms |
31824 KB |
Output is correct |
24 |
Correct |
144 ms |
31372 KB |
Output is correct |
25 |
Correct |
155 ms |
31568 KB |
Output is correct |
26 |
Correct |
183 ms |
31372 KB |
Output is correct |
27 |
Correct |
1 ms |
600 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 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 |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
604 KB |
Output is correct |
47 |
Correct |
272 ms |
34180 KB |
Output is correct |
48 |
Correct |
238 ms |
33364 KB |
Output is correct |
49 |
Correct |
235 ms |
33372 KB |
Output is correct |
50 |
Correct |
173 ms |
34384 KB |
Output is correct |
51 |
Correct |
200 ms |
33964 KB |
Output is correct |
52 |
Correct |
230 ms |
34004 KB |
Output is correct |
53 |
Correct |
226 ms |
34388 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
3 ms |
604 KB |
Output is correct |
57 |
Correct |
2 ms |
600 KB |
Output is correct |
58 |
Correct |
3 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
48 ms |
26652 KB |
Output is correct |
3 |
Correct |
57 ms |
26820 KB |
Output is correct |
4 |
Correct |
44 ms |
26196 KB |
Output is correct |
5 |
Correct |
87 ms |
26672 KB |
Output is correct |
6 |
Correct |
37 ms |
26176 KB |
Output is correct |
7 |
Correct |
51 ms |
26752 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 |
1 ms |
600 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 |
0 ms |
348 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 |
154 ms |
31572 KB |
Output is correct |
21 |
Correct |
177 ms |
30800 KB |
Output is correct |
22 |
Correct |
148 ms |
30800 KB |
Output is correct |
23 |
Correct |
175 ms |
31824 KB |
Output is correct |
24 |
Correct |
144 ms |
31372 KB |
Output is correct |
25 |
Correct |
155 ms |
31568 KB |
Output is correct |
26 |
Correct |
183 ms |
31372 KB |
Output is correct |
27 |
Correct |
1 ms |
600 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
1 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 |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
604 KB |
Output is correct |
47 |
Correct |
272 ms |
34180 KB |
Output is correct |
48 |
Correct |
238 ms |
33364 KB |
Output is correct |
49 |
Correct |
235 ms |
33372 KB |
Output is correct |
50 |
Correct |
173 ms |
34384 KB |
Output is correct |
51 |
Correct |
200 ms |
33964 KB |
Output is correct |
52 |
Correct |
230 ms |
34004 KB |
Output is correct |
53 |
Correct |
226 ms |
34388 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
3 ms |
604 KB |
Output is correct |
57 |
Correct |
2 ms |
600 KB |
Output is correct |
58 |
Correct |
3 ms |
604 KB |
Output is correct |
59 |
Correct |
221 ms |
36428 KB |
Output is correct |
60 |
Correct |
130 ms |
15960 KB |
Output is correct |
61 |
Correct |
150 ms |
16980 KB |
Output is correct |
62 |
Correct |
145 ms |
17492 KB |
Output is correct |
63 |
Correct |
282 ms |
35904 KB |
Output is correct |
64 |
Correct |
312 ms |
37712 KB |
Output is correct |
65 |
Correct |
357 ms |
37560 KB |
Output is correct |
66 |
Correct |
253 ms |
37968 KB |
Output is correct |
67 |
Correct |
235 ms |
37716 KB |
Output is correct |
68 |
Correct |
314 ms |
37716 KB |
Output is correct |
69 |
Correct |
379 ms |
37964 KB |
Output is correct |
70 |
Correct |
18 ms |
2396 KB |
Output is correct |
71 |
Correct |
13 ms |
2396 KB |
Output is correct |
72 |
Correct |
14 ms |
2396 KB |
Output is correct |
73 |
Correct |
14 ms |
2396 KB |
Output is correct |
74 |
Correct |
14 ms |
2312 KB |
Output is correct |
75 |
Correct |
35 ms |
2652 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
114 ms |
16712 KB |
Output is correct |
6 |
Correct |
99 ms |
16732 KB |
Output is correct |
7 |
Correct |
116 ms |
16728 KB |
Output is correct |
8 |
Correct |
120 ms |
16848 KB |
Output is correct |
9 |
Correct |
146 ms |
16732 KB |
Output is correct |
10 |
Correct |
99 ms |
16728 KB |
Output is correct |
11 |
Correct |
116 ms |
16732 KB |
Output is correct |
12 |
Correct |
143 ms |
16728 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 |
1 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 |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 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 |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 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 |
3 ms |
604 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
3 ms |
604 KB |
Output is correct |
44 |
Correct |
3 ms |
604 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
14 ms |
2396 KB |
Output is correct |
47 |
Correct |
13 ms |
2396 KB |
Output is correct |
48 |
Correct |
13 ms |
2396 KB |
Output is correct |
49 |
Correct |
11 ms |
2396 KB |
Output is correct |
50 |
Correct |
19 ms |
2392 KB |
Output is correct |
51 |
Correct |
111 ms |
17244 KB |
Output is correct |
52 |
Correct |
127 ms |
17240 KB |
Output is correct |
53 |
Correct |
146 ms |
17248 KB |
Output is correct |
54 |
Correct |
191 ms |
17256 KB |
Output is correct |
55 |
Correct |
1 ms |
600 KB |
Output is correct |
56 |
Correct |
27 ms |
2652 KB |
Output is correct |
57 |
Correct |
1 ms |
348 KB |
Output is correct |
58 |
Correct |
48 ms |
26652 KB |
Output is correct |
59 |
Correct |
57 ms |
26820 KB |
Output is correct |
60 |
Correct |
44 ms |
26196 KB |
Output is correct |
61 |
Correct |
87 ms |
26672 KB |
Output is correct |
62 |
Correct |
37 ms |
26176 KB |
Output is correct |
63 |
Correct |
51 ms |
26752 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 |
1 ms |
600 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 |
0 ms |
348 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 |
154 ms |
31572 KB |
Output is correct |
77 |
Correct |
177 ms |
30800 KB |
Output is correct |
78 |
Correct |
148 ms |
30800 KB |
Output is correct |
79 |
Correct |
175 ms |
31824 KB |
Output is correct |
80 |
Correct |
144 ms |
31372 KB |
Output is correct |
81 |
Correct |
155 ms |
31568 KB |
Output is correct |
82 |
Correct |
183 ms |
31372 KB |
Output is correct |
83 |
Correct |
1 ms |
600 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
1 ms |
348 KB |
Output is correct |
86 |
Correct |
1 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
344 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 |
1 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
1 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 |
348 KB |
Output is correct |
102 |
Correct |
1 ms |
604 KB |
Output is correct |
103 |
Correct |
272 ms |
34180 KB |
Output is correct |
104 |
Correct |
238 ms |
33364 KB |
Output is correct |
105 |
Correct |
235 ms |
33372 KB |
Output is correct |
106 |
Correct |
173 ms |
34384 KB |
Output is correct |
107 |
Correct |
200 ms |
33964 KB |
Output is correct |
108 |
Correct |
230 ms |
34004 KB |
Output is correct |
109 |
Correct |
226 ms |
34388 KB |
Output is correct |
110 |
Correct |
2 ms |
600 KB |
Output is correct |
111 |
Correct |
2 ms |
604 KB |
Output is correct |
112 |
Correct |
3 ms |
604 KB |
Output is correct |
113 |
Correct |
2 ms |
600 KB |
Output is correct |
114 |
Correct |
3 ms |
604 KB |
Output is correct |
115 |
Correct |
221 ms |
36428 KB |
Output is correct |
116 |
Correct |
130 ms |
15960 KB |
Output is correct |
117 |
Correct |
150 ms |
16980 KB |
Output is correct |
118 |
Correct |
145 ms |
17492 KB |
Output is correct |
119 |
Correct |
282 ms |
35904 KB |
Output is correct |
120 |
Correct |
312 ms |
37712 KB |
Output is correct |
121 |
Correct |
357 ms |
37560 KB |
Output is correct |
122 |
Correct |
253 ms |
37968 KB |
Output is correct |
123 |
Correct |
235 ms |
37716 KB |
Output is correct |
124 |
Correct |
314 ms |
37716 KB |
Output is correct |
125 |
Correct |
379 ms |
37964 KB |
Output is correct |
126 |
Correct |
18 ms |
2396 KB |
Output is correct |
127 |
Correct |
13 ms |
2396 KB |
Output is correct |
128 |
Correct |
14 ms |
2396 KB |
Output is correct |
129 |
Correct |
14 ms |
2396 KB |
Output is correct |
130 |
Correct |
14 ms |
2312 KB |
Output is correct |
131 |
Correct |
35 ms |
2652 KB |
Output is correct |
132 |
Correct |
513 ms |
54120 KB |
Output is correct |
133 |
Correct |
552 ms |
53988 KB |
Output is correct |
134 |
Correct |
580 ms |
54060 KB |
Output is correct |
135 |
Correct |
604 ms |
54004 KB |
Output is correct |
136 |
Correct |
613 ms |
54092 KB |
Output is correct |
137 |
Correct |
439 ms |
45116 KB |
Output is correct |
138 |
Correct |
406 ms |
45256 KB |
Output is correct |
139 |
Correct |
344 ms |
54028 KB |
Output is correct |
140 |
Correct |
351 ms |
53840 KB |
Output is correct |
141 |
Correct |
484 ms |
53804 KB |
Output is correct |
142 |
Correct |
615 ms |
54028 KB |
Output is correct |