Submission #891885

# Submission time Handle Problem Language Result Execution time Memory
891885 2023-12-24T10:54:25 Z alexander707070 Council (JOI23_council) C++14
100 / 100
2750 ms 589420 KB
#include<bits/stdc++.h>
#define MAXN 300007
using namespace std;

struct sol{
    int ans1,t1;
    int ans2,t2;
}best;

int n,m,br[25],curr;
int a[MAXN],s[MAXN][25],res,ans;

pair<int,int> ind[1024*1024];

pair<int,int> dp2[25][1024*1024];
bool li2[25][1024*1024];

int inv(int x){
    return (1<<m)-1-x;
}

pair<int,int> ff2(int m,int mask){
    if(m==-1){
        return ind[inv(mask)];
    }

    if(li2[m][mask])return dp2[m][mask];
    li2[m][mask]=true;
   
    if(((1<<m)&mask)>0){
        dp2[m][mask]=ff2(m-1,mask);
    }else{
        pair<int,int> s=ff2(m-1,mask^(1<<m));
        dp2[m][mask]=ff2(m-1,mask);

        if(dp2[m][mask].first==0){
            dp2[m][mask]=s;
        }else{
            dp2[m][mask].second=max(dp2[m][mask].second,s.first);
        }        
    }

    return dp2[m][mask];
}

sol dp[25][1024*1024];
bool li[25][1024*1024];

sol ff(int n,int mask){
    if(n==-1){
        sol res={0,0,0,0};
        if(ff2(m-1,mask).first!=0){
            res.ans1=__builtin_popcount(mask);
            res.t1=ff2(m-1,mask).first;
        }

        if(ff2(m-1,mask).second!=0){
            res.ans2=__builtin_popcount(mask);
            res.t2=ff2(m-1,mask).second;
        }

        return res;
    }

    if(li[n][mask])return dp[n][mask];
    li[n][mask]=true;

    if((mask&(1<<n))==0){
        dp[n][mask]=ff(n-1,mask);
    }else{
        sol fr=ff(n-1,mask),sc=ff(n-1,mask^(1<<n));

        vector< pair<int,int> > w={{fr.ans1,fr.t1},{fr.ans2,fr.t2},{sc.ans1,sc.t1},{sc.ans2,sc.t2}};
        sort(w.begin(),w.end());
        reverse(w.begin(),w.end());

        dp[n][mask].ans1=w[0].first;
        dp[n][mask].t1=w[0].second;

        for(int i=1;i<w.size();i++){
            if(w[i].second==w[0].second)continue;  
            dp[n][mask].ans2=w[i].first; 
            dp[n][mask].t2=w[i].second;
            break;  
        }
    }

    return dp[n][mask];
}

int main(){

    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin>>n>>m;
    for(int i=1;i<=n;i++){
        for(int f=1;f<=m;f++){
            cin>>s[i][f];
            a[i]*=2; a[i]+=s[i][f];

            br[f]+=s[i][f];
        }

        if(ind[a[i]].first==0)ind[a[i]].first=i;
        else ind[a[i]].second=i;
    }

    for(int i=1;i<=n;i++){
        for(int f=1;f<=m;f++)br[f]-=s[i][f];
        
        curr=res=0;
        for(int f=1;f<=m;f++){
            curr*=2;
            if(br[f]==n/2)curr++;
            if(br[f]>n/2)res++;
        }

        best=ff(m-1,curr);

        if(best.t1!=i){
            ans=res+best.ans1;
        }else{
            ans=res+best.ans2;
        }

        cout<<ans<<"\n";

        for(int f=1;f<=m;f++)br[f]+=s[i][f];
    }

    return 0;
}

Compilation message

