Submission #924569

# Submission time Handle Problem Language Result Execution time Memory
924569 2024-02-09T08:20:14 Z ttamx Council (JOI23_council) C++14
100 / 100
498 ms 18872 KB
#include<bits/stdc++.h>

using namespace std;

using pi = pair<int,int>;
using ppi = pair<pi,pi>;

const int N=3e5+5;
const int M=25;
const int K=(1<<20)+5;

int n,m;
int a[N],cnt[M];
ppi dp[K];

void upd(ppi &x,pi v){
    if(v.second==x.first.second)return void(x.first=min(x.first,v));
    x.second=min(x.second,v);
    if(x.first>x.second)swap(x.first,x.second);
}

void upd(ppi &x,ppi y){
    upd(x,y.first);
    upd(x,y.second);
}

int main(){
    cin.tie(nullptr)->sync_with_stdio(false);
    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;
        }
    }
    for(int i=0;i<1<<m;i++)dp[i]=ppi(pi(m,0),pi(m,0));
    for(int i=1;i<=n;i++)upd(dp[a[i]],pi(0,i));
    for(int k=1;k<1<<m;k<<=1){
        for(int i=0;i<1<<m;i+=k<<1){
            for(int j=0;j<k;j++){
                int u=i+j,v=i+j+k;
                auto du=dp[u],dv=dp[v];
                dp[v].first.first++;
                dp[v].second.first++;
                upd(dp[u],dv);
                upd(dp[v],du);
            }
        }
    }
    for(int i=1;i<=n;i++){
        int mask=0,ans=0;
        for(int j=0;j<m;j++){
            int res=cnt[j]-(a[i]>>j&1);
            if(res==n/2)mask|=1<<j;
            if(res>=n/2)ans++;
        }
        cout << ans-(dp[mask].first.second!=i?dp[mask].first:dp[mask].second).first << "\n";
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
5 Correct 94 ms 17032 KB Output is correct
6 Correct 88 ms 16988 KB Output is correct
7 Correct 97 ms 17028 KB Output is correct
8 Correct 104 ms 16988 KB Output is correct
9 Correct 141 ms 17236 KB Output is correct
10 Correct 96 ms 16988 KB Output is correct
11 Correct 109 ms 17028 KB Output is correct
12 Correct 140 ms 16988 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 0 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 0 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2392 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 0 ms 2396 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2392 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 1 ms 2648 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 0 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 0 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 2 ms 4700 KB Output is correct
42 Correct 2 ms 4700 KB Output is correct
43 Correct 2 ms 4700 KB Output is correct
44 Correct 2 ms 4700 KB Output is correct
45 Correct 2 ms 4700 KB Output is correct
46 Correct 10 ms 4700 KB Output is correct
47 Correct 11 ms 4560 KB Output is correct
48 Correct 12 ms 4700 KB Output is correct
49 Correct 11 ms 4700 KB Output is correct
50 Correct 12 ms 4696 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
5 Correct 94 ms 17032 KB Output is correct
6 Correct 88 ms 16988 KB Output is correct
7 Correct 97 ms 17028 KB Output is correct
8 Correct 104 ms 16988 KB Output is correct
9 Correct 141 ms 17236 KB Output is correct
10 Correct 96 ms 16988 KB Output is correct
11 Correct 109 ms 17028 KB Output is correct
12 Correct 140 ms 16988 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 0 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 0 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2392 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 0 ms 2396 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2392 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 1 ms 2648 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 0 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 0 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 2 ms 4700 KB Output is correct
42 Correct 2 ms 4700 KB Output is correct
43 Correct 2 ms 4700 KB Output is correct
44 Correct 2 ms 4700 KB Output is correct
45 Correct 2 ms 4700 KB Output is correct
46 Correct 10 ms 4700 KB Output is correct
47 Correct 11 ms 4560 KB Output is correct
48 Correct 12 ms 4700 KB Output is correct
49 Correct 11 ms 4700 KB Output is correct
50 Correct 12 ms 4696 KB Output is correct
51 Correct 90 ms 16988 KB Output is correct
52 Correct 91 ms 17032 KB Output is correct
53 Correct 171 ms 17040 KB Output is correct
54 Correct 177 ms 17232 KB Output is correct
55 Correct 1 ms 2392 KB Output is correct
56 Correct 25 ms 4700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2396 KB Output is correct
2 Correct 38 ms 3980 KB Output is correct
3 Correct 37 ms 3932 KB Output is correct
4 Correct 28 ms 3928 KB Output is correct
5 Correct 41 ms 3924 KB Output is correct
6 Correct 30 ms 3916 KB Output is correct
7 Correct 44 ms 3924 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2396 KB Output is correct
2 Correct 38 ms 3980 KB Output is correct
3 Correct 37 ms 3932 KB Output is correct
4 Correct 28 ms 3928 KB Output is correct
5 Correct 41 ms 3924 KB Output is correct
6 Correct 30 ms 3916 KB Output is correct
7 Correct 44 ms 3924 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2512 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 147 ms 4044 KB Output is correct
21 Correct 140 ms 4016 KB Output is correct
22 Correct 135 ms 3924 KB Output is correct
23 Correct 130 ms 4180 KB Output is correct
24 Correct 122 ms 4160 KB Output is correct
25 Correct 139 ms 3880 KB Output is correct
26 Correct 159 ms 4052 KB Output is correct
27 Correct 1 ms 2392 KB Output is correct
28 Correct 0 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2392 KB Output is correct
32 Correct 1 ms 2392 KB Output is correct
33 Correct 1 ms 2396 KB Output is correct
34 Correct 0 ms 2396 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 1 ms 2392 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 0 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 1 ms 2396 KB Output is correct
42 Correct 1 ms 2396 KB Output is correct
43 Correct 1 ms 2392 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2396 KB Output is correct
2 Correct 38 ms 3980 KB Output is correct
3 Correct 37 ms 3932 KB Output is correct
4 Correct 28 ms 3928 KB Output is correct
5 Correct 41 ms 3924 KB Output is correct
6 Correct 30 ms 3916 KB Output is correct
7 Correct 44 ms 3924 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2512 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 147 ms 4044 KB Output is correct
21 Correct 140 ms 4016 KB Output is correct
22 Correct 135 ms 3924 KB Output is correct
23 Correct 130 ms 4180 KB Output is correct
24 Correct 122 ms 4160 KB Output is correct
25 Correct 139 ms 3880 KB Output is correct
26 Correct 159 ms 4052 KB Output is correct
27 Correct 1 ms 2392 KB Output is correct
28 Correct 0 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2392 KB Output is correct
32 Correct 1 ms 2392 KB Output is correct
33 Correct 1 ms 2396 KB Output is correct
34 Correct 0 ms 2396 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 1 ms 2392 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 0 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 1 ms 2396 KB Output is correct
42 Correct 1 ms 2396 KB Output is correct
43 Correct 1 ms 2392 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
46 Correct 1 ms 2392 KB Output is correct
47 Correct 205 ms 6184 KB Output is correct
48 Correct 192 ms 4180 KB Output is correct
49 Correct 189 ms 4028 KB Output is correct
50 Correct 184 ms 6484 KB Output is correct
51 Correct 161 ms 6156 KB Output is correct
52 Correct 194 ms 6212 KB Output is correct
53 Correct 215 ms 6740 KB Output is correct
54 Correct 2 ms 4700 KB Output is correct
55 Correct 2 ms 4700 KB Output is correct
56 Correct 2 ms 4700 KB Output is correct
57 Correct 2 ms 4700 KB Output is correct
58 Correct 2 ms 4740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2396 KB Output is correct
2 Correct 38 ms 3980 KB Output is correct
3 Correct 37 ms 3932 KB Output is correct
4 Correct 28 ms 3928 KB Output is correct
5 Correct 41 ms 3924 KB Output is correct
6 Correct 30 ms 3916 KB Output is correct
7 Correct 44 ms 3924 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2512 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 147 ms 4044 KB Output is correct
21 Correct 140 ms 4016 KB Output is correct
22 Correct 135 ms 3924 KB Output is correct
23 Correct 130 ms 4180 KB Output is correct
24 Correct 122 ms 4160 KB Output is correct
25 Correct 139 ms 3880 KB Output is correct
26 Correct 159 ms 4052 KB Output is correct
27 Correct 1 ms 2392 KB Output is correct
28 Correct 0 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2392 KB Output is correct
32 Correct 1 ms 2392 KB Output is correct
33 Correct 1 ms 2396 KB Output is correct
34 Correct 0 ms 2396 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 1 ms 2392 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 0 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 1 ms 2396 KB Output is correct
42 Correct 1 ms 2396 KB Output is correct
43 Correct 1 ms 2392 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
46 Correct 1 ms 2392 KB Output is correct
47 Correct 205 ms 6184 KB Output is correct
48 Correct 192 ms 4180 KB Output is correct
49 Correct 189 ms 4028 KB Output is correct
50 Correct 184 ms 6484 KB Output is correct
51 Correct 161 ms 6156 KB Output is correct
52 Correct 194 ms 6212 KB Output is correct
53 Correct 215 ms 6740 KB Output is correct
54 Correct 2 ms 4700 KB Output is correct
55 Correct 2 ms 4700 KB Output is correct
56 Correct 2 ms 4700 KB Output is correct
57 Correct 2 ms 4700 KB Output is correct
58 Correct 2 ms 4740 KB Output is correct
59 Correct 227 ms 6584 KB Output is correct
60 Correct 110 ms 5204 KB Output is correct
61 Correct 120 ms 5204 KB Output is correct
62 Correct 121 ms 5316 KB Output is correct
63 Correct 238 ms 6224 KB Output is correct
64 Correct 277 ms 6228 KB Output is correct
65 Correct 261 ms 6228 KB Output is correct
66 Correct 230 ms 6780 KB Output is correct
67 Correct 199 ms 6228 KB Output is correct
68 Correct 247 ms 6244 KB Output is correct
69 Correct 271 ms 6492 KB Output is correct
70 Correct 10 ms 4700 KB Output is correct
71 Correct 10 ms 4700 KB Output is correct
72 Correct 13 ms 4700 KB Output is correct
73 Correct 11 ms 4696 KB Output is correct
74 Correct 12 ms 4696 KB Output is correct
75 Correct 25 ms 4948 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
5 Correct 94 ms 17032 KB Output is correct
6 Correct 88 ms 16988 KB Output is correct
7 Correct 97 ms 17028 KB Output is correct
8 Correct 104 ms 16988 KB Output is correct
9 Correct 141 ms 17236 KB Output is correct
10 Correct 96 ms 16988 KB Output is correct
11 Correct 109 ms 17028 KB Output is correct
12 Correct 140 ms 16988 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 0 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 1 ms 2396 KB Output is correct
19 Correct 0 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2392 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 0 ms 2396 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2392 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 1 ms 2648 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 0 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 0 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 2 ms 4700 KB Output is correct
42 Correct 2 ms 4700 KB Output is correct
43 Correct 2 ms 4700 KB Output is correct
44 Correct 2 ms 4700 KB Output is correct
45 Correct 2 ms 4700 KB Output is correct
46 Correct 10 ms 4700 KB Output is correct
47 Correct 11 ms 4560 KB Output is correct
48 Correct 12 ms 4700 KB Output is correct
49 Correct 11 ms 4700 KB Output is correct
50 Correct 12 ms 4696 KB Output is correct
51 Correct 90 ms 16988 KB Output is correct
52 Correct 91 ms 17032 KB Output is correct
53 Correct 171 ms 17040 KB Output is correct
54 Correct 177 ms 17232 KB Output is correct
55 Correct 1 ms 2392 KB Output is correct
56 Correct 25 ms 4700 KB Output is correct
57 Correct 0 ms 2396 KB Output is correct
58 Correct 38 ms 3980 KB Output is correct
59 Correct 37 ms 3932 KB Output is correct
60 Correct 28 ms 3928 KB Output is correct
61 Correct 41 ms 3924 KB Output is correct
62 Correct 30 ms 3916 KB Output is correct
63 Correct 44 ms 3924 KB Output is correct
64 Correct 0 ms 2396 KB Output is correct
65 Correct 0 ms 2396 KB Output is correct
66 Correct 1 ms 2396 KB Output is correct
67 Correct 1 ms 2396 KB Output is correct
68 Correct 0 ms 2396 KB Output is correct
69 Correct 1 ms 2396 KB Output is correct
70 Correct 1 ms 2396 KB Output is correct
71 Correct 1 ms 2396 KB Output is correct
72 Correct 0 ms 2396 KB Output is correct
73 Correct 1 ms 2512 KB Output is correct
74 Correct 1 ms 2396 KB Output is correct
75 Correct 1 ms 2396 KB Output is correct
76 Correct 147 ms 4044 KB Output is correct
77 Correct 140 ms 4016 KB Output is correct
78 Correct 135 ms 3924 KB Output is correct
79 Correct 130 ms 4180 KB Output is correct
80 Correct 122 ms 4160 KB Output is correct
81 Correct 139 ms 3880 KB Output is correct
82 Correct 159 ms 4052 KB Output is correct
83 Correct 1 ms 2392 KB Output is correct
84 Correct 0 ms 2396 KB Output is correct
85 Correct 0 ms 2396 KB Output is correct
86 Correct 1 ms 2396 KB Output is correct
87 Correct 1 ms 2392 KB Output is correct
88 Correct 1 ms 2392 KB Output is correct
89 Correct 1 ms 2396 KB Output is correct
90 Correct 0 ms 2396 KB Output is correct
91 Correct 1 ms 2396 KB Output is correct
92 Correct 1 ms 2396 KB Output is correct
93 Correct 1 ms 2392 KB Output is correct
94 Correct 1 ms 2396 KB Output is correct
95 Correct 0 ms 2396 KB Output is correct
96 Correct 1 ms 2396 KB Output is correct
97 Correct 1 ms 2396 KB Output is correct
98 Correct 1 ms 2396 KB Output is correct
99 Correct 1 ms 2392 KB Output is correct
100 Correct 1 ms 2396 KB Output is correct
101 Correct 1 ms 2396 KB Output is correct
102 Correct 1 ms 2392 KB Output is correct
103 Correct 205 ms 6184 KB Output is correct
104 Correct 192 ms 4180 KB Output is correct
105 Correct 189 ms 4028 KB Output is correct
106 Correct 184 ms 6484 KB Output is correct
107 Correct 161 ms 6156 KB Output is correct
108 Correct 194 ms 6212 KB Output is correct
109 Correct 215 ms 6740 KB Output is correct
110 Correct 2 ms 4700 KB Output is correct
111 Correct 2 ms 4700 KB Output is correct
112 Correct 2 ms 4700 KB Output is correct
113 Correct 2 ms 4700 KB Output is correct
114 Correct 2 ms 4740 KB Output is correct
115 Correct 227 ms 6584 KB Output is correct
116 Correct 110 ms 5204 KB Output is correct
117 Correct 120 ms 5204 KB Output is correct
118 Correct 121 ms 5316 KB Output is correct
119 Correct 238 ms 6224 KB Output is correct
120 Correct 277 ms 6228 KB Output is correct
121 Correct 261 ms 6228 KB Output is correct
122 Correct 230 ms 6780 KB Output is correct
123 Correct 199 ms 6228 KB Output is correct
124 Correct 247 ms 6244 KB Output is correct
125 Correct 271 ms 6492 KB Output is correct
126 Correct 10 ms 4700 KB Output is correct
127 Correct 10 ms 4700 KB Output is correct
128 Correct 13 ms 4700 KB Output is correct
129 Correct 11 ms 4696 KB Output is correct
130 Correct 12 ms 4696 KB Output is correct
131 Correct 25 ms 4948 KB Output is correct
132 Correct 440 ms 18772 KB Output is correct
133 Correct 438 ms 18532 KB Output is correct
134 Correct 433 ms 18768 KB Output is correct
135 Correct 484 ms 18772 KB Output is correct
136 Correct 476 ms 18872 KB Output is correct
137 Correct 353 ms 12376 KB Output is correct
138 Correct 358 ms 13140 KB Output is correct
139 Correct 332 ms 18772 KB Output is correct
140 Correct 314 ms 18556 KB Output is correct
141 Correct 460 ms 18516 KB Output is correct
142 Correct 498 ms 18756 KB Output is correct