답안 #985498

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
985498 2024-05-18T01:52:59 Z vjudge2 Council (JOI23_council) C++17
78 / 100
4000 ms 92756 KB
#include <bits/stdc++.h>
using namespace std;

void update(vector<pair<int, int>>& a, vector<pair<int, int>>& b) {
    vector<pair<int, int>> u;
    set<int> occ;
    for (auto& x : a) if (x.first != -1) u.push_back(x);
    for (auto& y : b) if (y.first != -1) u.push_back(y);
    sort(u.begin(), u.end(), [] (pair<int, int> x, pair<int, int> y) {
        return x.first > y.first;
    });
    a.clear();
    for (int i = 0; i < u.size(); i++) {
        if (!occ.count(u[i].second) && u[i].first != -1) {
            a.push_back(u[i]);
            occ.insert(u[i].second);
        }
    }
    while ((int) a.size() > 2) a.pop_back();
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);   
    int n, m;
    cin >> n >> m;
    vector<int> a(n, 0), freq(m, 0), b(n, 0);
    vector<vector<pair<int, int>>> dp(1 << m);
    for (int i = 0; i < n; i++) {
        int x;
        for (int j = 0; j < m; j++) {
            cin >> x;
            a[i] += (x << j);
            b[i] += ((1 - x) << j);
            if (x) freq[j]++;
        }
        // bitset<6> bs(b[i]);
        // cout << bs.to_string() << '\n';
        if (dp[b[i]].size() < 2) dp[b[i]].emplace_back(__builtin_popcount(b[i]), i);
    }
//     4 6
// 1 1 0 0 1 1
// 1 0 1 1 1 1
// 0 0 0 0 0 1
// 0 1 1 1 0 0
    // max(popcount(b[sth] & s))..
    for (int i = (1 << m) - 1; i >= 0; i--) {
        for (int j = 0; j < m; j++) {
            if (i & (1 << j)) {
                int k = (i ^ (1 << j));
                vector<pair<int, int>> t = dp[i];
                for (auto& [x, y] : t) if (x != -1) x--;
                update(dp[k], t);
            }
        }
    }
    // for (int i = 0; i < (1 << m); i++) {
    //     bitset<6> bs(i);
    //     cout << bs.to_string() << '\n';
    //     cout << dp[i][0].first << ' ' << dp[i][1].first << '\n';
    // }
    for (int i = 0; i < (1 << m); i++) {
        for (int j = 0; j < m; j++) {
            if (i & (1 << j)) {
                int k = (i ^ (1 << j));
                // if (i == 23) cout << "debug: " << dp[i][0].first << ' ' << dp[i][1].first << ' ' << dp[k][0].first << ' ' << dp[k][1].first << '\n';
                update(dp[i], dp[k]);
                // if (i == 23) cout << "debug: " << dp[i][0].first << ' ' << dp[i][1].first << '\n';
            }
        }
        // bitset<6> bs(i);
        // cout << bs.to_string() << '\n';
        // cout << dp[i][0].first << ' ' << dp[i][1].first << '\n';
    }
    for (int i = 0; i < n; i++) {
        int ans = 0, sub = 0;
        for (int j = 0; j < m; j++) {
            int cnter = freq[j];
            if (a[i] & (1 << j)) cnter--;
            if (cnter > n / 2) ans++;
            else if (cnter == n / 2) {
                sub += (1 << j);
                // cout << "crit: " << j << '\n';
            }
        }
        // cout << ans << '\n';
        // cout << dp[sub][0].first << ' ' << dp[sub][0].second << '\n';
        // cout << dp[sub][1].first << ' ' << dp[sub][1].second << '\n';
        if (i == dp[sub][0].second) cout << ans + dp[sub][1].first << '\n';
        else cout << ans + dp[sub][0].first << '\n';
    }
}

Compilation message

