답안 #612174

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
612174 2022-07-29T11:20:24 Z StrawHatWess 분수 공원 (IOI21_parks) C++17
70 / 100
308 ms 72336 KB
#include "parks.h"

#include <bits/stdc++.h>
using namespace std; 

#define FOR(i,a,b) for(int i=a; i<b; i++)
typedef long long ll;
typedef vector<int>vi;
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) begin(x),end(x)


typedef pair<int,int>pi; 
#define fi first
#define se second
typedef vector<pi>vpi;
#define eb emplace_back

bool ckmin(int &x, int y){
    bool f=(x>y); 
    x=min(x,y); 
    return f; 
}

bool ckmax(int &x, int y){
    bool f=(x<y); 
    x=max(x,y); 
    return f; 
}

//-------


const int MX=2e5+100;


vi rnk(MX,0), p(MX); 
int findSet(int i){return p[i]==i ? i : p[i]=findSet(p[i]); }

void unionSet(int u, int v){
    u=findSet(u), v=findSet(v); 

    if(rnk[u]<rnk[v]) swap(u,v); 
    if(rnk[u]==rnk[v]) rnk[u]++; 

    p[v]=u; 
}

int black(int x, int y){
    return (x/2+y/2)&1; 
}

int N; 
vi X, Y; 

unordered_map<int,int>pos[MX], vis[MX]; 

vpi ver[MX], hor[MX]; 
int construct_roads(vi X, vi Y) {
    N=sz(X); 
    ::X=X; ::Y=Y; 

    if (N==1) {
        build({}, {}, {}, {});
        return 1;
    }
    
    int sub=1; 
    FOR(i,0,N){
        pos[X[i]][Y[i]]=i, p[i]=i; 
        if(X[i]>6) sub=0; 
    }


    //building vertical 
    vpi roads; 
    FOR(i,0,N){
        int x=X[i], y=Y[i]; 
        if(pos[x].count(y-2)){
            int j=pos[x][y-2]; 
            if(findSet(i)!=findSet(j)){
                roads.eb(j,i);
                unionSet(i,j); 
            }
            
        }
    }
    //building horizontal
    FOR(i,0,N){
        int x=X[i], y=Y[i]; 
        if(pos[x-2].count(y)){
            int j=pos[x-2][y]; 
            if(findSet(i)!=findSet(j)){
                roads.eb(j,i);
                unionSet(i,j); 
            }
        }
    }


    //checking connectivity
    FOR(i,0,N) if(findSet(i)!=findSet(0)) return 0; 

    if(sub){
        for(auto it: roads){
            int i=it.fi, j=it.se; 
            if(X[i]==X[j]) ver[X[i]].eb(i,j); 
            else hor[X[i]].eb(i,j); 
        }

        vpi nw; 
        FOR(x,0,MX){
            for(pi cur: ver[x]) nw.pb(cur); 
            for(pi cur: hor[x]) nw.pb(cur); 
        }
        roads=nw; 

        vi u,v,A,B; 
        for(auto it: roads){
            int i=it.fi, j=it.se; 
            u.pb(i); v.pb(j); 

            if(X[i]==X[j]){
                //vertical
                int x=X[i], y=Y[i]; 

                if(!vis[x-1].count(y+1)){
                    A.pb(x-1); B.pb(y+1); 
                    vis[x-1][y+1]=1; 
                }
                else{
                    if(vis[x+1].count(y+1)) return 0; 

                    A.pb(x+1); B.pb(y+1); 
                    vis[x+1][y+1]=1; 
                }
            }
            else{
                //horizontal
                int x=X[i], y=Y[i];  

                if(!pos[x].count(y-2)){
                    if(!vis[x+1].count(y+1)){
                        A.pb(x+1); B.pb(y+1); 
                        vis[x+1][y+1]=1; 
                    }
                    else{
                        if(vis[x+1].count(y-1)) return 0; 

                        A.pb(x+1); B.pb(y-1); 
                        vis[x+1][y-1]=1; 
                    }
                }
                else{
                    if(!vis[x+1].count(y-1)){
                        A.pb(x+1); B.pb(y-1); 
                        vis[x+1][y-1]=1; 
                    }
                    else if(!vis[x+1].count(y+1)){
                        A.pb(x+1); B.pb(y+1); 
                        vis[x+1][y+1]=1; 
                    }
                    else return 0; 
                }
                

            }
        }

        build(u, v, A, B);
        return 1; 
    }

    vi U,V,A,B; 
    for(auto it: roads){
        int i=it.fi, j=it.se; 

        U.pb(i); V.pb(j); 

        if(X[i]==X[j]){
            //vertical
            if(black(X[i]-1,Y[i]+1)) A.pb(X[i]-1), B.pb(Y[i]+1); 
            else A.pb(X[i]+1), B.pb(Y[i]+1); 
        }
        else{
            //horizontal
            if(!black(X[i]+1,Y[i]+1)) A.pb(X[i]+1), B.pb(Y[i]+1); 
            else A.pb(X[i]+1), B.pb(Y[i]-1); 
        }
    }

    build(U, V, A, B);

    return 1;
}


