#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define sz(a) (int)(a.size())
#define all(a) a.begin(),a.end()
#define lb lower_bound
#define ub upper_bound
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define debug(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false);\
debug("%s time : %.4fs\n", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef pair<int,int> pii;
typedef vector<vector<int>> vii;
typedef vector<vector<ll>> VII;
ll gcd(ll a,ll b){if(!b)return a;else return gcd(b,a%b);}
int a[300001],cnt[20];
pii bit[2][1024][1024];
//i,m0,m1 : first half of mask = m0, second half of mask has i bits in common with m1
int main()
{
owo
int n,m;
cin>>n>>m;
for(int i=1;i<=n;i++){
for(int j=0;j<m;j++){
int x;
cin>>x;
a[i] |= (x<<j);
cnt[j]+=x;
}
int m0 = a[i]&1023;
int m1 = a[i]>>10;
for(int j=0;j<1024;j++){
int c = __builtin_popcount(m1&j);
if(!bit[0][m0][j].se)bit[0][m0][j] = {c,i};
else{
if(c <= bit[0][m0][j].fi){
bit[1][m0][j] = bit[0][m0][j];
bit[0][m0][j] = {c,i};
}else if(!bit[1][m0][j].se || c <= bit[1][m0][j].fi ){
bit[1][m0][j] = {c,i};
}
}
}
}
for(int i=1;i<=n;i++){
int mask = 0,ans = 0;
for(int j=0;j<m;j++){
if((a[i]>>j)&1)cnt[j]--;
if(cnt[j] >= n/2)ans++;
if(cnt[j] == n/2)mask+=(1<<j); //we try to make this bit off
}
int m0 = mask&1023;
int m1 = mask>>10;
int mn = 20;
for(int j=0;j<1024;j++){
int c = __builtin_popcount(m0&j);
if(!bit[0][j][m1].se)continue;
int kek = 20;
if(bit[0][j][m1].se != i)kek = bit[0][j][m1].fi;
else if(bit[1][j][m1].se)kek = bit[1][j][m1].fi;
mn = min(mn,kek+c);
}
cout<<ans-mn<<'\n';
for(int j=0;j<m;j++){
if((a[i]>>j)&1)cnt[j]++;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
3 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
596 KB |
Output is correct |
9 |
Correct |
5 ms |
3668 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
596 KB |
Output is correct |
12 |
Correct |
5 ms |
3540 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
3 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
3 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
468 KB |
Output is correct |
25 |
Correct |
1 ms |
596 KB |
Output is correct |
26 |
Correct |
5 ms |
1236 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
3 ms |
852 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 ms |
724 KB |
Output is correct |
31 |
Correct |
5 ms |
3540 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
468 KB |
Output is correct |
34 |
Correct |
1 ms |
648 KB |
Output is correct |
35 |
Correct |
2 ms |
1236 KB |
Output is correct |
36 |
Correct |
1 ms |
468 KB |
Output is correct |
37 |
Correct |
1 ms |
852 KB |
Output is correct |
38 |
Correct |
1 ms |
468 KB |
Output is correct |
39 |
Correct |
1 ms |
724 KB |
Output is correct |
40 |
Correct |
4 ms |
3668 KB |
Output is correct |
41 |
Correct |
1 ms |
468 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
596 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
596 KB |
Output is correct |
46 |
Correct |
1 ms |
468 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
584 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
3 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
596 KB |
Output is correct |
9 |
Correct |
5 ms |
3668 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
596 KB |
Output is correct |
12 |
Correct |
5 ms |
3540 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
3 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
3 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
468 KB |
Output is correct |
25 |
Correct |
1 ms |
596 KB |
Output is correct |
26 |
Correct |
5 ms |
1236 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
3 ms |
852 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 ms |
724 KB |
Output is correct |
31 |
Correct |
5 ms |
3540 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
468 KB |
Output is correct |
34 |
Correct |
1 ms |
648 KB |
Output is correct |
35 |
Correct |
2 ms |
1236 KB |
Output is correct |
36 |
Correct |
1 ms |
468 KB |
Output is correct |
37 |
Correct |
1 ms |
852 KB |
Output is correct |
38 |
Correct |
1 ms |
468 KB |
Output is correct |
39 |
Correct |
1 ms |
724 KB |
Output is correct |
40 |
Correct |
4 ms |
3668 KB |
Output is correct |
41 |
Correct |
1 ms |
468 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
596 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
596 KB |
Output is correct |
46 |
Correct |
1 ms |
468 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
584 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
596 KB |
Output is correct |
51 |
Correct |
23 ms |
384 KB |
Output is correct |
52 |
Correct |
23 ms |
364 KB |
Output is correct |
53 |
Correct |
45 ms |
15604 KB |
Output is correct |
54 |
Correct |
42 ms |
15384 KB |
Output is correct |
55 |
Correct |
48 ms |
424 KB |
Output is correct |
56 |
Correct |
38 ms |
15444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2023 ms |
2120 KB |
Output is correct |
3 |
Correct |
2020 ms |
2024 KB |
Output is correct |
4 |
Correct |
2185 ms |
2124 KB |
Output is correct |
5 |
Correct |
2047 ms |
2152 KB |
Output is correct |
6 |
Correct |
2043 ms |
2120 KB |
Output is correct |
7 |
Correct |
2072 ms |
2144 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
3 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
4 ms |
340 KB |
Output is correct |
17 |
Correct |
30 ms |
412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2023 ms |
2120 KB |
Output is correct |
3 |
Correct |
2020 ms |
2024 KB |
Output is correct |
4 |
Correct |
2185 ms |
2124 KB |
Output is correct |
5 |
Correct |
2047 ms |
2152 KB |
Output is correct |
6 |
Correct |
2043 ms |
2120 KB |
Output is correct |
7 |
Correct |
2072 ms |
2144 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
3 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
4 ms |
340 KB |
Output is correct |
17 |
Correct |
30 ms |
412 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
468 KB |
Output is correct |
20 |
Correct |
2354 ms |
7568 KB |
Output is correct |
21 |
Correct |
2264 ms |
5332 KB |
Output is correct |
22 |
Correct |
2297 ms |
5132 KB |
Output is correct |
23 |
Correct |
2250 ms |
2516 KB |
Output is correct |
24 |
Correct |
2160 ms |
2128 KB |
Output is correct |
25 |
Correct |
2536 ms |
18412 KB |
Output is correct |
26 |
Correct |
2591 ms |
18492 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 ms |
596 KB |
Output is correct |
31 |
Correct |
2 ms |
1236 KB |
Output is correct |
32 |
Correct |
1 ms |
468 KB |
Output is correct |
33 |
Correct |
1 ms |
852 KB |
Output is correct |
34 |
Correct |
1 ms |
468 KB |
Output is correct |
35 |
Correct |
1 ms |
724 KB |
Output is correct |
36 |
Correct |
5 ms |
3540 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
468 KB |
Output is correct |
39 |
Correct |
1 ms |
596 KB |
Output is correct |
40 |
Correct |
2 ms |
1236 KB |
Output is correct |
41 |
Correct |
1 ms |
468 KB |
Output is correct |
42 |
Correct |
1 ms |
852 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
724 KB |
Output is correct |
45 |
Correct |
5 ms |
3668 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2023 ms |
2120 KB |
Output is correct |
3 |
Correct |
2020 ms |
2024 KB |
Output is correct |
4 |
Correct |
2185 ms |
2124 KB |
Output is correct |
5 |
Correct |
2047 ms |
2152 KB |
Output is correct |
6 |
Correct |
2043 ms |
2120 KB |
Output is correct |
7 |
Correct |
2072 ms |
2144 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
3 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
4 ms |
340 KB |
Output is correct |
17 |
Correct |
30 ms |
412 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
468 KB |
Output is correct |
20 |
Correct |
2354 ms |
7568 KB |
Output is correct |
21 |
Correct |
2264 ms |
5332 KB |
Output is correct |
22 |
Correct |
2297 ms |
5132 KB |
Output is correct |
23 |
Correct |
2250 ms |
2516 KB |
Output is correct |
24 |
Correct |
2160 ms |
2128 KB |
Output is correct |
25 |
Correct |
2536 ms |
18412 KB |
Output is correct |
26 |
Correct |
2591 ms |
18492 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 ms |
596 KB |
Output is correct |
31 |
Correct |
2 ms |
1236 KB |
Output is correct |
32 |
Correct |
1 ms |
468 KB |
Output is correct |
33 |
Correct |
1 ms |
852 KB |
Output is correct |
34 |
Correct |
1 ms |
468 KB |
Output is correct |
35 |
Correct |
1 ms |
724 KB |
Output is correct |
36 |
Correct |
5 ms |
3540 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
468 KB |
Output is correct |
39 |
Correct |
1 ms |
596 KB |
Output is correct |
40 |
Correct |
2 ms |
1236 KB |
Output is correct |
41 |
Correct |
1 ms |
468 KB |
Output is correct |
42 |
Correct |
1 ms |
852 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
724 KB |
Output is correct |
45 |
Correct |
5 ms |
3668 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
2784 ms |
17228 KB |
Output is correct |
48 |
Correct |
2675 ms |
13968 KB |
Output is correct |
49 |
Correct |
2809 ms |
14060 KB |
Output is correct |
50 |
Correct |
2466 ms |
10560 KB |
Output is correct |
51 |
Correct |
2313 ms |
10312 KB |
Output is correct |
52 |
Correct |
2939 ms |
26608 KB |
Output is correct |
53 |
Correct |
2862 ms |
26868 KB |
Output is correct |
54 |
Correct |
1 ms |
468 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
596 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
2023 ms |
2120 KB |
Output is correct |
3 |
Correct |
2020 ms |
2024 KB |
Output is correct |
4 |
Correct |
2185 ms |
2124 KB |
Output is correct |
5 |
Correct |
2047 ms |
2152 KB |
Output is correct |
6 |
Correct |
2043 ms |
2120 KB |
Output is correct |
7 |
Correct |
2072 ms |
2144 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
3 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
4 ms |
340 KB |
Output is correct |
17 |
Correct |
30 ms |
412 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
468 KB |
Output is correct |
20 |
Correct |
2354 ms |
7568 KB |
Output is correct |
21 |
Correct |
2264 ms |
5332 KB |
Output is correct |
22 |
Correct |
2297 ms |
5132 KB |
Output is correct |
23 |
Correct |
2250 ms |
2516 KB |
Output is correct |
24 |
Correct |
2160 ms |
2128 KB |
Output is correct |
25 |
Correct |
2536 ms |
18412 KB |
Output is correct |
26 |
Correct |
2591 ms |
18492 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 ms |
596 KB |
Output is correct |
31 |
Correct |
2 ms |
1236 KB |
Output is correct |
32 |
Correct |
1 ms |
468 KB |
Output is correct |
33 |
Correct |
1 ms |
852 KB |
Output is correct |
34 |
Correct |
1 ms |
468 KB |
Output is correct |
35 |
Correct |
1 ms |
724 KB |
Output is correct |
36 |
Correct |
5 ms |
3540 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
468 KB |
Output is correct |
39 |
Correct |
1 ms |
596 KB |
Output is correct |
40 |
Correct |
2 ms |
1236 KB |
Output is correct |
41 |
Correct |
1 ms |
468 KB |
Output is correct |
42 |
Correct |
1 ms |
852 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
724 KB |
Output is correct |
45 |
Correct |
5 ms |
3668 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
2784 ms |
17228 KB |
Output is correct |
48 |
Correct |
2675 ms |
13968 KB |
Output is correct |
49 |
Correct |
2809 ms |
14060 KB |
Output is correct |
50 |
Correct |
2466 ms |
10560 KB |
Output is correct |
51 |
Correct |
2313 ms |
10312 KB |
Output is correct |
52 |
Correct |
2939 ms |
26608 KB |
Output is correct |
53 |
Correct |
2862 ms |
26868 KB |
Output is correct |
54 |
Correct |
1 ms |
468 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
596 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
596 KB |
Output is correct |
59 |
Correct |
2789 ms |
28028 KB |
Output is correct |
60 |
Correct |
1108 ms |
21340 KB |
Output is correct |
61 |
Correct |
1160 ms |
21636 KB |
Output is correct |
62 |
Correct |
1299 ms |
21780 KB |
Output is correct |
63 |
Correct |
3022 ms |
27644 KB |
Output is correct |
64 |
Correct |
3095 ms |
28228 KB |
Output is correct |
65 |
Correct |
3135 ms |
28244 KB |
Output is correct |
66 |
Correct |
2265 ms |
12384 KB |
Output is correct |
67 |
Correct |
2220 ms |
12056 KB |
Output is correct |
68 |
Correct |
2801 ms |
28536 KB |
Output is correct |
69 |
Correct |
2990 ms |
28676 KB |
Output is correct |
70 |
Correct |
1 ms |
456 KB |
Output is correct |
71 |
Correct |
1 ms |
340 KB |
Output is correct |
72 |
Correct |
1 ms |
584 KB |
Output is correct |
73 |
Correct |
1 ms |
328 KB |
Output is correct |
74 |
Correct |
1 ms |
596 KB |
Output is correct |
75 |
Correct |
39 ms |
15532 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
3 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
596 KB |
Output is correct |
9 |
Correct |
5 ms |
3668 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
596 KB |
Output is correct |
12 |
Correct |
5 ms |
3540 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
2 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
3 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
3 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
468 KB |
Output is correct |
25 |
Correct |
1 ms |
596 KB |
Output is correct |
26 |
Correct |
5 ms |
1236 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
3 ms |
852 KB |
Output is correct |
29 |
Correct |
1 ms |
468 KB |
Output is correct |
30 |
Correct |
1 ms |
724 KB |
Output is correct |
31 |
Correct |
5 ms |
3540 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
468 KB |
Output is correct |
34 |
Correct |
1 ms |
648 KB |
Output is correct |
35 |
Correct |
2 ms |
1236 KB |
Output is correct |
36 |
Correct |
1 ms |
468 KB |
Output is correct |
37 |
Correct |
1 ms |
852 KB |
Output is correct |
38 |
Correct |
1 ms |
468 KB |
Output is correct |
39 |
Correct |
1 ms |
724 KB |
Output is correct |
40 |
Correct |
4 ms |
3668 KB |
Output is correct |
41 |
Correct |
1 ms |
468 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
596 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
596 KB |
Output is correct |
46 |
Correct |
1 ms |
468 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
1 ms |
584 KB |
Output is correct |
49 |
Correct |
1 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
596 KB |
Output is correct |
51 |
Correct |
23 ms |
384 KB |
Output is correct |
52 |
Correct |
23 ms |
364 KB |
Output is correct |
53 |
Correct |
45 ms |
15604 KB |
Output is correct |
54 |
Correct |
42 ms |
15384 KB |
Output is correct |
55 |
Correct |
48 ms |
424 KB |
Output is correct |
56 |
Correct |
38 ms |
15444 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
2023 ms |
2120 KB |
Output is correct |
59 |
Correct |
2020 ms |
2024 KB |
Output is correct |
60 |
Correct |
2185 ms |
2124 KB |
Output is correct |
61 |
Correct |
2047 ms |
2152 KB |
Output is correct |
62 |
Correct |
2043 ms |
2120 KB |
Output is correct |
63 |
Correct |
2072 ms |
2144 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
1 ms |
340 KB |
Output is correct |
67 |
Correct |
1 ms |
340 KB |
Output is correct |
68 |
Correct |
3 ms |
384 KB |
Output is correct |
69 |
Correct |
1 ms |
340 KB |
Output is correct |
70 |
Correct |
1 ms |
340 KB |
Output is correct |
71 |
Correct |
1 ms |
340 KB |
Output is correct |
72 |
Correct |
4 ms |
340 KB |
Output is correct |
73 |
Correct |
30 ms |
412 KB |
Output is correct |
74 |
Correct |
1 ms |
340 KB |
Output is correct |
75 |
Correct |
1 ms |
468 KB |
Output is correct |
76 |
Correct |
2354 ms |
7568 KB |
Output is correct |
77 |
Correct |
2264 ms |
5332 KB |
Output is correct |
78 |
Correct |
2297 ms |
5132 KB |
Output is correct |
79 |
Correct |
2250 ms |
2516 KB |
Output is correct |
80 |
Correct |
2160 ms |
2128 KB |
Output is correct |
81 |
Correct |
2536 ms |
18412 KB |
Output is correct |
82 |
Correct |
2591 ms |
18492 KB |
Output is correct |
83 |
Correct |
1 ms |
468 KB |
Output is correct |
84 |
Correct |
1 ms |
340 KB |
Output is correct |
85 |
Correct |
1 ms |
468 KB |
Output is correct |
86 |
Correct |
1 ms |
596 KB |
Output is correct |
87 |
Correct |
2 ms |
1236 KB |
Output is correct |
88 |
Correct |
1 ms |
468 KB |
Output is correct |
89 |
Correct |
1 ms |
852 KB |
Output is correct |
90 |
Correct |
1 ms |
468 KB |
Output is correct |
91 |
Correct |
1 ms |
724 KB |
Output is correct |
92 |
Correct |
5 ms |
3540 KB |
Output is correct |
93 |
Correct |
1 ms |
340 KB |
Output is correct |
94 |
Correct |
1 ms |
468 KB |
Output is correct |
95 |
Correct |
1 ms |
596 KB |
Output is correct |
96 |
Correct |
2 ms |
1236 KB |
Output is correct |
97 |
Correct |
1 ms |
468 KB |
Output is correct |
98 |
Correct |
1 ms |
852 KB |
Output is correct |
99 |
Correct |
1 ms |
468 KB |
Output is correct |
100 |
Correct |
1 ms |
724 KB |
Output is correct |
101 |
Correct |
5 ms |
3668 KB |
Output is correct |
102 |
Correct |
1 ms |
340 KB |
Output is correct |
103 |
Correct |
2784 ms |
17228 KB |
Output is correct |
104 |
Correct |
2675 ms |
13968 KB |
Output is correct |
105 |
Correct |
2809 ms |
14060 KB |
Output is correct |
106 |
Correct |
2466 ms |
10560 KB |
Output is correct |
107 |
Correct |
2313 ms |
10312 KB |
Output is correct |
108 |
Correct |
2939 ms |
26608 KB |
Output is correct |
109 |
Correct |
2862 ms |
26868 KB |
Output is correct |
110 |
Correct |
1 ms |
468 KB |
Output is correct |
111 |
Correct |
1 ms |
340 KB |
Output is correct |
112 |
Correct |
1 ms |
596 KB |
Output is correct |
113 |
Correct |
1 ms |
340 KB |
Output is correct |
114 |
Correct |
1 ms |
596 KB |
Output is correct |
115 |
Correct |
2789 ms |
28028 KB |
Output is correct |
116 |
Correct |
1108 ms |
21340 KB |
Output is correct |
117 |
Correct |
1160 ms |
21636 KB |
Output is correct |
118 |
Correct |
1299 ms |
21780 KB |
Output is correct |
119 |
Correct |
3022 ms |
27644 KB |
Output is correct |
120 |
Correct |
3095 ms |
28228 KB |
Output is correct |
121 |
Correct |
3135 ms |
28244 KB |
Output is correct |
122 |
Correct |
2265 ms |
12384 KB |
Output is correct |
123 |
Correct |
2220 ms |
12056 KB |
Output is correct |
124 |
Correct |
2801 ms |
28536 KB |
Output is correct |
125 |
Correct |
2990 ms |
28676 KB |
Output is correct |
126 |
Correct |
1 ms |
456 KB |
Output is correct |
127 |
Correct |
1 ms |
340 KB |
Output is correct |
128 |
Correct |
1 ms |
584 KB |
Output is correct |
129 |
Correct |
1 ms |
328 KB |
Output is correct |
130 |
Correct |
1 ms |
596 KB |
Output is correct |
131 |
Correct |
39 ms |
15532 KB |
Output is correct |
132 |
Correct |
3623 ms |
30420 KB |
Output is correct |
133 |
Correct |
3894 ms |
30392 KB |
Output is correct |
134 |
Correct |
3902 ms |
30600 KB |
Output is correct |
135 |
Execution timed out |
4017 ms |
30440 KB |
Time limit exceeded |
136 |
Halted |
0 ms |
0 KB |
- |