council.cpp: In function 'void update(std::vector<std::pair<int, int> >&, std::vector<std::pair<int, int> >&)':
council.cpp:13:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     for (int i = 0; i < u.size(); i++) {
      |                     ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 7 ms 604 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 2594 ms 71288 KB Output is correct
6 Correct 1594 ms 58100 KB Output is correct
7 Correct 1830 ms 70724 KB Output is correct
8 Correct 1967 ms 74032 KB Output is correct
9 Correct 2612 ms 76296 KB Output is correct
10 Correct 1861 ms 70172 KB Output is correct
11 Correct 2050 ms 74016 KB Output is correct
12 Correct 2578 ms 76320 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 680 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 600 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 344 KB Output is correct
22 Correct 2 ms 344 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 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 1 ms 348 KB Output is correct
30 Correct 2 ms 456 KB Output is correct
31 Correct 3 ms 348 KB Output is correct
32 Correct 1 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 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 2 ms 348 KB Output is correct
40 Correct 3 ms 348 KB Output is correct
41 Correct 28 ms 1360 KB Output is correct
42 Correct 21 ms 1372 KB Output is correct
43 Correct 26 ms 1532 KB Output is correct
44 Correct 22 ms 1468 KB Output is correct
45 Correct 25 ms 1372 KB Output is correct
46 Correct 259 ms 9140 KB Output is correct
47 Correct 239 ms 9116 KB Output is correct
48 Correct 216 ms 9556 KB Output is correct
49 Correct 194 ms 8924 KB Output is correct
50 Correct 220 ms 9392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 7 ms 604 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 2594 ms 71288 KB Output is correct
6 Correct 1594 ms 58100 KB Output is correct
7 Correct 1830 ms 70724 KB Output is correct
8 Correct 1967 ms 74032 KB Output is correct
9 Correct 2612 ms 76296 KB Output is correct
10 Correct 1861 ms 70172 KB Output is correct
11 Correct 2050 ms 74016 KB Output is correct
12 Correct 2578 ms 76320 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 680 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 600 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 344 KB Output is correct
22 Correct 2 ms 344 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 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 1 ms 348 KB Output is correct
30 Correct 2 ms 456 KB Output is correct
31 Correct 3 ms 348 KB Output is correct
32 Correct 1 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 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 2 ms 348 KB Output is correct
40 Correct 3 ms 348 KB Output is correct
41 Correct 28 ms 1360 KB Output is correct
42 Correct 21 ms 1372 KB Output is correct
43 Correct 26 ms 1532 KB Output is correct
44 Correct 22 ms 1468 KB Output is correct
45 Correct 25 ms 1372 KB Output is correct
46 Correct 259 ms 9140 KB Output is correct
47 Correct 239 ms 9116 KB Output is correct
48 Correct 216 ms 9556 KB Output is correct
49 Correct 194 ms 8924 KB Output is correct
50 Correct 220 ms 9392 KB Output is correct
51 Correct 1587 ms 58196 KB Output is correct
52 Correct 2899 ms 58144 KB Output is correct
53 Correct 3698 ms 80464 KB Output is correct
54 Correct 3694 ms 79428 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 402 ms 10364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 51 ms 3324 KB Output is correct
3 Correct 41 ms 3244 KB Output is correct
4 Correct 31 ms 3160 KB Output is correct
5 Correct 44 ms 3356 KB Output is correct
6 Correct 36 ms 3324 KB Output is correct
7 Correct 47 ms 3408 KB Output is correct
8 Correct 0 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 1 ms 348 KB Output is correct
13 Correct 0 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 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 51 ms 3324 KB Output is correct
3 Correct 41 ms 3244 KB Output is correct
4 Correct 31 ms 3160 KB Output is correct
5 Correct 44 ms 3356 KB Output is correct
6 Correct 36 ms 3324 KB Output is correct
7 Correct 47 ms 3408 KB Output is correct
8 Correct 0 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 1 ms 348 KB Output is correct
13 Correct 0 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 1 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 159 ms 3404 KB Output is correct
21 Correct 144 ms 3408 KB Output is correct
22 Correct 158 ms 3332 KB Output is correct
23 Correct 140 ms 3612 KB Output is correct
24 Correct 135 ms 3348 KB Output is correct
25 Correct 149 ms 3408 KB Output is correct
26 Correct 165 ms 3412 KB Output is correct
27 Correct 2 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 464 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 2 ms 348 KB Output is correct
36 Correct 3 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 344 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 2 ms 344 KB Output is correct
45 Correct 3 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 51 ms 3324 KB Output is correct
3 Correct 41 ms 3244 KB Output is correct
4 Correct 31 ms 3160 KB Output is correct
5 Correct 44 ms 3356 KB Output is correct
6 Correct 36 ms 3324 KB Output is correct
7 Correct 47 ms 3408 KB Output is correct
8 Correct 0 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 1 ms 348 KB Output is correct
13 Correct 0 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 1 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 159 ms 3404 KB Output is correct
21 Correct 144 ms 3408 KB Output is correct
22 Correct 158 ms 3332 KB Output is correct
23 Correct 140 ms 3612 KB Output is correct
24 Correct 135 ms 3348 KB Output is correct
25 Correct 149 ms 3408 KB Output is correct
26 Correct 165 ms 3412 KB Output is correct
27 Correct 2 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 464 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 2 ms 348 KB Output is correct
36 Correct 3 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 344 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 2 ms 344 KB Output is correct
45 Correct 3 ms 344 KB Output is correct
46 Correct 5 ms 604 KB Output is correct
47 Correct 259 ms 4600 KB Output is correct
48 Correct 229 ms 3924 KB Output is correct
49 Correct 216 ms 3832 KB Output is correct
50 Correct 204 ms 4472 KB Output is correct
51 Correct 210 ms 4216 KB Output is correct
52 Correct 256 ms 4460 KB Output is correct
53 Correct 287 ms 4688 KB Output is correct
54 Correct 28 ms 1368 KB Output is correct
55 Correct 21 ms 1372 KB Output is correct
56 Correct 32 ms 1536 KB Output is correct
57 Correct 22 ms 1776 KB Output is correct
58 Correct 25 ms 1372 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 51 ms 3324 KB Output is correct
3 Correct 41 ms 3244 KB Output is correct
4 Correct 31 ms 3160 KB Output is correct
5 Correct 44 ms 3356 KB Output is correct
6 Correct 36 ms 3324 KB Output is correct
7 Correct 47 ms 3408 KB Output is correct
8 Correct 0 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 1 ms 348 KB Output is correct
13 Correct 0 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 1 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 159 ms 3404 KB Output is correct
21 Correct 144 ms 3408 KB Output is correct
22 Correct 158 ms 3332 KB Output is correct
23 Correct 140 ms 3612 KB Output is correct
24 Correct 135 ms 3348 KB Output is correct
25 Correct 149 ms 3408 KB Output is correct
26 Correct 165 ms 3412 KB Output is correct
27 Correct 2 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 464 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 2 ms 348 KB Output is correct
36 Correct 3 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 344 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 2 ms 344 KB Output is correct
45 Correct 3 ms 344 KB Output is correct
46 Correct 5 ms 604 KB Output is correct
47 Correct 259 ms 4600 KB Output is correct
48 Correct 229 ms 3924 KB Output is correct
49 Correct 216 ms 3832 KB Output is correct
50 Correct 204 ms 4472 KB Output is correct
51 Correct 210 ms 4216 KB Output is correct
52 Correct 256 ms 4460 KB Output is correct
53 Correct 287 ms 4688 KB Output is correct
54 Correct 28 ms 1368 KB Output is correct
55 Correct 21 ms 1372 KB Output is correct
56 Correct 32 ms 1536 KB Output is correct
57 Correct 22 ms 1776 KB Output is correct
58 Correct 25 ms 1372 KB Output is correct
59 Correct 463 ms 8572 KB Output is correct
60 Correct 631 ms 11728 KB Output is correct
61 Correct 652 ms 12252 KB Output is correct
62 Correct 623 ms 12136 KB Output is correct
63 Correct 450 ms 8272 KB Output is correct
64 Correct 686 ms 13088 KB Output is correct
65 Correct 683 ms 13416 KB Output is correct
66 Correct 446 ms 10832 KB Output is correct
67 Correct 504 ms 10484 KB Output is correct
68 Correct 890 ms 13740 KB Output is correct
69 Correct 831 ms 13900 KB Output is correct
70 Correct 275 ms 9228 KB Output is correct
71 Correct 212 ms 8968 KB Output is correct
72 Correct 217 ms 9552 KB Output is correct
73 Correct 199 ms 8760 KB Output is correct
74 Correct 219 ms 9364 KB Output is correct
75 Correct 421 ms 10436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 7 ms 604 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 2594 ms 71288 KB Output is correct
6 Correct 1594 ms 58100 KB Output is correct
7 Correct 1830 ms 70724 KB Output is correct
8 Correct 1967 ms 74032 KB Output is correct
9 Correct 2612 ms 76296 KB Output is correct
10 Correct 1861 ms 70172 KB Output is correct
11 Correct 2050 ms 74016 KB Output is correct
12 Correct 2578 ms 76320 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 680 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 600 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 344 KB Output is correct
22 Correct 2 ms 344 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 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 1 ms 348 KB Output is correct
30 Correct 2 ms 456 KB Output is correct
31 Correct 3 ms 348 KB Output is correct
32 Correct 1 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 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 2 ms 348 KB Output is correct
40 Correct 3 ms 348 KB Output is correct
41 Correct 28 ms 1360 KB Output is correct
42 Correct 21 ms 1372 KB Output is correct
43 Correct 26 ms 1532 KB Output is correct
44 Correct 22 ms 1468 KB Output is correct
45 Correct 25 ms 1372 KB Output is correct
46 Correct 259 ms 9140 KB Output is correct
47 Correct 239 ms 9116 KB Output is correct
48 Correct 216 ms 9556 KB Output is correct
49 Correct 194 ms 8924 KB Output is correct
50 Correct 220 ms 9392 KB Output is correct
51 Correct 1587 ms 58196 KB Output is correct
52 Correct 2899 ms 58144 KB Output is correct
53 Correct 3698 ms 80464 KB Output is correct
54 Correct 3694 ms 79428 KB Output is correct
55 Correct 1 ms 348 KB Output is correct
56 Correct 402 ms 10364 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 51 ms 3324 KB Output is correct
59 Correct 41 ms 3244 KB Output is correct
60 Correct 31 ms 3160 KB Output is correct
61 Correct 44 ms 3356 KB Output is correct
62 Correct 36 ms 3324 KB Output is correct
63 Correct 47 ms 3408 KB Output is correct
64 Correct 0 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 1 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 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 348 KB Output is correct
76 Correct 159 ms 3404 KB Output is correct
77 Correct 144 ms 3408 KB Output is correct
78 Correct 158 ms 3332 KB Output is correct
79 Correct 140 ms 3612 KB Output is correct
80 Correct 135 ms 3348 KB Output is correct
81 Correct 149 ms 3408 KB Output is correct
82 Correct 165 ms 3412 KB Output is correct
83 Correct 2 ms 344 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 1 ms 348 KB Output is correct
87 Correct 1 ms 464 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 1 ms 348 KB Output is correct
90 Correct 1 ms 348 KB Output is correct
91 Correct 2 ms 348 KB Output is correct
92 Correct 3 ms 348 KB Output is correct
93 Correct 0 ms 348 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 1 ms 344 KB Output is correct
97 Correct 1 ms 348 KB Output is correct
98 Correct 1 ms 344 KB Output is correct
99 Correct 1 ms 348 KB Output is correct
100 Correct 2 ms 344 KB Output is correct
101 Correct 3 ms 344 KB Output is correct
102 Correct 5 ms 604 KB Output is correct
103 Correct 259 ms 4600 KB Output is correct
104 Correct 229 ms 3924 KB Output is correct
105 Correct 216 ms 3832 KB Output is correct
106 Correct 204 ms 4472 KB Output is correct
107 Correct 210 ms 4216 KB Output is correct
108 Correct 256 ms 4460 KB Output is correct
109 Correct 287 ms 4688 KB Output is correct
110 Correct 28 ms 1368 KB Output is correct
111 Correct 21 ms 1372 KB Output is correct
112 Correct 32 ms 1536 KB Output is correct
113 Correct 22 ms 1776 KB Output is correct
114 Correct 25 ms 1372 KB Output is correct
115 Correct 463 ms 8572 KB Output is correct
116 Correct 631 ms 11728 KB Output is correct
117 Correct 652 ms 12252 KB Output is correct
118 Correct 623 ms 12136 KB Output is correct
119 Correct 450 ms 8272 KB Output is correct
120 Correct 686 ms 13088 KB Output is correct
121 Correct 683 ms 13416 KB Output is correct
122 Correct 446 ms 10832 KB Output is correct
123 Correct 504 ms 10484 KB Output is correct
124 Correct 890 ms 13740 KB Output is correct
125 Correct 831 ms 13900 KB Output is correct
126 Correct 275 ms 9228 KB Output is correct
127 Correct 212 ms 8968 KB Output is correct
128 Correct 217 ms 9552 KB Output is correct
129 Correct 199 ms 8760 KB Output is correct
130 Correct 219 ms 9364 KB Output is correct
131 Correct 421 ms 10436 KB Output is correct
132 Execution timed out 4008 ms 92756 KB Time limit exceeded
133 Halted 0 ms 0 KB -