/*
5
4 4
4 6
6 4
4 2
2 4

1
4
0 2 5 5
0 1 3 5
3 0 5 3
4 0 3 3




*/

/*

2
2 2
4 6

0


*/
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 33108 KB Output is correct
2 Correct 19 ms 33212 KB Output is correct
3 Correct 19 ms 33168 KB Output is correct
4 Correct 20 ms 33144 KB Output is correct
5 Correct 20 ms 33204 KB Output is correct
6 Correct 22 ms 33180 KB Output is correct
7 Correct 21 ms 33160 KB Output is correct
8 Correct 21 ms 33208 KB Output is correct
9 Correct 108 ms 52720 KB Output is correct
10 Correct 28 ms 35088 KB Output is correct
11 Correct 67 ms 43384 KB Output is correct
12 Correct 29 ms 36180 KB Output is correct
13 Correct 34 ms 37468 KB Output is correct
14 Correct 21 ms 33272 KB Output is correct
15 Correct 22 ms 33364 KB Output is correct
16 Correct 120 ms 52636 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 33108 KB Output is correct
2 Correct 19 ms 33212 KB Output is correct
3 Correct 19 ms 33168 KB Output is correct
4 Correct 20 ms 33144 KB Output is correct
5 Correct 20 ms 33204 KB Output is correct
6 Correct 22 ms 33180 KB Output is correct
7 Correct 21 ms 33160 KB Output is correct
8 Correct 21 ms 33208 KB Output is correct
9 Correct 108 ms 52720 KB Output is correct
10 Correct 28 ms 35088 KB Output is correct
11 Correct 67 ms 43384 KB Output is correct
12 Correct 29 ms 36180 KB Output is correct
13 Correct 34 ms 37468 KB Output is correct
14 Correct 21 ms 33272 KB Output is correct
15 Correct 22 ms 33364 KB Output is correct
16 Correct 120 ms 52636 KB Output is correct
17 Correct 19 ms 33132 KB Output is correct
18 Correct 18 ms 33180 KB Output is correct
19 Correct 18 ms 33212 KB Output is correct
20 Correct 25 ms 33216 KB Output is correct
21 Correct 18 ms 33156 KB Output is correct
22 Correct 20 ms 33108 KB Output is correct
23 Correct 267 ms 72004 KB Output is correct
24 Correct 24 ms 33116 KB Output is correct
25 Correct 19 ms 33492 KB Output is correct
26 Correct 18 ms 33448 KB Output is correct
27 Correct 19 ms 33548 KB Output is correct
28 Correct 105 ms 48036 KB Output is correct
29 Correct 134 ms 55788 KB Output is correct
30 Correct 206 ms 62764 KB Output is correct
31 Correct 269 ms 72032 KB Output is correct
32 Correct 19 ms 33212 KB Output is correct
33 Correct 19 ms 33140 KB Output is correct
34 Correct 20 ms 33172 KB Output is correct
35 Correct 22 ms 33276 KB Output is correct
36 Correct 18 ms 33216 KB Output is correct
37 Correct 19 ms 33220 KB Output is correct
38 Correct 21 ms 33092 KB Output is correct
39 Correct 19 ms 33224 KB Output is correct
40 Correct 22 ms 33108 KB Output is correct
41 Correct 20 ms 33204 KB Output is correct
42 Correct 19 ms 33108 KB Output is correct
43 Correct 20 ms 33364 KB Output is correct
44 Correct 20 ms 33480 KB Output is correct
45 Correct 112 ms 52328 KB Output is correct
46 Correct 166 ms 61032 KB Output is correct
47 Correct 172 ms 61108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 33108 KB Output is correct
2 Correct 19 ms 33212 KB Output is correct
3 Correct 19 ms 33168 KB Output is correct
4 Correct 20 ms 33144 KB Output is correct
5 Correct 20 ms 33204 KB Output is correct
6 Correct 22 ms 33180 KB Output is correct
7 Correct 21 ms 33160 KB Output is correct
8 Correct 21 ms 33208 KB Output is correct
9 Correct 108 ms 52720 KB Output is correct
10 Correct 28 ms 35088 KB Output is correct
11 Correct 67 ms 43384 KB Output is correct
12 Correct 29 ms 36180 KB Output is correct
13 Correct 34 ms 37468 KB Output is correct
14 Correct 21 ms 33272 KB Output is correct
15 Correct 22 ms 33364 KB Output is correct
16 Correct 120 ms 52636 KB Output is correct
17 Correct 19 ms 33132 KB Output is correct
18 Correct 18 ms 33180 KB Output is correct
19 Correct 18 ms 33212 KB Output is correct
20 Correct 25 ms 33216 KB Output is correct
21 Correct 18 ms 33156 KB Output is correct
22 Correct 20 ms 33108 KB Output is correct
23 Correct 267 ms 72004 KB Output is correct
24 Correct 24 ms 33116 KB Output is correct
25 Correct 19 ms 33492 KB Output is correct
26 Correct 18 ms 33448 KB Output is correct
27 Correct 19 ms 33548 KB Output is correct
28 Correct 105 ms 48036 KB Output is correct
29 Correct 134 ms 55788 KB Output is correct
30 Correct 206 ms 62764 KB Output is correct
31 Correct 269 ms 72032 KB Output is correct
32 Correct 19 ms 33212 KB Output is correct
33 Correct 19 ms 33140 KB Output is correct
34 Correct 20 ms 33172 KB Output is correct
35 Correct 22 ms 33276 KB Output is correct
36 Correct 18 ms 33216 KB Output is correct
37 Correct 19 ms 33220 KB Output is correct
38 Correct 21 ms 33092 KB Output is correct
39 Correct 19 ms 33224 KB Output is correct
40 Correct 22 ms 33108 KB Output is correct
41 Correct 20 ms 33204 KB Output is correct
42 Correct 19 ms 33108 KB Output is correct
43 Correct 20 ms 33364 KB Output is correct
44 Correct 20 ms 33480 KB Output is correct
45 Correct 112 ms 52328 KB Output is correct
46 Correct 166 ms 61032 KB Output is correct
47 Correct 172 ms 61108 KB Output is correct
48 Correct 21 ms 33168 KB Output is correct
49 Correct 19 ms 33216 KB Output is correct
50 Correct 19 ms 33124 KB Output is correct
51 Correct 19 ms 33208 KB Output is correct
52 Correct 19 ms 33108 KB Output is correct
53 Correct 19 ms 33208 KB Output is correct
54 Correct 24 ms 33160 KB Output is correct
55 Correct 243 ms 70848 KB Output is correct
56 Correct 20 ms 33108 KB Output is correct
57 Correct 22 ms 33492 KB Output is correct
58 Correct 25 ms 34344 KB Output is correct
59 Correct 25 ms 34136 KB Output is correct
60 Correct 136 ms 52032 KB Output is correct
61 Correct 154 ms 61300 KB Output is correct
62 Correct 196 ms 65428 KB Output is correct
63 Correct 240 ms 70872 KB Output is correct
64 Correct 19 ms 33108 KB Output is correct
65 Correct 20 ms 33108 KB Output is correct
66 Correct 22 ms 33212 KB Output is correct
67 Correct 224 ms 72336 KB Output is correct
68 Correct 229 ms 72072 KB Output is correct
69 Correct 244 ms 72096 KB Output is correct
70 Correct 20 ms 33468 KB Output is correct
71 Correct 22 ms 33868 KB Output is correct
72 Correct 111 ms 51796 KB Output is correct
73 Correct 184 ms 62792 KB Output is correct
74 Correct 268 ms 70864 KB Output is correct
75 Correct 231 ms 69824 KB Output is correct
76 Correct 220 ms 72060 KB Output is correct
77 Correct 21 ms 33620 KB Output is correct
78 Correct 23 ms 33992 KB Output is correct
79 Correct 122 ms 51768 KB Output is correct
80 Correct 207 ms 62920 KB Output is correct
81 Correct 248 ms 70644 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 33108 KB Output is correct
2 Correct 19 ms 33212 KB Output is correct
3 Correct 19 ms 33168 KB Output is correct
4 Correct 20 ms 33144 KB Output is correct
5 Correct 20 ms 33204 KB Output is correct
6 Correct 22 ms 33180 KB Output is correct
7 Correct 21 ms 33160 KB Output is correct
8 Correct 21 ms 33208 KB Output is correct
9 Correct 108 ms 52720 KB Output is correct
10 Correct 28 ms 35088 KB Output is correct
11 Correct 67 ms 43384 KB Output is correct
12 Correct 29 ms 36180 KB Output is correct
13 Correct 34 ms 37468 KB Output is correct
14 Correct 21 ms 33272 KB Output is correct
15 Correct 22 ms 33364 KB Output is correct
16 Correct 120 ms 52636 KB Output is correct
17 Correct 19 ms 33108 KB Output is correct
18 Correct 19 ms 33184 KB Output is correct
19 Correct 17 ms 33212 KB Output is correct
20 Correct 290 ms 71356 KB Output is correct
21 Correct 283 ms 65404 KB Output is correct
22 Correct 279 ms 65472 KB Output is correct
23 Correct 227 ms 61892 KB Output is correct
24 Correct 103 ms 47544 KB Output is correct
25 Correct 137 ms 49592 KB Output is correct
26 Correct 138 ms 49600 KB Output is correct
27 Correct 194 ms 60316 KB Output is correct
28 Correct 204 ms 60352 KB Output is correct
29 Correct 219 ms 60668 KB Output is correct
30 Correct 266 ms 60764 KB Output is correct
31 Correct 19 ms 33108 KB Output is correct
32 Correct 34 ms 35404 KB Output is correct
33 Correct 94 ms 50856 KB Output is correct
34 Correct 308 ms 71396 KB Output is correct
35 Correct 24 ms 34132 KB Output is correct
36 Correct 43 ms 37820 KB Output is correct
37 Correct 76 ms 42328 KB Output is correct
38 Correct 90 ms 45332 KB Output is correct
39 Correct 127 ms 49268 KB Output is correct
40 Correct 157 ms 54888 KB Output is correct
41 Correct 208 ms 58952 KB Output is correct
42 Correct 282 ms 62840 KB Output is correct
43 Correct 19 ms 33108 KB Output is correct
44 Correct 20 ms 33124 KB Output is correct
45 Correct 19 ms 33108 KB Output is correct
46 Correct 19 ms 33128 KB Output is correct
47 Correct 18 ms 33108 KB Output is correct
48 Correct 19 ms 33212 KB Output is correct
49 Correct 19 ms 33108 KB Output is correct
50 Correct 21 ms 33092 KB Output is correct
51 Correct 19 ms 33212 KB Output is correct
52 Correct 19 ms 33156 KB Output is correct
53 Correct 19 ms 33120 KB Output is correct
54 Correct 20 ms 33360 KB Output is correct
55 Correct 24 ms 33484 KB Output is correct
56 Correct 117 ms 52452 KB Output is correct
57 Correct 180 ms 61108 KB Output is correct
58 Correct 169 ms 61148 KB Output is correct
59 Correct 21 ms 33144 KB Output is correct
60 Correct 19 ms 33100 KB Output is correct
61 Correct 18 ms 33216 KB Output is correct
62 Correct 225 ms 72228 KB Output is correct
63 Correct 250 ms 72044 KB Output is correct
64 Correct 225 ms 72144 KB Output is correct
65 Correct 23 ms 33492 KB Output is correct
66 Correct 22 ms 33876 KB Output is correct
67 Correct 115 ms 51796 KB Output is correct
68 Correct 185 ms 62880 KB Output is correct
69 Correct 285 ms 70964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 33108 KB Output is correct
2 Correct 19 ms 33212 KB Output is correct
3 Correct 19 ms 33168 KB Output is correct
4 Correct 20 ms 33144 KB Output is correct
5 Correct 20 ms 33204 KB Output is correct
6 Correct 22 ms 33180 KB Output is correct
7 Correct 21 ms 33160 KB Output is correct
8 Correct 21 ms 33208 KB Output is correct
9 Correct 108 ms 52720 KB Output is correct
10 Correct 28 ms 35088 KB Output is correct
11 Correct 67 ms 43384 KB Output is correct
12 Correct 29 ms 36180 KB Output is correct
13 Correct 34 ms 37468 KB Output is correct
14 Correct 21 ms 33272 KB Output is correct
15 Correct 22 ms 33364 KB Output is correct
16 Correct 120 ms 52636 KB Output is correct
17 Correct 244 ms 66208 KB Output is correct
18 Correct 298 ms 66492 KB Output is correct
19 Correct 293 ms 65528 KB Output is correct
20 Correct 220 ms 59580 KB Output is correct
21 Correct 203 ms 58172 KB Output is correct
22 Correct 19 ms 33108 KB Output is correct
23 Correct 51 ms 37428 KB Output is correct
24 Correct 28 ms 35144 KB Output is correct
25 Correct 54 ms 39832 KB Output is correct
26 Correct 88 ms 43724 KB Output is correct
27 Correct 111 ms 47936 KB Output is correct
28 Correct 162 ms 51572 KB Output is correct
29 Correct 187 ms 56532 KB Output is correct
30 Correct 206 ms 59152 KB Output is correct
31 Correct 250 ms 62740 KB Output is correct
32 Correct 250 ms 69848 KB Output is correct
33 Correct 251 ms 71968 KB Output is correct
34 Correct 21 ms 33564 KB Output is correct
35 Correct 25 ms 33996 KB Output is correct
36 Correct 156 ms 51764 KB Output is correct
37 Correct 194 ms 62944 KB Output is correct
38 Correct 254 ms 70596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 33108 KB Output is correct
2 Correct 19 ms 33212 KB Output is correct
3 Correct 19 ms 33168 KB Output is correct
4 Correct 20 ms 33144 KB Output is correct
5 Correct 20 ms 33204 KB Output is correct
6 Correct 22 ms 33180 KB Output is correct
7 Correct 21 ms 33160 KB Output is correct
8 Correct 21 ms 33208 KB Output is correct
9 Correct 108 ms 52720 KB Output is correct
10 Correct 28 ms 35088 KB Output is correct
11 Correct 67 ms 43384 KB Output is correct
12 Correct 29 ms 36180 KB Output is correct
13 Correct 34 ms 37468 KB Output is correct
14 Correct 21 ms 33272 KB Output is correct
15 Correct 22 ms 33364 KB Output is correct
16 Correct 120 ms 52636 KB Output is correct
17 Correct 19 ms 33132 KB Output is correct
18 Correct 18 ms 33180 KB Output is correct
19 Correct 18 ms 33212 KB Output is correct
20 Correct 25 ms 33216 KB Output is correct
21 Correct 18 ms 33156 KB Output is correct
22 Correct 20 ms 33108 KB Output is correct
23 Correct 267 ms 72004 KB Output is correct
24 Correct 24 ms 33116 KB Output is correct
25 Correct 19 ms 33492 KB Output is correct
26 Correct 18 ms 33448 KB Output is correct
27 Correct 19 ms 33548 KB Output is correct
28 Correct 105 ms 48036 KB Output is correct
29 Correct 134 ms 55788 KB Output is correct
30 Correct 206 ms 62764 KB Output is correct
31 Correct 269 ms 72032 KB Output is correct
32 Correct 19 ms 33212 KB Output is correct
33 Correct 19 ms 33140 KB Output is correct
34 Correct 20 ms 33172 KB Output is correct
35 Correct 22 ms 33276 KB Output is correct
36 Correct 18 ms 33216 KB Output is correct
37 Correct 19 ms 33220 KB Output is correct
38 Correct 21 ms 33092 KB Output is correct
39 Correct 19 ms 33224 KB Output is correct
40 Correct 22 ms 33108 KB Output is correct
41 Correct 20 ms 33204 KB Output is correct
42 Correct 19 ms 33108 KB Output is correct
43 Correct 20 ms 33364 KB Output is correct
44 Correct 20 ms 33480 KB Output is correct
45 Correct 112 ms 52328 KB Output is correct
46 Correct 166 ms 61032 KB Output is correct
47 Correct 172 ms 61108 KB Output is correct
48 Correct 21 ms 33168 KB Output is correct
49 Correct 19 ms 33216 KB Output is correct
50 Correct 19 ms 33124 KB Output is correct
51 Correct 19 ms 33208 KB Output is correct
52 Correct 19 ms 33108 KB Output is correct
53 Correct 19 ms 33208 KB Output is correct
54 Correct 24 ms 33160 KB Output is correct
55 Correct 243 ms 70848 KB Output is correct
56 Correct 20 ms 33108 KB Output is correct
57 Correct 22 ms 33492 KB Output is correct
58 Correct 25 ms 34344 KB Output is correct
59 Correct 25 ms 34136 KB Output is correct
60 Correct 136 ms 52032 KB Output is correct
61 Correct 154 ms 61300 KB Output is correct
62 Correct 196 ms 65428 KB Output is correct
63 Correct 240 ms 70872 KB Output is correct
64 Correct 19 ms 33108 KB Output is correct
65 Correct 20 ms 33108 KB Output is correct
66 Correct 22 ms 33212 KB Output is correct
67 Correct 224 ms 72336 KB Output is correct
68 Correct 229 ms 72072 KB Output is correct
69 Correct 244 ms 72096 KB Output is correct
70 Correct 20 ms 33468 KB Output is correct
71 Correct 22 ms 33868 KB Output is correct
72 Correct 111 ms 51796 KB Output is correct
73 Correct 184 ms 62792 KB Output is correct
74 Correct 268 ms 70864 KB Output is correct
75 Correct 231 ms 69824 KB Output is correct
76 Correct 220 ms 72060 KB Output is correct
77 Correct 21 ms 33620 KB Output is correct
78 Correct 23 ms 33992 KB Output is correct
79 Correct 122 ms 51768 KB Output is correct
80 Correct 207 ms 62920 KB Output is correct
81 Correct 248 ms 70644 KB Output is correct
82 Correct 19 ms 33108 KB Output is correct
83 Correct 19 ms 33184 KB Output is correct
84 Correct 17 ms 33212 KB Output is correct
85 Correct 290 ms 71356 KB Output is correct
86 Correct 283 ms 65404 KB Output is correct
87 Correct 279 ms 65472 KB Output is correct
88 Correct 227 ms 61892 KB Output is correct
89 Correct 103 ms 47544 KB Output is correct
90 Correct 137 ms 49592 KB Output is correct
91 Correct 138 ms 49600 KB Output is correct
92 Correct 194 ms 60316 KB Output is correct
93 Correct 204 ms 60352 KB Output is correct
94 Correct 219 ms 60668 KB Output is correct
95 Correct 266 ms 60764 KB Output is correct
96 Correct 19 ms 33108 KB Output is correct
97 Correct 34 ms 35404 KB Output is correct
98 Correct 94 ms 50856 KB Output is correct
99 Correct 308 ms 71396 KB Output is correct
100 Correct 24 ms 34132 KB Output is correct
101 Correct 43 ms 37820 KB Output is correct
102 Correct 76 ms 42328 KB Output is correct
103 Correct 90 ms 45332 KB Output is correct
104 Correct 127 ms 49268 KB Output is correct
105 Correct 157 ms 54888 KB Output is correct
106 Correct 208 ms 58952 KB Output is correct
107 Correct 282 ms 62840 KB Output is correct
108 Correct 19 ms 33108 KB Output is correct
109 Correct 20 ms 33124 KB Output is correct
110 Correct 19 ms 33108 KB Output is correct
111 Correct 19 ms 33128 KB Output is correct
112 Correct 18 ms 33108 KB Output is correct
113 Correct 19 ms 33212 KB Output is correct
114 Correct 19 ms 33108 KB Output is correct
115 Correct 21 ms 33092 KB Output is correct
116 Correct 19 ms 33212 KB Output is correct
117 Correct 19 ms 33156 KB Output is correct
118 Correct 19 ms 33120 KB Output is correct
119 Correct 20 ms 33360 KB Output is correct
120 Correct 24 ms 33484 KB Output is correct
121 Correct 117 ms 52452 KB Output is correct
122 Correct 180 ms 61108 KB Output is correct
123 Correct 169 ms 61148 KB Output is correct
124 Correct 21 ms 33144 KB Output is correct
125 Correct 19 ms 33100 KB Output is correct
126 Correct 18 ms 33216 KB Output is correct
127 Correct 225 ms 72228 KB Output is correct
128 Correct 250 ms 72044 KB Output is correct
129 Correct 225 ms 72144 KB Output is correct
130 Correct 23 ms 33492 KB Output is correct
131 Correct 22 ms 33876 KB Output is correct
132 Correct 115 ms 51796 KB Output is correct
133 Correct 185 ms 62880 KB Output is correct
134 Correct 285 ms 70964 KB Output is correct
135 Correct 244 ms 66208 KB Output is correct
136 Correct 298 ms 66492 KB Output is correct
137 Correct 293 ms 65528 KB Output is correct
138 Correct 220 ms 59580 KB Output is correct
139 Correct 203 ms 58172 KB Output is correct
140 Correct 19 ms 33108 KB Output is correct
141 Correct 51 ms 37428 KB Output is correct
142 Correct 28 ms 35144 KB Output is correct
143 Correct 54 ms 39832 KB Output is correct
144 Correct 88 ms 43724 KB Output is correct
145 Correct 111 ms 47936 KB Output is correct
146 Correct 162 ms 51572 KB Output is correct
147 Correct 187 ms 56532 KB Output is correct
148 Correct 206 ms 59152 KB Output is correct
149 Correct 250 ms 62740 KB Output is correct
150 Correct 250 ms 69848 KB Output is correct
151 Correct 251 ms 71968 KB Output is correct
152 Correct 21 ms 33564 KB Output is correct
153 Correct 25 ms 33996 KB Output is correct
154 Correct 156 ms 51764 KB Output is correct
155 Correct 194 ms 62944 KB Output is correct
156 Correct 254 ms 70596 KB Output is correct
157 Correct 19 ms 33108 KB Output is correct
158 Correct 21 ms 33144 KB Output is correct
159 Correct 20 ms 33208 KB Output is correct
160 Correct 18 ms 33108 KB Output is correct
161 Incorrect 261 ms 60916 KB Tree @(1221, 1127) appears more than once: for edges on positions 228 and 262
162 Halted 0 ms 0 KB -