Submission #1089420

# Submission time Handle Problem Language Result Execution time Memory
1089420 2024-09-16T13:02:24 Z Thanhs Council (JOI23_council) C++14
100 / 100
1140 ms 121020 KB
#include <bits/stdc++.h>
using namespace std;
 
#define fi first
#define se second
#define int long long
#define endl '\n'
#define setmin(x, y) x = min((x), (y))
#define setmax(x, y) x = max((x), (y))
 
mt19937 hdp(chrono::high_resolution_clock::now().time_since_epoch().count());
int rand(int l, int r){return l + ((hdp() % (r - l + 1)) + r - l + 1) % (r - l + 1);}

const int NM = 3e5 + 5;
const int MM = 25;
const int EM = (1 << 20) + 5;

struct node
{
    pair<pair<int, int>, pair<int, int>> best = {{0, 0}, {0, 0}};
    node() {}
    node(int a, int b, int c, int d) : best({{a, b}, {c, d}}) {}
    node operator+(const node& o)
    {
        vector<pair<int, int>> v;
        v.push_back(best.fi);
        v.push_back(best.se);
        v.push_back(o.best.fi);
        v.push_back(o.best.se);
        sort(v.begin(), v.end(), [&](const pair<int, int> x, const pair<int, int> y) {return x.fi > y.fi;});
        node res;
        for (auto t : v)
        {
            if (!res.best.fi.se)
                res.best.fi = t;
            else if (!res.best.se.se && t.se != res.best.fi.se)
                res.best.se = t;
        }
        return res;
    }
}dp[EM];

int n, m, a[NM][MM], sum[MM];
pair<int, int> b[EM];

