#include<bits/stdc++.h>
using namespace std;
#define int long long
#define f first
#define s second
#define ii pair<int,int>
#define vi vector<int>
#define vvi vector<vi>
#define vvii vector<vector<ii>>
#define pb push_back
#define vpi vector<ii>
#define forcin for(int i = 0; i<n; ++i) cin>>v[i];
#define ld long double
#define all(a) (a).begin(),(a).end()
#define For(i, n, x) for (int i = x; i < n; i++)
#define rsz(a,x) assign(a,x)
signed main(){
int n,m; cin>>n>>m;
vector<vector<int>> v(n,vector<int>(m));
for(auto& x : v){
for(auto& z : x) cin>>z;
}
if(n <= 300){
vi cntones(m);
For(i,m,0){
For(j,n,0) cntones[i] += v[j][i];
}
//for(auto x : cntones) cout<<x<<" ";
int tot = (n)/2;
For(i,n,0){
int mx = 0;
For(j,n,0){
if(i == j) continue;
int tmp = 0;
For(k,m,0){
//if(i == 2) cerr<<i<<" "<<j<<" "<<k<<" "<<cntones[i]<<" "<<v[i][k]<<" "<<v[j][k]<<" "<<tot<<endl;
if(cntones[k] - v[i][k] - v[j][k] >= tot && cntones[k] - v[i][k] - v[j][k] > 0) tmp++;
}
mx = max(mx,tmp);
}
cout<<mx<<endl;
}
return 0;
}
for(auto& x : v){
for(auto& y : x) y^=1;
}
vector<int> dp(1ll<<m,0);
auto dp1 = dp;
auto idx = dp; auto idx1 = dp;
int cnt = 0;
set<int> msks;
for(auto x : v){
int z = 0;
int tot = 0;
for(int i = 0; i<m; i++){
z+= x[i] * (1ll<<i);
tot += x[i];
}
msks.insert(z);
if(dp[z] < tot){
dp1[z] = dp[z]; idx1[z] = idx[z];
dp[z] = tot; idx[z] = cnt;
}
else if(dp1[z] < tot){
dp1[z] = tot; idx1[z] = cnt;
}
//cerr<<z<<" "<<dp[z]<<" "<<idx[z]<<endl;
cnt++;
}
//cerr<<endl;
priority_queue<pair<int,int>> pq;
for(auto x : msks) pq.push({dp[x],x});
while(!pq.empty()){
pair<int,int> p = pq.top();
bool b = 0;
int tot = p.first; int u = p.second;
if(u >= (1ll<<m)) b = 1, u -= (1ll<<m);
pq.pop();
//cerr<<"START "<<u<<" "<<tot<<" "<<dp[u]<<" "<<idx[u]<<" "<<dp1[u]<<" "<<idx1[u]<<" "<<b<<endl;
if(tot < dp1[u]) continue;
if(!b && tot < dp[u]) continue;
//cerr<<"START LOOP"<<endl;
for(int i = 0; i < m; i++){
int z = u ^ (1ll<<i);
// trec el bit del d'aixo que estic mirant
int tmp;
int IDX;
if(!b) tmp = dp[u], IDX = idx[u];
else tmp = dp1[u], IDX = idx1[u];
if(v[IDX][i] && z < u) tmp--; // turning bit off and was active
if(z > u && v[IDX][i]) tmp++; // turning bit on and was active
//cerr<<u<<" "<<z<<" "<<tmp<<" "<<IDX<<" "<<i<<endl;
int ok = 0;
if(dp[z] < tmp){
dp1[z] = dp[z]; idx1[z] = idx[z];
dp[z] = tmp; idx[z] = IDX;
ok = 1;
}
else if(dp1[z] < tmp && IDX != idx[z]){
dp1[z] = tmp; idx1[z] = IDX;
ok = 2;
}
if(ok == 1){
pq.push({dp[z],z});
}
else if(ok == 2) pq.push({dp1[z],z + (1ll<<m)});
}
//cerr<<"END LOOP"<<endl;
}
vector<int> sumcols(m);
for(int j = 0; j<m; j++){
for(int i = 0; i<n; i++){
sumcols[j] += v[i][j] == 0;
}
}
for(int i = 0; i<n; i++){
int good = 0;
int msk = 0;
int bits = 0;
for(int j = 0; j<m; j++){
int z = sumcols[j]; z-=1^v[i][j];
if(z - 1>=(n)/2) good++;
else if(z == (n)/2){
msk+= (1ll<<j);
bits++;
}
}
//cerr<<i<<" "<<good<<" "<<msk<<" DP "<<dp[msk]<<" "<<idx[msk]<<" DP1 "<<dp1[msk]<<" "<<idx1[msk]<<endl;
if(idx[msk] == i && idx1[msk] != i) good+=dp1[msk];
else good+=dp[msk];
cout<<good<<endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
4 ms |
504 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
3 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
3 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 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 |
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 |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
432 KB |
Output is correct |
39 |
Correct |
0 ms |
600 KB |
Output is correct |
40 |
Correct |
2 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 |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
408 KB |
Output is correct |
47 |
Correct |
0 ms |
344 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
4 ms |
504 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
3 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
3 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 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 |
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 |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
432 KB |
Output is correct |
39 |
Correct |
0 ms |
600 KB |
Output is correct |
40 |
Correct |
2 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 |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
408 KB |
Output is correct |
47 |
Correct |
0 ms |
344 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
18 ms |
34016 KB |
Output is correct |
52 |
Correct |
384 ms |
39136 KB |
Output is correct |
53 |
Correct |
847 ms |
52404 KB |
Output is correct |
54 |
Correct |
841 ms |
52060 KB |
Output is correct |
55 |
Correct |
5 ms |
604 KB |
Output is correct |
56 |
Correct |
80 ms |
7292 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
421 ms |
18968 KB |
Output is correct |
3 |
Correct |
417 ms |
18628 KB |
Output is correct |
4 |
Correct |
389 ms |
18260 KB |
Output is correct |
5 |
Correct |
416 ms |
18516 KB |
Output is correct |
6 |
Correct |
388 ms |
17868 KB |
Output is correct |
7 |
Correct |
424 ms |
18528 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
436 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
5 ms |
600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
421 ms |
18968 KB |
Output is correct |
3 |
Correct |
417 ms |
18628 KB |
Output is correct |
4 |
Correct |
389 ms |
18260 KB |
Output is correct |
5 |
Correct |
416 ms |
18516 KB |
Output is correct |
6 |
Correct |
388 ms |
17868 KB |
Output is correct |
7 |
Correct |
424 ms |
18528 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
436 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
5 ms |
600 KB |
Output is correct |
18 |
Correct |
0 ms |
436 KB |
Output is correct |
19 |
Correct |
0 ms |
360 KB |
Output is correct |
20 |
Correct |
722 ms |
42412 KB |
Output is correct |
21 |
Correct |
699 ms |
36764 KB |
Output is correct |
22 |
Correct |
681 ms |
36680 KB |
Output is correct |
23 |
Correct |
700 ms |
42412 KB |
Output is correct |
24 |
Correct |
736 ms |
42320 KB |
Output is correct |
25 |
Correct |
706 ms |
42068 KB |
Output is correct |
26 |
Correct |
724 ms |
42180 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
604 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 |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
436 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 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 |
344 KB |
Output is correct |
44 |
Correct |
1 ms |
344 KB |
Output is correct |
45 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
421 ms |
18968 KB |
Output is correct |
3 |
Correct |
417 ms |
18628 KB |
Output is correct |
4 |
Correct |
389 ms |
18260 KB |
Output is correct |
5 |
Correct |
416 ms |
18516 KB |
Output is correct |
6 |
Correct |
388 ms |
17868 KB |
Output is correct |
7 |
Correct |
424 ms |
18528 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
436 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
5 ms |
600 KB |
Output is correct |
18 |
Correct |
0 ms |
436 KB |
Output is correct |
19 |
Correct |
0 ms |
360 KB |
Output is correct |
20 |
Correct |
722 ms |
42412 KB |
Output is correct |
21 |
Correct |
699 ms |
36764 KB |
Output is correct |
22 |
Correct |
681 ms |
36680 KB |
Output is correct |
23 |
Correct |
700 ms |
42412 KB |
Output is correct |
24 |
Correct |
736 ms |
42320 KB |
Output is correct |
25 |
Correct |
706 ms |
42068 KB |
Output is correct |
26 |
Correct |
724 ms |
42180 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
604 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 |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
436 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 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 |
344 KB |
Output is correct |
44 |
Correct |
1 ms |
344 KB |
Output is correct |
45 |
Correct |
2 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
344 KB |
Output is correct |
47 |
Correct |
871 ms |
54736 KB |
Output is correct |
48 |
Correct |
846 ms |
49284 KB |
Output is correct |
49 |
Correct |
837 ms |
49144 KB |
Output is correct |
50 |
Correct |
826 ms |
54824 KB |
Output is correct |
51 |
Correct |
829 ms |
54528 KB |
Output is correct |
52 |
Correct |
883 ms |
55716 KB |
Output is correct |
53 |
Correct |
920 ms |
56020 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
421 ms |
18968 KB |
Output is correct |
3 |
Correct |
417 ms |
18628 KB |
Output is correct |
4 |
Correct |
389 ms |
18260 KB |
Output is correct |
5 |
Correct |
416 ms |
18516 KB |
Output is correct |
6 |
Correct |
388 ms |
17868 KB |
Output is correct |
7 |
Correct |
424 ms |
18528 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
436 KB |
Output is correct |
14 |
Correct |
0 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
5 ms |
600 KB |
Output is correct |
18 |
Correct |
0 ms |
436 KB |
Output is correct |
19 |
Correct |
0 ms |
360 KB |
Output is correct |
20 |
Correct |
722 ms |
42412 KB |
Output is correct |
21 |
Correct |
699 ms |
36764 KB |
Output is correct |
22 |
Correct |
681 ms |
36680 KB |
Output is correct |
23 |
Correct |
700 ms |
42412 KB |
Output is correct |
24 |
Correct |
736 ms |
42320 KB |
Output is correct |
25 |
Correct |
706 ms |
42068 KB |
Output is correct |
26 |
Correct |
724 ms |
42180 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
604 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 |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
436 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 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 |
344 KB |
Output is correct |
44 |
Correct |
1 ms |
344 KB |
Output is correct |
45 |
Correct |
2 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
344 KB |
Output is correct |
47 |
Correct |
871 ms |
54736 KB |
Output is correct |
48 |
Correct |
846 ms |
49284 KB |
Output is correct |
49 |
Correct |
837 ms |
49144 KB |
Output is correct |
50 |
Correct |
826 ms |
54824 KB |
Output is correct |
51 |
Correct |
829 ms |
54528 KB |
Output is correct |
52 |
Correct |
883 ms |
55716 KB |
Output is correct |
53 |
Correct |
920 ms |
56020 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
996 ms |
65376 KB |
Output is correct |
60 |
Correct |
498 ms |
38184 KB |
Output is correct |
61 |
Correct |
529 ms |
39800 KB |
Output is correct |
62 |
Correct |
541 ms |
41248 KB |
Output is correct |
63 |
Correct |
1002 ms |
63176 KB |
Output is correct |
64 |
Correct |
1085 ms |
67592 KB |
Output is correct |
65 |
Correct |
1086 ms |
67544 KB |
Output is correct |
66 |
Correct |
911 ms |
64692 KB |
Output is correct |
67 |
Correct |
936 ms |
64972 KB |
Output is correct |
68 |
Correct |
1090 ms |
72048 KB |
Output is correct |
69 |
Correct |
1118 ms |
72296 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
436 KB |
Output is correct |
72 |
Correct |
0 ms |
344 KB |
Output is correct |
73 |
Correct |
0 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
82 ms |
7372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
4 ms |
504 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
3 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
3 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 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 |
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 |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
432 KB |
Output is correct |
39 |
Correct |
0 ms |
600 KB |
Output is correct |
40 |
Correct |
2 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 |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
408 KB |
Output is correct |
47 |
Correct |
0 ms |
344 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
18 ms |
34016 KB |
Output is correct |
52 |
Correct |
384 ms |
39136 KB |
Output is correct |
53 |
Correct |
847 ms |
52404 KB |
Output is correct |
54 |
Correct |
841 ms |
52060 KB |
Output is correct |
55 |
Correct |
5 ms |
604 KB |
Output is correct |
56 |
Correct |
80 ms |
7292 KB |
Output is correct |
57 |
Correct |
0 ms |
344 KB |
Output is correct |
58 |
Correct |
421 ms |
18968 KB |
Output is correct |
59 |
Correct |
417 ms |
18628 KB |
Output is correct |
60 |
Correct |
389 ms |
18260 KB |
Output is correct |
61 |
Correct |
416 ms |
18516 KB |
Output is correct |
62 |
Correct |
388 ms |
17868 KB |
Output is correct |
63 |
Correct |
424 ms |
18528 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
600 KB |
Output is correct |
69 |
Correct |
0 ms |
436 KB |
Output is correct |
70 |
Correct |
0 ms |
344 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
1 ms |
432 KB |
Output is correct |
73 |
Correct |
5 ms |
600 KB |
Output is correct |
74 |
Correct |
0 ms |
436 KB |
Output is correct |
75 |
Correct |
0 ms |
360 KB |
Output is correct |
76 |
Correct |
722 ms |
42412 KB |
Output is correct |
77 |
Correct |
699 ms |
36764 KB |
Output is correct |
78 |
Correct |
681 ms |
36680 KB |
Output is correct |
79 |
Correct |
700 ms |
42412 KB |
Output is correct |
80 |
Correct |
736 ms |
42320 KB |
Output is correct |
81 |
Correct |
706 ms |
42068 KB |
Output is correct |
82 |
Correct |
724 ms |
42180 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
604 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 |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
2 ms |
348 KB |
Output is correct |
93 |
Correct |
0 ms |
348 KB |
Output is correct |
94 |
Correct |
0 ms |
436 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 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 |
344 KB |
Output is correct |
100 |
Correct |
1 ms |
344 KB |
Output is correct |
101 |
Correct |
2 ms |
348 KB |
Output is correct |
102 |
Correct |
0 ms |
344 KB |
Output is correct |
103 |
Correct |
871 ms |
54736 KB |
Output is correct |
104 |
Correct |
846 ms |
49284 KB |
Output is correct |
105 |
Correct |
837 ms |
49144 KB |
Output is correct |
106 |
Correct |
826 ms |
54824 KB |
Output is correct |
107 |
Correct |
829 ms |
54528 KB |
Output is correct |
108 |
Correct |
883 ms |
55716 KB |
Output is correct |
109 |
Correct |
920 ms |
56020 KB |
Output is correct |
110 |
Correct |
0 ms |
348 KB |
Output is correct |
111 |
Correct |
0 ms |
348 KB |
Output is correct |
112 |
Correct |
0 ms |
348 KB |
Output is correct |
113 |
Correct |
0 ms |
348 KB |
Output is correct |
114 |
Correct |
0 ms |
348 KB |
Output is correct |
115 |
Correct |
996 ms |
65376 KB |
Output is correct |
116 |
Correct |
498 ms |
38184 KB |
Output is correct |
117 |
Correct |
529 ms |
39800 KB |
Output is correct |
118 |
Correct |
541 ms |
41248 KB |
Output is correct |
119 |
Correct |
1002 ms |
63176 KB |
Output is correct |
120 |
Correct |
1085 ms |
67592 KB |
Output is correct |
121 |
Correct |
1086 ms |
67544 KB |
Output is correct |
122 |
Correct |
911 ms |
64692 KB |
Output is correct |
123 |
Correct |
936 ms |
64972 KB |
Output is correct |
124 |
Correct |
1090 ms |
72048 KB |
Output is correct |
125 |
Correct |
1118 ms |
72296 KB |
Output is correct |
126 |
Correct |
0 ms |
348 KB |
Output is correct |
127 |
Correct |
0 ms |
436 KB |
Output is correct |
128 |
Correct |
0 ms |
344 KB |
Output is correct |
129 |
Correct |
0 ms |
348 KB |
Output is correct |
130 |
Correct |
0 ms |
348 KB |
Output is correct |
131 |
Correct |
82 ms |
7372 KB |
Output is correct |
132 |
Correct |
2163 ms |
131028 KB |
Output is correct |
133 |
Correct |
2238 ms |
131252 KB |
Output is correct |
134 |
Correct |
2210 ms |
133780 KB |
Output is correct |
135 |
Correct |
2196 ms |
147200 KB |
Output is correct |
136 |
Correct |
2132 ms |
128712 KB |
Output is correct |
137 |
Correct |
1498 ms |
94840 KB |
Output is correct |
138 |
Correct |
1529 ms |
95196 KB |
Output is correct |
139 |
Correct |
1034 ms |
104688 KB |
Output is correct |
140 |
Correct |
1410 ms |
109660 KB |
Output is correct |
141 |
Correct |
2115 ms |
132844 KB |
Output is correct |
142 |
Correct |
2157 ms |
132936 KB |
Output is correct |