council.cpp: In function 'sol ff(int, int)':
council.cpp:80:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   80 |         for(int i=1;i<w.size();i++){
      |                     ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 14684 KB Output is correct
2 Correct 10 ms 51952 KB Output is correct
3 Correct 2 ms 18780 KB Output is correct
4 Correct 3 ms 10588 KB Output is correct
5 Correct 582 ms 522512 KB Output is correct
6 Correct 38 ms 210768 KB Output is correct
7 Correct 66 ms 343888 KB Output is correct
8 Correct 75 ms 428372 KB Output is correct
9 Correct 49 ms 263368 KB Output is correct
10 Correct 317 ms 515168 KB Output is correct
11 Correct 325 ms 530004 KB Output is correct
12 Correct 584 ms 540684 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 10584 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 1 ms 10588 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 10588 KB Output is correct
20 Correct 2 ms 10588 KB Output is correct
21 Correct 2 ms 10844 KB Output is correct
22 Correct 5 ms 43612 KB Output is correct
23 Correct 2 ms 14684 KB Output is correct
24 Correct 2 ms 18780 KB Output is correct
25 Correct 2 ms 22876 KB Output is correct
26 Correct 3 ms 26972 KB Output is correct
27 Correct 4 ms 31324 KB Output is correct
28 Correct 4 ms 35420 KB Output is correct
29 Correct 4 ms 39516 KB Output is correct
30 Correct 5 ms 43612 KB Output is correct
31 Correct 5 ms 43612 KB Output is correct
32 Correct 2 ms 14684 KB Output is correct
33 Correct 2 ms 18780 KB Output is correct
34 Correct 3 ms 23076 KB Output is correct
35 Correct 3 ms 26972 KB Output is correct
36 Correct 4 ms 31324 KB Output is correct
37 Correct 4 ms 35420 KB Output is correct
38 Correct 4 ms 39516 KB Output is correct
39 Correct 6 ms 43680 KB Output is correct
40 Correct 5 ms 43608 KB Output is correct
41 Correct 12 ms 60508 KB Output is correct
42 Correct 7 ms 60500 KB Output is correct
43 Correct 8 ms 60252 KB Output is correct
44 Correct 10 ms 60508 KB Output is correct
45 Correct 9 ms 60432 KB Output is correct
46 Correct 72 ms 146260 KB Output is correct
47 Correct 22 ms 110172 KB Output is correct
48 Correct 15 ms 110428 KB Output is correct
49 Correct 43 ms 146124 KB Output is correct
50 Correct 45 ms 146272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 14684 KB Output is correct
2 Correct 10 ms 51952 KB Output is correct
3 Correct 2 ms 18780 KB Output is correct
4 Correct 3 ms 10588 KB Output is correct
5 Correct 582 ms 522512 KB Output is correct
6 Correct 38 ms 210768 KB Output is correct
7 Correct 66 ms 343888 KB Output is correct
8 Correct 75 ms 428372 KB Output is correct
9 Correct 49 ms 263368 KB Output is correct
10 Correct 317 ms 515168 KB Output is correct
11 Correct 325 ms 530004 KB Output is correct
12 Correct 584 ms 540684 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 10584 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 1 ms 10588 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 10588 KB Output is correct
20 Correct 2 ms 10588 KB Output is correct
21 Correct 2 ms 10844 KB Output is correct
22 Correct 5 ms 43612 KB Output is correct
23 Correct 2 ms 14684 KB Output is correct
24 Correct 2 ms 18780 KB Output is correct
25 Correct 2 ms 22876 KB Output is correct
26 Correct 3 ms 26972 KB Output is correct
27 Correct 4 ms 31324 KB Output is correct
28 Correct 4 ms 35420 KB Output is correct
29 Correct 4 ms 39516 KB Output is correct
30 Correct 5 ms 43612 KB Output is correct
31 Correct 5 ms 43612 KB Output is correct
32 Correct 2 ms 14684 KB Output is correct
33 Correct 2 ms 18780 KB Output is correct
34 Correct 3 ms 23076 KB Output is correct
35 Correct 3 ms 26972 KB Output is correct
36 Correct 4 ms 31324 KB Output is correct
37 Correct 4 ms 35420 KB Output is correct
38 Correct 4 ms 39516 KB Output is correct
39 Correct 6 ms 43680 KB Output is correct
40 Correct 5 ms 43608 KB Output is correct
41 Correct 12 ms 60508 KB Output is correct
42 Correct 7 ms 60500 KB Output is correct
43 Correct 8 ms 60252 KB Output is correct
44 Correct 10 ms 60508 KB Output is correct
45 Correct 9 ms 60432 KB Output is correct
46 Correct 72 ms 146260 KB Output is correct
47 Correct 22 ms 110172 KB Output is correct
48 Correct 15 ms 110428 KB Output is correct
49 Correct 43 ms 146124 KB Output is correct
50 Correct 45 ms 146272 KB Output is correct
51 Correct 39 ms 212816 KB Output is correct
52 Correct 41 ms 212976 KB Output is correct
53 Correct 42 ms 217892 KB Output is correct
54 Correct 1038 ms 546996 KB Output is correct
55 Correct 2 ms 12636 KB Output is correct
56 Correct 136 ms 149692 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 10588 KB Output is correct
2 Correct 47 ms 41504 KB Output is correct
3 Correct 47 ms 41552 KB Output is correct
4 Correct 36 ms 37476 KB Output is correct
5 Correct 51 ms 41476 KB Output is correct
6 Correct 42 ms 37456 KB Output is correct
7 Correct 52 ms 41620 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10588 KB Output is correct
12 Correct 1 ms 10588 KB Output is correct
13 Correct 1 ms 6488 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10588 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 2 ms 12636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 10588 KB Output is correct
2 Correct 47 ms 41504 KB Output is correct
3 Correct 47 ms 41552 KB Output is correct
4 Correct 36 ms 37476 KB Output is correct
5 Correct 51 ms 41476 KB Output is correct
6 Correct 42 ms 37456 KB Output is correct
7 Correct 52 ms 41620 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10588 KB Output is correct
12 Correct 1 ms 10588 KB Output is correct
13 Correct 1 ms 6488 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10588 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 2 ms 12636 KB Output is correct
18 Correct 2 ms 14684 KB Output is correct
19 Correct 2 ms 18780 KB Output is correct
20 Correct 164 ms 74580 KB Output is correct
21 Correct 151 ms 70480 KB Output is correct
22 Correct 156 ms 70300 KB Output is correct
23 Correct 143 ms 74836 KB Output is correct
24 Correct 144 ms 74384 KB Output is correct
25 Correct 156 ms 74580 KB Output is correct
26 Correct 175 ms 74372 KB Output is correct
27 Correct 5 ms 43612 KB Output is correct
28 Correct 2 ms 14684 KB Output is correct
29 Correct 2 ms 18780 KB Output is correct
30 Correct 3 ms 22876 KB Output is correct
31 Correct 3 ms 27096 KB Output is correct
32 Correct 4 ms 31324 KB Output is correct
33 Correct 4 ms 35416 KB Output is correct
34 Correct 4 ms 39516 KB Output is correct
35 Correct 4 ms 43612 KB Output is correct
36 Correct 5 ms 43668 KB Output is correct
37 Correct 2 ms 14684 KB Output is correct
38 Correct 2 ms 18780 KB Output is correct
39 Correct 3 ms 22876 KB Output is correct
40 Correct 3 ms 26972 KB Output is correct
41 Correct 4 ms 31320 KB Output is correct
42 Correct 4 ms 35420 KB Output is correct
43 Correct 4 ms 39536 KB Output is correct
44 Correct 5 ms 43472 KB Output is correct
45 Correct 5 ms 43700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 10588 KB Output is correct
2 Correct 47 ms 41504 KB Output is correct
3 Correct 47 ms 41552 KB Output is correct
4 Correct 36 ms 37476 KB Output is correct
5 Correct 51 ms 41476 KB Output is correct
6 Correct 42 ms 37456 KB Output is correct
7 Correct 52 ms 41620 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10588 KB Output is correct
12 Correct 1 ms 10588 KB Output is correct
13 Correct 1 ms 6488 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10588 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 2 ms 12636 KB Output is correct
18 Correct 2 ms 14684 KB Output is correct
19 Correct 2 ms 18780 KB Output is correct
20 Correct 164 ms 74580 KB Output is correct
21 Correct 151 ms 70480 KB Output is correct
22 Correct 156 ms 70300 KB Output is correct
23 Correct 143 ms 74836 KB Output is correct
24 Correct 144 ms 74384 KB Output is correct
25 Correct 156 ms 74580 KB Output is correct
26 Correct 175 ms 74372 KB Output is correct
27 Correct 5 ms 43612 KB Output is correct
28 Correct 2 ms 14684 KB Output is correct
29 Correct 2 ms 18780 KB Output is correct
30 Correct 3 ms 22876 KB Output is correct
31 Correct 3 ms 27096 KB Output is correct
32 Correct 4 ms 31324 KB Output is correct
33 Correct 4 ms 35416 KB Output is correct
34 Correct 4 ms 39516 KB Output is correct
35 Correct 4 ms 43612 KB Output is correct
36 Correct 5 ms 43668 KB Output is correct
37 Correct 2 ms 14684 KB Output is correct
38 Correct 2 ms 18780 KB Output is correct
39 Correct 3 ms 22876 KB Output is correct
40 Correct 3 ms 26972 KB Output is correct
41 Correct 4 ms 31320 KB Output is correct
42 Correct 4 ms 35420 KB Output is correct
43 Correct 4 ms 39536 KB Output is correct
44 Correct 5 ms 43472 KB Output is correct
45 Correct 5 ms 43700 KB Output is correct
46 Correct 6 ms 51800 KB Output is correct
47 Correct 242 ms 91872 KB Output is correct
48 Correct 213 ms 87120 KB Output is correct
49 Correct 211 ms 87112 KB Output is correct
50 Correct 198 ms 91512 KB Output is correct
51 Correct 187 ms 91220 KB Output is correct
52 Correct 215 ms 91352 KB Output is correct
53 Correct 241 ms 91988 KB Output is correct
54 Correct 12 ms 60508 KB Output is correct
55 Correct 7 ms 60508 KB Output is correct
56 Correct 7 ms 60252 KB Output is correct
57 Correct 9 ms 60508 KB Output is correct
58 Correct 10 ms 60624 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 10588 KB Output is correct
2 Correct 47 ms 41504 KB Output is correct
3 Correct 47 ms 41552 KB Output is correct
4 Correct 36 ms 37476 KB Output is correct
5 Correct 51 ms 41476 KB Output is correct
6 Correct 42 ms 37456 KB Output is correct
7 Correct 52 ms 41620 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10588 KB Output is correct
12 Correct 1 ms 10588 KB Output is correct
13 Correct 1 ms 6488 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10588 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 2 ms 12636 KB Output is correct
18 Correct 2 ms 14684 KB Output is correct
19 Correct 2 ms 18780 KB Output is correct
20 Correct 164 ms 74580 KB Output is correct
21 Correct 151 ms 70480 KB Output is correct
22 Correct 156 ms 70300 KB Output is correct
23 Correct 143 ms 74836 KB Output is correct
24 Correct 144 ms 74384 KB Output is correct
25 Correct 156 ms 74580 KB Output is correct
26 Correct 175 ms 74372 KB Output is correct
27 Correct 5 ms 43612 KB Output is correct
28 Correct 2 ms 14684 KB Output is correct
29 Correct 2 ms 18780 KB Output is correct
30 Correct 3 ms 22876 KB Output is correct
31 Correct 3 ms 27096 KB Output is correct
32 Correct 4 ms 31324 KB Output is correct
33 Correct 4 ms 35416 KB Output is correct
34 Correct 4 ms 39516 KB Output is correct
35 Correct 4 ms 43612 KB Output is correct
36 Correct 5 ms 43668 KB Output is correct
37 Correct 2 ms 14684 KB Output is correct
38 Correct 2 ms 18780 KB Output is correct
39 Correct 3 ms 22876 KB Output is correct
40 Correct 3 ms 26972 KB Output is correct
41 Correct 4 ms 31320 KB Output is correct
42 Correct 4 ms 35420 KB Output is correct
43 Correct 4 ms 39536 KB Output is correct
44 Correct 5 ms 43472 KB Output is correct
45 Correct 5 ms 43700 KB Output is correct
46 Correct 6 ms 51800 KB Output is correct
47 Correct 242 ms 91872 KB Output is correct
48 Correct 213 ms 87120 KB Output is correct
49 Correct 211 ms 87112 KB Output is correct
50 Correct 198 ms 91512 KB Output is correct
51 Correct 187 ms 91220 KB Output is correct
52 Correct 215 ms 91352 KB Output is correct
53 Correct 241 ms 91988 KB Output is correct
54 Correct 12 ms 60508 KB Output is correct
55 Correct 7 ms 60508 KB Output is correct
56 Correct 7 ms 60252 KB Output is correct
57 Correct 9 ms 60508 KB Output is correct
58 Correct 10 ms 60624 KB Output is correct
59 Correct 244 ms 140880 KB Output is correct
60 Correct 317 ms 164432 KB Output is correct
61 Correct 317 ms 164688 KB Output is correct
62 Correct 347 ms 164944 KB Output is correct
63 Correct 311 ms 143956 KB Output is correct
64 Correct 430 ms 188500 KB Output is correct
65 Correct 419 ms 188496 KB Output is correct
66 Correct 233 ms 148052 KB Output is correct
67 Correct 232 ms 147724 KB Output is correct
68 Correct 261 ms 148684 KB Output is correct
69 Correct 472 ms 188816 KB Output is correct
70 Correct 67 ms 146256 KB Output is correct
71 Correct 20 ms 110292 KB Output is correct
72 Correct 17 ms 110424 KB Output is correct
73 Correct 41 ms 146256 KB Output is correct
74 Correct 44 ms 146456 KB Output is correct
75 Correct 133 ms 149948 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 14684 KB Output is correct
2 Correct 10 ms 51952 KB Output is correct
3 Correct 2 ms 18780 KB Output is correct
4 Correct 3 ms 10588 KB Output is correct
5 Correct 582 ms 522512 KB Output is correct
6 Correct 38 ms 210768 KB Output is correct
7 Correct 66 ms 343888 KB Output is correct
8 Correct 75 ms 428372 KB Output is correct
9 Correct 49 ms 263368 KB Output is correct
10 Correct 317 ms 515168 KB Output is correct
11 Correct 325 ms 530004 KB Output is correct
12 Correct 584 ms 540684 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 10584 KB Output is correct
16 Correct 1 ms 10588 KB Output is correct
17 Correct 1 ms 10588 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 10588 KB Output is correct
20 Correct 2 ms 10588 KB Output is correct
21 Correct 2 ms 10844 KB Output is correct
22 Correct 5 ms 43612 KB Output is correct
23 Correct 2 ms 14684 KB Output is correct
24 Correct 2 ms 18780 KB Output is correct
25 Correct 2 ms 22876 KB Output is correct
26 Correct 3 ms 26972 KB Output is correct
27 Correct 4 ms 31324 KB Output is correct
28 Correct 4 ms 35420 KB Output is correct
29 Correct 4 ms 39516 KB Output is correct
30 Correct 5 ms 43612 KB Output is correct
31 Correct 5 ms 43612 KB Output is correct
32 Correct 2 ms 14684 KB Output is correct
33 Correct 2 ms 18780 KB Output is correct
34 Correct 3 ms 23076 KB Output is correct
35 Correct 3 ms 26972 KB Output is correct
36 Correct 4 ms 31324 KB Output is correct
37 Correct 4 ms 35420 KB Output is correct
38 Correct 4 ms 39516 KB Output is correct
39 Correct 6 ms 43680 KB Output is correct
40 Correct 5 ms 43608 KB Output is correct
41 Correct 12 ms 60508 KB Output is correct
42 Correct 7 ms 60500 KB Output is correct
43 Correct 8 ms 60252 KB Output is correct
44 Correct 10 ms 60508 KB Output is correct
45 Correct 9 ms 60432 KB Output is correct
46 Correct 72 ms 146260 KB Output is correct
47 Correct 22 ms 110172 KB Output is correct
48 Correct 15 ms 110428 KB Output is correct
49 Correct 43 ms 146124 KB Output is correct
50 Correct 45 ms 146272 KB Output is correct
51 Correct 39 ms 212816 KB Output is correct
52 Correct 41 ms 212976 KB Output is correct
53 Correct 42 ms 217892 KB Output is correct
54 Correct 1038 ms 546996 KB Output is correct
55 Correct 2 ms 12636 KB Output is correct
56 Correct 136 ms 149692 KB Output is correct
57 Correct 2 ms 10588 KB Output is correct
58 Correct 47 ms 41504 KB Output is correct
59 Correct 47 ms 41552 KB Output is correct
60 Correct 36 ms 37476 KB Output is correct
61 Correct 51 ms 41476 KB Output is correct
62 Correct 42 ms 37456 KB Output is correct
63 Correct 52 ms 41620 KB Output is correct
64 Correct 1 ms 6492 KB Output is correct
65 Correct 1 ms 6492 KB Output is correct
66 Correct 2 ms 10840 KB Output is correct
67 Correct 2 ms 10588 KB Output is correct
68 Correct 1 ms 10588 KB Output is correct
69 Correct 1 ms 6488 KB Output is correct
70 Correct 1 ms 10588 KB Output is correct
71 Correct 1 ms 10588 KB Output is correct
72 Correct 1 ms 10588 KB Output is correct
73 Correct 2 ms 12636 KB Output is correct
74 Correct 2 ms 14684 KB Output is correct
75 Correct 2 ms 18780 KB Output is correct
76 Correct 164 ms 74580 KB Output is correct
77 Correct 151 ms 70480 KB Output is correct
78 Correct 156 ms 70300 KB Output is correct
79 Correct 143 ms 74836 KB Output is correct
80 Correct 144 ms 74384 KB Output is correct
81 Correct 156 ms 74580 KB Output is correct
82 Correct 175 ms 74372 KB Output is correct
83 Correct 5 ms 43612 KB Output is correct
84 Correct 2 ms 14684 KB Output is correct
85 Correct 2 ms 18780 KB Output is correct
86 Correct 3 ms 22876 KB Output is correct
87 Correct 3 ms 27096 KB Output is correct
88 Correct 4 ms 31324 KB Output is correct
89 Correct 4 ms 35416 KB Output is correct
90 Correct 4 ms 39516 KB Output is correct
91 Correct 4 ms 43612 KB Output is correct
92 Correct 5 ms 43668 KB Output is correct
93 Correct 2 ms 14684 KB Output is correct
94 Correct 2 ms 18780 KB Output is correct
95 Correct 3 ms 22876 KB Output is correct
96 Correct 3 ms 26972 KB Output is correct
97 Correct 4 ms 31320 KB Output is correct
98 Correct 4 ms 35420 KB Output is correct
99 Correct 4 ms 39536 KB Output is correct
100 Correct 5 ms 43472 KB Output is correct
101 Correct 5 ms 43700 KB Output is correct
102 Correct 6 ms 51800 KB Output is correct
103 Correct 242 ms 91872 KB Output is correct
104 Correct 213 ms 87120 KB Output is correct
105 Correct 211 ms 87112 KB Output is correct
106 Correct 198 ms 91512 KB Output is correct
107 Correct 187 ms 91220 KB Output is correct
108 Correct 215 ms 91352 KB Output is correct
109 Correct 241 ms 91988 KB Output is correct
110 Correct 12 ms 60508 KB Output is correct
111 Correct 7 ms 60508 KB Output is correct
112 Correct 7 ms 60252 KB Output is correct
113 Correct 9 ms 60508 KB Output is correct
114 Correct 10 ms 60624 KB Output is correct
115 Correct 244 ms 140880 KB Output is correct
116 Correct 317 ms 164432 KB Output is correct
117 Correct 317 ms 164688 KB Output is correct
118 Correct 347 ms 164944 KB Output is correct
119 Correct 311 ms 143956 KB Output is correct
120 Correct 430 ms 188500 KB Output is correct
121 Correct 419 ms 188496 KB Output is correct
122 Correct 233 ms 148052 KB Output is correct
123 Correct 232 ms 147724 KB Output is correct
124 Correct 261 ms 148684 KB Output is correct
125 Correct 472 ms 188816 KB Output is correct
126 Correct 67 ms 146256 KB Output is correct
127 Correct 20 ms 110292 KB Output is correct
128 Correct 17 ms 110424 KB Output is correct
129 Correct 41 ms 146256 KB Output is correct
130 Correct 44 ms 146456 KB Output is correct
131 Correct 133 ms 149948 KB Output is correct
132 Correct 2357 ms 589420 KB Output is correct
133 Correct 2417 ms 589220 KB Output is correct
134 Correct 2438 ms 589332 KB Output is correct
135 Correct 2285 ms 589268 KB Output is correct
136 Correct 2250 ms 589392 KB Output is correct
137 Correct 1215 ms 380244 KB Output is correct
138 Correct 1132 ms 380552 KB Output is correct
139 Correct 295 ms 253660 KB Output is correct
140 Correct 298 ms 253396 KB Output is correct
141 Correct 343 ms 259704 KB Output is correct
142 Correct 2750 ms 589232 KB Output is correct