Submission #750516

# Submission time Handle Problem Language Result Execution time Memory
750516 2023-05-29T15:20:22 Z bachhoangxuan Council (JOI23_council) C++17
78 / 100
4000 ms 22200 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 5 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 1 ms 340 KB Output is correct
5 Correct 4 ms 4436 KB Output is correct
6 Correct 7 ms 4436 KB Output is correct
7 Correct 4 ms 4436 KB Output is correct
8 Correct 6 ms 4532 KB Output is correct
9 Correct 7 ms 5460 KB Output is correct
10 Correct 3 ms 4436 KB Output is correct
11 Correct 7 ms 4580 KB Output is correct
12 Correct 8 ms 5460 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 356 KB Output is correct
18 Correct 1 ms 352 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 2 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 484 KB Output is correct
31 Correct 1 ms 596 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 356 KB Output is correct
34 Correct 1 ms 356 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 596 KB Output is correct
41 Correct 2 ms 852 KB Output is correct
42 Correct 1 ms 852 KB Output is correct
43 Correct 2 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 1380 KB Output is correct
47 Correct 3 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 2 ms 1364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 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 1 ms 340 KB Output is correct
5 Correct 4 ms 4436 KB Output is correct
6 Correct 7 ms 4436 KB Output is correct
7 Correct 4 ms 4436 KB Output is correct
8 Correct 6 ms 4532 KB Output is correct
9 Correct 7 ms 5460 KB Output is correct
10 Correct 3 ms 4436 KB Output is correct
11 Correct 7 ms 4580 KB Output is correct
12 Correct 8 ms 5460 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 356 KB Output is correct
18 Correct 1 ms 352 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 2 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 484 KB Output is correct
31 Correct 1 ms 596 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 356 KB Output is correct
34 Correct 1 ms 356 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 596 KB Output is correct
41 Correct 2 ms 852 KB Output is correct
42 Correct 1 ms 852 KB Output is correct
43 Correct 2 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 1380 KB Output is correct
47 Correct 3 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 2 ms 1364 KB Output is correct
51 Correct 42 ms 4612 KB Output is correct
52 Correct 27 ms 4564 KB Output is correct
53 Correct 30 ms 8560 KB Output is correct
54 Correct 43 ms 8404 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 16 ms 2544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 76 ms 4204 KB Output is correct
3 Correct 97 ms 4252 KB Output is correct
4 Correct 56 ms 3968 KB Output is correct
5 Correct 74 ms 4300 KB Output is correct
6 Correct 61 ms 3828 KB Output is correct
7 Correct 86 ms 4220 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 352 KB Output is correct
17 Correct 2 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 76 ms 4204 KB Output is correct
3 Correct 97 ms 4252 KB Output is correct
4 Correct 56 ms 3968 KB Output is correct
5 Correct 74 ms 4300 KB Output is correct
6 Correct 61 ms 3828 KB Output is correct
7 Correct 86 ms 4220 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 352 KB Output is correct
17 Correct 2 ms 364 KB Output is correct
18 Correct 2 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 343 ms 7964 KB Output is correct
21 Correct 316 ms 7524 KB Output is correct
22 Correct 306 ms 7476 KB Output is correct
23 Correct 313 ms 7792 KB Output is correct
24 Correct 382 ms 7480 KB Output is correct
25 Correct 365 ms 8068 KB Output is correct
26 Correct 365 ms 8208 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 3 ms 352 KB Output is correct
32 Correct 1 ms 352 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 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 1 ms 360 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 352 KB Output is correct
42 Correct 1 ms 468 KB Output is correct
43 Correct 1 ms 340 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 76 ms 4204 KB Output is correct
3 Correct 97 ms 4252 KB Output is correct
4 Correct 56 ms 3968 KB Output is correct
5 Correct 74 ms 4300 KB Output is correct
6 Correct 61 ms 3828 KB Output is correct
7 Correct 86 ms 4220 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 352 KB Output is correct
17 Correct 2 ms 364 KB Output is correct
18 Correct 2 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 343 ms 7964 KB Output is correct
21 Correct 316 ms 7524 KB Output is correct
22 Correct 306 ms 7476 KB Output is correct
23 Correct 313 ms 7792 KB Output is correct
24 Correct 382 ms 7480 KB Output is correct
25 Correct 365 ms 8068 KB Output is correct
26 Correct 365 ms 8208 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 3 ms 352 KB Output is correct
32 Correct 1 ms 352 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 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 1 ms 360 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 352 KB Output is correct
42 Correct 1 ms 468 KB Output is correct
43 Correct 1 ms 340 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 712 ms 9872 KB Output is correct
48 Correct 634 ms 9532 KB Output is correct
49 Correct 653 ms 9504 KB Output is correct
50 Correct 610 ms 9448 KB Output is correct
51 Correct 657 ms 9404 KB Output is correct
52 Correct 776 ms 10824 KB Output is correct
53 Correct 782 ms 10392 KB Output is correct
54 Correct 1 ms 872 KB Output is correct
55 Correct 1 ms 868 KB Output is correct
56 Correct 2 ms 868 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 76 ms 4204 KB Output is correct
3 Correct 97 ms 4252 KB Output is correct
4 Correct 56 ms 3968 KB Output is correct
5 Correct 74 ms 4300 KB Output is correct
6 Correct 61 ms 3828 KB Output is correct
7 Correct 86 ms 4220 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 352 KB Output is correct
17 Correct 2 ms 364 KB Output is correct
18 Correct 2 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 343 ms 7964 KB Output is correct
21 Correct 316 ms 7524 KB Output is correct
22 Correct 306 ms 7476 KB Output is correct
23 Correct 313 ms 7792 KB Output is correct
24 Correct 382 ms 7480 KB Output is correct
25 Correct 365 ms 8068 KB Output is correct
26 Correct 365 ms 8208 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 3 ms 352 KB Output is correct
32 Correct 1 ms 352 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 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 1 ms 360 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 352 KB Output is correct
42 Correct 1 ms 468 KB Output is correct
43 Correct 1 ms 340 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 712 ms 9872 KB Output is correct
48 Correct 634 ms 9532 KB Output is correct
49 Correct 653 ms 9504 KB Output is correct
50 Correct 610 ms 9448 KB Output is correct
51 Correct 657 ms 9404 KB Output is correct
52 Correct 776 ms 10824 KB Output is correct
53 Correct 782 ms 10392 KB Output is correct
54 Correct 1 ms 872 KB Output is correct
55 Correct 1 ms 868 KB Output is correct
56 Correct 2 ms 868 KB Output is correct
57 Correct 1 ms 852 KB Output is correct
58 Correct 1 ms 852 KB Output is correct
59 Correct 1407 ms 12660 KB Output is correct
60 Correct 818 ms 6384 KB Output is correct
61 Correct 736 ms 6640 KB Output is correct
62 Correct 805 ms 6768 KB Output is correct
63 Correct 1099 ms 12264 KB Output is correct
64 Correct 1591 ms 12956 KB Output is correct
65 Correct 1452 ms 12668 KB Output is correct
66 Correct 1073 ms 11016 KB Output is correct
67 Correct 1026 ms 10752 KB Output is correct
68 Correct 1839 ms 13476 KB Output is correct
69 Correct 1891 ms 13440 KB Output is correct
70 Correct 1 ms 1364 KB Output is correct
71 Correct 1 ms 1364 KB Output is correct
72 Correct 1 ms 1492 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 2516 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 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 1 ms 340 KB Output is correct
5 Correct 4 ms 4436 KB Output is correct
6 Correct 7 ms 4436 KB Output is correct
7 Correct 4 ms 4436 KB Output is correct
8 Correct 6 ms 4532 KB Output is correct
9 Correct 7 ms 5460 KB Output is correct
10 Correct 3 ms 4436 KB Output is correct
11 Correct 7 ms 4580 KB Output is correct
12 Correct 8 ms 5460 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 356 KB Output is correct
18 Correct 1 ms 352 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 2 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 484 KB Output is correct
31 Correct 1 ms 596 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 356 KB Output is correct
34 Correct 1 ms 356 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 596 KB Output is correct
41 Correct 2 ms 852 KB Output is correct
42 Correct 1 ms 852 KB Output is correct
43 Correct 2 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 1380 KB Output is correct
47 Correct 3 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 2 ms 1364 KB Output is correct
51 Correct 42 ms 4612 KB Output is correct
52 Correct 27 ms 4564 KB Output is correct
53 Correct 30 ms 8560 KB Output is correct
54 Correct 43 ms 8404 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 16 ms 2544 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 76 ms 4204 KB Output is correct
59 Correct 97 ms 4252 KB Output is correct
60 Correct 56 ms 3968 KB Output is correct
61 Correct 74 ms 4300 KB Output is correct
62 Correct 61 ms 3828 KB Output is correct
63 Correct 86 ms 4220 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 1 ms 340 KB Output is correct
67 Correct 1 ms 340 KB Output is correct
68 Correct 1 ms 340 KB Output is correct
69 Correct 1 ms 340 KB Output is correct
70 Correct 1 ms 340 KB Output is correct
71 Correct 1 ms 340 KB Output is correct
72 Correct 1 ms 352 KB Output is correct
73 Correct 2 ms 364 KB Output is correct
74 Correct 2 ms 340 KB Output is correct
75 Correct 1 ms 340 KB Output is correct
76 Correct 343 ms 7964 KB Output is correct
77 Correct 316 ms 7524 KB Output is correct
78 Correct 306 ms 7476 KB Output is correct
79 Correct 313 ms 7792 KB Output is correct
80 Correct 382 ms 7480 KB Output is correct
81 Correct 365 ms 8068 KB Output is correct
82 Correct 365 ms 8208 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 3 ms 352 KB Output is correct
88 Correct 1 ms 352 KB Output is correct
89 Correct 1 ms 468 KB Output is correct
90 Correct 1 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 1 ms 360 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 352 KB Output is correct
98 Correct 1 ms 468 KB Output is correct
99 Correct 1 ms 340 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 712 ms 9872 KB Output is correct
104 Correct 634 ms 9532 KB Output is correct
105 Correct 653 ms 9504 KB Output is correct
106 Correct 610 ms 9448 KB Output is correct
107 Correct 657 ms 9404 KB Output is correct
108 Correct 776 ms 10824 KB Output is correct
109 Correct 782 ms 10392 KB Output is correct
110 Correct 1 ms 872 KB Output is correct
111 Correct 1 ms 868 KB Output is correct
112 Correct 2 ms 868 KB Output is correct
113 Correct 1 ms 852 KB Output is correct
114 Correct 1 ms 852 KB Output is correct
115 Correct 1407 ms 12660 KB Output is correct
116 Correct 818 ms 6384 KB Output is correct
117 Correct 736 ms 6640 KB Output is correct
118 Correct 805 ms 6768 KB Output is correct
119 Correct 1099 ms 12264 KB Output is correct
120 Correct 1591 ms 12956 KB Output is correct
121 Correct 1452 ms 12668 KB Output is correct
122 Correct 1073 ms 11016 KB Output is correct
123 Correct 1026 ms 10752 KB Output is correct
124 Correct 1839 ms 13476 KB Output is correct
125 Correct 1891 ms 13440 KB Output is correct
126 Correct 1 ms 1364 KB Output is correct
127 Correct 1 ms 1364 KB Output is correct
128 Correct 1 ms 1492 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 2516 KB Output is correct
132 Correct 3829 ms 19672 KB Output is correct
133 Correct 3607 ms 21228 KB Output is correct
134 Correct 3593 ms 19128 KB Output is correct
135 Correct 3301 ms 20768 KB Output is correct
136 Correct 3498 ms 20048 KB Output is correct
137 Correct 2615 ms 15884 KB Output is correct
138 Correct 2699 ms 17400 KB Output is correct
139 Correct 2585 ms 16140 KB Output is correct
140 Correct 2306 ms 15860 KB Output is correct
141 Correct 3517 ms 20884 KB Output is correct
142 Execution timed out 4013 ms 22200 KB Time limit exceeded
143 Halted 0 ms 0 KB -