# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1086877 |
2024-09-11T16:12:15 Z |
coldbr3w |
Council (JOI23_council) |
C++17 |
|
560 ms |
51632 KB |
#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();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 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 |
348 KB |
Output is correct |
5 |
Correct |
101 ms |
16728 KB |
Output is correct |
6 |
Correct |
96 ms |
16728 KB |
Output is correct |
7 |
Correct |
95 ms |
16728 KB |
Output is correct |
8 |
Correct |
102 ms |
16728 KB |
Output is correct |
9 |
Correct |
146 ms |
16732 KB |
Output is correct |
10 |
Correct |
99 ms |
16732 KB |
Output is correct |
11 |
Correct |
107 ms |
16728 KB |
Output is correct |
12 |
Correct |
145 ms |
16728 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
0 ms |
460 KB |
Output is correct |
19 |
Correct |
1 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 |
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 |
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 |
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 |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
444 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
1 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 |
3 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 |
600 KB |
Output is correct |
46 |
Correct |
13 ms |
2396 KB |
Output is correct |
47 |
Correct |
13 ms |
2396 KB |
Output is correct |
48 |
Correct |
15 ms |
2512 KB |
Output is correct |
49 |
Correct |
12 ms |
2396 KB |
Output is correct |
50 |
Correct |
14 ms |
2396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 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 |
348 KB |
Output is correct |
5 |
Correct |
101 ms |
16728 KB |
Output is correct |
6 |
Correct |
96 ms |
16728 KB |
Output is correct |
7 |
Correct |
95 ms |
16728 KB |
Output is correct |
8 |
Correct |
102 ms |
16728 KB |
Output is correct |
9 |
Correct |
146 ms |
16732 KB |
Output is correct |
10 |
Correct |
99 ms |
16732 KB |
Output is correct |
11 |
Correct |
107 ms |
16728 KB |
Output is correct |
12 |
Correct |
145 ms |
16728 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
0 ms |
460 KB |
Output is correct |
19 |
Correct |
1 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 |
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 |
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 |
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 |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
444 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
1 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 |
3 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 |
600 KB |
Output is correct |
46 |
Correct |
13 ms |
2396 KB |
Output is correct |
47 |
Correct |
13 ms |
2396 KB |
Output is correct |
48 |
Correct |
15 ms |
2512 KB |
Output is correct |
49 |
Correct |
12 ms |
2396 KB |
Output is correct |
50 |
Correct |
14 ms |
2396 KB |
Output is correct |
51 |
Correct |
109 ms |
17244 KB |
Output is correct |
52 |
Correct |
125 ms |
17248 KB |
Output is correct |
53 |
Correct |
162 ms |
17244 KB |
Output is correct |
54 |
Correct |
185 ms |
17248 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
28 ms |
2888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
352 KB |
Output is correct |
2 |
Correct |
59 ms |
26720 KB |
Output is correct |
3 |
Correct |
50 ms |
26772 KB |
Output is correct |
4 |
Correct |
64 ms |
26200 KB |
Output is correct |
5 |
Correct |
67 ms |
26684 KB |
Output is correct |
6 |
Correct |
40 ms |
26164 KB |
Output is correct |
7 |
Correct |
75 ms |
26792 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
460 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 |
464 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
352 KB |
Output is correct |
2 |
Correct |
59 ms |
26720 KB |
Output is correct |
3 |
Correct |
50 ms |
26772 KB |
Output is correct |
4 |
Correct |
64 ms |
26200 KB |
Output is correct |
5 |
Correct |
67 ms |
26684 KB |
Output is correct |
6 |
Correct |
40 ms |
26164 KB |
Output is correct |
7 |
Correct |
75 ms |
26792 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
460 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 |
464 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
176 ms |
30296 KB |
Output is correct |
21 |
Correct |
178 ms |
29992 KB |
Output is correct |
22 |
Correct |
151 ms |
29956 KB |
Output is correct |
23 |
Correct |
140 ms |
30548 KB |
Output is correct |
24 |
Correct |
129 ms |
30084 KB |
Output is correct |
25 |
Correct |
148 ms |
30292 KB |
Output is correct |
26 |
Correct |
165 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 |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
464 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 |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 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 |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
352 KB |
Output is correct |
2 |
Correct |
59 ms |
26720 KB |
Output is correct |
3 |
Correct |
50 ms |
26772 KB |
Output is correct |
4 |
Correct |
64 ms |
26200 KB |
Output is correct |
5 |
Correct |
67 ms |
26684 KB |
Output is correct |
6 |
Correct |
40 ms |
26164 KB |
Output is correct |
7 |
Correct |
75 ms |
26792 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
460 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 |
464 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
176 ms |
30296 KB |
Output is correct |
21 |
Correct |
178 ms |
29992 KB |
Output is correct |
22 |
Correct |
151 ms |
29956 KB |
Output is correct |
23 |
Correct |
140 ms |
30548 KB |
Output is correct |
24 |
Correct |
129 ms |
30084 KB |
Output is correct |
25 |
Correct |
148 ms |
30292 KB |
Output is correct |
26 |
Correct |
165 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 |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
464 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 |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 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 |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
242 ms |
32492 KB |
Output is correct |
48 |
Correct |
209 ms |
31824 KB |
Output is correct |
49 |
Correct |
210 ms |
31800 KB |
Output is correct |
50 |
Correct |
181 ms |
32860 KB |
Output is correct |
51 |
Correct |
181 ms |
32592 KB |
Output is correct |
52 |
Correct |
210 ms |
32472 KB |
Output is correct |
53 |
Correct |
235 ms |
32852 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
3 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 |
720 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
352 KB |
Output is correct |
2 |
Correct |
59 ms |
26720 KB |
Output is correct |
3 |
Correct |
50 ms |
26772 KB |
Output is correct |
4 |
Correct |
64 ms |
26200 KB |
Output is correct |
5 |
Correct |
67 ms |
26684 KB |
Output is correct |
6 |
Correct |
40 ms |
26164 KB |
Output is correct |
7 |
Correct |
75 ms |
26792 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
460 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 |
464 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
176 ms |
30296 KB |
Output is correct |
21 |
Correct |
178 ms |
29992 KB |
Output is correct |
22 |
Correct |
151 ms |
29956 KB |
Output is correct |
23 |
Correct |
140 ms |
30548 KB |
Output is correct |
24 |
Correct |
129 ms |
30084 KB |
Output is correct |
25 |
Correct |
148 ms |
30292 KB |
Output is correct |
26 |
Correct |
165 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 |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
464 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 |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 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 |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
242 ms |
32492 KB |
Output is correct |
48 |
Correct |
209 ms |
31824 KB |
Output is correct |
49 |
Correct |
210 ms |
31800 KB |
Output is correct |
50 |
Correct |
181 ms |
32860 KB |
Output is correct |
51 |
Correct |
181 ms |
32592 KB |
Output is correct |
52 |
Correct |
210 ms |
32472 KB |
Output is correct |
53 |
Correct |
235 ms |
32852 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
3 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 |
720 KB |
Output is correct |
59 |
Correct |
242 ms |
34360 KB |
Output is correct |
60 |
Correct |
117 ms |
15184 KB |
Output is correct |
61 |
Correct |
126 ms |
16212 KB |
Output is correct |
62 |
Correct |
135 ms |
16724 KB |
Output is correct |
63 |
Correct |
275 ms |
33932 KB |
Output is correct |
64 |
Correct |
296 ms |
35440 KB |
Output is correct |
65 |
Correct |
307 ms |
35244 KB |
Output is correct |
66 |
Correct |
220 ms |
35664 KB |
Output is correct |
67 |
Correct |
235 ms |
35292 KB |
Output is correct |
68 |
Correct |
257 ms |
35408 KB |
Output is correct |
69 |
Correct |
324 ms |
35668 KB |
Output is correct |
70 |
Correct |
12 ms |
2396 KB |
Output is correct |
71 |
Correct |
12 ms |
2396 KB |
Output is correct |
72 |
Correct |
13 ms |
2416 KB |
Output is correct |
73 |
Correct |
13 ms |
2396 KB |
Output is correct |
74 |
Correct |
12 ms |
2396 KB |
Output is correct |
75 |
Correct |
26 ms |
2652 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 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 |
348 KB |
Output is correct |
5 |
Correct |
101 ms |
16728 KB |
Output is correct |
6 |
Correct |
96 ms |
16728 KB |
Output is correct |
7 |
Correct |
95 ms |
16728 KB |
Output is correct |
8 |
Correct |
102 ms |
16728 KB |
Output is correct |
9 |
Correct |
146 ms |
16732 KB |
Output is correct |
10 |
Correct |
99 ms |
16732 KB |
Output is correct |
11 |
Correct |
107 ms |
16728 KB |
Output is correct |
12 |
Correct |
145 ms |
16728 KB |
Output is correct |
13 |
Correct |
1 ms |
344 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 |
0 ms |
460 KB |
Output is correct |
19 |
Correct |
1 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 |
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 |
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 |
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 |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
444 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
1 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 |
3 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 |
600 KB |
Output is correct |
46 |
Correct |
13 ms |
2396 KB |
Output is correct |
47 |
Correct |
13 ms |
2396 KB |
Output is correct |
48 |
Correct |
15 ms |
2512 KB |
Output is correct |
49 |
Correct |
12 ms |
2396 KB |
Output is correct |
50 |
Correct |
14 ms |
2396 KB |
Output is correct |
51 |
Correct |
109 ms |
17244 KB |
Output is correct |
52 |
Correct |
125 ms |
17248 KB |
Output is correct |
53 |
Correct |
162 ms |
17244 KB |
Output is correct |
54 |
Correct |
185 ms |
17248 KB |
Output is correct |
55 |
Correct |
2 ms |
604 KB |
Output is correct |
56 |
Correct |
28 ms |
2888 KB |
Output is correct |
57 |
Correct |
1 ms |
352 KB |
Output is correct |
58 |
Correct |
59 ms |
26720 KB |
Output is correct |
59 |
Correct |
50 ms |
26772 KB |
Output is correct |
60 |
Correct |
64 ms |
26200 KB |
Output is correct |
61 |
Correct |
67 ms |
26684 KB |
Output is correct |
62 |
Correct |
40 ms |
26164 KB |
Output is correct |
63 |
Correct |
75 ms |
26792 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
1 ms |
460 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 |
464 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
600 KB |
Output is correct |
74 |
Correct |
0 ms |
344 KB |
Output is correct |
75 |
Correct |
1 ms |
348 KB |
Output is correct |
76 |
Correct |
176 ms |
30296 KB |
Output is correct |
77 |
Correct |
178 ms |
29992 KB |
Output is correct |
78 |
Correct |
151 ms |
29956 KB |
Output is correct |
79 |
Correct |
140 ms |
30548 KB |
Output is correct |
80 |
Correct |
129 ms |
30084 KB |
Output is correct |
81 |
Correct |
148 ms |
30292 KB |
Output is correct |
82 |
Correct |
165 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 |
348 KB |
Output is correct |
87 |
Correct |
1 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
464 KB |
Output is correct |
90 |
Correct |
0 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 |
344 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 |
348 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
242 ms |
32492 KB |
Output is correct |
104 |
Correct |
209 ms |
31824 KB |
Output is correct |
105 |
Correct |
210 ms |
31800 KB |
Output is correct |
106 |
Correct |
181 ms |
32860 KB |
Output is correct |
107 |
Correct |
181 ms |
32592 KB |
Output is correct |
108 |
Correct |
210 ms |
32472 KB |
Output is correct |
109 |
Correct |
235 ms |
32852 KB |
Output is correct |
110 |
Correct |
2 ms |
600 KB |
Output is correct |
111 |
Correct |
3 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 |
720 KB |
Output is correct |
115 |
Correct |
242 ms |
34360 KB |
Output is correct |
116 |
Correct |
117 ms |
15184 KB |
Output is correct |
117 |
Correct |
126 ms |
16212 KB |
Output is correct |
118 |
Correct |
135 ms |
16724 KB |
Output is correct |
119 |
Correct |
275 ms |
33932 KB |
Output is correct |
120 |
Correct |
296 ms |
35440 KB |
Output is correct |
121 |
Correct |
307 ms |
35244 KB |
Output is correct |
122 |
Correct |
220 ms |
35664 KB |
Output is correct |
123 |
Correct |
235 ms |
35292 KB |
Output is correct |
124 |
Correct |
257 ms |
35408 KB |
Output is correct |
125 |
Correct |
324 ms |
35668 KB |
Output is correct |
126 |
Correct |
12 ms |
2396 KB |
Output is correct |
127 |
Correct |
12 ms |
2396 KB |
Output is correct |
128 |
Correct |
13 ms |
2416 KB |
Output is correct |
129 |
Correct |
13 ms |
2396 KB |
Output is correct |
130 |
Correct |
12 ms |
2396 KB |
Output is correct |
131 |
Correct |
26 ms |
2652 KB |
Output is correct |
132 |
Correct |
492 ms |
51576 KB |
Output is correct |
133 |
Correct |
492 ms |
51284 KB |
Output is correct |
134 |
Correct |
502 ms |
51632 KB |
Output is correct |
135 |
Correct |
547 ms |
51536 KB |
Output is correct |
136 |
Correct |
560 ms |
51420 KB |
Output is correct |
137 |
Correct |
409 ms |
42592 KB |
Output is correct |
138 |
Correct |
397 ms |
42836 KB |
Output is correct |
139 |
Correct |
355 ms |
51596 KB |
Output is correct |
140 |
Correct |
365 ms |
51284 KB |
Output is correct |
141 |
Correct |
512 ms |
51280 KB |
Output is correct |
142 |
Correct |
552 ms |
51536 KB |
Output is correct |