#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
const int N = 3e5;
int ans[N+10];
vector< vector<int> > build(int n, int m, vector< vector<int> > &a){
vector<int> cnt(m);
for(int i = 0;i < n; i++){
for(int j = 0;j < m; j++){
cnt[j]+= a[i][j];
}
}
vector< vector<int> > res(n);
for(int i = 0;i < n; i++){
for(int j = 0;j < m; j++){
if(cnt[j] > (n / 2) + 1){
ans[i]++;
}
}
}
for(int i = 0;i < n; i++){
for(int j = 0;j < m; j++){
if(cnt[j] == n / 2){
res[i].push_back(a[i][j]);
}else if(cnt[j] == (n / 2) + 1){
res[i].push_back(a[i][j]);
}
}
}
return res;
}
pair<int, int> dp[2][1222][1222];
signed main(){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n, m; cin >> n >> m;
vector< vector<int> > a(n, vector<int>(m));
for(int i = 0;i < n; i++){
for(int j = 0;j < m; j++){
cin >> a[i][j];
}
}
a = build(n, m, a);
n = a.size();
m = a[0].size();
vector<int> cnt(m,0);
for(int i = 0;i < n; i++){
for(int j = 0;j < m; j++){
cnt[j]+= a[i][j];
}
}
vector<int> bits(n);
for(int i = 0;i < n; i++){
int mask = 0;
for(int j = 0;j < m; j++){
if(a[i][j]){
mask+= (1<<j);
}
}
bits[i] = mask;
}
for(int i = 0;i < 2; i++){
for(int j = 0;j < 1024; j++){
for(int k = 0;k < 1024; k++){
dp[i][j][k] = {-1, -1};
}
}
}
for(int i = 0;i < n; i++){
int m0 = bits[i] & 1023;
int m1 = bits[i]>>10;
for(int j = 0;j < 1024; j++){
int c = __builtin_popcount(m1 & j);
if(dp[0][m0][j].ff == -1){
dp[0][m0][j] = {c, i};
}else{
if(dp[0][m0][j].ff >= c){
dp[1][m0][j] = dp[0][m0][j];
dp[0][m0][j] = {c, i};
}else if(dp[1][m0][j].ff == -1 || dp[1][m0][j].ff >= c){
dp[1][m0][j] = {c, i};
}
}
}
}
for(int i = 0;i < n; i++){
int mask = 0, bc = 0;
for(int j = 0;j < m; j++){
if(bits[i] & (1<<j)){
if(cnt[j] == n/2 + 1){
bc++;
mask+= (1<<j);
}
}else{
if(cnt[j] == n / 2 + 1) bc++;
else{
mask+= (1<<j);
bc++;
}
}
}
int mn = m;
int m0 = mask & 1023;
int m1 = mask >> 10;
for(int j = 0;j < 1024; j++){
int c = __builtin_popcount(m0 & j);
if(dp[0][j][m1].ff == -1) continue;
int kek = 20;
if(dp[0][j][m1].ss != i && dp[0][j][m1].ss != -1){
kek = min(kek, dp[0][j][m1].ff);
}
if(dp[1][j][m1].ss != i && dp[1][j][m1].ss != -1){
kek = min(kek, dp[1][j][m1].ff);
}
mn = min(mn, kek + c);
}
ans[i] = ans[i] + bc - mn;
}
for(int i = 0;i < n; i++) cout << ans[i] << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
23132 KB |
Output is correct |
2 |
Correct |
5 ms |
23176 KB |
Output is correct |
3 |
Correct |
4 ms |
23132 KB |
Output is correct |
4 |
Correct |
5 ms |
23132 KB |
Output is correct |
5 |
Correct |
5 ms |
23132 KB |
Output is correct |
6 |
Correct |
6 ms |
23132 KB |
Output is correct |
7 |
Correct |
4 ms |
23208 KB |
Output is correct |
8 |
Correct |
5 ms |
23384 KB |
Output is correct |
9 |
Correct |
6 ms |
23132 KB |
Output is correct |
10 |
Correct |
5 ms |
23196 KB |
Output is correct |
11 |
Correct |
4 ms |
23128 KB |
Output is correct |
12 |
Correct |
9 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23132 KB |
Output is correct |
14 |
Correct |
5 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23132 KB |
Output is correct |
16 |
Correct |
4 ms |
23132 KB |
Output is correct |
17 |
Correct |
6 ms |
23132 KB |
Output is correct |
18 |
Correct |
5 ms |
23128 KB |
Output is correct |
19 |
Correct |
4 ms |
23132 KB |
Output is correct |
20 |
Correct |
5 ms |
23132 KB |
Output is correct |
21 |
Correct |
6 ms |
23132 KB |
Output is correct |
22 |
Correct |
4 ms |
23132 KB |
Output is correct |
23 |
Correct |
4 ms |
23132 KB |
Output is correct |
24 |
Correct |
4 ms |
23132 KB |
Output is correct |
25 |
Correct |
4 ms |
23132 KB |
Output is correct |
26 |
Correct |
5 ms |
23212 KB |
Output is correct |
27 |
Correct |
4 ms |
23132 KB |
Output is correct |
28 |
Correct |
5 ms |
23132 KB |
Output is correct |
29 |
Correct |
4 ms |
23132 KB |
Output is correct |
30 |
Correct |
5 ms |
23132 KB |
Output is correct |
31 |
Correct |
6 ms |
23132 KB |
Output is correct |
32 |
Correct |
5 ms |
23132 KB |
Output is correct |
33 |
Correct |
5 ms |
23132 KB |
Output is correct |
34 |
Correct |
4 ms |
23224 KB |
Output is correct |
35 |
Correct |
6 ms |
23132 KB |
Output is correct |
36 |
Correct |
4 ms |
22996 KB |
Output is correct |
37 |
Correct |
4 ms |
23132 KB |
Output is correct |
38 |
Correct |
4 ms |
23192 KB |
Output is correct |
39 |
Correct |
5 ms |
23132 KB |
Output is correct |
40 |
Correct |
6 ms |
23128 KB |
Output is correct |
41 |
Correct |
4 ms |
23132 KB |
Output is correct |
42 |
Correct |
5 ms |
23192 KB |
Output is correct |
43 |
Correct |
4 ms |
23128 KB |
Output is correct |
44 |
Correct |
4 ms |
23132 KB |
Output is correct |
45 |
Correct |
4 ms |
23132 KB |
Output is correct |
46 |
Correct |
4 ms |
23132 KB |
Output is correct |
47 |
Correct |
4 ms |
23384 KB |
Output is correct |
48 |
Correct |
4 ms |
23144 KB |
Output is correct |
49 |
Correct |
5 ms |
23128 KB |
Output is correct |
50 |
Correct |
7 ms |
23192 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
23132 KB |
Output is correct |
2 |
Correct |
5 ms |
23176 KB |
Output is correct |
3 |
Correct |
4 ms |
23132 KB |
Output is correct |
4 |
Correct |
5 ms |
23132 KB |
Output is correct |
5 |
Correct |
5 ms |
23132 KB |
Output is correct |
6 |
Correct |
6 ms |
23132 KB |
Output is correct |
7 |
Correct |
4 ms |
23208 KB |
Output is correct |
8 |
Correct |
5 ms |
23384 KB |
Output is correct |
9 |
Correct |
6 ms |
23132 KB |
Output is correct |
10 |
Correct |
5 ms |
23196 KB |
Output is correct |
11 |
Correct |
4 ms |
23128 KB |
Output is correct |
12 |
Correct |
9 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23132 KB |
Output is correct |
14 |
Correct |
5 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23132 KB |
Output is correct |
16 |
Correct |
4 ms |
23132 KB |
Output is correct |
17 |
Correct |
6 ms |
23132 KB |
Output is correct |
18 |
Correct |
5 ms |
23128 KB |
Output is correct |
19 |
Correct |
4 ms |
23132 KB |
Output is correct |
20 |
Correct |
5 ms |
23132 KB |
Output is correct |
21 |
Correct |
6 ms |
23132 KB |
Output is correct |
22 |
Correct |
4 ms |
23132 KB |
Output is correct |
23 |
Correct |
4 ms |
23132 KB |
Output is correct |
24 |
Correct |
4 ms |
23132 KB |
Output is correct |
25 |
Correct |
4 ms |
23132 KB |
Output is correct |
26 |
Correct |
5 ms |
23212 KB |
Output is correct |
27 |
Correct |
4 ms |
23132 KB |
Output is correct |
28 |
Correct |
5 ms |
23132 KB |
Output is correct |
29 |
Correct |
4 ms |
23132 KB |
Output is correct |
30 |
Correct |
5 ms |
23132 KB |
Output is correct |
31 |
Correct |
6 ms |
23132 KB |
Output is correct |
32 |
Correct |
5 ms |
23132 KB |
Output is correct |
33 |
Correct |
5 ms |
23132 KB |
Output is correct |
34 |
Correct |
4 ms |
23224 KB |
Output is correct |
35 |
Correct |
6 ms |
23132 KB |
Output is correct |
36 |
Correct |
4 ms |
22996 KB |
Output is correct |
37 |
Correct |
4 ms |
23132 KB |
Output is correct |
38 |
Correct |
4 ms |
23192 KB |
Output is correct |
39 |
Correct |
5 ms |
23132 KB |
Output is correct |
40 |
Correct |
6 ms |
23128 KB |
Output is correct |
41 |
Correct |
4 ms |
23132 KB |
Output is correct |
42 |
Correct |
5 ms |
23192 KB |
Output is correct |
43 |
Correct |
4 ms |
23128 KB |
Output is correct |
44 |
Correct |
4 ms |
23132 KB |
Output is correct |
45 |
Correct |
4 ms |
23132 KB |
Output is correct |
46 |
Correct |
4 ms |
23132 KB |
Output is correct |
47 |
Correct |
4 ms |
23384 KB |
Output is correct |
48 |
Correct |
4 ms |
23144 KB |
Output is correct |
49 |
Correct |
5 ms |
23128 KB |
Output is correct |
50 |
Correct |
7 ms |
23192 KB |
Output is correct |
51 |
Correct |
22 ms |
23644 KB |
Output is correct |
52 |
Correct |
22 ms |
23644 KB |
Output is correct |
53 |
Correct |
43 ms |
23772 KB |
Output is correct |
54 |
Correct |
64 ms |
24172 KB |
Output is correct |
55 |
Correct |
20 ms |
23384 KB |
Output is correct |
56 |
Correct |
35 ms |
23900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
23132 KB |
Output is correct |
2 |
Correct |
1583 ms |
42164 KB |
Output is correct |
3 |
Correct |
1569 ms |
42456 KB |
Output is correct |
4 |
Correct |
1560 ms |
41692 KB |
Output is correct |
5 |
Correct |
1577 ms |
41940 KB |
Output is correct |
6 |
Correct |
1593 ms |
51080 KB |
Output is correct |
7 |
Correct |
1629 ms |
51384 KB |
Output is correct |
8 |
Correct |
4 ms |
23132 KB |
Output is correct |
9 |
Correct |
5 ms |
23128 KB |
Output is correct |
10 |
Correct |
5 ms |
23132 KB |
Output is correct |
11 |
Correct |
4 ms |
23132 KB |
Output is correct |
12 |
Correct |
6 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23128 KB |
Output is correct |
14 |
Correct |
4 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23192 KB |
Output is correct |
16 |
Correct |
6 ms |
23132 KB |
Output is correct |
17 |
Correct |
22 ms |
23772 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
23132 KB |
Output is correct |
2 |
Correct |
1583 ms |
42164 KB |
Output is correct |
3 |
Correct |
1569 ms |
42456 KB |
Output is correct |
4 |
Correct |
1560 ms |
41692 KB |
Output is correct |
5 |
Correct |
1577 ms |
41940 KB |
Output is correct |
6 |
Correct |
1593 ms |
51080 KB |
Output is correct |
7 |
Correct |
1629 ms |
51384 KB |
Output is correct |
8 |
Correct |
4 ms |
23132 KB |
Output is correct |
9 |
Correct |
5 ms |
23128 KB |
Output is correct |
10 |
Correct |
5 ms |
23132 KB |
Output is correct |
11 |
Correct |
4 ms |
23132 KB |
Output is correct |
12 |
Correct |
6 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23128 KB |
Output is correct |
14 |
Correct |
4 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23192 KB |
Output is correct |
16 |
Correct |
6 ms |
23132 KB |
Output is correct |
17 |
Correct |
22 ms |
23772 KB |
Output is correct |
18 |
Correct |
4 ms |
23128 KB |
Output is correct |
19 |
Correct |
4 ms |
23132 KB |
Output is correct |
20 |
Correct |
1964 ms |
72688 KB |
Output is correct |
21 |
Correct |
1849 ms |
72268 KB |
Output is correct |
22 |
Correct |
1830 ms |
72252 KB |
Output is correct |
23 |
Correct |
1662 ms |
49348 KB |
Output is correct |
24 |
Correct |
1663 ms |
49100 KB |
Output is correct |
25 |
Correct |
1687 ms |
49108 KB |
Output is correct |
26 |
Correct |
2277 ms |
72684 KB |
Output is correct |
27 |
Correct |
4 ms |
23132 KB |
Output is correct |
28 |
Correct |
5 ms |
23132 KB |
Output is correct |
29 |
Correct |
4 ms |
23128 KB |
Output is correct |
30 |
Correct |
4 ms |
23132 KB |
Output is correct |
31 |
Correct |
5 ms |
23132 KB |
Output is correct |
32 |
Correct |
4 ms |
23132 KB |
Output is correct |
33 |
Correct |
4 ms |
23212 KB |
Output is correct |
34 |
Correct |
4 ms |
23132 KB |
Output is correct |
35 |
Correct |
5 ms |
23132 KB |
Output is correct |
36 |
Correct |
6 ms |
23132 KB |
Output is correct |
37 |
Correct |
4 ms |
23132 KB |
Output is correct |
38 |
Correct |
4 ms |
23128 KB |
Output is correct |
39 |
Correct |
4 ms |
23132 KB |
Output is correct |
40 |
Correct |
5 ms |
23132 KB |
Output is correct |
41 |
Correct |
4 ms |
23132 KB |
Output is correct |
42 |
Correct |
5 ms |
23132 KB |
Output is correct |
43 |
Correct |
4 ms |
23132 KB |
Output is correct |
44 |
Correct |
5 ms |
23212 KB |
Output is correct |
45 |
Correct |
6 ms |
23272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
23132 KB |
Output is correct |
2 |
Correct |
1583 ms |
42164 KB |
Output is correct |
3 |
Correct |
1569 ms |
42456 KB |
Output is correct |
4 |
Correct |
1560 ms |
41692 KB |
Output is correct |
5 |
Correct |
1577 ms |
41940 KB |
Output is correct |
6 |
Correct |
1593 ms |
51080 KB |
Output is correct |
7 |
Correct |
1629 ms |
51384 KB |
Output is correct |
8 |
Correct |
4 ms |
23132 KB |
Output is correct |
9 |
Correct |
5 ms |
23128 KB |
Output is correct |
10 |
Correct |
5 ms |
23132 KB |
Output is correct |
11 |
Correct |
4 ms |
23132 KB |
Output is correct |
12 |
Correct |
6 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23128 KB |
Output is correct |
14 |
Correct |
4 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23192 KB |
Output is correct |
16 |
Correct |
6 ms |
23132 KB |
Output is correct |
17 |
Correct |
22 ms |
23772 KB |
Output is correct |
18 |
Correct |
4 ms |
23128 KB |
Output is correct |
19 |
Correct |
4 ms |
23132 KB |
Output is correct |
20 |
Correct |
1964 ms |
72688 KB |
Output is correct |
21 |
Correct |
1849 ms |
72268 KB |
Output is correct |
22 |
Correct |
1830 ms |
72252 KB |
Output is correct |
23 |
Correct |
1662 ms |
49348 KB |
Output is correct |
24 |
Correct |
1663 ms |
49100 KB |
Output is correct |
25 |
Correct |
1687 ms |
49108 KB |
Output is correct |
26 |
Correct |
2277 ms |
72684 KB |
Output is correct |
27 |
Correct |
4 ms |
23132 KB |
Output is correct |
28 |
Correct |
5 ms |
23132 KB |
Output is correct |
29 |
Correct |
4 ms |
23128 KB |
Output is correct |
30 |
Correct |
4 ms |
23132 KB |
Output is correct |
31 |
Correct |
5 ms |
23132 KB |
Output is correct |
32 |
Correct |
4 ms |
23132 KB |
Output is correct |
33 |
Correct |
4 ms |
23212 KB |
Output is correct |
34 |
Correct |
4 ms |
23132 KB |
Output is correct |
35 |
Correct |
5 ms |
23132 KB |
Output is correct |
36 |
Correct |
6 ms |
23132 KB |
Output is correct |
37 |
Correct |
4 ms |
23132 KB |
Output is correct |
38 |
Correct |
4 ms |
23128 KB |
Output is correct |
39 |
Correct |
4 ms |
23132 KB |
Output is correct |
40 |
Correct |
5 ms |
23132 KB |
Output is correct |
41 |
Correct |
4 ms |
23132 KB |
Output is correct |
42 |
Correct |
5 ms |
23132 KB |
Output is correct |
43 |
Correct |
4 ms |
23132 KB |
Output is correct |
44 |
Correct |
5 ms |
23212 KB |
Output is correct |
45 |
Correct |
6 ms |
23272 KB |
Output is correct |
46 |
Correct |
4 ms |
23132 KB |
Output is correct |
47 |
Correct |
2487 ms |
78912 KB |
Output is correct |
48 |
Correct |
2331 ms |
78144 KB |
Output is correct |
49 |
Correct |
2364 ms |
78260 KB |
Output is correct |
50 |
Correct |
1725 ms |
55344 KB |
Output is correct |
51 |
Correct |
1715 ms |
55180 KB |
Output is correct |
52 |
Correct |
1728 ms |
55312 KB |
Output is correct |
53 |
Correct |
2587 ms |
78916 KB |
Output is correct |
54 |
Correct |
4 ms |
23132 KB |
Output is correct |
55 |
Correct |
4 ms |
23132 KB |
Output is correct |
56 |
Correct |
4 ms |
23132 KB |
Output is correct |
57 |
Correct |
5 ms |
23380 KB |
Output is correct |
58 |
Correct |
4 ms |
23132 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
23132 KB |
Output is correct |
2 |
Correct |
1583 ms |
42164 KB |
Output is correct |
3 |
Correct |
1569 ms |
42456 KB |
Output is correct |
4 |
Correct |
1560 ms |
41692 KB |
Output is correct |
5 |
Correct |
1577 ms |
41940 KB |
Output is correct |
6 |
Correct |
1593 ms |
51080 KB |
Output is correct |
7 |
Correct |
1629 ms |
51384 KB |
Output is correct |
8 |
Correct |
4 ms |
23132 KB |
Output is correct |
9 |
Correct |
5 ms |
23128 KB |
Output is correct |
10 |
Correct |
5 ms |
23132 KB |
Output is correct |
11 |
Correct |
4 ms |
23132 KB |
Output is correct |
12 |
Correct |
6 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23128 KB |
Output is correct |
14 |
Correct |
4 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23192 KB |
Output is correct |
16 |
Correct |
6 ms |
23132 KB |
Output is correct |
17 |
Correct |
22 ms |
23772 KB |
Output is correct |
18 |
Correct |
4 ms |
23128 KB |
Output is correct |
19 |
Correct |
4 ms |
23132 KB |
Output is correct |
20 |
Correct |
1964 ms |
72688 KB |
Output is correct |
21 |
Correct |
1849 ms |
72268 KB |
Output is correct |
22 |
Correct |
1830 ms |
72252 KB |
Output is correct |
23 |
Correct |
1662 ms |
49348 KB |
Output is correct |
24 |
Correct |
1663 ms |
49100 KB |
Output is correct |
25 |
Correct |
1687 ms |
49108 KB |
Output is correct |
26 |
Correct |
2277 ms |
72684 KB |
Output is correct |
27 |
Correct |
4 ms |
23132 KB |
Output is correct |
28 |
Correct |
5 ms |
23132 KB |
Output is correct |
29 |
Correct |
4 ms |
23128 KB |
Output is correct |
30 |
Correct |
4 ms |
23132 KB |
Output is correct |
31 |
Correct |
5 ms |
23132 KB |
Output is correct |
32 |
Correct |
4 ms |
23132 KB |
Output is correct |
33 |
Correct |
4 ms |
23212 KB |
Output is correct |
34 |
Correct |
4 ms |
23132 KB |
Output is correct |
35 |
Correct |
5 ms |
23132 KB |
Output is correct |
36 |
Correct |
6 ms |
23132 KB |
Output is correct |
37 |
Correct |
4 ms |
23132 KB |
Output is correct |
38 |
Correct |
4 ms |
23128 KB |
Output is correct |
39 |
Correct |
4 ms |
23132 KB |
Output is correct |
40 |
Correct |
5 ms |
23132 KB |
Output is correct |
41 |
Correct |
4 ms |
23132 KB |
Output is correct |
42 |
Correct |
5 ms |
23132 KB |
Output is correct |
43 |
Correct |
4 ms |
23132 KB |
Output is correct |
44 |
Correct |
5 ms |
23212 KB |
Output is correct |
45 |
Correct |
6 ms |
23272 KB |
Output is correct |
46 |
Correct |
4 ms |
23132 KB |
Output is correct |
47 |
Correct |
2487 ms |
78912 KB |
Output is correct |
48 |
Correct |
2331 ms |
78144 KB |
Output is correct |
49 |
Correct |
2364 ms |
78260 KB |
Output is correct |
50 |
Correct |
1725 ms |
55344 KB |
Output is correct |
51 |
Correct |
1715 ms |
55180 KB |
Output is correct |
52 |
Correct |
1728 ms |
55312 KB |
Output is correct |
53 |
Correct |
2587 ms |
78916 KB |
Output is correct |
54 |
Correct |
4 ms |
23132 KB |
Output is correct |
55 |
Correct |
4 ms |
23132 KB |
Output is correct |
56 |
Correct |
4 ms |
23132 KB |
Output is correct |
57 |
Correct |
5 ms |
23380 KB |
Output is correct |
58 |
Correct |
4 ms |
23132 KB |
Output is correct |
59 |
Correct |
1775 ms |
60528 KB |
Output is correct |
60 |
Correct |
1345 ms |
53976 KB |
Output is correct |
61 |
Correct |
1368 ms |
56020 KB |
Output is correct |
62 |
Correct |
1465 ms |
57240 KB |
Output is correct |
63 |
Correct |
3270 ms |
83940 KB |
Output is correct |
64 |
Correct |
3477 ms |
102944 KB |
Output is correct |
65 |
Correct |
3409 ms |
102912 KB |
Output is correct |
66 |
Correct |
1731 ms |
60888 KB |
Output is correct |
67 |
Correct |
1759 ms |
60380 KB |
Output is correct |
68 |
Correct |
1775 ms |
60524 KB |
Output is correct |
69 |
Correct |
3249 ms |
98612 KB |
Output is correct |
70 |
Correct |
4 ms |
23132 KB |
Output is correct |
71 |
Correct |
4 ms |
23132 KB |
Output is correct |
72 |
Correct |
4 ms |
23128 KB |
Output is correct |
73 |
Correct |
4 ms |
23128 KB |
Output is correct |
74 |
Correct |
4 ms |
23132 KB |
Output is correct |
75 |
Correct |
35 ms |
24012 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
23132 KB |
Output is correct |
2 |
Correct |
5 ms |
23176 KB |
Output is correct |
3 |
Correct |
4 ms |
23132 KB |
Output is correct |
4 |
Correct |
5 ms |
23132 KB |
Output is correct |
5 |
Correct |
5 ms |
23132 KB |
Output is correct |
6 |
Correct |
6 ms |
23132 KB |
Output is correct |
7 |
Correct |
4 ms |
23208 KB |
Output is correct |
8 |
Correct |
5 ms |
23384 KB |
Output is correct |
9 |
Correct |
6 ms |
23132 KB |
Output is correct |
10 |
Correct |
5 ms |
23196 KB |
Output is correct |
11 |
Correct |
4 ms |
23128 KB |
Output is correct |
12 |
Correct |
9 ms |
23132 KB |
Output is correct |
13 |
Correct |
5 ms |
23132 KB |
Output is correct |
14 |
Correct |
5 ms |
23132 KB |
Output is correct |
15 |
Correct |
4 ms |
23132 KB |
Output is correct |
16 |
Correct |
4 ms |
23132 KB |
Output is correct |
17 |
Correct |
6 ms |
23132 KB |
Output is correct |
18 |
Correct |
5 ms |
23128 KB |
Output is correct |
19 |
Correct |
4 ms |
23132 KB |
Output is correct |
20 |
Correct |
5 ms |
23132 KB |
Output is correct |
21 |
Correct |
6 ms |
23132 KB |
Output is correct |
22 |
Correct |
4 ms |
23132 KB |
Output is correct |
23 |
Correct |
4 ms |
23132 KB |
Output is correct |
24 |
Correct |
4 ms |
23132 KB |
Output is correct |
25 |
Correct |
4 ms |
23132 KB |
Output is correct |
26 |
Correct |
5 ms |
23212 KB |
Output is correct |
27 |
Correct |
4 ms |
23132 KB |
Output is correct |
28 |
Correct |
5 ms |
23132 KB |
Output is correct |
29 |
Correct |
4 ms |
23132 KB |
Output is correct |
30 |
Correct |
5 ms |
23132 KB |
Output is correct |
31 |
Correct |
6 ms |
23132 KB |
Output is correct |
32 |
Correct |
5 ms |
23132 KB |
Output is correct |
33 |
Correct |
5 ms |
23132 KB |
Output is correct |
34 |
Correct |
4 ms |
23224 KB |
Output is correct |
35 |
Correct |
6 ms |
23132 KB |
Output is correct |
36 |
Correct |
4 ms |
22996 KB |
Output is correct |
37 |
Correct |
4 ms |
23132 KB |
Output is correct |
38 |
Correct |
4 ms |
23192 KB |
Output is correct |
39 |
Correct |
5 ms |
23132 KB |
Output is correct |
40 |
Correct |
6 ms |
23128 KB |
Output is correct |
41 |
Correct |
4 ms |
23132 KB |
Output is correct |
42 |
Correct |
5 ms |
23192 KB |
Output is correct |
43 |
Correct |
4 ms |
23128 KB |
Output is correct |
44 |
Correct |
4 ms |
23132 KB |
Output is correct |
45 |
Correct |
4 ms |
23132 KB |
Output is correct |
46 |
Correct |
4 ms |
23132 KB |
Output is correct |
47 |
Correct |
4 ms |
23384 KB |
Output is correct |
48 |
Correct |
4 ms |
23144 KB |
Output is correct |
49 |
Correct |
5 ms |
23128 KB |
Output is correct |
50 |
Correct |
7 ms |
23192 KB |
Output is correct |
51 |
Correct |
22 ms |
23644 KB |
Output is correct |
52 |
Correct |
22 ms |
23644 KB |
Output is correct |
53 |
Correct |
43 ms |
23772 KB |
Output is correct |
54 |
Correct |
64 ms |
24172 KB |
Output is correct |
55 |
Correct |
20 ms |
23384 KB |
Output is correct |
56 |
Correct |
35 ms |
23900 KB |
Output is correct |
57 |
Correct |
4 ms |
23132 KB |
Output is correct |
58 |
Correct |
1583 ms |
42164 KB |
Output is correct |
59 |
Correct |
1569 ms |
42456 KB |
Output is correct |
60 |
Correct |
1560 ms |
41692 KB |
Output is correct |
61 |
Correct |
1577 ms |
41940 KB |
Output is correct |
62 |
Correct |
1593 ms |
51080 KB |
Output is correct |
63 |
Correct |
1629 ms |
51384 KB |
Output is correct |
64 |
Correct |
4 ms |
23132 KB |
Output is correct |
65 |
Correct |
5 ms |
23128 KB |
Output is correct |
66 |
Correct |
5 ms |
23132 KB |
Output is correct |
67 |
Correct |
4 ms |
23132 KB |
Output is correct |
68 |
Correct |
6 ms |
23132 KB |
Output is correct |
69 |
Correct |
5 ms |
23128 KB |
Output is correct |
70 |
Correct |
4 ms |
23132 KB |
Output is correct |
71 |
Correct |
4 ms |
23192 KB |
Output is correct |
72 |
Correct |
6 ms |
23132 KB |
Output is correct |
73 |
Correct |
22 ms |
23772 KB |
Output is correct |
74 |
Correct |
4 ms |
23128 KB |
Output is correct |
75 |
Correct |
4 ms |
23132 KB |
Output is correct |
76 |
Correct |
1964 ms |
72688 KB |
Output is correct |
77 |
Correct |
1849 ms |
72268 KB |
Output is correct |
78 |
Correct |
1830 ms |
72252 KB |
Output is correct |
79 |
Correct |
1662 ms |
49348 KB |
Output is correct |
80 |
Correct |
1663 ms |
49100 KB |
Output is correct |
81 |
Correct |
1687 ms |
49108 KB |
Output is correct |
82 |
Correct |
2277 ms |
72684 KB |
Output is correct |
83 |
Correct |
4 ms |
23132 KB |
Output is correct |
84 |
Correct |
5 ms |
23132 KB |
Output is correct |
85 |
Correct |
4 ms |
23128 KB |
Output is correct |
86 |
Correct |
4 ms |
23132 KB |
Output is correct |
87 |
Correct |
5 ms |
23132 KB |
Output is correct |
88 |
Correct |
4 ms |
23132 KB |
Output is correct |
89 |
Correct |
4 ms |
23212 KB |
Output is correct |
90 |
Correct |
4 ms |
23132 KB |
Output is correct |
91 |
Correct |
5 ms |
23132 KB |
Output is correct |
92 |
Correct |
6 ms |
23132 KB |
Output is correct |
93 |
Correct |
4 ms |
23132 KB |
Output is correct |
94 |
Correct |
4 ms |
23128 KB |
Output is correct |
95 |
Correct |
4 ms |
23132 KB |
Output is correct |
96 |
Correct |
5 ms |
23132 KB |
Output is correct |
97 |
Correct |
4 ms |
23132 KB |
Output is correct |
98 |
Correct |
5 ms |
23132 KB |
Output is correct |
99 |
Correct |
4 ms |
23132 KB |
Output is correct |
100 |
Correct |
5 ms |
23212 KB |
Output is correct |
101 |
Correct |
6 ms |
23272 KB |
Output is correct |
102 |
Correct |
4 ms |
23132 KB |
Output is correct |
103 |
Correct |
2487 ms |
78912 KB |
Output is correct |
104 |
Correct |
2331 ms |
78144 KB |
Output is correct |
105 |
Correct |
2364 ms |
78260 KB |
Output is correct |
106 |
Correct |
1725 ms |
55344 KB |
Output is correct |
107 |
Correct |
1715 ms |
55180 KB |
Output is correct |
108 |
Correct |
1728 ms |
55312 KB |
Output is correct |
109 |
Correct |
2587 ms |
78916 KB |
Output is correct |
110 |
Correct |
4 ms |
23132 KB |
Output is correct |
111 |
Correct |
4 ms |
23132 KB |
Output is correct |
112 |
Correct |
4 ms |
23132 KB |
Output is correct |
113 |
Correct |
5 ms |
23380 KB |
Output is correct |
114 |
Correct |
4 ms |
23132 KB |
Output is correct |
115 |
Correct |
1775 ms |
60528 KB |
Output is correct |
116 |
Correct |
1345 ms |
53976 KB |
Output is correct |
117 |
Correct |
1368 ms |
56020 KB |
Output is correct |
118 |
Correct |
1465 ms |
57240 KB |
Output is correct |
119 |
Correct |
3270 ms |
83940 KB |
Output is correct |
120 |
Correct |
3477 ms |
102944 KB |
Output is correct |
121 |
Correct |
3409 ms |
102912 KB |
Output is correct |
122 |
Correct |
1731 ms |
60888 KB |
Output is correct |
123 |
Correct |
1759 ms |
60380 KB |
Output is correct |
124 |
Correct |
1775 ms |
60524 KB |
Output is correct |
125 |
Correct |
3249 ms |
98612 KB |
Output is correct |
126 |
Correct |
4 ms |
23132 KB |
Output is correct |
127 |
Correct |
4 ms |
23132 KB |
Output is correct |
128 |
Correct |
4 ms |
23128 KB |
Output is correct |
129 |
Correct |
4 ms |
23128 KB |
Output is correct |
130 |
Correct |
4 ms |
23132 KB |
Output is correct |
131 |
Correct |
35 ms |
24012 KB |
Output is correct |
132 |
Execution timed out |
4043 ms |
101632 KB |
Time limit exceeded |
133 |
Halted |
0 ms |
0 KB |
- |