# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
754655 |
2023-06-08T08:33:19 Z |
vjudge1 |
Council (JOI23_council) |
C++17 |
|
3986 ms |
12904 KB |
// Judges with GCC >= 12 only needs Ofast
// #pragma GCC optimize("O3,no-stack-protector,fast-math,unroll-loops,tree-vectorize")
// MLE optimization
// #pragma GCC optimize("conserve-stack")
// Old judges
// #pragma GCC target("sse4.2,popcnt,lzcnt,abm,mmx,fma,bmi,bmi2")
// New judges. Test with assert(__builtin_cpu_supports("avx2"));
// #pragma GCC target("avx2,popcnt,lzcnt,abm,bmi,bmi2,fma,tune=native")
// Atcoder
// #pragma GCC target("avx2,popcnt,lzcnt,abm,bmi,bmi2,fma")
#include<bits/stdc++.h>
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
uniform_real_distribution<> pp(0.0,1.0);
#define ld long double
#define pii pair<int,int>
#define piii pair<int,pii>
#define fi first
#define se second
const int mod=998244353;
const int mod2=1e9+7;
const int maxn=300005;
const int bl=650;
const int maxs=650;
const int maxm=200005;
const int maxq=500005;
const int maxl=20;
const int maxa=1000005;
int power(int a,int n){
int res=1;
while(n){
if(n&1) res=res*a%mod;
a=a*a%mod;n>>=1;
}
return res;
}
int n,m,Min[1030][1030],num[25],cur[maxn],ok[1030][1030];
vector<int> x[1030];
void solve(){
cin >> n >> m;
for(int i=1;i<=n;i++){
for(int j=0;j<m;j++){
int a;cin >> a;
cur[i]+=a*(1<<j);
num[j]+=a;
}
x[cur[i]&((1<<(m/2))-1)].push_back(cur[i]>>(m/2));
}
for(int i=0;i<(1<<(m/2));i++){
for(int k:x[i]) ok[i][k]++;
for(int j=0;j<(1<<(m-m/2));j++){
Min[i][j]=m+1;
for(int k:x[i]) Min[i][j]=min(Min[i][j],__builtin_popcount(k&j));
}
}
for(int i=1;i<=n;i++){
int check=0,ans=0,add=m+1,f1=(cur[i]&((1<<(m/2))-1)),f2=cur[i]>>(m/2);
for(int j=0;j<m;j++){
int total=(num[j]-((cur[i]>>j)&1));
if(total==(n/2)) check^=(1<<j);
else if(total>(n/2)) ans++;
}
for(int j=0;j<(1<<m/2);j++){
if(j!=f1) add=min(add,__builtin_popcount(check&j)+Min[j][check>>(m/2)]);
else{
for(int k=0;k<(1<<(m-m/2));k++){
if(ok[j][k] && (k!=f2 || ok[j][k]>=2)) add=min(add,__builtin_popcount(check&j)+__builtin_popcount(k&(check>>(m/2))));
}
}
}
ans+=__builtin_popcount(check)-add;
cout << ans << '\n';
}
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
int test=1;//cin >> test;
while(test--) solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
596 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
4 ms |
4436 KB |
Output is correct |
6 |
Correct |
7 ms |
4504 KB |
Output is correct |
7 |
Correct |
5 ms |
4436 KB |
Output is correct |
8 |
Correct |
5 ms |
4564 KB |
Output is correct |
9 |
Correct |
9 ms |
5588 KB |
Output is correct |
10 |
Correct |
3 ms |
4436 KB |
Output is correct |
11 |
Correct |
3 ms |
4564 KB |
Output is correct |
12 |
Correct |
6 ms |
5460 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
0 ms |
340 KB |
Output is correct |
17 |
Correct |
0 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
0 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
0 ms |
468 KB |
Output is correct |
23 |
Correct |
0 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
1 ms |
340 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
468 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
468 KB |
Output is correct |
31 |
Correct |
2 ms |
596 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
468 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
468 KB |
Output is correct |
40 |
Correct |
1 ms |
596 KB |
Output is correct |
41 |
Correct |
1 ms |
852 KB |
Output is correct |
42 |
Correct |
1 ms |
852 KB |
Output is correct |
43 |
Correct |
1 ms |
852 KB |
Output is correct |
44 |
Correct |
1 ms |
852 KB |
Output is correct |
45 |
Correct |
1 ms |
852 KB |
Output is correct |
46 |
Correct |
1 ms |
1364 KB |
Output is correct |
47 |
Correct |
1 ms |
1364 KB |
Output is correct |
48 |
Correct |
1 ms |
1364 KB |
Output is correct |
49 |
Correct |
1 ms |
1364 KB |
Output is correct |
50 |
Correct |
1 ms |
1364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
596 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
4 ms |
4436 KB |
Output is correct |
6 |
Correct |
7 ms |
4504 KB |
Output is correct |
7 |
Correct |
5 ms |
4436 KB |
Output is correct |
8 |
Correct |
5 ms |
4564 KB |
Output is correct |
9 |
Correct |
9 ms |
5588 KB |
Output is correct |
10 |
Correct |
3 ms |
4436 KB |
Output is correct |
11 |
Correct |
3 ms |
4564 KB |
Output is correct |
12 |
Correct |
6 ms |
5460 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
0 ms |
340 KB |
Output is correct |
17 |
Correct |
0 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
0 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
0 ms |
468 KB |
Output is correct |
23 |
Correct |
0 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
1 ms |
340 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
468 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
468 KB |
Output is correct |
31 |
Correct |
2 ms |
596 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
468 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
468 KB |
Output is correct |
40 |
Correct |
1 ms |
596 KB |
Output is correct |
41 |
Correct |
1 ms |
852 KB |
Output is correct |
42 |
Correct |
1 ms |
852 KB |
Output is correct |
43 |
Correct |
1 ms |
852 KB |
Output is correct |
44 |
Correct |
1 ms |
852 KB |
Output is correct |
45 |
Correct |
1 ms |
852 KB |
Output is correct |
46 |
Correct |
1 ms |
1364 KB |
Output is correct |
47 |
Correct |
1 ms |
1364 KB |
Output is correct |
48 |
Correct |
1 ms |
1364 KB |
Output is correct |
49 |
Correct |
1 ms |
1364 KB |
Output is correct |
50 |
Correct |
1 ms |
1364 KB |
Output is correct |
51 |
Correct |
30 ms |
4560 KB |
Output is correct |
52 |
Correct |
26 ms |
4536 KB |
Output is correct |
53 |
Correct |
29 ms |
8476 KB |
Output is correct |
54 |
Correct |
36 ms |
8380 KB |
Output is correct |
55 |
Correct |
2 ms |
340 KB |
Output is correct |
56 |
Correct |
15 ms |
2516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
70 ms |
3508 KB |
Output is correct |
3 |
Correct |
70 ms |
3528 KB |
Output is correct |
4 |
Correct |
54 ms |
3536 KB |
Output is correct |
5 |
Correct |
74 ms |
3440 KB |
Output is correct |
6 |
Correct |
58 ms |
3512 KB |
Output is correct |
7 |
Correct |
75 ms |
3332 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 |
0 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
70 ms |
3508 KB |
Output is correct |
3 |
Correct |
70 ms |
3528 KB |
Output is correct |
4 |
Correct |
54 ms |
3536 KB |
Output is correct |
5 |
Correct |
74 ms |
3440 KB |
Output is correct |
6 |
Correct |
58 ms |
3512 KB |
Output is correct |
7 |
Correct |
75 ms |
3332 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 |
0 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
288 ms |
3992 KB |
Output is correct |
21 |
Correct |
252 ms |
4144 KB |
Output is correct |
22 |
Correct |
255 ms |
4072 KB |
Output is correct |
23 |
Correct |
263 ms |
3756 KB |
Output is correct |
24 |
Correct |
221 ms |
3568 KB |
Output is correct |
25 |
Correct |
301 ms |
4172 KB |
Output is correct |
26 |
Correct |
321 ms |
4200 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 |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
0 ms |
340 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
468 KB |
Output is correct |
34 |
Correct |
0 ms |
468 KB |
Output is correct |
35 |
Correct |
1 ms |
468 KB |
Output is correct |
36 |
Correct |
1 ms |
596 KB |
Output is correct |
37 |
Correct |
0 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
468 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
468 KB |
Output is correct |
45 |
Correct |
1 ms |
596 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
70 ms |
3508 KB |
Output is correct |
3 |
Correct |
70 ms |
3528 KB |
Output is correct |
4 |
Correct |
54 ms |
3536 KB |
Output is correct |
5 |
Correct |
74 ms |
3440 KB |
Output is correct |
6 |
Correct |
58 ms |
3512 KB |
Output is correct |
7 |
Correct |
75 ms |
3332 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 |
0 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
288 ms |
3992 KB |
Output is correct |
21 |
Correct |
252 ms |
4144 KB |
Output is correct |
22 |
Correct |
255 ms |
4072 KB |
Output is correct |
23 |
Correct |
263 ms |
3756 KB |
Output is correct |
24 |
Correct |
221 ms |
3568 KB |
Output is correct |
25 |
Correct |
301 ms |
4172 KB |
Output is correct |
26 |
Correct |
321 ms |
4200 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 |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
0 ms |
340 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
468 KB |
Output is correct |
34 |
Correct |
0 ms |
468 KB |
Output is correct |
35 |
Correct |
1 ms |
468 KB |
Output is correct |
36 |
Correct |
1 ms |
596 KB |
Output is correct |
37 |
Correct |
0 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
468 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
468 KB |
Output is correct |
45 |
Correct |
1 ms |
596 KB |
Output is correct |
46 |
Correct |
1 ms |
596 KB |
Output is correct |
47 |
Correct |
640 ms |
4956 KB |
Output is correct |
48 |
Correct |
567 ms |
4480 KB |
Output is correct |
49 |
Correct |
561 ms |
4596 KB |
Output is correct |
50 |
Correct |
501 ms |
4304 KB |
Output is correct |
51 |
Correct |
466 ms |
3908 KB |
Output is correct |
52 |
Correct |
727 ms |
5380 KB |
Output is correct |
53 |
Correct |
742 ms |
5416 KB |
Output is correct |
54 |
Correct |
1 ms |
852 KB |
Output is correct |
55 |
Correct |
1 ms |
852 KB |
Output is correct |
56 |
Correct |
1 ms |
852 KB |
Output is correct |
57 |
Correct |
1 ms |
852 KB |
Output is correct |
58 |
Correct |
1 ms |
852 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
70 ms |
3508 KB |
Output is correct |
3 |
Correct |
70 ms |
3528 KB |
Output is correct |
4 |
Correct |
54 ms |
3536 KB |
Output is correct |
5 |
Correct |
74 ms |
3440 KB |
Output is correct |
6 |
Correct |
58 ms |
3512 KB |
Output is correct |
7 |
Correct |
75 ms |
3332 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 |
0 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
288 ms |
3992 KB |
Output is correct |
21 |
Correct |
252 ms |
4144 KB |
Output is correct |
22 |
Correct |
255 ms |
4072 KB |
Output is correct |
23 |
Correct |
263 ms |
3756 KB |
Output is correct |
24 |
Correct |
221 ms |
3568 KB |
Output is correct |
25 |
Correct |
301 ms |
4172 KB |
Output is correct |
26 |
Correct |
321 ms |
4200 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 |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
0 ms |
340 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
468 KB |
Output is correct |
34 |
Correct |
0 ms |
468 KB |
Output is correct |
35 |
Correct |
1 ms |
468 KB |
Output is correct |
36 |
Correct |
1 ms |
596 KB |
Output is correct |
37 |
Correct |
0 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
468 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
468 KB |
Output is correct |
45 |
Correct |
1 ms |
596 KB |
Output is correct |
46 |
Correct |
1 ms |
596 KB |
Output is correct |
47 |
Correct |
640 ms |
4956 KB |
Output is correct |
48 |
Correct |
567 ms |
4480 KB |
Output is correct |
49 |
Correct |
561 ms |
4596 KB |
Output is correct |
50 |
Correct |
501 ms |
4304 KB |
Output is correct |
51 |
Correct |
466 ms |
3908 KB |
Output is correct |
52 |
Correct |
727 ms |
5380 KB |
Output is correct |
53 |
Correct |
742 ms |
5416 KB |
Output is correct |
54 |
Correct |
1 ms |
852 KB |
Output is correct |
55 |
Correct |
1 ms |
852 KB |
Output is correct |
56 |
Correct |
1 ms |
852 KB |
Output is correct |
57 |
Correct |
1 ms |
852 KB |
Output is correct |
58 |
Correct |
1 ms |
852 KB |
Output is correct |
59 |
Correct |
1166 ms |
6320 KB |
Output is correct |
60 |
Correct |
757 ms |
3824 KB |
Output is correct |
61 |
Correct |
733 ms |
3872 KB |
Output is correct |
62 |
Correct |
838 ms |
3792 KB |
Output is correct |
63 |
Correct |
1018 ms |
6080 KB |
Output is correct |
64 |
Correct |
1592 ms |
6012 KB |
Output is correct |
65 |
Correct |
1480 ms |
6184 KB |
Output is correct |
66 |
Correct |
1127 ms |
4780 KB |
Output is correct |
67 |
Correct |
1125 ms |
4368 KB |
Output is correct |
68 |
Correct |
1829 ms |
6464 KB |
Output is correct |
69 |
Correct |
1850 ms |
6928 KB |
Output is correct |
70 |
Correct |
2 ms |
1364 KB |
Output is correct |
71 |
Correct |
1 ms |
1364 KB |
Output is correct |
72 |
Correct |
1 ms |
1364 KB |
Output is correct |
73 |
Correct |
1 ms |
1364 KB |
Output is correct |
74 |
Correct |
1 ms |
1364 KB |
Output is correct |
75 |
Correct |
14 ms |
2468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
596 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
4 ms |
4436 KB |
Output is correct |
6 |
Correct |
7 ms |
4504 KB |
Output is correct |
7 |
Correct |
5 ms |
4436 KB |
Output is correct |
8 |
Correct |
5 ms |
4564 KB |
Output is correct |
9 |
Correct |
9 ms |
5588 KB |
Output is correct |
10 |
Correct |
3 ms |
4436 KB |
Output is correct |
11 |
Correct |
3 ms |
4564 KB |
Output is correct |
12 |
Correct |
6 ms |
5460 KB |
Output is correct |
13 |
Correct |
0 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
340 KB |
Output is correct |
16 |
Correct |
0 ms |
340 KB |
Output is correct |
17 |
Correct |
0 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
0 ms |
340 KB |
Output is correct |
20 |
Correct |
0 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
0 ms |
468 KB |
Output is correct |
23 |
Correct |
0 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
1 ms |
340 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
468 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
468 KB |
Output is correct |
31 |
Correct |
2 ms |
596 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
468 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
468 KB |
Output is correct |
40 |
Correct |
1 ms |
596 KB |
Output is correct |
41 |
Correct |
1 ms |
852 KB |
Output is correct |
42 |
Correct |
1 ms |
852 KB |
Output is correct |
43 |
Correct |
1 ms |
852 KB |
Output is correct |
44 |
Correct |
1 ms |
852 KB |
Output is correct |
45 |
Correct |
1 ms |
852 KB |
Output is correct |
46 |
Correct |
1 ms |
1364 KB |
Output is correct |
47 |
Correct |
1 ms |
1364 KB |
Output is correct |
48 |
Correct |
1 ms |
1364 KB |
Output is correct |
49 |
Correct |
1 ms |
1364 KB |
Output is correct |
50 |
Correct |
1 ms |
1364 KB |
Output is correct |
51 |
Correct |
30 ms |
4560 KB |
Output is correct |
52 |
Correct |
26 ms |
4536 KB |
Output is correct |
53 |
Correct |
29 ms |
8476 KB |
Output is correct |
54 |
Correct |
36 ms |
8380 KB |
Output is correct |
55 |
Correct |
2 ms |
340 KB |
Output is correct |
56 |
Correct |
15 ms |
2516 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
70 ms |
3508 KB |
Output is correct |
59 |
Correct |
70 ms |
3528 KB |
Output is correct |
60 |
Correct |
54 ms |
3536 KB |
Output is correct |
61 |
Correct |
74 ms |
3440 KB |
Output is correct |
62 |
Correct |
58 ms |
3512 KB |
Output is correct |
63 |
Correct |
75 ms |
3332 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 |
0 ms |
340 KB |
Output is correct |
68 |
Correct |
1 ms |
340 KB |
Output is correct |
69 |
Correct |
0 ms |
340 KB |
Output is correct |
70 |
Correct |
1 ms |
340 KB |
Output is correct |
71 |
Correct |
0 ms |
340 KB |
Output is correct |
72 |
Correct |
1 ms |
340 KB |
Output is correct |
73 |
Correct |
1 ms |
340 KB |
Output is correct |
74 |
Correct |
1 ms |
340 KB |
Output is correct |
75 |
Correct |
0 ms |
340 KB |
Output is correct |
76 |
Correct |
288 ms |
3992 KB |
Output is correct |
77 |
Correct |
252 ms |
4144 KB |
Output is correct |
78 |
Correct |
255 ms |
4072 KB |
Output is correct |
79 |
Correct |
263 ms |
3756 KB |
Output is correct |
80 |
Correct |
221 ms |
3568 KB |
Output is correct |
81 |
Correct |
301 ms |
4172 KB |
Output is correct |
82 |
Correct |
321 ms |
4200 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 |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
340 KB |
Output is correct |
87 |
Correct |
0 ms |
340 KB |
Output is correct |
88 |
Correct |
1 ms |
340 KB |
Output is correct |
89 |
Correct |
1 ms |
468 KB |
Output is correct |
90 |
Correct |
0 ms |
468 KB |
Output is correct |
91 |
Correct |
1 ms |
468 KB |
Output is correct |
92 |
Correct |
1 ms |
596 KB |
Output is correct |
93 |
Correct |
0 ms |
340 KB |
Output is correct |
94 |
Correct |
1 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
1 ms |
340 KB |
Output is correct |
97 |
Correct |
1 ms |
340 KB |
Output is correct |
98 |
Correct |
1 ms |
468 KB |
Output is correct |
99 |
Correct |
1 ms |
468 KB |
Output is correct |
100 |
Correct |
1 ms |
468 KB |
Output is correct |
101 |
Correct |
1 ms |
596 KB |
Output is correct |
102 |
Correct |
1 ms |
596 KB |
Output is correct |
103 |
Correct |
640 ms |
4956 KB |
Output is correct |
104 |
Correct |
567 ms |
4480 KB |
Output is correct |
105 |
Correct |
561 ms |
4596 KB |
Output is correct |
106 |
Correct |
501 ms |
4304 KB |
Output is correct |
107 |
Correct |
466 ms |
3908 KB |
Output is correct |
108 |
Correct |
727 ms |
5380 KB |
Output is correct |
109 |
Correct |
742 ms |
5416 KB |
Output is correct |
110 |
Correct |
1 ms |
852 KB |
Output is correct |
111 |
Correct |
1 ms |
852 KB |
Output is correct |
112 |
Correct |
1 ms |
852 KB |
Output is correct |
113 |
Correct |
1 ms |
852 KB |
Output is correct |
114 |
Correct |
1 ms |
852 KB |
Output is correct |
115 |
Correct |
1166 ms |
6320 KB |
Output is correct |
116 |
Correct |
757 ms |
3824 KB |
Output is correct |
117 |
Correct |
733 ms |
3872 KB |
Output is correct |
118 |
Correct |
838 ms |
3792 KB |
Output is correct |
119 |
Correct |
1018 ms |
6080 KB |
Output is correct |
120 |
Correct |
1592 ms |
6012 KB |
Output is correct |
121 |
Correct |
1480 ms |
6184 KB |
Output is correct |
122 |
Correct |
1127 ms |
4780 KB |
Output is correct |
123 |
Correct |
1125 ms |
4368 KB |
Output is correct |
124 |
Correct |
1829 ms |
6464 KB |
Output is correct |
125 |
Correct |
1850 ms |
6928 KB |
Output is correct |
126 |
Correct |
2 ms |
1364 KB |
Output is correct |
127 |
Correct |
1 ms |
1364 KB |
Output is correct |
128 |
Correct |
1 ms |
1364 KB |
Output is correct |
129 |
Correct |
1 ms |
1364 KB |
Output is correct |
130 |
Correct |
1 ms |
1364 KB |
Output is correct |
131 |
Correct |
14 ms |
2468 KB |
Output is correct |
132 |
Correct |
3651 ms |
12360 KB |
Output is correct |
133 |
Correct |
3514 ms |
12284 KB |
Output is correct |
134 |
Correct |
3809 ms |
12424 KB |
Output is correct |
135 |
Correct |
3646 ms |
12588 KB |
Output is correct |
136 |
Correct |
3480 ms |
12512 KB |
Output is correct |
137 |
Correct |
2850 ms |
8248 KB |
Output is correct |
138 |
Correct |
2711 ms |
8604 KB |
Output is correct |
139 |
Correct |
2622 ms |
7852 KB |
Output is correct |
140 |
Correct |
2254 ms |
7452 KB |
Output is correct |
141 |
Correct |
3524 ms |
12708 KB |
Output is correct |
142 |
Correct |
3986 ms |
12904 KB |
Output is correct |