void solve()
{
    cin >> n >> m;
    for (int i = 1; i <= n; i++)
    {
        int msk = 0;
        for (int j = 0; j < m; j++)
        {
            cin >> a[i][j];
            sum[j] += a[i][j];
            msk |= a[i][j] << j;
        }
        (b[msk].fi ? b[msk].se : b[msk].fi) = i;
    }    
    for (int i = 0; i < m; i++)
        for (int j = 0; j < (1 << m); j++)
            if (j >> i & 1)
            {
                if (b[j ^ (1 << i)].fi)
                    (b[j].fi ? b[j].se : b[j].fi) = b[j ^ (1 << i)].fi;
                if (b[j ^ (1 << i)].se)
                    (b[j].fi ? b[j].se : b[j].fi) = b[j ^ (1 << i)].se;
            }
    for (int i = 0; i < (1 << m); i++)
        if (i < (i ^ ((1 << m) - 1)))
            swap(b[i], b[i ^ ((1 << m) - 1)]);
    for (int i = 0; i < (1 << m); i++)
        dp[i] = node(b[i].fi ? __builtin_popcount(i) : 0, b[i].fi, b[i].se ? __builtin_popcount(i) : 0, b[i].se);
    for (int i = 0; i < m; i++)
        for (int j = 0; j < (1 << m); j++)
            if (j >> i & 1)
                dp[j] = dp[j] + dp[j ^ (1 << i)];
    for (int i = 1; i <= n; i++)
    {
        int msk = 0, ans = 0;
        for (int j = 0; j < m; j++)
        {
            if (sum[j] - a[i][j] == n / 2)
                msk |= 1 << j;
            else
                ans += sum[j] - a[i][j] > n / 2;
        }
        cout << ans + (dp[msk].best.fi.se == i ? dp[msk].best.se : dp[msk].best.fi).fi << endl;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    if (fopen("in.txt", "r")) 
    {
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    }
    int tc = 1; 
    // cin >> tc;
    while (tc--)
        solve();

}

Compilation message

council.cpp: In function 'int main()':
council.cpp:97:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   97 |         freopen("in.txt", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
council.cpp:98:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   98 |         freopen("out.txt", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 15 ms 33116 KB Output is correct
2 Correct 15 ms 33140 KB Output is correct
3 Correct 14 ms 33112 KB Output is correct
4 Correct 12 ms 33248 KB Output is correct
5 Correct 698 ms 49512 KB Output is correct
6 Correct 714 ms 49764 KB Output is correct
7 Correct 708 ms 49696 KB Output is correct
8 Correct 691 ms 49492 KB Output is correct
9 Correct 706 ms 49760 KB Output is correct
10 Correct 700 ms 49488 KB Output is correct
11 Correct 731 ms 49628 KB Output is correct
12 Correct 753 ms 49764 KB Output is correct
13 Correct 13 ms 33112 KB Output is correct
14 Correct 14 ms 33276 KB Output is correct
15 Correct 13 ms 33288 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 33116 KB Output is correct
18 Correct 17 ms 33272 KB Output is correct
19 Correct 13 ms 33112 KB Output is correct
20 Correct 13 ms 33116 KB Output is correct
21 Correct 13 ms 33372 KB Output is correct
22 Correct 13 ms 33116 KB Output is correct
23 Correct 14 ms 33116 KB Output is correct
24 Correct 13 ms 33156 KB Output is correct
25 Correct 14 ms 33116 KB Output is correct
26 Correct 12 ms 33116 KB Output is correct
27 Correct 12 ms 33300 KB Output is correct
28 Correct 13 ms 33368 KB Output is correct
29 Correct 13 ms 33116 KB Output is correct
30 Correct 13 ms 33120 KB Output is correct
31 Correct 14 ms 33368 KB Output is correct
32 Correct 12 ms 33172 KB Output is correct
33 Correct 13 ms 33112 KB Output is correct
34 Correct 14 ms 33116 KB Output is correct
35 Correct 14 ms 33116 KB Output is correct
36 Correct 15 ms 33116 KB Output is correct
37 Correct 13 ms 33116 KB Output is correct
38 Correct 13 ms 33264 KB Output is correct
39 Correct 14 ms 33116 KB Output is correct
40 Correct 14 ms 33372 KB Output is correct
41 Correct 20 ms 33384 KB Output is correct
42 Correct 25 ms 33372 KB Output is correct
43 Correct 22 ms 33372 KB Output is correct
44 Correct 21 ms 33372 KB Output is correct
45 Correct 21 ms 33372 KB Output is correct
46 Correct 88 ms 35164 KB Output is correct
47 Correct 86 ms 35160 KB Output is correct
48 Correct 86 ms 35164 KB Output is correct
49 Correct 87 ms 35340 KB Output is correct
50 Correct 94 ms 35164 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 33116 KB Output is correct
2 Correct 15 ms 33140 KB Output is correct
3 Correct 14 ms 33112 KB Output is correct
4 Correct 12 ms 33248 KB Output is correct
5 Correct 698 ms 49512 KB Output is correct
6 Correct 714 ms 49764 KB Output is correct
7 Correct 708 ms 49696 KB Output is correct
8 Correct 691 ms 49492 KB Output is correct
9 Correct 706 ms 49760 KB Output is correct
10 Correct 700 ms 49488 KB Output is correct
11 Correct 731 ms 49628 KB Output is correct
12 Correct 753 ms 49764 KB Output is correct
13 Correct 13 ms 33112 KB Output is correct
14 Correct 14 ms 33276 KB Output is correct
15 Correct 13 ms 33288 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 33116 KB Output is correct
18 Correct 17 ms 33272 KB Output is correct
19 Correct 13 ms 33112 KB Output is correct
20 Correct 13 ms 33116 KB Output is correct
21 Correct 13 ms 33372 KB Output is correct
22 Correct 13 ms 33116 KB Output is correct
23 Correct 14 ms 33116 KB Output is correct
24 Correct 13 ms 33156 KB Output is correct
25 Correct 14 ms 33116 KB Output is correct
26 Correct 12 ms 33116 KB Output is correct
27 Correct 12 ms 33300 KB Output is correct
28 Correct 13 ms 33368 KB Output is correct
29 Correct 13 ms 33116 KB Output is correct
30 Correct 13 ms 33120 KB Output is correct
31 Correct 14 ms 33368 KB Output is correct
32 Correct 12 ms 33172 KB Output is correct
33 Correct 13 ms 33112 KB Output is correct
34 Correct 14 ms 33116 KB Output is correct
35 Correct 14 ms 33116 KB Output is correct
36 Correct 15 ms 33116 KB Output is correct
37 Correct 13 ms 33116 KB Output is correct
38 Correct 13 ms 33264 KB Output is correct
39 Correct 14 ms 33116 KB Output is correct
40 Correct 14 ms 33372 KB Output is correct
41 Correct 20 ms 33384 KB Output is correct
42 Correct 25 ms 33372 KB Output is correct
43 Correct 22 ms 33372 KB Output is correct
44 Correct 21 ms 33372 KB Output is correct
45 Correct 21 ms 33372 KB Output is correct
46 Correct 88 ms 35164 KB Output is correct
47 Correct 86 ms 35160 KB Output is correct
48 Correct 86 ms 35164 KB Output is correct
49 Correct 87 ms 35340 KB Output is correct
50 Correct 94 ms 35164 KB Output is correct
51 Correct 749 ms 50400 KB Output is correct
52 Correct 751 ms 50200 KB Output is correct
53 Correct 721 ms 50260 KB Output is correct
54 Correct 751 ms 50400 KB Output is correct
55 Correct 15 ms 33884 KB Output is correct
56 Correct 91 ms 36036 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 33116 KB Output is correct
2 Correct 73 ms 93608 KB Output is correct
3 Correct 77 ms 93520 KB Output is correct
4 Correct 61 ms 93012 KB Output is correct
5 Correct 75 ms 93536 KB Output is correct
6 Correct 69 ms 93140 KB Output is correct
7 Correct 81 ms 93644 KB Output is correct
8 Correct 13 ms 33116 KB Output is correct
9 Correct 13 ms 33116 KB Output is correct
10 Correct 13 ms 33112 KB Output is correct
11 Correct 13 ms 33116 KB Output is correct
12 Correct 14 ms 33372 KB Output is correct
13 Correct 13 ms 33368 KB Output is correct
14 Correct 13 ms 33116 KB Output is correct
15 Correct 14 ms 33148 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 34132 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 33116 KB Output is correct
2 Correct 73 ms 93608 KB Output is correct
3 Correct 77 ms 93520 KB Output is correct
4 Correct 61 ms 93012 KB Output is correct
5 Correct 75 ms 93536 KB Output is correct
6 Correct 69 ms 93140 KB Output is correct
7 Correct 81 ms 93644 KB Output is correct
8 Correct 13 ms 33116 KB Output is correct
9 Correct 13 ms 33116 KB Output is correct
10 Correct 13 ms 33112 KB Output is correct
11 Correct 13 ms 33116 KB Output is correct
12 Correct 14 ms 33372 KB Output is correct
13 Correct 13 ms 33368 KB Output is correct
14 Correct 13 ms 33116 KB Output is correct
15 Correct 14 ms 33148 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 34132 KB Output is correct
18 Correct 14 ms 33112 KB Output is correct
19 Correct 13 ms 33116 KB Output is correct
20 Correct 186 ms 98296 KB Output is correct
21 Correct 172 ms 97880 KB Output is correct
22 Correct 157 ms 97692 KB Output is correct
23 Correct 175 ms 98752 KB Output is correct
24 Correct 150 ms 98308 KB Output is correct
25 Correct 162 ms 98392 KB Output is correct
26 Correct 187 ms 98388 KB Output is correct
27 Correct 13 ms 33116 KB Output is correct
28 Correct 13 ms 33296 KB Output is correct
29 Correct 12 ms 33128 KB Output is correct
30 Correct 13 ms 33368 KB Output is correct
31 Correct 14 ms 33116 KB Output is correct
32 Correct 15 ms 33116 KB Output is correct
33 Correct 14 ms 33116 KB Output is correct
34 Correct 13 ms 33116 KB Output is correct
35 Correct 13 ms 33188 KB Output is correct
36 Correct 14 ms 33272 KB Output is correct
37 Correct 13 ms 33116 KB Output is correct
38 Correct 13 ms 33280 KB Output is correct
39 Correct 12 ms 33112 KB Output is correct
40 Correct 12 ms 33116 KB Output is correct
41 Correct 13 ms 33296 KB Output is correct
42 Correct 13 ms 33116 KB Output is correct
43 Correct 14 ms 33116 KB Output is correct
44 Correct 13 ms 33120 KB Output is correct
45 Correct 14 ms 33372 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 33116 KB Output is correct
2 Correct 73 ms 93608 KB Output is correct
3 Correct 77 ms 93520 KB Output is correct
4 Correct 61 ms 93012 KB Output is correct
5 Correct 75 ms 93536 KB Output is correct
6 Correct 69 ms 93140 KB Output is correct
7 Correct 81 ms 93644 KB Output is correct
8 Correct 13 ms 33116 KB Output is correct
9 Correct 13 ms 33116 KB Output is correct
10 Correct 13 ms 33112 KB Output is correct
11 Correct 13 ms 33116 KB Output is correct
12 Correct 14 ms 33372 KB Output is correct
13 Correct 13 ms 33368 KB Output is correct
14 Correct 13 ms 33116 KB Output is correct
15 Correct 14 ms 33148 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 34132 KB Output is correct
18 Correct 14 ms 33112 KB Output is correct
19 Correct 13 ms 33116 KB Output is correct
20 Correct 186 ms 98296 KB Output is correct
21 Correct 172 ms 97880 KB Output is correct
22 Correct 157 ms 97692 KB Output is correct
23 Correct 175 ms 98752 KB Output is correct
24 Correct 150 ms 98308 KB Output is correct
25 Correct 162 ms 98392 KB Output is correct
26 Correct 187 ms 98388 KB Output is correct
27 Correct 13 ms 33116 KB Output is correct
28 Correct 13 ms 33296 KB Output is correct
29 Correct 12 ms 33128 KB Output is correct
30 Correct 13 ms 33368 KB Output is correct
31 Correct 14 ms 33116 KB Output is correct
32 Correct 15 ms 33116 KB Output is correct
33 Correct 14 ms 33116 KB Output is correct
34 Correct 13 ms 33116 KB Output is correct
35 Correct 13 ms 33188 KB Output is correct
36 Correct 14 ms 33272 KB Output is correct
37 Correct 13 ms 33116 KB Output is correct
38 Correct 13 ms 33280 KB Output is correct
39 Correct 12 ms 33112 KB Output is correct
40 Correct 12 ms 33116 KB Output is correct
41 Correct 13 ms 33296 KB Output is correct
42 Correct 13 ms 33116 KB Output is correct
43 Correct 14 ms 33116 KB Output is correct
44 Correct 13 ms 33120 KB Output is correct
45 Correct 14 ms 33372 KB Output is correct
46 Correct 15 ms 33372 KB Output is correct
47 Correct 237 ms 100836 KB Output is correct
48 Correct 215 ms 100196 KB Output is correct
49 Correct 208 ms 100180 KB Output is correct
50 Correct 199 ms 101204 KB Output is correct
51 Correct 198 ms 100904 KB Output is correct
52 Correct 234 ms 101200 KB Output is correct
53 Correct 264 ms 101280 KB Output is correct
54 Correct 21 ms 33368 KB Output is correct
55 Correct 22 ms 33572 KB Output is correct
56 Correct 22 ms 33368 KB Output is correct
57 Correct 20 ms 33488 KB Output is correct
58 Correct 21 ms 33372 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 33116 KB Output is correct
2 Correct 73 ms 93608 KB Output is correct
3 Correct 77 ms 93520 KB Output is correct
4 Correct 61 ms 93012 KB Output is correct
5 Correct 75 ms 93536 KB Output is correct
6 Correct 69 ms 93140 KB Output is correct
7 Correct 81 ms 93644 KB Output is correct
8 Correct 13 ms 33116 KB Output is correct
9 Correct 13 ms 33116 KB Output is correct
10 Correct 13 ms 33112 KB Output is correct
11 Correct 13 ms 33116 KB Output is correct
12 Correct 14 ms 33372 KB Output is correct
13 Correct 13 ms 33368 KB Output is correct
14 Correct 13 ms 33116 KB Output is correct
15 Correct 14 ms 33148 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 34132 KB Output is correct
18 Correct 14 ms 33112 KB Output is correct
19 Correct 13 ms 33116 KB Output is correct
20 Correct 186 ms 98296 KB Output is correct
21 Correct 172 ms 97880 KB Output is correct
22 Correct 157 ms 97692 KB Output is correct
23 Correct 175 ms 98752 KB Output is correct
24 Correct 150 ms 98308 KB Output is correct
25 Correct 162 ms 98392 KB Output is correct
26 Correct 187 ms 98388 KB Output is correct
27 Correct 13 ms 33116 KB Output is correct
28 Correct 13 ms 33296 KB Output is correct
29 Correct 12 ms 33128 KB Output is correct
30 Correct 13 ms 33368 KB Output is correct
31 Correct 14 ms 33116 KB Output is correct
32 Correct 15 ms 33116 KB Output is correct
33 Correct 14 ms 33116 KB Output is correct
34 Correct 13 ms 33116 KB Output is correct
35 Correct 13 ms 33188 KB Output is correct
36 Correct 14 ms 33272 KB Output is correct
37 Correct 13 ms 33116 KB Output is correct
38 Correct 13 ms 33280 KB Output is correct
39 Correct 12 ms 33112 KB Output is correct
40 Correct 12 ms 33116 KB Output is correct
41 Correct 13 ms 33296 KB Output is correct
42 Correct 13 ms 33116 KB Output is correct
43 Correct 14 ms 33116 KB Output is correct
44 Correct 13 ms 33120 KB Output is correct
45 Correct 14 ms 33372 KB Output is correct
46 Correct 15 ms 33372 KB Output is correct
47 Correct 237 ms 100836 KB Output is correct
48 Correct 215 ms 100196 KB Output is correct
49 Correct 208 ms 100180 KB Output is correct
50 Correct 199 ms 101204 KB Output is correct
51 Correct 198 ms 100904 KB Output is correct
52 Correct 234 ms 101200 KB Output is correct
53 Correct 264 ms 101280 KB Output is correct
54 Correct 21 ms 33368 KB Output is correct
55 Correct 22 ms 33572 KB Output is correct
56 Correct 22 ms 33368 KB Output is correct
57 Correct 20 ms 33488 KB Output is correct
58 Correct 21 ms 33372 KB Output is correct
59 Correct 273 ms 103196 KB Output is correct
60 Correct 189 ms 61784 KB Output is correct
61 Correct 205 ms 63824 KB Output is correct
62 Correct 226 ms 64796 KB Output is correct
63 Correct 284 ms 102996 KB Output is correct
64 Correct 351 ms 104436 KB Output is correct
65 Correct 387 ms 104532 KB Output is correct
66 Correct 302 ms 104788 KB Output is correct
67 Correct 280 ms 104516 KB Output is correct
68 Correct 325 ms 104532 KB Output is correct
69 Correct 389 ms 104720 KB Output is correct
70 Correct 84 ms 35164 KB Output is correct
71 Correct 85 ms 35164 KB Output is correct
72 Correct 86 ms 35344 KB Output is correct
73 Correct 91 ms 35164 KB Output is correct
74 Correct 86 ms 35160 KB Output is correct
75 Correct 98 ms 35932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 33116 KB Output is correct
2 Correct 15 ms 33140 KB Output is correct
3 Correct 14 ms 33112 KB Output is correct
4 Correct 12 ms 33248 KB Output is correct
5 Correct 698 ms 49512 KB Output is correct
6 Correct 714 ms 49764 KB Output is correct
7 Correct 708 ms 49696 KB Output is correct
8 Correct 691 ms 49492 KB Output is correct
9 Correct 706 ms 49760 KB Output is correct
10 Correct 700 ms 49488 KB Output is correct
11 Correct 731 ms 49628 KB Output is correct
12 Correct 753 ms 49764 KB Output is correct
13 Correct 13 ms 33112 KB Output is correct
14 Correct 14 ms 33276 KB Output is correct
15 Correct 13 ms 33288 KB Output is correct
16 Correct 14 ms 33116 KB Output is correct
17 Correct 14 ms 33116 KB Output is correct
18 Correct 17 ms 33272 KB Output is correct
19 Correct 13 ms 33112 KB Output is correct
20 Correct 13 ms 33116 KB Output is correct
21 Correct 13 ms 33372 KB Output is correct
22 Correct 13 ms 33116 KB Output is correct
23 Correct 14 ms 33116 KB Output is correct
24 Correct 13 ms 33156 KB Output is correct
25 Correct 14 ms 33116 KB Output is correct
26 Correct 12 ms 33116 KB Output is correct
27 Correct 12 ms 33300 KB Output is correct
28 Correct 13 ms 33368 KB Output is correct
29 Correct 13 ms 33116 KB Output is correct
30 Correct 13 ms 33120 KB Output is correct
31 Correct 14 ms 33368 KB Output is correct
32 Correct 12 ms 33172 KB Output is correct
33 Correct 13 ms 33112 KB Output is correct
34 Correct 14 ms 33116 KB Output is correct
35 Correct 14 ms 33116 KB Output is correct
36 Correct 15 ms 33116 KB Output is correct
37 Correct 13 ms 33116 KB Output is correct
38 Correct 13 ms 33264 KB Output is correct
39 Correct 14 ms 33116 KB Output is correct
40 Correct 14 ms 33372 KB Output is correct
41 Correct 20 ms 33384 KB Output is correct
42 Correct 25 ms 33372 KB Output is correct
43 Correct 22 ms 33372 KB Output is correct
44 Correct 21 ms 33372 KB Output is correct
45 Correct 21 ms 33372 KB Output is correct
46 Correct 88 ms 35164 KB Output is correct
47 Correct 86 ms 35160 KB Output is correct
48 Correct 86 ms 35164 KB Output is correct
49 Correct 87 ms 35340 KB Output is correct
50 Correct 94 ms 35164 KB Output is correct
51 Correct 749 ms 50400 KB Output is correct
52 Correct 751 ms 50200 KB Output is correct
53 Correct 721 ms 50260 KB Output is correct
54 Correct 751 ms 50400 KB Output is correct
55 Correct 15 ms 33884 KB Output is correct
56 Correct 91 ms 36036 KB Output is correct
57 Correct 13 ms 33116 KB Output is correct
58 Correct 73 ms 93608 KB Output is correct
59 Correct 77 ms 93520 KB Output is correct
60 Correct 61 ms 93012 KB Output is correct
61 Correct 75 ms 93536 KB Output is correct
62 Correct 69 ms 93140 KB Output is correct
63 Correct 81 ms 93644 KB Output is correct
64 Correct 13 ms 33116 KB Output is correct
65 Correct 13 ms 33116 KB Output is correct
66 Correct 13 ms 33112 KB Output is correct
67 Correct 13 ms 33116 KB Output is correct
68 Correct 14 ms 33372 KB Output is correct
69 Correct 13 ms 33368 KB Output is correct
70 Correct 13 ms 33116 KB Output is correct
71 Correct 14 ms 33148 KB Output is correct
72 Correct 14 ms 33116 KB Output is correct
73 Correct 14 ms 34132 KB Output is correct
74 Correct 14 ms 33112 KB Output is correct
75 Correct 13 ms 33116 KB Output is correct
76 Correct 186 ms 98296 KB Output is correct
77 Correct 172 ms 97880 KB Output is correct
78 Correct 157 ms 97692 KB Output is correct
79 Correct 175 ms 98752 KB Output is correct
80 Correct 150 ms 98308 KB Output is correct
81 Correct 162 ms 98392 KB Output is correct
82 Correct 187 ms 98388 KB Output is correct
83 Correct 13 ms 33116 KB Output is correct
84 Correct 13 ms 33296 KB Output is correct
85 Correct 12 ms 33128 KB Output is correct
86 Correct 13 ms 33368 KB Output is correct
87 Correct 14 ms 33116 KB Output is correct
88 Correct 15 ms 33116 KB Output is correct
89 Correct 14 ms 33116 KB Output is correct
90 Correct 13 ms 33116 KB Output is correct
91 Correct 13 ms 33188 KB Output is correct
92 Correct 14 ms 33272 KB Output is correct
93 Correct 13 ms 33116 KB Output is correct
94 Correct 13 ms 33280 KB Output is correct
95 Correct 12 ms 33112 KB Output is correct
96 Correct 12 ms 33116 KB Output is correct
97 Correct 13 ms 33296 KB Output is correct
98 Correct 13 ms 33116 KB Output is correct
99 Correct 14 ms 33116 KB Output is correct
100 Correct 13 ms 33120 KB Output is correct
101 Correct 14 ms 33372 KB Output is correct
102 Correct 15 ms 33372 KB Output is correct
103 Correct 237 ms 100836 KB Output is correct
104 Correct 215 ms 100196 KB Output is correct
105 Correct 208 ms 100180 KB Output is correct
106 Correct 199 ms 101204 KB Output is correct
107 Correct 198 ms 100904 KB Output is correct
108 Correct 234 ms 101200 KB Output is correct
109 Correct 264 ms 101280 KB Output is correct
110 Correct 21 ms 33368 KB Output is correct
111 Correct 22 ms 33572 KB Output is correct
112 Correct 22 ms 33368 KB Output is correct
113 Correct 20 ms 33488 KB Output is correct
114 Correct 21 ms 33372 KB Output is correct
115 Correct 273 ms 103196 KB Output is correct
116 Correct 189 ms 61784 KB Output is correct
117 Correct 205 ms 63824 KB Output is correct
118 Correct 226 ms 64796 KB Output is correct
119 Correct 284 ms 102996 KB Output is correct
120 Correct 351 ms 104436 KB Output is correct
121 Correct 387 ms 104532 KB Output is correct
122 Correct 302 ms 104788 KB Output is correct
123 Correct 280 ms 104516 KB Output is correct
124 Correct 325 ms 104532 KB Output is correct
125 Correct 389 ms 104720 KB Output is correct
126 Correct 84 ms 35164 KB Output is correct
127 Correct 85 ms 35164 KB Output is correct
128 Correct 86 ms 35344 KB Output is correct
129 Correct 91 ms 35164 KB Output is correct
130 Correct 86 ms 35160 KB Output is correct
131 Correct 98 ms 35932 KB Output is correct
132 Correct 1057 ms 121020 KB Output is correct
133 Correct 1027 ms 120792 KB Output is correct
134 Correct 1037 ms 120920 KB Output is correct
135 Correct 1074 ms 120916 KB Output is correct
136 Correct 1135 ms 120916 KB Output is correct
137 Correct 639 ms 112040 KB Output is correct
138 Correct 625 ms 112208 KB Output is correct
139 Correct 927 ms 120928 KB Output is correct
140 Correct 960 ms 120660 KB Output is correct
141 Correct 1050 ms 120656 KB Output is correct
142 Correct 1140 ms 120916 KB Output is correct