#include <bits/stdc++.h>
using namespace std;
typedef int ll;
typedef __int128 lll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
#define MAX 9223372036854775807LL
#define MIN -9223372036854775807LL
#define INF 0x3f3f3f3f3f3f3f3f
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout << fixed; cout.precision(10);
#define sp << " "
#define en << "\n"
#define compress(v) sort(v.begin(), v.end()), v.erase(unique(v.begin(), v.end()), v.end())
ll n, m;
ll A[300010][21];
ll a[300010];
ll siz;
ll dp1[1200010];
ll dp2[1200010][21];
ll cou[21];
ll b[21];
ll pas[21][21];
ll two, one, zero;
int main(void)
{
fastio
cin >> n >> m;
siz = (1 << m) - 1;
for(ll i = 1 ; i <= n ; ++i)
{
for(ll j = 0 ; j < m ; ++j)
{
cin >> A[i][j];
a[i] += (1 << j) * A[i][j];
cou[j] += A[i][j];
}
a[i] ^= siz;
dp1[a[i]]++;
}
for(ll i = 0 ; i < m ; ++i)
{
for(ll j = siz ; j >= 0 ; --j)
{
if(j & (1 << i))
dp1[j ^ (1 << i)] += dp1[j];
}
}
for(ll i = 0 ; i <= siz ; ++i)
dp2[i][__builtin_popcount(i)] += dp1[i];
for(register ll i = 0 ; i <= m ; ++i)
{
for(register ll j = 0 ; j < m ; ++j)
{
for(register ll k = 0 ; k <= siz ; ++k)
{
if(k & (1 << j))
dp2[k][i] += dp2[k ^ (1 << j)][i];
}
}
}
pas[0][0] = 1;
for(ll i = 1 ; i <= 20 ; ++i)
{
pas[i][0] = pas[i][i] = 1;
for(ll j = 1 ; j < i ; ++j)
pas[i][j] = pas[i - 1][j - 1] + pas[i - 1][j];
}
for(ll i = 0 ; i < m ; ++i)
{
if(cou[i] >= n / 2 + 2)
two |= (1 << i);
else if(cou[i] == n / 2 + 1)
one |= (1 << i);
else if(cou[i] == n / 2)
zero |= (1 << i);
}
for(ll i = 1 ; i <= n ; ++i)
{
ll ONE = two | (one & a[i]);
ll ZERO = (one & (~a[i])) | (zero & a[i]);
for(ll j = 0 ; j <= m ; ++j)
b[j] = dp2[ZERO][j];
ll gap = (a[i] & ZERO);
ll COU = __builtin_popcount(gap);
for(ll j = 0 ; j <= COU ; ++j)
b[j] -= pas[COU][j];
ll ans = 0;
for(ll j = m ; j >= 0 ; --j)
{
if(b[j])
{
ans = max(ans, j);
break;
}
}
cout << ans + __builtin_popcount(ONE) en;
}
return 0;
}
Compilation message
council.cpp: In function 'int main()':
council.cpp:64:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
64 | for(register ll i = 0 ; i <= m ; ++i)
| ^
council.cpp:66:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
66 | for(register ll j = 0 ; j < m ; ++j)
| ^
council.cpp:68:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
68 | for(register ll k = 0 ; k <= siz ; ++k)
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
2789 ms |
92972 KB |
Output is correct |
6 |
Correct |
3043 ms |
95056 KB |
Output is correct |
7 |
Correct |
3139 ms |
93016 KB |
Output is correct |
8 |
Correct |
3031 ms |
93008 KB |
Output is correct |
9 |
Correct |
3014 ms |
95016 KB |
Output is correct |
10 |
Correct |
2903 ms |
93008 KB |
Output is correct |
11 |
Correct |
2804 ms |
95016 KB |
Output is correct |
12 |
Correct |
2796 ms |
95016 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
2 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
2 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
2 ms |
4440 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4452 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
2 ms |
4444 KB |
Output is correct |
27 |
Correct |
1 ms |
4440 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
2 ms |
4440 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
2 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
2 ms |
4444 KB |
Output is correct |
37 |
Correct |
2 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4440 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
2 ms |
4444 KB |
Output is correct |
41 |
Correct |
12 ms |
6748 KB |
Output is correct |
42 |
Correct |
8 ms |
8796 KB |
Output is correct |
43 |
Correct |
11 ms |
8852 KB |
Output is correct |
44 |
Correct |
8 ms |
8796 KB |
Output is correct |
45 |
Correct |
8 ms |
8796 KB |
Output is correct |
46 |
Correct |
58 ms |
17084 KB |
Output is correct |
47 |
Correct |
67 ms |
19084 KB |
Output is correct |
48 |
Correct |
319 ms |
19084 KB |
Output is correct |
49 |
Correct |
144 ms |
19260 KB |
Output is correct |
50 |
Correct |
71 ms |
19036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
2789 ms |
92972 KB |
Output is correct |
6 |
Correct |
3043 ms |
95056 KB |
Output is correct |
7 |
Correct |
3139 ms |
93016 KB |
Output is correct |
8 |
Correct |
3031 ms |
93008 KB |
Output is correct |
9 |
Correct |
3014 ms |
95016 KB |
Output is correct |
10 |
Correct |
2903 ms |
93008 KB |
Output is correct |
11 |
Correct |
2804 ms |
95016 KB |
Output is correct |
12 |
Correct |
2796 ms |
95016 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
2 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
2 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
2 ms |
4440 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4452 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
2 ms |
4444 KB |
Output is correct |
27 |
Correct |
1 ms |
4440 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
2 ms |
4440 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
2 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
2 ms |
4444 KB |
Output is correct |
37 |
Correct |
2 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4440 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
2 ms |
4444 KB |
Output is correct |
41 |
Correct |
12 ms |
6748 KB |
Output is correct |
42 |
Correct |
8 ms |
8796 KB |
Output is correct |
43 |
Correct |
11 ms |
8852 KB |
Output is correct |
44 |
Correct |
8 ms |
8796 KB |
Output is correct |
45 |
Correct |
8 ms |
8796 KB |
Output is correct |
46 |
Correct |
58 ms |
17084 KB |
Output is correct |
47 |
Correct |
67 ms |
19084 KB |
Output is correct |
48 |
Correct |
319 ms |
19084 KB |
Output is correct |
49 |
Correct |
144 ms |
19260 KB |
Output is correct |
50 |
Correct |
71 ms |
19036 KB |
Output is correct |
51 |
Correct |
2801 ms |
94972 KB |
Output is correct |
52 |
Correct |
3526 ms |
93136 KB |
Output is correct |
53 |
Correct |
3155 ms |
95136 KB |
Output is correct |
54 |
Correct |
3344 ms |
95140 KB |
Output is correct |
55 |
Correct |
2 ms |
4544 KB |
Output is correct |
56 |
Correct |
66 ms |
19288 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
46 ms |
30428 KB |
Output is correct |
3 |
Correct |
48 ms |
30428 KB |
Output is correct |
4 |
Correct |
47 ms |
30036 KB |
Output is correct |
5 |
Correct |
53 ms |
30632 KB |
Output is correct |
6 |
Correct |
37 ms |
30032 KB |
Output is correct |
7 |
Correct |
52 ms |
30428 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4564 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
46 ms |
30428 KB |
Output is correct |
3 |
Correct |
48 ms |
30428 KB |
Output is correct |
4 |
Correct |
47 ms |
30036 KB |
Output is correct |
5 |
Correct |
53 ms |
30632 KB |
Output is correct |
6 |
Correct |
37 ms |
30032 KB |
Output is correct |
7 |
Correct |
52 ms |
30428 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4564 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
154 ms |
35408 KB |
Output is correct |
21 |
Correct |
142 ms |
34760 KB |
Output is correct |
22 |
Correct |
146 ms |
34896 KB |
Output is correct |
23 |
Correct |
140 ms |
35548 KB |
Output is correct |
24 |
Correct |
159 ms |
35420 KB |
Output is correct |
25 |
Correct |
181 ms |
35420 KB |
Output is correct |
26 |
Correct |
180 ms |
35404 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
2 ms |
4560 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
2 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
2 ms |
4572 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4444 KB |
Output is correct |
42 |
Correct |
1 ms |
4444 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
1 ms |
4444 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
46 ms |
30428 KB |
Output is correct |
3 |
Correct |
48 ms |
30428 KB |
Output is correct |
4 |
Correct |
47 ms |
30036 KB |
Output is correct |
5 |
Correct |
53 ms |
30632 KB |
Output is correct |
6 |
Correct |
37 ms |
30032 KB |
Output is correct |
7 |
Correct |
52 ms |
30428 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4564 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
154 ms |
35408 KB |
Output is correct |
21 |
Correct |
142 ms |
34760 KB |
Output is correct |
22 |
Correct |
146 ms |
34896 KB |
Output is correct |
23 |
Correct |
140 ms |
35548 KB |
Output is correct |
24 |
Correct |
159 ms |
35420 KB |
Output is correct |
25 |
Correct |
181 ms |
35420 KB |
Output is correct |
26 |
Correct |
180 ms |
35404 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
2 ms |
4560 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
2 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
2 ms |
4572 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4444 KB |
Output is correct |
42 |
Correct |
1 ms |
4444 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
1 ms |
4444 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
46 |
Correct |
3 ms |
6744 KB |
Output is correct |
47 |
Correct |
214 ms |
41840 KB |
Output is correct |
48 |
Correct |
203 ms |
39252 KB |
Output is correct |
49 |
Correct |
203 ms |
39496 KB |
Output is correct |
50 |
Correct |
188 ms |
40016 KB |
Output is correct |
51 |
Correct |
190 ms |
39736 KB |
Output is correct |
52 |
Correct |
208 ms |
41816 KB |
Output is correct |
53 |
Correct |
256 ms |
42132 KB |
Output is correct |
54 |
Correct |
7 ms |
6748 KB |
Output is correct |
55 |
Correct |
7 ms |
8796 KB |
Output is correct |
56 |
Correct |
8 ms |
8796 KB |
Output is correct |
57 |
Correct |
7 ms |
8796 KB |
Output is correct |
58 |
Correct |
9 ms |
8792 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
46 ms |
30428 KB |
Output is correct |
3 |
Correct |
48 ms |
30428 KB |
Output is correct |
4 |
Correct |
47 ms |
30036 KB |
Output is correct |
5 |
Correct |
53 ms |
30632 KB |
Output is correct |
6 |
Correct |
37 ms |
30032 KB |
Output is correct |
7 |
Correct |
52 ms |
30428 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4564 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
154 ms |
35408 KB |
Output is correct |
21 |
Correct |
142 ms |
34760 KB |
Output is correct |
22 |
Correct |
146 ms |
34896 KB |
Output is correct |
23 |
Correct |
140 ms |
35548 KB |
Output is correct |
24 |
Correct |
159 ms |
35420 KB |
Output is correct |
25 |
Correct |
181 ms |
35420 KB |
Output is correct |
26 |
Correct |
180 ms |
35404 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
2 ms |
4560 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4444 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
2 ms |
4444 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
2 ms |
4572 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4444 KB |
Output is correct |
41 |
Correct |
1 ms |
4444 KB |
Output is correct |
42 |
Correct |
1 ms |
4444 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
1 ms |
4444 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
46 |
Correct |
3 ms |
6744 KB |
Output is correct |
47 |
Correct |
214 ms |
41840 KB |
Output is correct |
48 |
Correct |
203 ms |
39252 KB |
Output is correct |
49 |
Correct |
203 ms |
39496 KB |
Output is correct |
50 |
Correct |
188 ms |
40016 KB |
Output is correct |
51 |
Correct |
190 ms |
39736 KB |
Output is correct |
52 |
Correct |
208 ms |
41816 KB |
Output is correct |
53 |
Correct |
256 ms |
42132 KB |
Output is correct |
54 |
Correct |
7 ms |
6748 KB |
Output is correct |
55 |
Correct |
7 ms |
8796 KB |
Output is correct |
56 |
Correct |
8 ms |
8796 KB |
Output is correct |
57 |
Correct |
7 ms |
8796 KB |
Output is correct |
58 |
Correct |
9 ms |
8792 KB |
Output is correct |
59 |
Correct |
256 ms |
47432 KB |
Output is correct |
60 |
Correct |
172 ms |
33400 KB |
Output is correct |
61 |
Correct |
190 ms |
33596 KB |
Output is correct |
62 |
Correct |
197 ms |
33856 KB |
Output is correct |
63 |
Correct |
274 ms |
47184 KB |
Output is correct |
64 |
Correct |
390 ms |
53856 KB |
Output is correct |
65 |
Correct |
322 ms |
53888 KB |
Output is correct |
66 |
Correct |
297 ms |
52796 KB |
Output is correct |
67 |
Correct |
337 ms |
51888 KB |
Output is correct |
68 |
Correct |
319 ms |
53884 KB |
Output is correct |
69 |
Correct |
362 ms |
54196 KB |
Output is correct |
70 |
Correct |
69 ms |
16988 KB |
Output is correct |
71 |
Correct |
87 ms |
19088 KB |
Output is correct |
72 |
Correct |
61 ms |
19032 KB |
Output is correct |
73 |
Correct |
67 ms |
19092 KB |
Output is correct |
74 |
Correct |
64 ms |
19032 KB |
Output is correct |
75 |
Correct |
64 ms |
19036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
2 ms |
6748 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
2789 ms |
92972 KB |
Output is correct |
6 |
Correct |
3043 ms |
95056 KB |
Output is correct |
7 |
Correct |
3139 ms |
93016 KB |
Output is correct |
8 |
Correct |
3031 ms |
93008 KB |
Output is correct |
9 |
Correct |
3014 ms |
95016 KB |
Output is correct |
10 |
Correct |
2903 ms |
93008 KB |
Output is correct |
11 |
Correct |
2804 ms |
95016 KB |
Output is correct |
12 |
Correct |
2796 ms |
95016 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
2 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
2 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
2 ms |
4440 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4452 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
2 ms |
4444 KB |
Output is correct |
27 |
Correct |
1 ms |
4440 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
2 ms |
4440 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
2 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
2 ms |
4444 KB |
Output is correct |
37 |
Correct |
2 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4440 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
2 ms |
4444 KB |
Output is correct |
41 |
Correct |
12 ms |
6748 KB |
Output is correct |
42 |
Correct |
8 ms |
8796 KB |
Output is correct |
43 |
Correct |
11 ms |
8852 KB |
Output is correct |
44 |
Correct |
8 ms |
8796 KB |
Output is correct |
45 |
Correct |
8 ms |
8796 KB |
Output is correct |
46 |
Correct |
58 ms |
17084 KB |
Output is correct |
47 |
Correct |
67 ms |
19084 KB |
Output is correct |
48 |
Correct |
319 ms |
19084 KB |
Output is correct |
49 |
Correct |
144 ms |
19260 KB |
Output is correct |
50 |
Correct |
71 ms |
19036 KB |
Output is correct |
51 |
Correct |
2801 ms |
94972 KB |
Output is correct |
52 |
Correct |
3526 ms |
93136 KB |
Output is correct |
53 |
Correct |
3155 ms |
95136 KB |
Output is correct |
54 |
Correct |
3344 ms |
95140 KB |
Output is correct |
55 |
Correct |
2 ms |
4544 KB |
Output is correct |
56 |
Correct |
66 ms |
19288 KB |
Output is correct |
57 |
Correct |
1 ms |
4440 KB |
Output is correct |
58 |
Correct |
46 ms |
30428 KB |
Output is correct |
59 |
Correct |
48 ms |
30428 KB |
Output is correct |
60 |
Correct |
47 ms |
30036 KB |
Output is correct |
61 |
Correct |
53 ms |
30632 KB |
Output is correct |
62 |
Correct |
37 ms |
30032 KB |
Output is correct |
63 |
Correct |
52 ms |
30428 KB |
Output is correct |
64 |
Correct |
1 ms |
4444 KB |
Output is correct |
65 |
Correct |
1 ms |
4444 KB |
Output is correct |
66 |
Correct |
1 ms |
4440 KB |
Output is correct |
67 |
Correct |
1 ms |
4444 KB |
Output is correct |
68 |
Correct |
1 ms |
4564 KB |
Output is correct |
69 |
Correct |
1 ms |
4440 KB |
Output is correct |
70 |
Correct |
1 ms |
4444 KB |
Output is correct |
71 |
Correct |
1 ms |
4444 KB |
Output is correct |
72 |
Correct |
1 ms |
4444 KB |
Output is correct |
73 |
Correct |
2 ms |
4444 KB |
Output is correct |
74 |
Correct |
1 ms |
4444 KB |
Output is correct |
75 |
Correct |
1 ms |
4444 KB |
Output is correct |
76 |
Correct |
154 ms |
35408 KB |
Output is correct |
77 |
Correct |
142 ms |
34760 KB |
Output is correct |
78 |
Correct |
146 ms |
34896 KB |
Output is correct |
79 |
Correct |
140 ms |
35548 KB |
Output is correct |
80 |
Correct |
159 ms |
35420 KB |
Output is correct |
81 |
Correct |
181 ms |
35420 KB |
Output is correct |
82 |
Correct |
180 ms |
35404 KB |
Output is correct |
83 |
Correct |
1 ms |
4444 KB |
Output is correct |
84 |
Correct |
1 ms |
4444 KB |
Output is correct |
85 |
Correct |
2 ms |
4560 KB |
Output is correct |
86 |
Correct |
1 ms |
4444 KB |
Output is correct |
87 |
Correct |
1 ms |
4444 KB |
Output is correct |
88 |
Correct |
1 ms |
4444 KB |
Output is correct |
89 |
Correct |
1 ms |
4444 KB |
Output is correct |
90 |
Correct |
2 ms |
4444 KB |
Output is correct |
91 |
Correct |
1 ms |
4440 KB |
Output is correct |
92 |
Correct |
2 ms |
4572 KB |
Output is correct |
93 |
Correct |
1 ms |
4444 KB |
Output is correct |
94 |
Correct |
1 ms |
4444 KB |
Output is correct |
95 |
Correct |
1 ms |
4444 KB |
Output is correct |
96 |
Correct |
1 ms |
4444 KB |
Output is correct |
97 |
Correct |
1 ms |
4444 KB |
Output is correct |
98 |
Correct |
1 ms |
4444 KB |
Output is correct |
99 |
Correct |
1 ms |
4444 KB |
Output is correct |
100 |
Correct |
1 ms |
4444 KB |
Output is correct |
101 |
Correct |
2 ms |
4444 KB |
Output is correct |
102 |
Correct |
3 ms |
6744 KB |
Output is correct |
103 |
Correct |
214 ms |
41840 KB |
Output is correct |
104 |
Correct |
203 ms |
39252 KB |
Output is correct |
105 |
Correct |
203 ms |
39496 KB |
Output is correct |
106 |
Correct |
188 ms |
40016 KB |
Output is correct |
107 |
Correct |
190 ms |
39736 KB |
Output is correct |
108 |
Correct |
208 ms |
41816 KB |
Output is correct |
109 |
Correct |
256 ms |
42132 KB |
Output is correct |
110 |
Correct |
7 ms |
6748 KB |
Output is correct |
111 |
Correct |
7 ms |
8796 KB |
Output is correct |
112 |
Correct |
8 ms |
8796 KB |
Output is correct |
113 |
Correct |
7 ms |
8796 KB |
Output is correct |
114 |
Correct |
9 ms |
8792 KB |
Output is correct |
115 |
Correct |
256 ms |
47432 KB |
Output is correct |
116 |
Correct |
172 ms |
33400 KB |
Output is correct |
117 |
Correct |
190 ms |
33596 KB |
Output is correct |
118 |
Correct |
197 ms |
33856 KB |
Output is correct |
119 |
Correct |
274 ms |
47184 KB |
Output is correct |
120 |
Correct |
390 ms |
53856 KB |
Output is correct |
121 |
Correct |
322 ms |
53888 KB |
Output is correct |
122 |
Correct |
297 ms |
52796 KB |
Output is correct |
123 |
Correct |
337 ms |
51888 KB |
Output is correct |
124 |
Correct |
319 ms |
53884 KB |
Output is correct |
125 |
Correct |
362 ms |
54196 KB |
Output is correct |
126 |
Correct |
69 ms |
16988 KB |
Output is correct |
127 |
Correct |
87 ms |
19088 KB |
Output is correct |
128 |
Correct |
61 ms |
19032 KB |
Output is correct |
129 |
Correct |
67 ms |
19092 KB |
Output is correct |
130 |
Correct |
64 ms |
19032 KB |
Output is correct |
131 |
Correct |
64 ms |
19036 KB |
Output is correct |
132 |
Correct |
3819 ms |
131820 KB |
Output is correct |
133 |
Correct |
3637 ms |
131584 KB |
Output is correct |
134 |
Correct |
3346 ms |
131828 KB |
Output is correct |
135 |
Correct |
3153 ms |
131824 KB |
Output is correct |
136 |
Correct |
2981 ms |
131824 KB |
Output is correct |
137 |
Correct |
1540 ms |
85856 KB |
Output is correct |
138 |
Correct |
1517 ms |
86096 KB |
Output is correct |
139 |
Correct |
2723 ms |
131780 KB |
Output is correct |
140 |
Correct |
2735 ms |
129544 KB |
Output is correct |
141 |
Correct |
3538 ms |
131564 KB |
Output is correct |
142 |
Correct |
3647 ms |
131892 KB |
Output is correct |