Submission #776261

# Submission time Handle Problem Language Result Execution time Memory
776261 2023-07-07T14:02:44 Z hugo_pm Council (JOI23_council) C++17
100 / 100
2877 ms 668532 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;

#define all(v) (v).begin(), (v).end()
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define sz(v) ((int)((v).size()))

template<typename T>
void chmax(T &x, const T &v) { if (x < v) x = v; }
template<typename T>
void chmin(T &x, const T &v) { if (x > v) x = v; }

using pii = pair<int, int>;

string to_string(string s) { return s; }
template <typename T> string to_string(T v) {
	bool first = true;
	string res = "[";
	for (const auto &x : v) {
		if (!first)
			res += ", ";
		first = false;
		res += to_string(x);
	}
	res += "]";
	return res;
}

void dbg_out() { cout << endl; }
template <typename Head, typename... Tail> void dbg_out(Head H, Tail... T) {
	cout << ' ' << to_string(H);
	dbg_out(T...);
}

#ifdef DEBUG
#define dbg(...) cout << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

    int nbPerson, nbProp;
    cin >> nbPerson >> nbProp;
    vector<vector<int>> vote(nbPerson, vector<int>(nbProp));
    vector<int> somme(nbProp, 0);
    rep(iPerson, 0, nbPerson) {
        rep(iProp, 0, nbProp) {
            int x; cin >> x;
            vote[iPerson][iProp] = x;
            somme[iProp] += x;
        }
    }
    int seuil = nbPerson/2;
    int alwaysOk = 0;
    vector<int> useful, mask(nbPerson);
    rep(iProp, 0, nbProp) {
        if (seuil == somme[iProp] || somme[iProp] == seuil+1) {
            useful.push_back(iProp);
            rep(iPerson, 0, nbPerson) {
                if (vote[iPerson][iProp] == 0) {
                    mask[iPerson] += 1<<iProp;
                }
            }
        } else if (somme[iProp] >= seuil+2) {
            alwaysOk++;
        }
    }

    vector<vector<pii>> dp(1 << nbProp, {{-1, -1}, {-1, -1}});
    rep(iPerson, 0, nbPerson) {
        int x = mask[iPerson];
        dp[x].emplace_back(__builtin_popcountll(x), iPerson);
    }
    for (int x = (1<<nbProp)-1; x >= 0; --x) {
        //dbg(x, dp[x]);
        rep(bit, 0, nbProp) {
            int plusHaut = x | (1<<bit);
            if (plusHaut == x) continue;
            for (auto [pop, from] : dp[plusHaut]) if (pop > 0) {
                    dp[x].emplace_back(__builtin_popcount(x), from);
            }
        }
        sort(dp[x].rbegin(), dp[x].rend());
        dp[x].resize(unique(all(dp[x])) - dp[x].begin());
        dp[x].resize(2);
    }
    rep(x, 0, 1<<nbProp) {
        rep(bit, 0, nbProp) if (x & (1<<bit)){
            for (auto p: dp[x^(1<<bit)]) dp[x].push_back(p);
        }
        sort(dp[x].rbegin(), dp[x].rend());
        vector<pii> ps;
        rep(i, 0, sz(dp[x])) {
            if (i == 0 || dp[x][i].second != dp[x][i-1].second) {
                ps.push_back(dp[x][i]);
            }
        }
        dp[x] = ps;
        dp[x].resize(2);
    }
    rep(iChef, 0, nbPerson) {
        int M = 0;
        int middle = 0;
        for (int iProp : useful) {
            bool c1 = (vote[iChef][iProp] == 0 && somme[iProp] == seuil);
            bool c2 = (vote[iChef][iProp] == 1 && somme[iProp] == seuil+1);
            if (c1 || c2) {
                M += (1<<iProp);
            } else if (vote[iChef][iProp] == 0) {
                assert(somme[iProp] == seuil+1);
                ++middle;
            }
        }
        string s = bitset<12>(M).to_string();
        auto take = dp[M][0];
        //dbg(iChef, take.first, take.second, middle, alwaysOk);
        if (take.second == iChef) { take = dp[M][1]; }
        //dbg(iChef, take.first, take.second, middle, alwaysOk);
        cout << take.first + middle + alwaysOk << "\n";
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 4 ms 1620 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1427 ms 560256 KB Output is correct
6 Correct 1042 ms 535036 KB Output is correct
7 Correct 1265 ms 535012 KB Output is correct
8 Correct 1253 ms 535072 KB Output is correct
9 Correct 1096 ms 535084 KB Output is correct
10 Correct 1234 ms 535588 KB Output is correct
11 Correct 1425 ms 536244 KB Output is correct
12 Correct 1678 ms 570596 KB Output is correct
13 Correct 0 ms 324 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 316 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 596 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 340 KB Output is correct
29 Correct 1 ms 448 KB Output is correct
30 Correct 1 ms 596 KB Output is correct
31 Correct 1 ms 596 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 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 468 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 2 ms 724 KB Output is correct
41 Correct 14 ms 7252 KB Output is correct
42 Correct 13 ms 6592 KB Output is correct
43 Correct 13 ms 6612 KB Output is correct
44 Correct 14 ms 6612 KB Output is correct
45 Correct 15 ms 6740 KB Output is correct
46 Correct 150 ms 67484 KB Output is correct
47 Correct 144 ms 60620 KB Output is correct
48 Correct 136 ms 60620 KB Output is correct
49 Correct 149 ms 60752 KB Output is correct
50 Correct 160 ms 61712 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 4 ms 1620 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1427 ms 560256 KB Output is correct
6 Correct 1042 ms 535036 KB Output is correct
7 Correct 1265 ms 535012 KB Output is correct
8 Correct 1253 ms 535072 KB Output is correct
9 Correct 1096 ms 535084 KB Output is correct
10 Correct 1234 ms 535588 KB Output is correct
11 Correct 1425 ms 536244 KB Output is correct
12 Correct 1678 ms 570596 KB Output is correct
13 Correct 0 ms 324 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 316 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 596 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 340 KB Output is correct
29 Correct 1 ms 448 KB Output is correct
30 Correct 1 ms 596 KB Output is correct
31 Correct 1 ms 596 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 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 468 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 2 ms 724 KB Output is correct
41 Correct 14 ms 7252 KB Output is correct
42 Correct 13 ms 6592 KB Output is correct
43 Correct 13 ms 6612 KB Output is correct
44 Correct 14 ms 6612 KB Output is correct
45 Correct 15 ms 6740 KB Output is correct
46 Correct 150 ms 67484 KB Output is correct
47 Correct 144 ms 60620 KB Output is correct
48 Correct 136 ms 60620 KB Output is correct
49 Correct 149 ms 60752 KB Output is correct
50 Correct 160 ms 61712 KB Output is correct
51 Correct 1008 ms 535848 KB Output is correct
52 Correct 998 ms 535844 KB Output is correct
53 Correct 1002 ms 535756 KB Output is correct
54 Correct 1984 ms 598696 KB Output is correct
55 Correct 1 ms 596 KB Output is correct
56 Correct 238 ms 75704 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 320 KB Output is correct
2 Correct 76 ms 28624 KB Output is correct
3 Correct 73 ms 28608 KB Output is correct
4 Correct 61 ms 27972 KB Output is correct
5 Correct 79 ms 28512 KB Output is correct
6 Correct 65 ms 26032 KB Output is correct
7 Correct 84 ms 25632 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 316 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 320 KB Output is correct
2 Correct 76 ms 28624 KB Output is correct
3 Correct 73 ms 28608 KB Output is correct
4 Correct 61 ms 27972 KB Output is correct
5 Correct 79 ms 28512 KB Output is correct
6 Correct 65 ms 26032 KB Output is correct
7 Correct 84 ms 25632 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 316 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 230 ms 48320 KB Output is correct
21 Correct 208 ms 43936 KB Output is correct
22 Correct 212 ms 43632 KB Output is correct
23 Correct 171 ms 48436 KB Output is correct
24 Correct 159 ms 48408 KB Output is correct
25 Correct 179 ms 48400 KB Output is correct
26 Correct 249 ms 49668 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 0 ms 320 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 5 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 444 KB Output is correct
35 Correct 1 ms 576 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 320 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 320 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 468 KB Output is correct
44 Correct 1 ms 596 KB Output is correct
45 Correct 2 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 320 KB Output is correct
2 Correct 76 ms 28624 KB Output is correct
3 Correct 73 ms 28608 KB Output is correct
4 Correct 61 ms 27972 KB Output is correct
5 Correct 79 ms 28512 KB Output is correct
6 Correct 65 ms 26032 KB Output is correct
7 Correct 84 ms 25632 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 316 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 230 ms 48320 KB Output is correct
21 Correct 208 ms 43936 KB Output is correct
22 Correct 212 ms 43632 KB Output is correct
23 Correct 171 ms 48436 KB Output is correct
24 Correct 159 ms 48408 KB Output is correct
25 Correct 179 ms 48400 KB Output is correct
26 Correct 249 ms 49668 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 0 ms 320 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 5 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 444 KB Output is correct
35 Correct 1 ms 576 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 320 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 320 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 468 KB Output is correct
44 Correct 1 ms 596 KB Output is correct
45 Correct 2 ms 724 KB Output is correct
46 Correct 4 ms 1600 KB Output is correct
47 Correct 337 ms 64364 KB Output is correct
48 Correct 298 ms 56016 KB Output is correct
49 Correct 344 ms 55968 KB Output is correct
50 Correct 232 ms 61292 KB Output is correct
51 Correct 250 ms 60980 KB Output is correct
52 Correct 243 ms 60964 KB Output is correct
53 Correct 353 ms 66100 KB Output is correct
54 Correct 14 ms 7252 KB Output is correct
55 Correct 13 ms 6620 KB Output is correct
56 Correct 14 ms 6584 KB Output is correct
57 Correct 15 ms 6672 KB Output is correct
58 Correct 15 ms 6740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 320 KB Output is correct
2 Correct 76 ms 28624 KB Output is correct
3 Correct 73 ms 28608 KB Output is correct
4 Correct 61 ms 27972 KB Output is correct
5 Correct 79 ms 28512 KB Output is correct
6 Correct 65 ms 26032 KB Output is correct
7 Correct 84 ms 25632 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 316 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 230 ms 48320 KB Output is correct
21 Correct 208 ms 43936 KB Output is correct
22 Correct 212 ms 43632 KB Output is correct
23 Correct 171 ms 48436 KB Output is correct
24 Correct 159 ms 48408 KB Output is correct
25 Correct 179 ms 48400 KB Output is correct
26 Correct 249 ms 49668 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 0 ms 320 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 5 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 444 KB Output is correct
35 Correct 1 ms 576 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 320 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 320 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 468 KB Output is correct
44 Correct 1 ms 596 KB Output is correct
45 Correct 2 ms 724 KB Output is correct
46 Correct 4 ms 1600 KB Output is correct
47 Correct 337 ms 64364 KB Output is correct
48 Correct 298 ms 56016 KB Output is correct
49 Correct 344 ms 55968 KB Output is correct
50 Correct 232 ms 61292 KB Output is correct
51 Correct 250 ms 60980 KB Output is correct
52 Correct 243 ms 60964 KB Output is correct
53 Correct 353 ms 66100 KB Output is correct
54 Correct 14 ms 7252 KB Output is correct
55 Correct 13 ms 6620 KB Output is correct
56 Correct 14 ms 6584 KB Output is correct
57 Correct 15 ms 6672 KB Output is correct
58 Correct 15 ms 6740 KB Output is correct
59 Correct 317 ms 88388 KB Output is correct
60 Correct 469 ms 96260 KB Output is correct
61 Correct 425 ms 97968 KB Output is correct
62 Correct 452 ms 98804 KB Output is correct
63 Correct 510 ms 95580 KB Output is correct
64 Correct 616 ms 127656 KB Output is correct
65 Correct 633 ms 127624 KB Output is correct
66 Correct 366 ms 120116 KB Output is correct
67 Correct 381 ms 119740 KB Output is correct
68 Correct 373 ms 119788 KB Output is correct
69 Correct 677 ms 129760 KB Output is correct
70 Correct 157 ms 67512 KB Output is correct
71 Correct 135 ms 60660 KB Output is correct
72 Correct 130 ms 60640 KB Output is correct
73 Correct 142 ms 60828 KB Output is correct
74 Correct 161 ms 61624 KB Output is correct
75 Correct 226 ms 75724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 4 ms 1620 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1427 ms 560256 KB Output is correct
6 Correct 1042 ms 535036 KB Output is correct
7 Correct 1265 ms 535012 KB Output is correct
8 Correct 1253 ms 535072 KB Output is correct
9 Correct 1096 ms 535084 KB Output is correct
10 Correct 1234 ms 535588 KB Output is correct
11 Correct 1425 ms 536244 KB Output is correct
12 Correct 1678 ms 570596 KB Output is correct
13 Correct 0 ms 324 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 316 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 596 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 340 KB Output is correct
29 Correct 1 ms 448 KB Output is correct
30 Correct 1 ms 596 KB Output is correct
31 Correct 1 ms 596 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 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 468 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 2 ms 724 KB Output is correct
41 Correct 14 ms 7252 KB Output is correct
42 Correct 13 ms 6592 KB Output is correct
43 Correct 13 ms 6612 KB Output is correct
44 Correct 14 ms 6612 KB Output is correct
45 Correct 15 ms 6740 KB Output is correct
46 Correct 150 ms 67484 KB Output is correct
47 Correct 144 ms 60620 KB Output is correct
48 Correct 136 ms 60620 KB Output is correct
49 Correct 149 ms 60752 KB Output is correct
50 Correct 160 ms 61712 KB Output is correct
51 Correct 1008 ms 535848 KB Output is correct
52 Correct 998 ms 535844 KB Output is correct
53 Correct 1002 ms 535756 KB Output is correct
54 Correct 1984 ms 598696 KB Output is correct
55 Correct 1 ms 596 KB Output is correct
56 Correct 238 ms 75704 KB Output is correct
57 Correct 1 ms 320 KB Output is correct
58 Correct 76 ms 28624 KB Output is correct
59 Correct 73 ms 28608 KB Output is correct
60 Correct 61 ms 27972 KB Output is correct
61 Correct 79 ms 28512 KB Output is correct
62 Correct 65 ms 26032 KB Output is correct
63 Correct 84 ms 25632 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 1 ms 212 KB Output is correct
68 Correct 1 ms 340 KB Output is correct
69 Correct 1 ms 212 KB Output is correct
70 Correct 0 ms 316 KB Output is correct
71 Correct 1 ms 212 KB Output is correct
72 Correct 1 ms 340 KB Output is correct
73 Correct 1 ms 596 KB Output is correct
74 Correct 1 ms 212 KB Output is correct
75 Correct 0 ms 212 KB Output is correct
76 Correct 230 ms 48320 KB Output is correct
77 Correct 208 ms 43936 KB Output is correct
78 Correct 212 ms 43632 KB Output is correct
79 Correct 171 ms 48436 KB Output is correct
80 Correct 159 ms 48408 KB Output is correct
81 Correct 179 ms 48400 KB Output is correct
82 Correct 249 ms 49668 KB Output is correct
83 Correct 1 ms 596 KB Output is correct
84 Correct 0 ms 320 KB Output is correct
85 Correct 0 ms 212 KB Output is correct
86 Correct 1 ms 212 KB Output is correct
87 Correct 5 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 444 KB Output is correct
91 Correct 1 ms 576 KB Output is correct
92 Correct 2 ms 596 KB Output is correct
93 Correct 1 ms 212 KB Output is correct
94 Correct 1 ms 320 KB Output is correct
95 Correct 1 ms 212 KB Output is correct
96 Correct 1 ms 320 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 468 KB Output is correct
100 Correct 1 ms 596 KB Output is correct
101 Correct 2 ms 724 KB Output is correct
102 Correct 4 ms 1600 KB Output is correct
103 Correct 337 ms 64364 KB Output is correct
104 Correct 298 ms 56016 KB Output is correct
105 Correct 344 ms 55968 KB Output is correct
106 Correct 232 ms 61292 KB Output is correct
107 Correct 250 ms 60980 KB Output is correct
108 Correct 243 ms 60964 KB Output is correct
109 Correct 353 ms 66100 KB Output is correct
110 Correct 14 ms 7252 KB Output is correct
111 Correct 13 ms 6620 KB Output is correct
112 Correct 14 ms 6584 KB Output is correct
113 Correct 15 ms 6672 KB Output is correct
114 Correct 15 ms 6740 KB Output is correct
115 Correct 317 ms 88388 KB Output is correct
116 Correct 469 ms 96260 KB Output is correct
117 Correct 425 ms 97968 KB Output is correct
118 Correct 452 ms 98804 KB Output is correct
119 Correct 510 ms 95580 KB Output is correct
120 Correct 616 ms 127656 KB Output is correct
121 Correct 633 ms 127624 KB Output is correct
122 Correct 366 ms 120116 KB Output is correct
123 Correct 381 ms 119740 KB Output is correct
124 Correct 373 ms 119788 KB Output is correct
125 Correct 677 ms 129760 KB Output is correct
126 Correct 157 ms 67512 KB Output is correct
127 Correct 135 ms 60660 KB Output is correct
128 Correct 130 ms 60640 KB Output is correct
129 Correct 142 ms 60828 KB Output is correct
130 Correct 161 ms 61624 KB Output is correct
131 Correct 226 ms 75724 KB Output is correct
132 Correct 2168 ms 649852 KB Output is correct
133 Correct 2123 ms 649784 KB Output is correct
134 Correct 2171 ms 657412 KB Output is correct
135 Correct 2565 ms 646336 KB Output is correct
136 Correct 2647 ms 668532 KB Output is correct
137 Correct 1472 ms 354992 KB Output is correct
138 Correct 1436 ms 354616 KB Output is correct
139 Correct 1274 ms 603940 KB Output is correct
140 Correct 1265 ms 603656 KB Output is correct
141 Correct 1284 ms 603600 KB Output is correct
142 Correct 2877 ms 655480 KB Output is correct