Submission #793177

# Submission time Handle Problem Language Result Execution time Memory
793177 2023-07-25T15:13:18 Z Cookie Council (JOI23_council) C++14
100 / 100
336 ms 49184 KB
#include<bits/stdc++.h>
#include<fstream>
using namespace std;
ifstream fin("FEEDING.INP");
ofstream fout("FEEDING.OUT");
#define sz(a) (int)a.size()
#define ll long long
#define pb push_back
#define forr(i, a, b) for(int i = a; i < b; i++)
#define dorr(i, a, b) for(int i = a; i >= b; i--)
#define ld long double
#define vt vector
#include<fstream>
#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
const ld PI = 3.14159265359;
using u128 = __uint128_t;
//const int x[4] = {1, -1, 0, 0};
//const int y[4] = {0, 0, 1, -1};
const ll mod = 1e9 + 7, inf = 1e9;
const int mxn = 1e5 + 5;
int n, m;
pii son[(1 << 20)];
char c[300005][21];
int cnt[(1 << 20)], val[20], mask[300005];
pair<pii, pii>dp[(1 << 20)];
bool ckmx(pii a, pii b){
    if(b.fi == 0)return(1);
    return(a.se > b.se);
}
signed 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 j = 0; j < m; j++){
            cin >> c[i][j];
            if(c[i][j] == '1'){
                mask[i] += (1 << j);
                val[j]++;
            }
        }
        mask[i] = (((1 << m) - 1) ^ mask[i]);
        if(!son[mask[i]].fi)son[mask[i]].fi = i;
        else if(!son[mask[i]].se)son[mask[i]].se = i;
    }
    for(int i = 0; i < (1 << m); i++){
        cnt[i] = __builtin_popcount(i);
    }
    for(int i = 0; i < m; i++){
        for(int j = 0; j < (1 << m); j++){
            if(!(j & (1 << i))){
                int &x = son[j].fi, &y = son[j].se, candx = son[j ^ (1 << i)].fi, candy = son[j ^ (1 << i)].se;
                if(x){
                    if(!y){
                        if(candx && candx != x)y = candx;
                        else if(candy && candy != x)y = candy;
                    }
                }else{
                    if(candx){
                        x = candx;
                        if(candy)y = candy;
                    }else{
                        if(candy)x = candy;
                    }
                }
                
            }
        }
    }
    for(int i = 0; i < (1 << m); i++){
        
        dp[i] = make_pair(make_pair(son[i].first, ((son[i].first ? cnt[i] : 0))), make_pair(son[i].second, (son[i].second ? cnt[i] : 0)));
        
    }
    
    for(int i = 0; i < m; i++){
        for(int j = 0; j < (1 << m); j++){
            if(j & (1 << i)){
                auto [cand1, cand2] = dp[j ^ (1 << i)];
                
                if(cand1.fi && ckmx(cand1, dp[j].se)){
                    pii rem = dp[j].se;
                    dp[j].se = cand1;
                    
                    if(ckmx(dp[j].se, dp[j].fi)){
                        
                        swap(dp[j].fi, dp[j].se);
                    }
                    if(dp[j].fi.fi == dp[j].se.fi){
                        dp[j].se = rem;
                    }
                }if(cand2.fi && ckmx(cand2, dp[j].se)){
                    pii rem = dp[j].se;
                    dp[j].se = cand2;
                    if(ckmx(dp[j].se, dp[j].fi)){
                        swap(dp[j].fi, dp[j].se);
                    }
                    if(dp[j].fi.fi == dp[j].se.fi){
                        dp[j].se = rem;
                    }
                }
            }
        }
    }
    
    for(int i = 1; i <= n; i++){
        int mask = 0, ans = 0;
        for(int j = 0; j < m; j++){
            if(c[i][j] == '1'){
                val[j]--; 
            }
            if(val[j] == n / 2){
                mask += (1 << j); ans++;
            }else if(val[j] > n / 2)ans++;
            if(c[i][j] == '1'){
                val[j]++;
            }
        }
        //cout << mask << " ";
        auto [res1, res2] = dp[mask];
        
        if(res1.fi != i){
            //cout << res1.se << " " << " " << cnt[mask] << " ";
            cout << ans - (cnt[mask] - res1.se) << "\n";
        }else{
            assert(res2.fi != i);
            cout << ans - (cnt[mask] - res2.se) << "\n";
        }
        
    }
    return(0);
}

