답안 #1062274

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1062274 2024-08-17T00:04:01 Z mariaclara 분수 공원 (IOI21_parks) C++17
70 / 100
563 ms 87460 KB
#include "parks.h"
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
const int MAX = 2e5+5;
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define mk make_pair
#define pb push_back
#define fr first
#define sc second

int N;
vector<int> v[MAX], X, Y;
vector<pii> range[MAX];

bool check(vector<pii> e) {
    vector<int> g[N];

    for(auto [A,B] : e) 
        g[A].pb(B), g[B].pb(A);

    queue<int> fila;
    vector<bool> vis(N);
    fila.push(0);
    vis[0] = 1;

    while(!fila.empty()) {
        int at = fila.front();
        fila.pop();

        for(int viz : g[at])
            if(!vis[viz]) fila.push(viz), vis[viz] = 1;
    }

    for(int i = 0; i < N; i++) if(!vis[i]) return 0;
    return 1;
}

void construct(vector<pii> edges){
    vector<int> U, V, A, B;
    map<pii,vector<pii>> point;

    // vamos anotar pontos e quantas ruas eles olham

    for(auto [i1, i2] : edges){
        int x1 = X[i1], y1 = Y[i1], x2 = X[i2], y2 = Y[i2];
        if(x1 == x2) {
            point[{x1+1, (y1+y2)/2}].pb({i1,i2});
            point[{x1-1, (y1+y2)/2}].pb({i1,i2});
        }
        if(y1 == y2) {
            point[{(x1+x2)/2, y1+1}].pb({i1,i2});
            point[{(x1+x2)/2, y1-1}].pb({i1,i2});
        }
    }

    queue<pii> fila;

    for(auto [p, qtd] : point)
        if(sz(qtd) == 1) fila.push(p);

    while(!point.empty()) {
        if(fila.empty()) fila.push((*point.begin()).fr);

        auto [a,b] = fila.front();
        fila.pop();

        if(point.count({a,b}) == 0) continue;
        auto [u,v] = point[{a,b}].back();
        point[{a,b}].pop_back();

        U.pb(u); V.pb(v); A.pb(a); B.pb(b);

        pii p = {a,b};
        if(X[u] == X[v]) p.fr = 2*X[u] - p.fr;
        else p.sc = 2*Y[u] - p.sc;

        for(int ind = 0; ind < sz(point[p]); ind++) {
            if(point[p][ind] == mk(u,v)) {
                point[p].erase(point[p].begin() + ind);
                break;
            }
        }

        if(sz(point[p]) == 1) fila.push(p);
        if(point[p].empty()) point.erase(p);
        point.erase({a,b});
    }

    build(U, V, A, B);
}

