Submission #841408

# Submission time Handle Problem Language Result Execution time Memory
841408 2023-09-01T15:39:15 Z model_code Beech Tree (IOI23_beechtree) C++17
100 / 100
392 ms 100408 KB
// correct/sol_na_full.cpp

#include "beechtree.h"
#include <algorithm>
#include <iostream>
#include <map>
#include <set>

#define xx first
#define yy second

#define all(x) (x).begin(), (x).end()

std::vector<std::vector<std::pair<int, int>>> adj;
std::vector<int> ans;

struct result
{
    int sz = 0;
    bool ok = true;
    std::map<int, int> child;
    std::set<std::pair<int, int>> ord;

    result() {}

    result(int ind)
    {
        sz = adj[ind].size();
        for (auto i : adj[ind])
        {
            if (child.count(i.yy))
                ok = false;
            child[i.yy] = i.xx;
        }
    }
} lst[200001];

bool check(int x, int y)
{
    for (auto &[col, id] : lst[x].child)
    {
        auto it = lst[y].child.find(col);
        if (it == lst[y].child.end() || lst[it->yy].sz < lst[id].sz)
        {
            return false;
        }
    }

    return true;
}

bool insert(int x, std::pair<int, int> elem)
{
    bool res = true;

    auto it = lst[x].ord.insert(elem).xx;
    if (it != lst[x].ord.begin())
        res &= check(prev(it)->yy, elem.yy);
    if (next(it) != lst[x].ord.end())
        res &= check(elem.yy, next(it)->yy);

    return res;
}

void dfs(int x)
{
    lst[x] = result(x);

    if (adj[x].empty())
    {
        ans[x] = 1;
        return;
    }

    for (auto i : adj[x])
    {
        dfs(i.xx);
        lst[x].ok &= lst[i.xx].ok;
        lst[x].sz += lst[i.xx].sz;

        if (lst[i.xx].ord.size() > lst[x].ord.size())
        {
            lst[i.xx].ord.swap(lst[x].ord);
        }

        for (auto [sz, node] : lst[i.xx].ord)
        {
            lst[x].ok &= insert(x, {sz, node});
        }
    }

    lst[x].ok &= insert(x, {lst[x].sz, x});
    ans[x] = lst[x].ok ? 1 : 0;
    return;
}