Compilation message

council.cpp: In function 'int main()':
council.cpp:82:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   82 |                 auto [cand1, cand2] = dp[j ^ (1 << i)];
      |                      ^
council.cpp:123:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  123 |         auto [res1, res2] = dp[mask];
      |              ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 468 KB Output is correct
3 Correct 0 ms 292 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 81 ms 24860 KB Output is correct
6 Correct 91 ms 20868 KB Output is correct
7 Correct 98 ms 23392 KB Output is correct
8 Correct 84 ms 23468 KB Output is correct
9 Correct 100 ms 28436 KB Output is correct
10 Correct 79 ms 22736 KB Output is correct
11 Correct 88 ms 24732 KB Output is correct
12 Correct 106 ms 28600 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 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 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 0 ms 340 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 352 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 0 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 724 KB Output is correct
42 Correct 1 ms 724 KB Output is correct
43 Correct 2 ms 724 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 2 ms 724 KB Output is correct
46 Correct 9 ms 3412 KB Output is correct
47 Correct 8 ms 3312 KB Output is correct
48 Correct 10 ms 3540 KB Output is correct
49 Correct 8 ms 3284 KB Output is correct
50 Correct 10 ms 3920 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 468 KB Output is correct
3 Correct 0 ms 292 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 81 ms 24860 KB Output is correct
6 Correct 91 ms 20868 KB Output is correct
7 Correct 98 ms 23392 KB Output is correct
8 Correct 84 ms 23468 KB Output is correct
9 Correct 100 ms 28436 KB Output is correct
10 Correct 79 ms 22736 KB Output is correct
11 Correct 88 ms 24732 KB Output is correct
12 Correct 106 ms 28600 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 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 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 0 ms 340 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 352 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 0 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 724 KB Output is correct
42 Correct 1 ms 724 KB Output is correct
43 Correct 2 ms 724 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 2 ms 724 KB Output is correct
46 Correct 9 ms 3412 KB Output is correct
47 Correct 8 ms 3312 KB Output is correct
48 Correct 10 ms 3540 KB Output is correct
49 Correct 8 ms 3284 KB Output is correct
50 Correct 10 ms 3920 KB Output is correct
51 Correct 76 ms 20932 KB Output is correct
52 Correct 96 ms 29128 KB Output is correct
53 Correct 101 ms 29128 KB Output is correct
54 Correct 113 ms 29100 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 14 ms 4032 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 32 ms 8216 KB Output is correct
3 Correct 26 ms 8396 KB Output is correct
4 Correct 24 ms 8300 KB Output is correct
5 Correct 31 ms 8232 KB Output is correct
6 Correct 25 ms 8256 KB Output is correct
7 Correct 32 ms 8236 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 288 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 32 ms 8216 KB Output is correct
3 Correct 26 ms 8396 KB Output is correct
4 Correct 24 ms 8300 KB Output is correct
5 Correct 31 ms 8232 KB Output is correct
6 Correct 25 ms 8256 KB Output is correct
7 Correct 32 ms 8236 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 288 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 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 85 ms 8228 KB Output is correct
21 Correct 81 ms 8192 KB Output is correct
22 Correct 80 ms 13496 KB Output is correct
23 Correct 57 ms 14456 KB Output is correct
24 Correct 65 ms 14068 KB Output is correct
25 Correct 92 ms 14128 KB Output is correct
26 Correct 93 ms 14124 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 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 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 0 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 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 32 ms 8216 KB Output is correct
3 Correct 26 ms 8396 KB Output is correct
4 Correct 24 ms 8300 KB Output is correct
5 Correct 31 ms 8232 KB Output is correct
6 Correct 25 ms 8256 KB Output is correct
7 Correct 32 ms 8236 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 288 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 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 85 ms 8228 KB Output is correct
21 Correct 81 ms 8192 KB Output is correct
22 Correct 80 ms 13496 KB Output is correct
23 Correct 57 ms 14456 KB Output is correct
24 Correct 65 ms 14068 KB Output is correct
25 Correct 92 ms 14128 KB Output is correct
26 Correct 93 ms 14124 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 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 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 0 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 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 304 KB Output is correct
46 Correct 1 ms 468 KB Output is correct
47 Correct 117 ms 16912 KB Output is correct
48 Correct 122 ms 16064 KB Output is correct
49 Correct 124 ms 16000 KB Output is correct
50 Correct 71 ms 17112 KB Output is correct
51 Correct 72 ms 16920 KB Output is correct
52 Correct 123 ms 16820 KB Output is correct
53 Correct 125 ms 17160 KB Output is correct
54 Correct 1 ms 724 KB Output is correct
55 Correct 1 ms 724 KB Output is correct
56 Correct 2 ms 720 KB Output is correct
57 Correct 2 ms 792 KB Output is correct
58 Correct 2 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 32 ms 8216 KB Output is correct
3 Correct 26 ms 8396 KB Output is correct
4 Correct 24 ms 8300 KB Output is correct
5 Correct 31 ms 8232 KB Output is correct
6 Correct 25 ms 8256 KB Output is correct
7 Correct 32 ms 8236 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 288 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 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 85 ms 8228 KB Output is correct
21 Correct 81 ms 8192 KB Output is correct
22 Correct 80 ms 13496 KB Output is correct
23 Correct 57 ms 14456 KB Output is correct
24 Correct 65 ms 14068 KB Output is correct
25 Correct 92 ms 14128 KB Output is correct
26 Correct 93 ms 14124 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 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 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 0 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 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 304 KB Output is correct
46 Correct 1 ms 468 KB Output is correct
47 Correct 117 ms 16912 KB Output is correct
48 Correct 122 ms 16064 KB Output is correct
49 Correct 124 ms 16000 KB Output is correct
50 Correct 71 ms 17112 KB Output is correct
51 Correct 72 ms 16920 KB Output is correct
52 Correct 123 ms 16820 KB Output is correct
53 Correct 125 ms 17160 KB Output is correct
54 Correct 1 ms 724 KB Output is correct
55 Correct 1 ms 724 KB Output is correct
56 Correct 2 ms 720 KB Output is correct
57 Correct 2 ms 792 KB Output is correct
58 Correct 2 ms 724 KB Output is correct
59 Correct 139 ms 19740 KB Output is correct
60 Correct 65 ms 10756 KB Output is correct
61 Correct 67 ms 11356 KB Output is correct
62 Correct 70 ms 11608 KB Output is correct
63 Correct 135 ms 19368 KB Output is correct
64 Correct 149 ms 21780 KB Output is correct
65 Correct 153 ms 21720 KB Output is correct
66 Correct 89 ms 21068 KB Output is correct
67 Correct 96 ms 21832 KB Output is correct
68 Correct 166 ms 21940 KB Output is correct
69 Correct 164 ms 22028 KB Output is correct
70 Correct 11 ms 3408 KB Output is correct
71 Correct 8 ms 3284 KB Output is correct
72 Correct 10 ms 3544 KB Output is correct
73 Correct 9 ms 3284 KB Output is correct
74 Correct 10 ms 3924 KB Output is correct
75 Correct 14 ms 4052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 468 KB Output is correct
3 Correct 0 ms 292 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 81 ms 24860 KB Output is correct
6 Correct 91 ms 20868 KB Output is correct
7 Correct 98 ms 23392 KB Output is correct
8 Correct 84 ms 23468 KB Output is correct
9 Correct 100 ms 28436 KB Output is correct
10 Correct 79 ms 22736 KB Output is correct
11 Correct 88 ms 24732 KB Output is correct
12 Correct 106 ms 28600 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 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 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 0 ms 340 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 352 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 0 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 0 ms 340 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 0 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 0 ms 340 KB Output is correct
39 Correct 0 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 724 KB Output is correct
42 Correct 1 ms 724 KB Output is correct
43 Correct 2 ms 724 KB Output is correct
44 Correct 1 ms 724 KB Output is correct
45 Correct 2 ms 724 KB Output is correct
46 Correct 9 ms 3412 KB Output is correct
47 Correct 8 ms 3312 KB Output is correct
48 Correct 10 ms 3540 KB Output is correct
49 Correct 8 ms 3284 KB Output is correct
50 Correct 10 ms 3920 KB Output is correct
51 Correct 76 ms 20932 KB Output is correct
52 Correct 96 ms 29128 KB Output is correct
53 Correct 101 ms 29128 KB Output is correct
54 Correct 113 ms 29100 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 14 ms 4032 KB Output is correct
57 Correct 0 ms 340 KB Output is correct
58 Correct 32 ms 8216 KB Output is correct
59 Correct 26 ms 8396 KB Output is correct
60 Correct 24 ms 8300 KB Output is correct
61 Correct 31 ms 8232 KB Output is correct
62 Correct 25 ms 8256 KB Output is correct
63 Correct 32 ms 8236 KB Output is correct
64 Correct 0 ms 340 KB Output is correct
65 Correct 0 ms 340 KB Output is correct
66 Correct 0 ms 340 KB Output is correct
67 Correct 0 ms 340 KB Output is correct
68 Correct 0 ms 340 KB Output is correct
69 Correct 0 ms 340 KB Output is correct
70 Correct 0 ms 340 KB Output is correct
71 Correct 0 ms 288 KB Output is correct
72 Correct 0 ms 340 KB Output is correct
73 Correct 1 ms 340 KB Output is correct
74 Correct 0 ms 340 KB Output is correct
75 Correct 0 ms 340 KB Output is correct
76 Correct 85 ms 8228 KB Output is correct
77 Correct 81 ms 8192 KB Output is correct
78 Correct 80 ms 13496 KB Output is correct
79 Correct 57 ms 14456 KB Output is correct
80 Correct 65 ms 14068 KB Output is correct
81 Correct 92 ms 14128 KB Output is correct
82 Correct 93 ms 14124 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 0 ms 340 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 1 ms 340 KB Output is correct
87 Correct 1 ms 340 KB Output is correct
88 Correct 1 ms 340 KB Output is correct
89 Correct 1 ms 340 KB Output is correct
90 Correct 1 ms 340 KB Output is correct
91 Correct 1 ms 340 KB Output is correct
92 Correct 1 ms 340 KB Output is correct
93 Correct 1 ms 340 KB Output is correct
94 Correct 1 ms 340 KB Output is correct
95 Correct 0 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 340 KB Output is correct
99 Correct 1 ms 340 KB Output is correct
100 Correct 1 ms 340 KB Output is correct
101 Correct 1 ms 304 KB Output is correct
102 Correct 1 ms 468 KB Output is correct
103 Correct 117 ms 16912 KB Output is correct
104 Correct 122 ms 16064 KB Output is correct
105 Correct 124 ms 16000 KB Output is correct
106 Correct 71 ms 17112 KB Output is correct
107 Correct 72 ms 16920 KB Output is correct
108 Correct 123 ms 16820 KB Output is correct
109 Correct 125 ms 17160 KB Output is correct
110 Correct 1 ms 724 KB Output is correct
111 Correct 1 ms 724 KB Output is correct
112 Correct 2 ms 720 KB Output is correct
113 Correct 2 ms 792 KB Output is correct
114 Correct 2 ms 724 KB Output is correct
115 Correct 139 ms 19740 KB Output is correct
116 Correct 65 ms 10756 KB Output is correct
117 Correct 67 ms 11356 KB Output is correct
118 Correct 70 ms 11608 KB Output is correct
119 Correct 135 ms 19368 KB Output is correct
120 Correct 149 ms 21780 KB Output is correct
121 Correct 153 ms 21720 KB Output is correct
122 Correct 89 ms 21068 KB Output is correct
123 Correct 96 ms 21832 KB Output is correct
124 Correct 166 ms 21940 KB Output is correct
125 Correct 164 ms 22028 KB Output is correct
126 Correct 11 ms 3408 KB Output is correct
127 Correct 8 ms 3284 KB Output is correct
128 Correct 10 ms 3544 KB Output is correct
129 Correct 9 ms 3284 KB Output is correct
130 Correct 10 ms 3924 KB Output is correct
131 Correct 14 ms 4052 KB Output is correct
132 Correct 275 ms 49184 KB Output is correct
133 Correct 266 ms 48740 KB Output is correct
134 Correct 286 ms 49100 KB Output is correct
135 Correct 310 ms 48844 KB Output is correct
136 Correct 336 ms 49100 KB Output is correct
137 Correct 206 ms 33868 KB Output is correct
138 Correct 205 ms 33992 KB Output is correct
139 Correct 169 ms 40732 KB Output is correct
140 Correct 175 ms 48644 KB Output is correct
141 Correct 302 ms 48664 KB Output is correct
142 Correct 312 ms 49080 KB Output is correct