int construct_roads(vector<int> x, vector<int> y) {
    N = sz(x);
    map<pii,int> ind;
    X = x;
    Y = y;

    for(int i = 0; i < N; i++)
        ind[{x[i], y[i]}] = i, v[x[i]].pb(y[i]);

    vector<pii> edges;

    for(int i = 2; i < MAX; i += 2) {
        sort(all(v[i]));
        for(int k = 0, last = -1; k < sz(v[i]); k++) {
            int j = v[i][k];
            // olhando o ponto (i,j)

            if(last == -1) last = j;
            if(k+1 == sz(v[i]) or v[i][k+1] - j != 2) range[i].pb({last, j}), last = -1;
            else edges.pb({ind[{i, j}], ind[{i, j+2}]});
        }
    }

    for(int i = 2; i < MAX; i += 2) {
        for(int j = 0, k = 0; j < sz(range[i]) and k < sz(range[i-2]); ) {
            if(range[i][j].sc < range[i-2][k].fr) j++;
            else if(range[i-2][k].sc < range[i][j].fr) k++;
            else {
                int p = min(range[i][j].sc, range[i-2][k].sc);
                edges.pb({ind[{i-2,p}], ind[{i,p}]});
                if(range[i][j].sc < range[i-2][k].sc) j++;
                else k++;
            }
        }
    }

    if(!check(edges)) return 0;

    construct(edges);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 2 ms 9820 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9828 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 3 ms 9828 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 216 ms 46740 KB Output is correct
10 Correct 15 ms 13660 KB Output is correct
11 Correct 97 ms 29704 KB Output is correct
12 Correct 23 ms 15320 KB Output is correct
13 Correct 24 ms 16848 KB Output is correct
14 Correct 3 ms 9820 KB Output is correct
15 Correct 3 ms 10076 KB Output is correct
16 Correct 222 ms 46544 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 2 ms 9820 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9828 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 3 ms 9828 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 216 ms 46740 KB Output is correct
10 Correct 15 ms 13660 KB Output is correct
11 Correct 97 ms 29704 KB Output is correct
12 Correct 23 ms 15320 KB Output is correct
13 Correct 24 ms 16848 KB Output is correct
14 Correct 3 ms 9820 KB Output is correct
15 Correct 3 ms 10076 KB Output is correct
16 Correct 222 ms 46544 KB Output is correct
17 Correct 2 ms 9816 KB Output is correct
18 Correct 2 ms 9820 KB Output is correct
19 Correct 2 ms 9820 KB Output is correct
20 Correct 2 ms 9820 KB Output is correct
21 Correct 2 ms 9820 KB Output is correct
22 Correct 2 ms 9820 KB Output is correct
23 Correct 410 ms 75424 KB Output is correct
24 Correct 2 ms 9816 KB Output is correct
25 Correct 4 ms 10076 KB Output is correct
26 Correct 3 ms 10076 KB Output is correct
27 Correct 4 ms 10388 KB Output is correct
28 Correct 144 ms 35280 KB Output is correct
29 Correct 219 ms 47948 KB Output is correct
30 Correct 307 ms 62716 KB Output is correct
31 Correct 397 ms 75416 KB Output is correct
32 Correct 2 ms 9820 KB Output is correct
33 Correct 2 ms 9820 KB Output is correct
34 Correct 2 ms 9820 KB Output is correct
35 Correct 2 ms 9820 KB Output is correct
36 Correct 2 ms 9820 KB Output is correct
37 Correct 2 ms 9612 KB Output is correct
38 Correct 2 ms 9816 KB Output is correct
39 Correct 2 ms 9816 KB Output is correct
40 Correct 2 ms 9820 KB Output is correct
41 Correct 3 ms 9820 KB Output is correct
42 Correct 2 ms 9820 KB Output is correct
43 Correct 3 ms 10076 KB Output is correct
44 Correct 3 ms 10076 KB Output is correct
45 Correct 196 ms 40908 KB Output is correct
46 Correct 291 ms 56512 KB Output is correct
47 Correct 301 ms 56012 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 2 ms 9820 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9828 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 3 ms 9828 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 216 ms 46740 KB Output is correct
10 Correct 15 ms 13660 KB Output is correct
11 Correct 97 ms 29704 KB Output is correct
12 Correct 23 ms 15320 KB Output is correct
13 Correct 24 ms 16848 KB Output is correct
14 Correct 3 ms 9820 KB Output is correct
15 Correct 3 ms 10076 KB Output is correct
16 Correct 222 ms 46544 KB Output is correct
17 Correct 2 ms 9816 KB Output is correct
18 Correct 2 ms 9820 KB Output is correct
19 Correct 2 ms 9820 KB Output is correct
20 Correct 2 ms 9820 KB Output is correct
21 Correct 2 ms 9820 KB Output is correct
22 Correct 2 ms 9820 KB Output is correct
23 Correct 410 ms 75424 KB Output is correct
24 Correct 2 ms 9816 KB Output is correct
25 Correct 4 ms 10076 KB Output is correct
26 Correct 3 ms 10076 KB Output is correct
27 Correct 4 ms 10388 KB Output is correct
28 Correct 144 ms 35280 KB Output is correct
29 Correct 219 ms 47948 KB Output is correct
30 Correct 307 ms 62716 KB Output is correct
31 Correct 397 ms 75416 KB Output is correct
32 Correct 2 ms 9820 KB Output is correct
33 Correct 2 ms 9820 KB Output is correct
34 Correct 2 ms 9820 KB Output is correct
35 Correct 2 ms 9820 KB Output is correct
36 Correct 2 ms 9820 KB Output is correct
37 Correct 2 ms 9612 KB Output is correct
38 Correct 2 ms 9816 KB Output is correct
39 Correct 2 ms 9816 KB Output is correct
40 Correct 2 ms 9820 KB Output is correct
41 Correct 3 ms 9820 KB Output is correct
42 Correct 2 ms 9820 KB Output is correct
43 Correct 3 ms 10076 KB Output is correct
44 Correct 3 ms 10076 KB Output is correct
45 Correct 196 ms 40908 KB Output is correct
46 Correct 291 ms 56512 KB Output is correct
47 Correct 301 ms 56012 KB Output is correct
48 Correct 2 ms 9816 KB Output is correct
49 Correct 2 ms 9820 KB Output is correct
50 Correct 2 ms 9816 KB Output is correct
51 Correct 2 ms 9820 KB Output is correct
52 Correct 2 ms 9820 KB Output is correct
53 Correct 3 ms 9820 KB Output is correct
54 Correct 2 ms 9820 KB Output is correct
55 Correct 395 ms 72024 KB Output is correct
56 Correct 2 ms 9820 KB Output is correct
57 Correct 5 ms 10344 KB Output is correct
58 Correct 11 ms 11636 KB Output is correct
59 Correct 8 ms 11612 KB Output is correct
60 Correct 171 ms 41568 KB Output is correct
61 Correct 251 ms 52356 KB Output is correct
62 Correct 314 ms 63048 KB Output is correct
63 Correct 402 ms 73756 KB Output is correct
64 Correct 2 ms 9820 KB Output is correct
65 Correct 2 ms 9828 KB Output is correct
66 Correct 2 ms 9820 KB Output is correct
67 Correct 467 ms 85404 KB Output is correct
68 Correct 406 ms 85592 KB Output is correct
69 Correct 414 ms 85104 KB Output is correct
70 Correct 4 ms 10332 KB Output is correct
71 Correct 6 ms 11220 KB Output is correct
72 Correct 200 ms 41520 KB Output is correct
73 Correct 323 ms 57680 KB Output is correct
74 Correct 448 ms 73756 KB Output is correct
75 Correct 468 ms 81252 KB Output is correct
76 Correct 428 ms 85592 KB Output is correct
77 Correct 6 ms 10584 KB Output is correct
78 Correct 10 ms 11332 KB Output is correct
79 Correct 205 ms 42868 KB Output is correct
80 Correct 356 ms 60616 KB Output is correct
81 Correct 484 ms 77296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 2 ms 9820 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9828 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 3 ms 9828 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 216 ms 46740 KB Output is correct
10 Correct 15 ms 13660 KB Output is correct
11 Correct 97 ms 29704 KB Output is correct
12 Correct 23 ms 15320 KB Output is correct
13 Correct 24 ms 16848 KB Output is correct
14 Correct 3 ms 9820 KB Output is correct
15 Correct 3 ms 10076 KB Output is correct
16 Correct 222 ms 46544 KB Output is correct
17 Correct 2 ms 9820 KB Output is correct
18 Correct 2 ms 9820 KB Output is correct
19 Correct 2 ms 9820 KB Output is correct
20 Correct 365 ms 65000 KB Output is correct
21 Correct 346 ms 61536 KB Output is correct
22 Correct 348 ms 61540 KB Output is correct
23 Correct 338 ms 76060 KB Output is correct
24 Correct 115 ms 34132 KB Output is correct
25 Correct 209 ms 43456 KB Output is correct
26 Correct 163 ms 41896 KB Output is correct
27 Correct 356 ms 87460 KB Output is correct
28 Correct 368 ms 87264 KB Output is correct
29 Correct 392 ms 86088 KB Output is correct
30 Correct 417 ms 85924 KB Output is correct
31 Correct 2 ms 9816 KB Output is correct
32 Correct 28 ms 14184 KB Output is correct
33 Correct 60 ms 28120 KB Output is correct
34 Correct 365 ms 67464 KB Output is correct
35 Correct 10 ms 11612 KB Output is correct
36 Correct 48 ms 18812 KB Output is correct
37 Correct 78 ms 27748 KB Output is correct
38 Correct 174 ms 34680 KB Output is correct
39 Correct 247 ms 43624 KB Output is correct
40 Correct 322 ms 52860 KB Output is correct
41 Correct 412 ms 64536 KB Output is correct
42 Correct 485 ms 72496 KB Output is correct
43 Correct 2 ms 9820 KB Output is correct
44 Correct 2 ms 9656 KB Output is correct
45 Correct 2 ms 9820 KB Output is correct
46 Correct 3 ms 9820 KB Output is correct
47 Correct 2 ms 9820 KB Output is correct
48 Correct 2 ms 9820 KB Output is correct
49 Correct 2 ms 9820 KB Output is correct
50 Correct 2 ms 9820 KB Output is correct
51 Correct 2 ms 9820 KB Output is correct
52 Correct 3 ms 9820 KB Output is correct
53 Correct 2 ms 9820 KB Output is correct
54 Correct 3 ms 10076 KB Output is correct
55 Correct 4 ms 10332 KB Output is correct
56 Correct 190 ms 41676 KB Output is correct
57 Correct 307 ms 57800 KB Output is correct
58 Correct 314 ms 57036 KB Output is correct
59 Correct 3 ms 9816 KB Output is correct
60 Correct 2 ms 9820 KB Output is correct
61 Correct 2 ms 9820 KB Output is correct
62 Correct 479 ms 85372 KB Output is correct
63 Correct 412 ms 85396 KB Output is correct
64 Correct 416 ms 85108 KB Output is correct
65 Correct 4 ms 10328 KB Output is correct
66 Correct 7 ms 11096 KB Output is correct
67 Correct 207 ms 41548 KB Output is correct
68 Correct 336 ms 57892 KB Output is correct
69 Correct 448 ms 73920 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 2 ms 9820 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9828 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 3 ms 9828 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 216 ms 46740 KB Output is correct
10 Correct 15 ms 13660 KB Output is correct
11 Correct 97 ms 29704 KB Output is correct
12 Correct 23 ms 15320 KB Output is correct
13 Correct 24 ms 16848 KB Output is correct
14 Correct 3 ms 9820 KB Output is correct
15 Correct 3 ms 10076 KB Output is correct
16 Correct 222 ms 46544 KB Output is correct
17 Correct 395 ms 86872 KB Output is correct
18 Correct 386 ms 87012 KB Output is correct
19 Correct 404 ms 63468 KB Output is correct
20 Correct 371 ms 68724 KB Output is correct
21 Correct 338 ms 75888 KB Output is correct
22 Correct 2 ms 9816 KB Output is correct
23 Correct 67 ms 19792 KB Output is correct
24 Correct 16 ms 13272 KB Output is correct
25 Correct 56 ms 22468 KB Output is correct
26 Correct 99 ms 31592 KB Output is correct
27 Correct 247 ms 42016 KB Output is correct
28 Correct 326 ms 50356 KB Output is correct
29 Correct 394 ms 59156 KB Output is correct
30 Correct 473 ms 67276 KB Output is correct
31 Correct 563 ms 77904 KB Output is correct
32 Correct 494 ms 81260 KB Output is correct
33 Correct 417 ms 85592 KB Output is correct
34 Correct 5 ms 10584 KB Output is correct
35 Correct 7 ms 11608 KB Output is correct
36 Correct 211 ms 42820 KB Output is correct
37 Correct 332 ms 60580 KB Output is correct
38 Correct 459 ms 77044 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 2 ms 9820 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9828 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 3 ms 9828 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 216 ms 46740 KB Output is correct
10 Correct 15 ms 13660 KB Output is correct
11 Correct 97 ms 29704 KB Output is correct
12 Correct 23 ms 15320 KB Output is correct
13 Correct 24 ms 16848 KB Output is correct
14 Correct 3 ms 9820 KB Output is correct
15 Correct 3 ms 10076 KB Output is correct
16 Correct 222 ms 46544 KB Output is correct
17 Correct 2 ms 9816 KB Output is correct
18 Correct 2 ms 9820 KB Output is correct
19 Correct 2 ms 9820 KB Output is correct
20 Correct 2 ms 9820 KB Output is correct
21 Correct 2 ms 9820 KB Output is correct
22 Correct 2 ms 9820 KB Output is correct
23 Correct 410 ms 75424 KB Output is correct
24 Correct 2 ms 9816 KB Output is correct
25 Correct 4 ms 10076 KB Output is correct
26 Correct 3 ms 10076 KB Output is correct
27 Correct 4 ms 10388 KB Output is correct
28 Correct 144 ms 35280 KB Output is correct
29 Correct 219 ms 47948 KB Output is correct
30 Correct 307 ms 62716 KB Output is correct
31 Correct 397 ms 75416 KB Output is correct
32 Correct 2 ms 9820 KB Output is correct
33 Correct 2 ms 9820 KB Output is correct
34 Correct 2 ms 9820 KB Output is correct
35 Correct 2 ms 9820 KB Output is correct
36 Correct 2 ms 9820 KB Output is correct
37 Correct 2 ms 9612 KB Output is correct
38 Correct 2 ms 9816 KB Output is correct
39 Correct 2 ms 9816 KB Output is correct
40 Correct 2 ms 9820 KB Output is correct
41 Correct 3 ms 9820 KB Output is correct
42 Correct 2 ms 9820 KB Output is correct
43 Correct 3 ms 10076 KB Output is correct
44 Correct 3 ms 10076 KB Output is correct
45 Correct 196 ms 40908 KB Output is correct
46 Correct 291 ms 56512 KB Output is correct
47 Correct 301 ms 56012 KB Output is correct
48 Correct 2 ms 9816 KB Output is correct
49 Correct 2 ms 9820 KB Output is correct
50 Correct 2 ms 9816 KB Output is correct
51 Correct 2 ms 9820 KB Output is correct
52 Correct 2 ms 9820 KB Output is correct
53 Correct 3 ms 9820 KB Output is correct
54 Correct 2 ms 9820 KB Output is correct
55 Correct 395 ms 72024 KB Output is correct
56 Correct 2 ms 9820 KB Output is correct
57 Correct 5 ms 10344 KB Output is correct
58 Correct 11 ms 11636 KB Output is correct
59 Correct 8 ms 11612 KB Output is correct
60 Correct 171 ms 41568 KB Output is correct
61 Correct 251 ms 52356 KB Output is correct
62 Correct 314 ms 63048 KB Output is correct
63 Correct 402 ms 73756 KB Output is correct
64 Correct 2 ms 9820 KB Output is correct
65 Correct 2 ms 9828 KB Output is correct
66 Correct 2 ms 9820 KB Output is correct
67 Correct 467 ms 85404 KB Output is correct
68 Correct 406 ms 85592 KB Output is correct
69 Correct 414 ms 85104 KB Output is correct
70 Correct 4 ms 10332 KB Output is correct
71 Correct 6 ms 11220 KB Output is correct
72 Correct 200 ms 41520 KB Output is correct
73 Correct 323 ms 57680 KB Output is correct
74 Correct 448 ms 73756 KB Output is correct
75 Correct 468 ms 81252 KB Output is correct
76 Correct 428 ms 85592 KB Output is correct
77 Correct 6 ms 10584 KB Output is correct
78 Correct 10 ms 11332 KB Output is correct
79 Correct 205 ms 42868 KB Output is correct
80 Correct 356 ms 60616 KB Output is correct
81 Correct 484 ms 77296 KB Output is correct
82 Correct 2 ms 9820 KB Output is correct
83 Correct 2 ms 9820 KB Output is correct
84 Correct 2 ms 9820 KB Output is correct
85 Correct 365 ms 65000 KB Output is correct
86 Correct 346 ms 61536 KB Output is correct
87 Correct 348 ms 61540 KB Output is correct
88 Correct 338 ms 76060 KB Output is correct
89 Correct 115 ms 34132 KB Output is correct
90 Correct 209 ms 43456 KB Output is correct
91 Correct 163 ms 41896 KB Output is correct
92 Correct 356 ms 87460 KB Output is correct
93 Correct 368 ms 87264 KB Output is correct
94 Correct 392 ms 86088 KB Output is correct
95 Correct 417 ms 85924 KB Output is correct
96 Correct 2 ms 9816 KB Output is correct
97 Correct 28 ms 14184 KB Output is correct
98 Correct 60 ms 28120 KB Output is correct
99 Correct 365 ms 67464 KB Output is correct
100 Correct 10 ms 11612 KB Output is correct
101 Correct 48 ms 18812 KB Output is correct
102 Correct 78 ms 27748 KB Output is correct
103 Correct 174 ms 34680 KB Output is correct
104 Correct 247 ms 43624 KB Output is correct
105 Correct 322 ms 52860 KB Output is correct
106 Correct 412 ms 64536 KB Output is correct
107 Correct 485 ms 72496 KB Output is correct
108 Correct 2 ms 9820 KB Output is correct
109 Correct 2 ms 9656 KB Output is correct
110 Correct 2 ms 9820 KB Output is correct
111 Correct 3 ms 9820 KB Output is correct
112 Correct 2 ms 9820 KB Output is correct
113 Correct 2 ms 9820 KB Output is correct
114 Correct 2 ms 9820 KB Output is correct
115 Correct 2 ms 9820 KB Output is correct
116 Correct 2 ms 9820 KB Output is correct
117 Correct 3 ms 9820 KB Output is correct
118 Correct 2 ms 9820 KB Output is correct
119 Correct 3 ms 10076 KB Output is correct
120 Correct 4 ms 10332 KB Output is correct
121 Correct 190 ms 41676 KB Output is correct
122 Correct 307 ms 57800 KB Output is correct
123 Correct 314 ms 57036 KB Output is correct
124 Correct 3 ms 9816 KB Output is correct
125 Correct 2 ms 9820 KB Output is correct
126 Correct 2 ms 9820 KB Output is correct
127 Correct 479 ms 85372 KB Output is correct
128 Correct 412 ms 85396 KB Output is correct
129 Correct 416 ms 85108 KB Output is correct
130 Correct 4 ms 10328 KB Output is correct
131 Correct 7 ms 11096 KB Output is correct
132 Correct 207 ms 41548 KB Output is correct
133 Correct 336 ms 57892 KB Output is correct
134 Correct 448 ms 73920 KB Output is correct
135 Correct 395 ms 86872 KB Output is correct
136 Correct 386 ms 87012 KB Output is correct
137 Correct 404 ms 63468 KB Output is correct
138 Correct 371 ms 68724 KB Output is correct
139 Correct 338 ms 75888 KB Output is correct
140 Correct 2 ms 9816 KB Output is correct
141 Correct 67 ms 19792 KB Output is correct
142 Correct 16 ms 13272 KB Output is correct
143 Correct 56 ms 22468 KB Output is correct
144 Correct 99 ms 31592 KB Output is correct
145 Correct 247 ms 42016 KB Output is correct
146 Correct 326 ms 50356 KB Output is correct
147 Correct 394 ms 59156 KB Output is correct
148 Correct 473 ms 67276 KB Output is correct
149 Correct 563 ms 77904 KB Output is correct
150 Correct 494 ms 81260 KB Output is correct
151 Correct 417 ms 85592 KB Output is correct
152 Correct 5 ms 10584 KB Output is correct
153 Correct 7 ms 11608 KB Output is correct
154 Correct 211 ms 42820 KB Output is correct
155 Correct 332 ms 60580 KB Output is correct
156 Correct 459 ms 77044 KB Output is correct
157 Correct 2 ms 9820 KB Output is correct
158 Correct 2 ms 9820 KB Output is correct
159 Correct 2 ms 9820 KB Output is correct
160 Correct 2 ms 9820 KB Output is correct
161 Correct 386 ms 61000 KB Output is correct
162 Correct 375 ms 67424 KB Output is correct
163 Correct 367 ms 70056 KB Output is correct
164 Correct 369 ms 70052 KB Output is correct
165 Correct 396 ms 67748 KB Output is correct
166 Correct 375 ms 66476 KB Output is correct
167 Incorrect 96 ms 23640 KB Given structure is not connected: There is no path between vertices 0 and 4
168 Halted 0 ms 0 KB -