std::vector<int> beechtree(int N, int M, std::vector<int> P, std::vector<int> C)
{
    adj.resize(N);
    for (int i = 1; i < N; ++i)
    {
        adj[P[i]].push_back({i, C[i]});
    }

    ans.resize(N);
    dfs(0);
    return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 20564 KB Output is correct
2 Correct 10 ms 20652 KB Output is correct
3 Correct 11 ms 20652 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 20632 KB Output is correct
2 Correct 10 ms 20564 KB Output is correct
3 Correct 10 ms 20564 KB Output is correct
4 Correct 10 ms 20564 KB Output is correct
5 Correct 9 ms 20576 KB Output is correct
6 Correct 9 ms 20564 KB Output is correct
7 Correct 12 ms 20612 KB Output is correct
8 Correct 10 ms 20652 KB Output is correct
9 Correct 10 ms 20564 KB Output is correct
10 Correct 15 ms 20548 KB Output is correct
11 Correct 10 ms 20564 KB Output is correct
12 Correct 10 ms 20528 KB Output is correct
13 Correct 12 ms 20652 KB Output is correct
14 Correct 12 ms 20604 KB Output is correct
15 Correct 10 ms 20564 KB Output is correct
16 Correct 10 ms 20592 KB Output is correct
17 Correct 12 ms 20652 KB Output is correct
18 Correct 9 ms 20564 KB Output is correct
19 Correct 10 ms 20652 KB Output is correct
20 Correct 10 ms 20656 KB Output is correct
21 Correct 10 ms 20652 KB Output is correct
22 Correct 12 ms 20540 KB Output is correct
23 Correct 10 ms 20564 KB Output is correct
24 Correct 10 ms 20564 KB Output is correct
25 Correct 10 ms 20564 KB Output is correct
26 Correct 10 ms 20564 KB Output is correct
27 Correct 11 ms 20564 KB Output is correct
28 Correct 11 ms 20564 KB Output is correct
29 Correct 11 ms 20584 KB Output is correct
30 Correct 13 ms 20652 KB Output is correct
31 Correct 10 ms 20564 KB Output is correct
32 Correct 12 ms 20620 KB Output is correct
33 Correct 13 ms 20568 KB Output is correct
34 Correct 10 ms 20564 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 20632 KB Output is correct
2 Correct 10 ms 20564 KB Output is correct
3 Correct 10 ms 20564 KB Output is correct
4 Correct 10 ms 20564 KB Output is correct
5 Correct 9 ms 20576 KB Output is correct
6 Correct 9 ms 20564 KB Output is correct
7 Correct 148 ms 100268 KB Output is correct
8 Correct 156 ms 100240 KB Output is correct
9 Correct 10 ms 20716 KB Output is correct
10 Correct 10 ms 20716 KB Output is correct
11 Correct 12 ms 20692 KB Output is correct
12 Correct 10 ms 20652 KB Output is correct
13 Correct 11 ms 21344 KB Output is correct
14 Correct 12 ms 21424 KB Output is correct
15 Correct 11 ms 21432 KB Output is correct
16 Correct 14 ms 21396 KB Output is correct
17 Correct 163 ms 100292 KB Output is correct
18 Correct 155 ms 99240 KB Output is correct
19 Correct 143 ms 100408 KB Output is correct
20 Correct 146 ms 98876 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 20564 KB Output is correct
2 Correct 10 ms 20556 KB Output is correct
3 Correct 11 ms 20584 KB Output is correct
4 Correct 12 ms 20564 KB Output is correct
5 Correct 10 ms 20652 KB Output is correct
6 Correct 10 ms 20656 KB Output is correct
7 Correct 13 ms 20564 KB Output is correct
8 Correct 13 ms 20652 KB Output is correct
9 Correct 15 ms 20648 KB Output is correct
10 Correct 15 ms 20564 KB Output is correct
11 Correct 22 ms 20720 KB Output is correct
12 Correct 13 ms 20704 KB Output is correct
13 Correct 12 ms 20760 KB Output is correct
14 Correct 13 ms 20672 KB Output is correct
15 Correct 87 ms 32624 KB Output is correct
16 Correct 75 ms 31568 KB Output is correct
17 Correct 93 ms 31808 KB Output is correct
18 Correct 73 ms 31900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 20632 KB Output is correct
2 Correct 10 ms 20564 KB Output is correct
3 Correct 12 ms 20612 KB Output is correct
4 Correct 10 ms 20652 KB Output is correct
5 Correct 148 ms 100268 KB Output is correct
6 Correct 156 ms 100240 KB Output is correct
7 Correct 10 ms 20608 KB Output is correct
8 Correct 12 ms 20644 KB Output is correct
9 Correct 11 ms 20820 KB Output is correct
10 Correct 11 ms 20804 KB Output is correct
11 Correct 127 ms 49744 KB Output is correct
12 Correct 128 ms 40988 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 20564 KB Output is correct
2 Correct 10 ms 20652 KB Output is correct
3 Correct 11 ms 20652 KB Output is correct
4 Correct 9 ms 20632 KB Output is correct
5 Correct 10 ms 20564 KB Output is correct
6 Correct 10 ms 20564 KB Output is correct
7 Correct 10 ms 20564 KB Output is correct
8 Correct 9 ms 20576 KB Output is correct
9 Correct 9 ms 20564 KB Output is correct
10 Correct 12 ms 20612 KB Output is correct
11 Correct 10 ms 20652 KB Output is correct
12 Correct 10 ms 20564 KB Output is correct
13 Correct 15 ms 20548 KB Output is correct
14 Correct 10 ms 20564 KB Output is correct
15 Correct 10 ms 20528 KB Output is correct
16 Correct 12 ms 20652 KB Output is correct
17 Correct 12 ms 20604 KB Output is correct
18 Correct 10 ms 20564 KB Output is correct
19 Correct 10 ms 20592 KB Output is correct
20 Correct 12 ms 20652 KB Output is correct
21 Correct 9 ms 20564 KB Output is correct
22 Correct 10 ms 20652 KB Output is correct
23 Correct 10 ms 20656 KB Output is correct
24 Correct 10 ms 20652 KB Output is correct
25 Correct 12 ms 20540 KB Output is correct
26 Correct 10 ms 20564 KB Output is correct
27 Correct 10 ms 20564 KB Output is correct
28 Correct 10 ms 20564 KB Output is correct
29 Correct 10 ms 20564 KB Output is correct
30 Correct 11 ms 20564 KB Output is correct
31 Correct 11 ms 20564 KB Output is correct
32 Correct 11 ms 20584 KB Output is correct
33 Correct 13 ms 20652 KB Output is correct
34 Correct 10 ms 20564 KB Output is correct
35 Correct 12 ms 20620 KB Output is correct
36 Correct 13 ms 20568 KB Output is correct
37 Correct 10 ms 20564 KB Output is correct
38 Correct 10 ms 20716 KB Output is correct
39 Correct 10 ms 20716 KB Output is correct
40 Correct 12 ms 20692 KB Output is correct
41 Correct 10 ms 20652 KB Output is correct
42 Correct 10 ms 20564 KB Output is correct
43 Correct 10 ms 20556 KB Output is correct
44 Correct 11 ms 20584 KB Output is correct
45 Correct 12 ms 20564 KB Output is correct
46 Correct 10 ms 20652 KB Output is correct
47 Correct 10 ms 20656 KB Output is correct
48 Correct 13 ms 20564 KB Output is correct
49 Correct 13 ms 20652 KB Output is correct
50 Correct 15 ms 20648 KB Output is correct
51 Correct 15 ms 20564 KB Output is correct
52 Correct 10 ms 20608 KB Output is correct
53 Correct 12 ms 20644 KB Output is correct
54 Correct 13 ms 20608 KB Output is correct
55 Correct 11 ms 20652 KB Output is correct
56 Correct 10 ms 20564 KB Output is correct
57 Correct 13 ms 20608 KB Output is correct
58 Correct 13 ms 20564 KB Output is correct
59 Correct 11 ms 20676 KB Output is correct
60 Correct 11 ms 20612 KB Output is correct
61 Correct 11 ms 20564 KB Output is correct
62 Correct 13 ms 20652 KB Output is correct
63 Correct 14 ms 20564 KB Output is correct
64 Correct 11 ms 20600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 20632 KB Output is correct
2 Correct 10 ms 20564 KB Output is correct
3 Correct 12 ms 20612 KB Output is correct
4 Correct 10 ms 20652 KB Output is correct
5 Correct 10 ms 20564 KB Output is correct
6 Correct 15 ms 20548 KB Output is correct
7 Correct 10 ms 20564 KB Output is correct
8 Correct 10 ms 20528 KB Output is correct
9 Correct 12 ms 20652 KB Output is correct
10 Correct 12 ms 20604 KB Output is correct
11 Correct 10 ms 20564 KB Output is correct
12 Correct 10 ms 20592 KB Output is correct
13 Correct 12 ms 20652 KB Output is correct
14 Correct 9 ms 20564 KB Output is correct
15 Correct 10 ms 20652 KB Output is correct
16 Correct 10 ms 20656 KB Output is correct
17 Correct 10 ms 20652 KB Output is correct
18 Correct 12 ms 20540 KB Output is correct
19 Correct 10 ms 20564 KB Output is correct
20 Correct 10 ms 20564 KB Output is correct
21 Correct 10 ms 20564 KB Output is correct
22 Correct 10 ms 20564 KB Output is correct
23 Correct 11 ms 20564 KB Output is correct
24 Correct 11 ms 20564 KB Output is correct
25 Correct 12 ms 21332 KB Output is correct
26 Correct 12 ms 21432 KB Output is correct
27 Correct 12 ms 21324 KB Output is correct
28 Correct 12 ms 21432 KB Output is correct
29 Correct 12 ms 21332 KB Output is correct
30 Correct 14 ms 21168 KB Output is correct
31 Correct 14 ms 21020 KB Output is correct
32 Correct 13 ms 21044 KB Output is correct
33 Correct 13 ms 20992 KB Output is correct
34 Correct 14 ms 21044 KB Output is correct
35 Correct 16 ms 21076 KB Output is correct
36 Correct 14 ms 20908 KB Output is correct
37 Correct 11 ms 20976 KB Output is correct
38 Correct 11 ms 21076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 20564 KB Output is correct
2 Correct 10 ms 20652 KB Output is correct
3 Correct 11 ms 20652 KB Output is correct
4 Correct 9 ms 20632 KB Output is correct
5 Correct 10 ms 20564 KB Output is correct
6 Correct 10 ms 20564 KB Output is correct
7 Correct 10 ms 20564 KB Output is correct
8 Correct 9 ms 20576 KB Output is correct
9 Correct 9 ms 20564 KB Output is correct
10 Correct 12 ms 20612 KB Output is correct
11 Correct 10 ms 20652 KB Output is correct
12 Correct 10 ms 20564 KB Output is correct
13 Correct 15 ms 20548 KB Output is correct
14 Correct 10 ms 20564 KB Output is correct
15 Correct 10 ms 20528 KB Output is correct
16 Correct 12 ms 20652 KB Output is correct
17 Correct 12 ms 20604 KB Output is correct
18 Correct 10 ms 20564 KB Output is correct
19 Correct 10 ms 20592 KB Output is correct
20 Correct 12 ms 20652 KB Output is correct
21 Correct 9 ms 20564 KB Output is correct
22 Correct 10 ms 20652 KB Output is correct
23 Correct 10 ms 20656 KB Output is correct
24 Correct 10 ms 20652 KB Output is correct
25 Correct 12 ms 20540 KB Output is correct
26 Correct 10 ms 20564 KB Output is correct
27 Correct 10 ms 20564 KB Output is correct
28 Correct 10 ms 20564 KB Output is correct
29 Correct 10 ms 20564 KB Output is correct
30 Correct 11 ms 20564 KB Output is correct
31 Correct 11 ms 20564 KB Output is correct
32 Correct 11 ms 20584 KB Output is correct
33 Correct 13 ms 20652 KB Output is correct
34 Correct 10 ms 20564 KB Output is correct
35 Correct 12 ms 20620 KB Output is correct
36 Correct 13 ms 20568 KB Output is correct
37 Correct 10 ms 20564 KB Output is correct
38 Correct 10 ms 20716 KB Output is correct
39 Correct 10 ms 20716 KB Output is correct
40 Correct 12 ms 20692 KB Output is correct
41 Correct 10 ms 20652 KB Output is correct
42 Correct 11 ms 21344 KB Output is correct
43 Correct 12 ms 21424 KB Output is correct
44 Correct 11 ms 21432 KB Output is correct
45 Correct 14 ms 21396 KB Output is correct
46 Correct 10 ms 20564 KB Output is correct
47 Correct 10 ms 20556 KB Output is correct
48 Correct 11 ms 20584 KB Output is correct
49 Correct 12 ms 20564 KB Output is correct
50 Correct 10 ms 20652 KB Output is correct
51 Correct 10 ms 20656 KB Output is correct
52 Correct 13 ms 20564 KB Output is correct
53 Correct 13 ms 20652 KB Output is correct
54 Correct 15 ms 20648 KB Output is correct
55 Correct 15 ms 20564 KB Output is correct
56 Correct 22 ms 20720 KB Output is correct
57 Correct 13 ms 20704 KB Output is correct
58 Correct 12 ms 20760 KB Output is correct
59 Correct 13 ms 20672 KB Output is correct
60 Correct 10 ms 20608 KB Output is correct
61 Correct 12 ms 20644 KB Output is correct
62 Correct 11 ms 20820 KB Output is correct
63 Correct 11 ms 20804 KB Output is correct
64 Correct 13 ms 20608 KB Output is correct
65 Correct 11 ms 20652 KB Output is correct
66 Correct 10 ms 20564 KB Output is correct
67 Correct 13 ms 20608 KB Output is correct
68 Correct 13 ms 20564 KB Output is correct
69 Correct 11 ms 20676 KB Output is correct
70 Correct 11 ms 20612 KB Output is correct
71 Correct 11 ms 20564 KB Output is correct
72 Correct 13 ms 20652 KB Output is correct
73 Correct 14 ms 20564 KB Output is correct
74 Correct 11 ms 20600 KB Output is correct
75 Correct 12 ms 21332 KB Output is correct
76 Correct 12 ms 21432 KB Output is correct
77 Correct 12 ms 21324 KB Output is correct
78 Correct 12 ms 21432 KB Output is correct
79 Correct 12 ms 21332 KB Output is correct
80 Correct 14 ms 21168 KB Output is correct
81 Correct 14 ms 21020 KB Output is correct
82 Correct 13 ms 21044 KB Output is correct
83 Correct 13 ms 20992 KB Output is correct
84 Correct 14 ms 21044 KB Output is correct
85 Correct 16 ms 21076 KB Output is correct
86 Correct 14 ms 20908 KB Output is correct
87 Correct 11 ms 20976 KB Output is correct
88 Correct 11 ms 21076 KB Output is correct
89 Correct 11 ms 21176 KB Output is correct
90 Correct 14 ms 21132 KB Output is correct
91 Correct 16 ms 21048 KB Output is correct
92 Correct 12 ms 20996 KB Output is correct
93 Correct 13 ms 21060 KB Output is correct
94 Correct 14 ms 20948 KB Output is correct
95 Correct 12 ms 20916 KB Output is correct
96 Correct 12 ms 20948 KB Output is correct
97 Correct 12 ms 21044 KB Output is correct
98 Correct 10 ms 21076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 20632 KB Output is correct
2 Correct 10 ms 20564 KB Output is correct
3 Correct 12 ms 20612 KB Output is correct
4 Correct 10 ms 20652 KB Output is correct
5 Correct 10 ms 20564 KB Output is correct
6 Correct 15 ms 20548 KB Output is correct
7 Correct 10 ms 20564 KB Output is correct
8 Correct 10 ms 20528 KB Output is correct
9 Correct 12 ms 20652 KB Output is correct
10 Correct 12 ms 20604 KB Output is correct
11 Correct 10 ms 20564 KB Output is correct
12 Correct 10 ms 20592 KB Output is correct
13 Correct 12 ms 20652 KB Output is correct
14 Correct 9 ms 20564 KB Output is correct
15 Correct 10 ms 20652 KB Output is correct
16 Correct 10 ms 20656 KB Output is correct
17 Correct 10 ms 20652 KB Output is correct
18 Correct 12 ms 20540 KB Output is correct
19 Correct 10 ms 20564 KB Output is correct
20 Correct 10 ms 20564 KB Output is correct
21 Correct 10 ms 20564 KB Output is correct
22 Correct 10 ms 20564 KB Output is correct
23 Correct 11 ms 20564 KB Output is correct
24 Correct 11 ms 20564 KB Output is correct
25 Correct 12 ms 21332 KB Output is correct
26 Correct 12 ms 21432 KB Output is correct
27 Correct 12 ms 21324 KB Output is correct
28 Correct 12 ms 21432 KB Output is correct
29 Correct 12 ms 21332 KB Output is correct
30 Correct 14 ms 21168 KB Output is correct
31 Correct 14 ms 21020 KB Output is correct
32 Correct 13 ms 21044 KB Output is correct
33 Correct 13 ms 20992 KB Output is correct
34 Correct 14 ms 21044 KB Output is correct
35 Correct 16 ms 21076 KB Output is correct
36 Correct 14 ms 20908 KB Output is correct
37 Correct 11 ms 20976 KB Output is correct
38 Correct 11 ms 21076 KB Output is correct
39 Correct 198 ms 100104 KB Output is correct
40 Correct 192 ms 100060 KB Output is correct
41 Correct 149 ms 100128 KB Output is correct
42 Correct 154 ms 100132 KB Output is correct
43 Correct 176 ms 87616 KB Output is correct
44 Correct 173 ms 74008 KB Output is correct
45 Correct 392 ms 86824 KB Output is correct
46 Correct 265 ms 81816 KB Output is correct
47 Correct 220 ms 75660 KB Output is correct
48 Correct 185 ms 68016 KB Output is correct
49 Correct 170 ms 60976 KB Output is correct
50 Correct 348 ms 80844 KB Output is correct
51 Correct 261 ms 76984 KB Output is correct
52 Correct 193 ms 69780 KB Output is correct
53 Correct 180 ms 62992 KB Output is correct
54 Correct 151 ms 56136 KB Output is correct
55 Correct 120 ms 65440 KB Output is correct
56 Correct 110 ms 66036 KB Output is correct
57 Correct 117 ms 55880 KB Output is correct
58 Correct 120 ms 54804 KB Output is correct
59 Correct 162 ms 54904 KB Output is correct
60 Correct 126 ms 54828 KB Output is correct
61 Correct 162 ms 54756 KB Output is correct
62 Correct 124 ms 54748 KB Output is correct
63 Correct 140 ms 61812 KB Output is correct
64 Correct 196 ms 69952 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 20564 KB Output is correct
2 Correct 10 ms 20652 KB Output is correct
3 Correct 11 ms 20652 KB Output is correct
4 Correct 9 ms 20632 KB Output is correct
5 Correct 10 ms 20564 KB Output is correct
6 Correct 10 ms 20564 KB Output is correct
7 Correct 10 ms 20564 KB Output is correct
8 Correct 9 ms 20576 KB Output is correct
9 Correct 9 ms 20564 KB Output is correct
10 Correct 12 ms 20612 KB Output is correct
11 Correct 10 ms 20652 KB Output is correct
12 Correct 10 ms 20564 KB Output is correct
13 Correct 15 ms 20548 KB Output is correct
14 Correct 10 ms 20564 KB Output is correct
15 Correct 10 ms 20528 KB Output is correct
16 Correct 12 ms 20652 KB Output is correct
17 Correct 12 ms 20604 KB Output is correct
18 Correct 10 ms 20564 KB Output is correct
19 Correct 10 ms 20592 KB Output is correct
20 Correct 12 ms 20652 KB Output is correct
21 Correct 9 ms 20564 KB Output is correct
22 Correct 10 ms 20652 KB Output is correct
23 Correct 10 ms 20656 KB Output is correct
24 Correct 10 ms 20652 KB Output is correct
25 Correct 12 ms 20540 KB Output is correct
26 Correct 10 ms 20564 KB Output is correct
27 Correct 10 ms 20564 KB Output is correct
28 Correct 10 ms 20564 KB Output is correct
29 Correct 10 ms 20564 KB Output is correct
30 Correct 11 ms 20564 KB Output is correct
31 Correct 11 ms 20564 KB Output is correct
32 Correct 11 ms 20584 KB Output is correct
33 Correct 13 ms 20652 KB Output is correct
34 Correct 10 ms 20564 KB Output is correct
35 Correct 12 ms 20620 KB Output is correct
36 Correct 13 ms 20568 KB Output is correct
37 Correct 10 ms 20564 KB Output is correct
38 Correct 148 ms 100268 KB Output is correct
39 Correct 156 ms 100240 KB Output is correct
40 Correct 10 ms 20716 KB Output is correct
41 Correct 10 ms 20716 KB Output is correct
42 Correct 12 ms 20692 KB Output is correct
43 Correct 10 ms 20652 KB Output is correct
44 Correct 11 ms 21344 KB Output is correct
45 Correct 12 ms 21424 KB Output is correct
46 Correct 11 ms 21432 KB Output is correct
47 Correct 14 ms 21396 KB Output is correct
48 Correct 163 ms 100292 KB Output is correct
49 Correct 155 ms 99240 KB Output is correct
50 Correct 143 ms 100408 KB Output is correct
51 Correct 146 ms 98876 KB Output is correct
52 Correct 10 ms 20564 KB Output is correct
53 Correct 10 ms 20556 KB Output is correct
54 Correct 11 ms 20584 KB Output is correct
55 Correct 12 ms 20564 KB Output is correct
56 Correct 10 ms 20652 KB Output is correct
57 Correct 10 ms 20656 KB Output is correct
58 Correct 13 ms 20564 KB Output is correct
59 Correct 13 ms 20652 KB Output is correct
60 Correct 15 ms 20648 KB Output is correct
61 Correct 15 ms 20564 KB Output is correct
62 Correct 22 ms 20720 KB Output is correct
63 Correct 13 ms 20704 KB Output is correct
64 Correct 12 ms 20760 KB Output is correct
65 Correct 13 ms 20672 KB Output is correct
66 Correct 87 ms 32624 KB Output is correct
67 Correct 75 ms 31568 KB Output is correct
68 Correct 93 ms 31808 KB Output is correct
69 Correct 73 ms 31900 KB Output is correct
70 Correct 10 ms 20608 KB Output is correct
71 Correct 12 ms 20644 KB Output is correct
72 Correct 11 ms 20820 KB Output is correct
73 Correct 11 ms 20804 KB Output is correct
74 Correct 127 ms 49744 KB Output is correct
75 Correct 128 ms 40988 KB Output is correct
76 Correct 13 ms 20608 KB Output is correct
77 Correct 11 ms 20652 KB Output is correct
78 Correct 10 ms 20564 KB Output is correct
79 Correct 13 ms 20608 KB Output is correct
80 Correct 13 ms 20564 KB Output is correct
81 Correct 11 ms 20676 KB Output is correct
82 Correct 11 ms 20612 KB Output is correct
83 Correct 11 ms 20564 KB Output is correct
84 Correct 13 ms 20652 KB Output is correct
85 Correct 14 ms 20564 KB Output is correct
86 Correct 11 ms 20600 KB Output is correct
87 Correct 12 ms 21332 KB Output is correct
88 Correct 12 ms 21432 KB Output is correct
89 Correct 12 ms 21324 KB Output is correct
90 Correct 12 ms 21432 KB Output is correct
91 Correct 12 ms 21332 KB Output is correct
92 Correct 14 ms 21168 KB Output is correct
93 Correct 14 ms 21020 KB Output is correct
94 Correct 13 ms 21044 KB Output is correct
95 Correct 13 ms 20992 KB Output is correct
96 Correct 14 ms 21044 KB Output is correct
97 Correct 16 ms 21076 KB Output is correct
98 Correct 14 ms 20908 KB Output is correct
99 Correct 11 ms 20976 KB Output is correct
100 Correct 11 ms 21076 KB Output is correct
101 Correct 11 ms 21176 KB Output is correct
102 Correct 14 ms 21132 KB Output is correct
103 Correct 16 ms 21048 KB Output is correct
104 Correct 12 ms 20996 KB Output is correct
105 Correct 13 ms 21060 KB Output is correct
106 Correct 14 ms 20948 KB Output is correct
107 Correct 12 ms 20916 KB Output is correct
108 Correct 12 ms 20948 KB Output is correct
109 Correct 12 ms 21044 KB Output is correct
110 Correct 10 ms 21076 KB Output is correct
111 Correct 198 ms 100104 KB Output is correct
112 Correct 192 ms 100060 KB Output is correct
113 Correct 149 ms 100128 KB Output is correct
114 Correct 154 ms 100132 KB Output is correct
115 Correct 176 ms 87616 KB Output is correct
116 Correct 173 ms 74008 KB Output is correct
117 Correct 392 ms 86824 KB Output is correct
118 Correct 265 ms 81816 KB Output is correct
119 Correct 220 ms 75660 KB Output is correct
120 Correct 185 ms 68016 KB Output is correct
121 Correct 170 ms 60976 KB Output is correct
122 Correct 348 ms 80844 KB Output is correct
123 Correct 261 ms 76984 KB Output is correct
124 Correct 193 ms 69780 KB Output is correct
125 Correct 180 ms 62992 KB Output is correct
126 Correct 151 ms 56136 KB Output is correct
127 Correct 120 ms 65440 KB Output is correct
128 Correct 110 ms 66036 KB Output is correct
129 Correct 117 ms 55880 KB Output is correct
130 Correct 120 ms 54804 KB Output is correct
131 Correct 162 ms 54904 KB Output is correct
132 Correct 126 ms 54828 KB Output is correct
133 Correct 162 ms 54756 KB Output is correct
134 Correct 124 ms 54748 KB Output is correct
135 Correct 140 ms 61812 KB Output is correct
136 Correct 196 ms 69952 KB Output is correct
137 Correct 169 ms 80972 KB Output is correct
138 Correct 202 ms 75316 KB Output is correct
139 Correct 360 ms 76448 KB Output is correct
140 Correct 282 ms 76524 KB Output is correct
141 Correct 205 ms 71712 KB Output is correct
142 Correct 203 ms 66388 KB Output is correct
143 Correct 173 ms 60436 KB Output is correct
144 Correct 235 ms 54544 KB Output is correct
145 Correct 186 ms 56880 KB Output is correct
146 Correct 177 ms 60088 KB Output is correct
147 Correct 229 ms 62916 KB Output is correct
148 Correct 183 ms 55720 KB Output is correct
149 Correct 125 ms 65352 KB Output is correct
150 Correct 112 ms 65284 KB Output is correct
151 Correct 173 ms 56372 KB Output is correct
152 Correct 170 ms 55848 KB Output is correct
153 Correct 375 ms 55716 KB Output is correct
154 Correct 163 ms 55084 KB Output is correct
155 Correct 146 ms 55736 KB Output is correct
156 Correct 159 ms 55720 KB Output is correct
157 Correct 186 ms 62852 KB Output is correct
158 Correct 161 ms 70936 KB Output is correct