Submission #818203

# Submission time Handle Problem Language Result Execution time Memory
818203 2023-08-10T03:55:09 Z jophyyjh Fountain Parks (IOI21_parks) C++17
70 / 100
1094 ms 73052 KB
/**
 * (Just a test)
 * 
 * Time Complexity: O(n * log(n))   (Kruskal, bipartite graph, BFS, implementation)
 * Implementation 0.9               (test)
*/

#include <bits/stdc++.h>
#include "parks.h"

typedef std::vector<int>    vec;

struct DSU {
    vec set, rank;
    DSU(int n) {
        set.resize(n);
        rank.resize(n);
        for (int k = 0; k < n; k++)
            set[k] = k, rank[k] = 1;
    }
    inline int find(int k) {
        if (set[k] == k)
            return k;
        return set[k] = find(set[k]);
    }
    bool merge(int a, int b) {
        a = find(a), b = find(b);
        if (a == b)
            return false;
        if (rank[b] > rank[a])
            std::swap(a, b);
        set[b] = a, rank[a] += rank[b];
        return true;
    }
};


struct pos_t {
    int x, y;
};

inline bool operator<(const pos_t& p1, const pos_t& p2) {
    return p1.x < p2.x || (p1.x == p2.x && p1.y < p2.y);
}

int construct_roads(vec x, vec y) {
    int n = x.size();
    std::map<pos_t, int> map;
    for (int k = 0; k < n; k++)
        map[{x[k], y[k]}] = k;
    
    DSU dsu(n);
    vec u, v;
    int ans_pt = 0;
    std::map<pos_t, vec> road_ls;
    for (int k = 0; k < n; k++) {
        for (int d = -1; d <= 1; d += 2) {
            pos_t new_pos = {x[k], y[k] + 2 * d};
            if (map.find(new_pos) == map.end())
                continue;
            int l = map[new_pos];
            if (dsu.merge(k, l)) {
                u.push_back(k);
                v.push_back(l);
                road_ls[{x[k] - 1, y[k] + d}].push_back(ans_pt);
                road_ls[{x[k] + 1, y[k] + d}].push_back(ans_pt);
                ans_pt++;
            }
        }
    }
    vec order(n);
    for (int i = 0; i < n; i++)
        order[i] = i;
    std::sort(order.begin(), order.end(),
              [&](int o1, int o2) {
                  return y[o1] > y[o2];
              });
    for (int k : order) {
        for (int d = -1; d <= 1; d += 2) {
            pos_t new_pos = {x[k] + 2 * d, y[k]};
            if (map.find(new_pos) == map.end())
                continue;
            int l = map[new_pos];
            if (dsu.merge(k, l)) {
                u.push_back(k);
                v.push_back(l);
                road_ls[{x[k] + d, y[k] + 1}].push_back(ans_pt);
                road_ls[{x[k] + d, y[k] - 1}].push_back(ans_pt);
                ans_pt++;
            }
        }
    }
    if (ans_pt < n - 1)
        return 0;

    vec bench_x(n - 1, -1), bench_y(n - 1, -1);
    std::queue<int> bfs_queue;
    for (int start = n - 2; start >= 0; start--) {
        if (bench_x[start] != -1)
            continue;
        int s_u = u[start], s_v = v[start];
        if (y[s_u] == y[s_v])       // horizontal
            bench_x[start] = (x[s_u] + x[s_v]) / 2, bench_y[start] = y[s_u] + 1;    // up
        else
            bench_x[start] = x[s_u] + 1, bench_y[start] = (y[s_u] + y[s_v]) / 2;
        bfs_queue.push(start);
        while (!bfs_queue.empty()) {
            int t = bfs_queue.front(), bx = bench_x[t], by = bench_y[t];
            bfs_queue.pop();
            assert(bx != -1 && by != -1);
            for (int nr : road_ls[{bx, by}]) {
                if (bench_x[nr] != -1)
                    continue;
                bench_x[nr] = x[u[nr]] + x[v[nr]] - bx;
                bench_y[nr] = y[u[nr]] + y[v[nr]] - by;
                bfs_queue.push(nr);
            }
        }
    }
    build(u, v, bench_x, bench_y);
    return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 372 ms 36692 KB Output is correct
10 Correct 19 ms 4008 KB Output is correct
11 Correct 106 ms 19888 KB Output is correct
12 Correct 22 ms 5928 KB Output is correct
13 Correct 67 ms 14580 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 3 ms 956 KB Output is correct
16 Correct 393 ms 36736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 372 ms 36692 KB Output is correct
10 Correct 19 ms 4008 KB Output is correct
11 Correct 106 ms 19888 KB Output is correct
12 Correct 22 ms 5928 KB Output is correct
13 Correct 67 ms 14580 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 3 ms 956 KB Output is correct
16 Correct 393 ms 36736 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 300 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 304 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1085 ms 61988 KB Output is correct
24 Correct 1 ms 296 KB Output is correct
25 Correct 2 ms 568 KB Output is correct
26 Correct 5 ms 1092 KB Output is correct
27 Correct 6 ms 1364 KB Output is correct
28 Correct 327 ms 24960 KB Output is correct
29 Correct 585 ms 37520 KB Output is correct
30 Correct 816 ms 49864 KB Output is correct
31 Correct 1086 ms 62012 KB Output is correct
32 Correct 1 ms 300 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 304 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 0 ms 296 KB Output is correct
41 Correct 1 ms 300 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 3 ms 724 KB Output is correct
44 Correct 6 ms 1036 KB Output is correct
45 Correct 299 ms 29884 KB Output is correct
46 Correct 607 ms 43284 KB Output is correct
47 Correct 558 ms 43212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 372 ms 36692 KB Output is correct
10 Correct 19 ms 4008 KB Output is correct
11 Correct 106 ms 19888 KB Output is correct
12 Correct 22 ms 5928 KB Output is correct
13 Correct 67 ms 14580 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 3 ms 956 KB Output is correct
16 Correct 393 ms 36736 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 300 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 304 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1085 ms 61988 KB Output is correct
24 Correct 1 ms 296 KB Output is correct
25 Correct 2 ms 568 KB Output is correct
26 Correct 5 ms 1092 KB Output is correct
27 Correct 6 ms 1364 KB Output is correct
28 Correct 327 ms 24960 KB Output is correct
29 Correct 585 ms 37520 KB Output is correct
30 Correct 816 ms 49864 KB Output is correct
31 Correct 1086 ms 62012 KB Output is correct
32 Correct 1 ms 300 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 304 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 0 ms 296 KB Output is correct
41 Correct 1 ms 300 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 3 ms 724 KB Output is correct
44 Correct 6 ms 1036 KB Output is correct
45 Correct 299 ms 29884 KB Output is correct
46 Correct 607 ms 43284 KB Output is correct
47 Correct 558 ms 43212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1006 ms 58356 KB Output is correct
56 Correct 1 ms 296 KB Output is correct
57 Correct 3 ms 820 KB Output is correct
58 Correct 12 ms 2104 KB Output is correct
59 Correct 16 ms 2772 KB Output is correct
60 Correct 358 ms 29340 KB Output is correct
61 Correct 604 ms 39552 KB Output is correct
62 Correct 765 ms 48404 KB Output is correct
63 Correct 1094 ms 58360 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 1 ms 224 KB Output is correct
67 Correct 1028 ms 72948 KB Output is correct
68 Correct 937 ms 72912 KB Output is correct
69 Correct 913 ms 72592 KB Output is correct
70 Correct 7 ms 1236 KB Output is correct
71 Correct 14 ms 2288 KB Output is correct
72 Correct 306 ms 29336 KB Output is correct
73 Correct 601 ms 44044 KB Output is correct
74 Correct 831 ms 58224 KB Output is correct
75 Correct 899 ms 64204 KB Output is correct
76 Correct 895 ms 72932 KB Output is correct
77 Correct 7 ms 1620 KB Output is correct
78 Correct 13 ms 2620 KB Output is correct
79 Correct 334 ms 30408 KB Output is correct
80 Correct 536 ms 45596 KB Output is correct
81 Correct 848 ms 60432 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 372 ms 36692 KB Output is correct
10 Correct 19 ms 4008 KB Output is correct
11 Correct 106 ms 19888 KB Output is correct
12 Correct 22 ms 5928 KB Output is correct
13 Correct 67 ms 14580 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 3 ms 956 KB Output is correct
16 Correct 393 ms 36736 KB Output is correct
17 Correct 1 ms 300 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 292 KB Output is correct
20 Correct 722 ms 51132 KB Output is correct
21 Correct 614 ms 51288 KB Output is correct
22 Correct 684 ms 51148 KB Output is correct
23 Correct 663 ms 62124 KB Output is correct
24 Correct 326 ms 19604 KB Output is correct
25 Correct 705 ms 64924 KB Output is correct
26 Correct 807 ms 65032 KB Output is correct
27 Correct 977 ms 72884 KB Output is correct
28 Correct 927 ms 72880 KB Output is correct
29 Correct 805 ms 72824 KB Output is correct
30 Correct 802 ms 72800 KB Output is correct
31 Correct 0 ms 300 KB Output is correct
32 Correct 34 ms 4644 KB Output is correct
33 Correct 106 ms 10548 KB Output is correct
34 Correct 642 ms 51000 KB Output is correct
35 Correct 16 ms 2644 KB Output is correct
36 Correct 101 ms 12304 KB Output is correct
37 Correct 256 ms 24332 KB Output is correct
38 Correct 246 ms 22780 KB Output is correct
39 Correct 393 ms 31084 KB Output is correct
40 Correct 580 ms 39088 KB Output is correct
41 Correct 718 ms 47180 KB Output is correct
42 Correct 910 ms 55252 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 212 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 0 ms 300 KB Output is correct
54 Correct 3 ms 724 KB Output is correct
55 Correct 4 ms 980 KB Output is correct
56 Correct 298 ms 29936 KB Output is correct
57 Correct 505 ms 43280 KB Output is correct
58 Correct 551 ms 43240 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 906 ms 72968 KB Output is correct
63 Correct 856 ms 73052 KB Output is correct
64 Correct 884 ms 72600 KB Output is correct
65 Correct 5 ms 1236 KB Output is correct
66 Correct 11 ms 2212 KB Output is correct
67 Correct 329 ms 29352 KB Output is correct
68 Correct 523 ms 43940 KB Output is correct
69 Correct 812 ms 58308 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 372 ms 36692 KB Output is correct
10 Correct 19 ms 4008 KB Output is correct
11 Correct 106 ms 19888 KB Output is correct
12 Correct 22 ms 5928 KB Output is correct
13 Correct 67 ms 14580 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 3 ms 956 KB Output is correct
16 Correct 393 ms 36736 KB Output is correct
17 Correct 951 ms 72872 KB Output is correct
18 Correct 894 ms 72892 KB Output is correct
19 Correct 681 ms 51052 KB Output is correct
20 Correct 910 ms 57212 KB Output is correct
21 Correct 747 ms 57608 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 88 ms 9848 KB Output is correct
24 Correct 36 ms 5344 KB Output is correct
25 Correct 159 ms 17968 KB Output is correct
26 Correct 355 ms 30208 KB Output is correct
27 Correct 362 ms 29276 KB Output is correct
28 Correct 505 ms 36352 KB Output is correct
29 Correct 618 ms 43180 KB Output is correct
30 Correct 872 ms 50280 KB Output is correct
31 Correct 1076 ms 57056 KB Output is correct
32 Correct 956 ms 64204 KB Output is correct
33 Correct 928 ms 72972 KB Output is correct
34 Correct 10 ms 1572 KB Output is correct
35 Correct 14 ms 2636 KB Output is correct
36 Correct 378 ms 30312 KB Output is correct
37 Correct 650 ms 45556 KB Output is correct
38 Correct 953 ms 60436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 296 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 372 ms 36692 KB Output is correct
10 Correct 19 ms 4008 KB Output is correct
11 Correct 106 ms 19888 KB Output is correct
12 Correct 22 ms 5928 KB Output is correct
13 Correct 67 ms 14580 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 3 ms 956 KB Output is correct
16 Correct 393 ms 36736 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 300 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 304 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1085 ms 61988 KB Output is correct
24 Correct 1 ms 296 KB Output is correct
25 Correct 2 ms 568 KB Output is correct
26 Correct 5 ms 1092 KB Output is correct
27 Correct 6 ms 1364 KB Output is correct
28 Correct 327 ms 24960 KB Output is correct
29 Correct 585 ms 37520 KB Output is correct
30 Correct 816 ms 49864 KB Output is correct
31 Correct 1086 ms 62012 KB Output is correct
32 Correct 1 ms 300 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 304 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 0 ms 296 KB Output is correct
41 Correct 1 ms 300 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 3 ms 724 KB Output is correct
44 Correct 6 ms 1036 KB Output is correct
45 Correct 299 ms 29884 KB Output is correct
46 Correct 607 ms 43284 KB Output is correct
47 Correct 558 ms 43212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1006 ms 58356 KB Output is correct
56 Correct 1 ms 296 KB Output is correct
57 Correct 3 ms 820 KB Output is correct
58 Correct 12 ms 2104 KB Output is correct
59 Correct 16 ms 2772 KB Output is correct
60 Correct 358 ms 29340 KB Output is correct
61 Correct 604 ms 39552 KB Output is correct
62 Correct 765 ms 48404 KB Output is correct
63 Correct 1094 ms 58360 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 1 ms 224 KB Output is correct
67 Correct 1028 ms 72948 KB Output is correct
68 Correct 937 ms 72912 KB Output is correct
69 Correct 913 ms 72592 KB Output is correct
70 Correct 7 ms 1236 KB Output is correct
71 Correct 14 ms 2288 KB Output is correct
72 Correct 306 ms 29336 KB Output is correct
73 Correct 601 ms 44044 KB Output is correct
74 Correct 831 ms 58224 KB Output is correct
75 Correct 899 ms 64204 KB Output is correct
76 Correct 895 ms 72932 KB Output is correct
77 Correct 7 ms 1620 KB Output is correct
78 Correct 13 ms 2620 KB Output is correct
79 Correct 334 ms 30408 KB Output is correct
80 Correct 536 ms 45596 KB Output is correct
81 Correct 848 ms 60432 KB Output is correct
82 Correct 1 ms 300 KB Output is correct
83 Correct 0 ms 212 KB Output is correct
84 Correct 0 ms 292 KB Output is correct
85 Correct 722 ms 51132 KB Output is correct
86 Correct 614 ms 51288 KB Output is correct
87 Correct 684 ms 51148 KB Output is correct
88 Correct 663 ms 62124 KB Output is correct
89 Correct 326 ms 19604 KB Output is correct
90 Correct 705 ms 64924 KB Output is correct
91 Correct 807 ms 65032 KB Output is correct
92 Correct 977 ms 72884 KB Output is correct
93 Correct 927 ms 72880 KB Output is correct
94 Correct 805 ms 72824 KB Output is correct
95 Correct 802 ms 72800 KB Output is correct
96 Correct 0 ms 300 KB Output is correct
97 Correct 34 ms 4644 KB Output is correct
98 Correct 106 ms 10548 KB Output is correct
99 Correct 642 ms 51000 KB Output is correct
100 Correct 16 ms 2644 KB Output is correct
101 Correct 101 ms 12304 KB Output is correct
102 Correct 256 ms 24332 KB Output is correct
103 Correct 246 ms 22780 KB Output is correct
104 Correct 393 ms 31084 KB Output is correct
105 Correct 580 ms 39088 KB Output is correct
106 Correct 718 ms 47180 KB Output is correct
107 Correct 910 ms 55252 KB Output is correct
108 Correct 1 ms 212 KB Output is correct
109 Correct 0 ms 212 KB Output is correct
110 Correct 1 ms 212 KB Output is correct
111 Correct 0 ms 212 KB Output is correct
112 Correct 0 ms 212 KB Output is correct
113 Correct 0 ms 212 KB Output is correct
114 Correct 0 ms 212 KB Output is correct
115 Correct 0 ms 212 KB Output is correct
116 Correct 0 ms 212 KB Output is correct
117 Correct 1 ms 212 KB Output is correct
118 Correct 0 ms 300 KB Output is correct
119 Correct 3 ms 724 KB Output is correct
120 Correct 4 ms 980 KB Output is correct
121 Correct 298 ms 29936 KB Output is correct
122 Correct 505 ms 43280 KB Output is correct
123 Correct 551 ms 43240 KB Output is correct
124 Correct 0 ms 212 KB Output is correct
125 Correct 0 ms 212 KB Output is correct
126 Correct 1 ms 212 KB Output is correct
127 Correct 906 ms 72968 KB Output is correct
128 Correct 856 ms 73052 KB Output is correct
129 Correct 884 ms 72600 KB Output is correct
130 Correct 5 ms 1236 KB Output is correct
131 Correct 11 ms 2212 KB Output is correct
132 Correct 329 ms 29352 KB Output is correct
133 Correct 523 ms 43940 KB Output is correct
134 Correct 812 ms 58308 KB Output is correct
135 Correct 951 ms 72872 KB Output is correct
136 Correct 894 ms 72892 KB Output is correct
137 Correct 681 ms 51052 KB Output is correct
138 Correct 910 ms 57212 KB Output is correct
139 Correct 747 ms 57608 KB Output is correct
140 Correct 0 ms 212 KB Output is correct
141 Correct 88 ms 9848 KB Output is correct
142 Correct 36 ms 5344 KB Output is correct
143 Correct 159 ms 17968 KB Output is correct
144 Correct 355 ms 30208 KB Output is correct
145 Correct 362 ms 29276 KB Output is correct
146 Correct 505 ms 36352 KB Output is correct
147 Correct 618 ms 43180 KB Output is correct
148 Correct 872 ms 50280 KB Output is correct
149 Correct 1076 ms 57056 KB Output is correct
150 Correct 956 ms 64204 KB Output is correct
151 Correct 928 ms 72972 KB Output is correct
152 Correct 10 ms 1572 KB Output is correct
153 Correct 14 ms 2636 KB Output is correct
154 Correct 378 ms 30312 KB Output is correct
155 Correct 650 ms 45556 KB Output is correct
156 Correct 953 ms 60436 KB Output is correct
157 Correct 1 ms 212 KB Output is correct
158 Correct 1 ms 212 KB Output is correct
159 Correct 1 ms 256 KB Output is correct
160 Correct 1 ms 304 KB Output is correct
161 Correct 967 ms 51076 KB Output is correct
162 Correct 634 ms 51000 KB Output is correct
163 Correct 737 ms 51016 KB Output is correct
164 Correct 722 ms 51056 KB Output is correct
165 Incorrect 808 ms 51016 KB Tree @(44441, 44453) appears more than once: for edges on positions 129952 and 177775
166 Halted 0 ms 0 KB -