Submission #1014188

# Submission time Handle Problem Language Result Execution time Memory
1014188 2024-07-04T13:50:06 Z Pacybwoah Council (JOI23_council) C++17
100 / 100
1085 ms 47112 KB
#include<iostream>
#include<vector>
#include<cassert>
#include<utility>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m;
    cin >> n >> m;
    vector<int> vec(n), cnt(1 << m), popcnt(1 << m);
    vector<int> res(m);
    vector<pair<int, int>> dp(1 << m, make_pair(-1, -1));
    for(int i = 0; i < n; i++){
        int tmp;
        for(int j = 0; j < m; j++){
            cin >> tmp;
            vec[i] += (tmp << j);
            res[j] += tmp;
        }
        cnt[vec[i]]++;
        if(dp[((1 << m) - 1) ^ vec[i]].first != -1) dp[((1 << m) - 1) ^ vec[i]].second = i;
        else dp[((1 << m) - 1) ^ vec[i]].first = i;
    }
    for(int i = 0; i < m; i++){
        for(int j = 0; j < (1 << m); j++){
            if((1 << i) & j){
                popcnt[j]++;
                if(dp[j ^ (1 << i)].first == -1){
                    dp[j ^ (1 << i)].first = dp[j].first;
                    dp[j ^ (1 << i)].second = dp[j].second;
                }
                else if(dp[j ^ (1 << i)].second == -1){
                    if(dp[j ^ (1 << i)].first != dp[j].first) dp[j ^ (1 << i)].second = dp[j].first;
                    else dp[j ^ (1 << i)].second = dp[j].second;
                }
            }
        }
    }
    vector<pair<pair<int, int>, pair<int, int>> > dp2(1 << m, make_pair(make_pair(0, 0), make_pair(0, 0)));
    for(int i = 0; i < (1 << m); i++){
        if(dp[i].first != -1){
            dp2[i].first.first = popcnt[i];
            dp2[i].first.second = dp[i].first + 1;
        }
        if(dp[i].second != -1){
            dp2[i].second.first = popcnt[i];
            dp2[i].second.second = dp[i].second + 1;
        }
    }
    auto pull = [&](pair<pair<int, int>, pair<int, int>> &a, pair<pair<int, int>, pair<int, int>> &b){
        vector<int> poss, pos;
        if(b.first.second != a.first.second && b.first.second != a.second.second) poss.push_back(b.first.second), pos.push_back(b.first.first);
        if(b.second.second != a.first.second && b.second.second != a.second.second) poss.push_back(b.second.second), pos.push_back(b.second.first);
        while((int)poss.size() < 2) poss.push_back(0), pos.push_back(0);
        if(pos[0] >= a.first.first){
            if(pos[1] >= a.first.first) a.second = make_pair(pos[1], poss[1]);
            else a.second = a.first;
            a.first = make_pair(pos[0], poss[0]);
        }
        else{
            if(pos[0] > a.second.first) a.second = make_pair(pos[0], poss[0]);
        }
    };
    for(int i = 0; i < m; i++){
        for(int j = 0; j < (1 << m); j++){
            if((1 << i) & j){
                pull(dp2[j], dp2[j ^ (1 << i)]);
            }
        }
    }
    int maj = n / 2;
    for(auto &x: vec){
        int crit = 0, uncrit = 0;
        for(int i = 0; i < m; i++){
            if(x & (1 << i)){
                if(res[i] == maj + 1) crit += (1 << i);
                else if(res[i] > maj + 1) uncrit++;
            }
            else{
                if(res[i] == maj) crit += (1 << i);
                else if(res[i] > maj) uncrit++;
            }
        }
        int mask = ((1 << m) - 1) ^ x;
        mask = (mask & crit);
        if(popcnt[mask] == dp2[crit].first.first) cout << dp2[crit].second.first + uncrit << "\n";
        else cout << dp2[crit].first.first + uncrit << "\n";
        //cout << dp2[crit].first.first << " " << dp2[crit].second.first << "\n";
    }
}
// g++ -std=c++17 pB.cpp -Wall -Wextra -Wshadow -fsanitize=undefined -fsanitize=address -o run
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 2 ms 592 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 739 ms 33308 KB Output is correct
6 Correct 777 ms 33308 KB Output is correct
7 Correct 712 ms 33104 KB Output is correct
8 Correct 772 ms 33108 KB Output is correct
9 Correct 803 ms 33104 KB Output is correct
10 Correct 790 ms 33268 KB Output is correct
11 Correct 734 ms 33108 KB Output is correct
12 Correct 756 ms 33304 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 344 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 1 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 484 KB Output is correct
31 Correct 1 ms 344 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 456 KB Output is correct
34 Correct 0 ms 356 KB Output is correct
35 Correct 0 ms 352 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 ms 352 KB Output is correct
39 Correct 1 ms 352 KB Output is correct
40 Correct 2 ms 348 KB Output is correct
41 Correct 8 ms 976 KB Output is correct
42 Correct 9 ms 864 KB Output is correct
43 Correct 9 ms 856 KB Output is correct
44 Correct 9 ms 860 KB Output is correct
45 Correct 9 ms 860 KB Output is correct
46 Correct 75 ms 4564 KB Output is correct
47 Correct 71 ms 4568 KB Output is correct
48 Correct 74 ms 4444 KB Output is correct
49 Correct 74 ms 4444 KB Output is correct
50 Correct 82 ms 4444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 2 ms 592 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 739 ms 33308 KB Output is correct
6 Correct 777 ms 33308 KB Output is correct
7 Correct 712 ms 33104 KB Output is correct
8 Correct 772 ms 33108 KB Output is correct
9 Correct 803 ms 33104 KB Output is correct
10 Correct 790 ms 33268 KB Output is correct
11 Correct 734 ms 33108 KB Output is correct
12 Correct 756 ms 33304 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 344 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 1 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 484 KB Output is correct
31 Correct 1 ms 344 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 456 KB Output is correct
34 Correct 0 ms 356 KB Output is correct
35 Correct 0 ms 352 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 ms 352 KB Output is correct
39 Correct 1 ms 352 KB Output is correct
40 Correct 2 ms 348 KB Output is correct
41 Correct 8 ms 976 KB Output is correct
42 Correct 9 ms 864 KB Output is correct
43 Correct 9 ms 856 KB Output is correct
44 Correct 9 ms 860 KB Output is correct
45 Correct 9 ms 860 KB Output is correct
46 Correct 75 ms 4564 KB Output is correct
47 Correct 71 ms 4568 KB Output is correct
48 Correct 74 ms 4444 KB Output is correct
49 Correct 74 ms 4444 KB Output is correct
50 Correct 82 ms 4444 KB Output is correct
51 Correct 731 ms 33404 KB Output is correct
52 Correct 698 ms 33420 KB Output is correct
53 Correct 788 ms 33424 KB Output is correct
54 Correct 814 ms 33420 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 87 ms 4700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 33 ms 3252 KB Output is correct
3 Correct 33 ms 3152 KB Output is correct
4 Correct 27 ms 2812 KB Output is correct
5 Correct 48 ms 3244 KB Output is correct
6 Correct 27 ms 2652 KB Output is correct
7 Correct 41 ms 3408 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 456 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 33 ms 3252 KB Output is correct
3 Correct 33 ms 3152 KB Output is correct
4 Correct 27 ms 2812 KB Output is correct
5 Correct 48 ms 3244 KB Output is correct
6 Correct 27 ms 2652 KB Output is correct
7 Correct 41 ms 3408 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 456 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 456 KB Output is correct
20 Correct 132 ms 7892 KB Output is correct
21 Correct 127 ms 7384 KB Output is correct
22 Correct 118 ms 7500 KB Output is correct
23 Correct 118 ms 8292 KB Output is correct
24 Correct 108 ms 7908 KB Output is correct
25 Correct 140 ms 8012 KB Output is correct
26 Correct 136 ms 8020 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 1 ms 420 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 352 KB Output is correct
39 Correct 0 ms 352 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 33 ms 3252 KB Output is correct
3 Correct 33 ms 3152 KB Output is correct
4 Correct 27 ms 2812 KB Output is correct
5 Correct 48 ms 3244 KB Output is correct
6 Correct 27 ms 2652 KB Output is correct
7 Correct 41 ms 3408 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 456 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 456 KB Output is correct
20 Correct 132 ms 7892 KB Output is correct
21 Correct 127 ms 7384 KB Output is correct
22 Correct 118 ms 7500 KB Output is correct
23 Correct 118 ms 8292 KB Output is correct
24 Correct 108 ms 7908 KB Output is correct
25 Correct 140 ms 8012 KB Output is correct
26 Correct 136 ms 8020 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 1 ms 420 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 352 KB Output is correct
39 Correct 0 ms 352 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 348 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 204 ms 10688 KB Output is correct
48 Correct 193 ms 10064 KB Output is correct
49 Correct 172 ms 9932 KB Output is correct
50 Correct 165 ms 11092 KB Output is correct
51 Correct 156 ms 10948 KB Output is correct
52 Correct 177 ms 10832 KB Output is correct
53 Correct 227 ms 11196 KB Output is correct
54 Correct 9 ms 856 KB Output is correct
55 Correct 8 ms 856 KB Output is correct
56 Correct 10 ms 856 KB Output is correct
57 Correct 8 ms 860 KB Output is correct
58 Correct 9 ms 860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 33 ms 3252 KB Output is correct
3 Correct 33 ms 3152 KB Output is correct
4 Correct 27 ms 2812 KB Output is correct
5 Correct 48 ms 3244 KB Output is correct
6 Correct 27 ms 2652 KB Output is correct
7 Correct 41 ms 3408 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 456 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 456 KB Output is correct
20 Correct 132 ms 7892 KB Output is correct
21 Correct 127 ms 7384 KB Output is correct
22 Correct 118 ms 7500 KB Output is correct
23 Correct 118 ms 8292 KB Output is correct
24 Correct 108 ms 7908 KB Output is correct
25 Correct 140 ms 8012 KB Output is correct
26 Correct 136 ms 8020 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 1 ms 420 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 352 KB Output is correct
39 Correct 0 ms 352 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 1 ms 348 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 204 ms 10688 KB Output is correct
48 Correct 193 ms 10064 KB Output is correct
49 Correct 172 ms 9932 KB Output is correct
50 Correct 165 ms 11092 KB Output is correct
51 Correct 156 ms 10948 KB Output is correct
52 Correct 177 ms 10832 KB Output is correct
53 Correct 227 ms 11196 KB Output is correct
54 Correct 9 ms 856 KB Output is correct
55 Correct 8 ms 856 KB Output is correct
56 Correct 10 ms 856 KB Output is correct
57 Correct 8 ms 860 KB Output is correct
58 Correct 9 ms 860 KB Output is correct
59 Correct 269 ms 13832 KB Output is correct
60 Correct 157 ms 9092 KB Output is correct
61 Correct 170 ms 9300 KB Output is correct
62 Correct 181 ms 9556 KB Output is correct
63 Correct 224 ms 13648 KB Output is correct
64 Correct 299 ms 16208 KB Output is correct
65 Correct 302 ms 16224 KB Output is correct
66 Correct 282 ms 16464 KB Output is correct
67 Correct 255 ms 16092 KB Output is correct
68 Correct 327 ms 16208 KB Output is correct
69 Correct 323 ms 16468 KB Output is correct
70 Correct 108 ms 4444 KB Output is correct
71 Correct 106 ms 4440 KB Output is correct
72 Correct 86 ms 4688 KB Output is correct
73 Correct 78 ms 4444 KB Output is correct
74 Correct 77 ms 4560 KB Output is correct
75 Correct 77 ms 4696 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 2 ms 592 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 739 ms 33308 KB Output is correct
6 Correct 777 ms 33308 KB Output is correct
7 Correct 712 ms 33104 KB Output is correct
8 Correct 772 ms 33108 KB Output is correct
9 Correct 803 ms 33104 KB Output is correct
10 Correct 790 ms 33268 KB Output is correct
11 Correct 734 ms 33108 KB Output is correct
12 Correct 756 ms 33304 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 344 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 1 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 484 KB Output is correct
31 Correct 1 ms 344 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 456 KB Output is correct
34 Correct 0 ms 356 KB Output is correct
35 Correct 0 ms 352 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 ms 352 KB Output is correct
39 Correct 1 ms 352 KB Output is correct
40 Correct 2 ms 348 KB Output is correct
41 Correct 8 ms 976 KB Output is correct
42 Correct 9 ms 864 KB Output is correct
43 Correct 9 ms 856 KB Output is correct
44 Correct 9 ms 860 KB Output is correct
45 Correct 9 ms 860 KB Output is correct
46 Correct 75 ms 4564 KB Output is correct
47 Correct 71 ms 4568 KB Output is correct
48 Correct 74 ms 4444 KB Output is correct
49 Correct 74 ms 4444 KB Output is correct
50 Correct 82 ms 4444 KB Output is correct
51 Correct 731 ms 33404 KB Output is correct
52 Correct 698 ms 33420 KB Output is correct
53 Correct 788 ms 33424 KB Output is correct
54 Correct 814 ms 33420 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 87 ms 4700 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 33 ms 3252 KB Output is correct
59 Correct 33 ms 3152 KB Output is correct
60 Correct 27 ms 2812 KB Output is correct
61 Correct 48 ms 3244 KB Output is correct
62 Correct 27 ms 2652 KB Output is correct
63 Correct 41 ms 3408 KB Output is correct
64 Correct 1 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 456 KB Output is correct
71 Correct 0 ms 604 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 1 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 456 KB Output is correct
76 Correct 132 ms 7892 KB Output is correct
77 Correct 127 ms 7384 KB Output is correct
78 Correct 118 ms 7500 KB Output is correct
79 Correct 118 ms 8292 KB Output is correct
80 Correct 108 ms 7908 KB Output is correct
81 Correct 140 ms 8012 KB Output is correct
82 Correct 136 ms 8020 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 0 ms 348 KB Output is correct
87 Correct 1 ms 420 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 1 ms 348 KB Output is correct
92 Correct 1 ms 348 KB Output is correct
93 Correct 0 ms 348 KB Output is correct
94 Correct 1 ms 352 KB Output is correct
95 Correct 0 ms 352 KB Output is correct
96 Correct 0 ms 348 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 1 ms 348 KB Output is correct
101 Correct 1 ms 348 KB Output is correct
102 Correct 2 ms 348 KB Output is correct
103 Correct 204 ms 10688 KB Output is correct
104 Correct 193 ms 10064 KB Output is correct
105 Correct 172 ms 9932 KB Output is correct
106 Correct 165 ms 11092 KB Output is correct
107 Correct 156 ms 10948 KB Output is correct
108 Correct 177 ms 10832 KB Output is correct
109 Correct 227 ms 11196 KB Output is correct
110 Correct 9 ms 856 KB Output is correct
111 Correct 8 ms 856 KB Output is correct
112 Correct 10 ms 856 KB Output is correct
113 Correct 8 ms 860 KB Output is correct
114 Correct 9 ms 860 KB Output is correct
115 Correct 269 ms 13832 KB Output is correct
116 Correct 157 ms 9092 KB Output is correct
117 Correct 170 ms 9300 KB Output is correct
118 Correct 181 ms 9556 KB Output is correct
119 Correct 224 ms 13648 KB Output is correct
120 Correct 299 ms 16208 KB Output is correct
121 Correct 302 ms 16224 KB Output is correct
122 Correct 282 ms 16464 KB Output is correct
123 Correct 255 ms 16092 KB Output is correct
124 Correct 327 ms 16208 KB Output is correct
125 Correct 323 ms 16468 KB Output is correct
126 Correct 108 ms 4444 KB Output is correct
127 Correct 106 ms 4440 KB Output is correct
128 Correct 86 ms 4688 KB Output is correct
129 Correct 78 ms 4444 KB Output is correct
130 Correct 77 ms 4560 KB Output is correct
131 Correct 77 ms 4696 KB Output is correct
132 Correct 996 ms 46932 KB Output is correct
133 Correct 1085 ms 46928 KB Output is correct
134 Correct 973 ms 46984 KB Output is correct
135 Correct 1026 ms 46980 KB Output is correct
136 Correct 1010 ms 47112 KB Output is correct
137 Correct 609 ms 29776 KB Output is correct
138 Correct 625 ms 30068 KB Output is correct
139 Correct 941 ms 46932 KB Output is correct
140 Correct 962 ms 46728 KB Output is correct
141 Correct 1070 ms 46600 KB Output is correct
142 Correct 1022 ms 46932 KB Output is correct