답안 #1048138

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1048138 2024-08-08T01:03:15 Z vjudge1 분수 공원 (IOI21_parks) C++17
70 / 100
335 ms 85188 KB
#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
mt19937 rng;
struct bpmatch{
    vector<int>adj[200100];
    int match1[200100],match2[400100],dep[200100];
    void AE(int a,int b){
        adj[a].push_back(b);
    }
    int bfs(int n){
        queue<int>q;
        for(int i=1;i<=n;i++)
            if(!match1[i])
                q.push(i),
                dep[i]=1;
            else dep[i]=0;
        dep[0]=0;
        while(q.size()){
            int x=q.front();
            q.pop();
            if(dep[x]>=dep[0]&&dep[0])
                continue;
            for(auto i:adj[x])
                if(!dep[match2[i]])
                    dep[match2[i]]=dep[x]+1,
                    q.push(match2[i]);
        }
        return dep[0];
    }
    int dfs(int n){
        if(!n)return 1;
        for(auto i:adj[n]){
            if(dep[match2[i]]==dep[n]+1&&dfs(match2[i]))
                return match2[match1[n]=i]=n,1;
        }
        dep[n]=1e9;
        return 0;
    }
    int matching(int n){
        int ans=0;
        while(bfs(n))for(int i=1;i<=n;i++)
            if(!match1[i]) ans+=dfs(i);
        return ans;
    }
} G;
map<int,int> pts[200100];
vector<pair<int,int>> tre_edges;
struct dsu{
    int par[200100];
    int abp(int n){
        return par[n]?par[n]=abp(par[n]):n;
    }
    int  merge(int a,int b){
        a=abp(a),b=abp(b);
        return a-b?par[a]=b:0;
    }
} DT;
int Xpos[400100],Ypos[400100];
int construct_roads(std::vector<int> x, std::vector<int> y) {
    int n=x.size();
    for(int i=0;i<n;i++)
        pts[x[i]][y[i]]=i+1;
    vector<tuple<int,int,int>>E,pt;
    for(int i=0;i<n;i++)
        pt.push_back({x[i],y[i],i});
    sort(pt.begin(),pt.end());
    for(auto[X,Y,i]:pt) {
        if(pts[X+2][Y])
            E.push_back({i+1,pts[X+2][Y],0});
        if(pts[X][Y+2])
            E.push_back({i+1,pts[X][Y+2],1});
    }
    vector<int>u,v,A,B;
    int CC=0;
    for(auto [i,j,k]:E){
        if(DT.merge(i,j)){
            u.push_back(i-1);
            v.push_back(j-1);
            int x1=x[i-1]+1,y1=y[i-1]+1;
            int x2=x1,y2=y1;
            if(k)x2-=2;
            else y2-=2;
            if(!pts[x1][y1])
                pts[x1][y1]=++CC,
                Xpos[CC]=x1,
                Ypos[CC]=y1;
            if(!pts[x2][y2])
                pts[x2][y2]=++CC,
                Xpos[CC]=x2,
                Ypos[CC]=y2;
            G.AE(u.size(),pts[x1][y1]);
            G.AE(u.size(),pts[x2][y2]);
        }
    }
    if(u.size()-n+1)return 0;
    if(G.matching(n-1)!=n-1)
        return 0;
    for(int i=1;i<n;i++)
        A.push_back(Xpos[G.match1[i]]),
        B.push_back(Ypos[G.match1[i]]);
    build(u,v,A,B);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20828 KB Output is correct
3 Correct 2 ms 16732 KB Output is correct
4 Correct 2 ms 20828 KB Output is correct
5 Correct 2 ms 20828 KB Output is correct
6 Correct 2 ms 18780 KB Output is correct
7 Correct 2 ms 18780 KB Output is correct
8 Correct 2 ms 18780 KB Output is correct
9 Correct 149 ms 52012 KB Output is correct
10 Correct 12 ms 24096 KB Output is correct
11 Correct 71 ms 37780 KB Output is correct
12 Correct 18 ms 25628 KB Output is correct
13 Correct 46 ms 30668 KB Output is correct
14 Correct 4 ms 19032 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 151 ms 52100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20828 KB Output is correct
3 Correct 2 ms 16732 KB Output is correct
4 Correct 2 ms 20828 KB Output is correct
5 Correct 2 ms 20828 KB Output is correct
6 Correct 2 ms 18780 KB Output is correct
7 Correct 2 ms 18780 KB Output is correct
8 Correct 2 ms 18780 KB Output is correct
9 Correct 149 ms 52012 KB Output is correct
10 Correct 12 ms 24096 KB Output is correct
11 Correct 71 ms 37780 KB Output is correct
12 Correct 18 ms 25628 KB Output is correct
13 Correct 46 ms 30668 KB Output is correct
14 Correct 4 ms 19032 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 151 ms 52100 KB Output is correct
17 Correct 2 ms 20828 KB Output is correct
18 Correct 2 ms 20828 KB Output is correct
19 Correct 2 ms 20828 KB Output is correct
20 Correct 2 ms 20828 KB Output is correct
21 Correct 2 ms 18780 KB Output is correct
22 Correct 3 ms 20828 KB Output is correct
23 Correct 272 ms 74044 KB Output is correct
24 Correct 2 ms 20828 KB Output is correct
25 Correct 4 ms 21084 KB Output is correct
26 Correct 4 ms 19564 KB Output is correct
27 Correct 5 ms 19512 KB Output is correct
28 Correct 106 ms 41956 KB Output is correct
29 Correct 154 ms 52548 KB Output is correct
30 Correct 213 ms 62520 KB Output is correct
31 Correct 261 ms 75068 KB Output is correct
32 Correct 2 ms 20828 KB Output is correct
33 Correct 2 ms 20828 KB Output is correct
34 Correct 2 ms 20828 KB Output is correct
35 Correct 2 ms 16732 KB Output is correct
36 Correct 2 ms 16732 KB Output is correct
37 Correct 2 ms 20928 KB Output is correct
38 Correct 2 ms 20828 KB Output is correct
39 Correct 2 ms 20824 KB Output is correct
40 Correct 2 ms 20828 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 2 ms 20828 KB Output is correct
43 Correct 3 ms 19292 KB Output is correct
44 Correct 5 ms 19408 KB Output is correct
45 Correct 111 ms 48488 KB Output is correct
46 Correct 163 ms 61384 KB Output is correct
47 Correct 169 ms 61124 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20828 KB Output is correct
3 Correct 2 ms 16732 KB Output is correct
4 Correct 2 ms 20828 KB Output is correct
5 Correct 2 ms 20828 KB Output is correct
6 Correct 2 ms 18780 KB Output is correct
7 Correct 2 ms 18780 KB Output is correct
8 Correct 2 ms 18780 KB Output is correct
9 Correct 149 ms 52012 KB Output is correct
10 Correct 12 ms 24096 KB Output is correct
11 Correct 71 ms 37780 KB Output is correct
12 Correct 18 ms 25628 KB Output is correct
13 Correct 46 ms 30668 KB Output is correct
14 Correct 4 ms 19032 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 151 ms 52100 KB Output is correct
17 Correct 2 ms 20828 KB Output is correct
18 Correct 2 ms 20828 KB Output is correct
19 Correct 2 ms 20828 KB Output is correct
20 Correct 2 ms 20828 KB Output is correct
21 Correct 2 ms 18780 KB Output is correct
22 Correct 3 ms 20828 KB Output is correct
23 Correct 272 ms 74044 KB Output is correct
24 Correct 2 ms 20828 KB Output is correct
25 Correct 4 ms 21084 KB Output is correct
26 Correct 4 ms 19564 KB Output is correct
27 Correct 5 ms 19512 KB Output is correct
28 Correct 106 ms 41956 KB Output is correct
29 Correct 154 ms 52548 KB Output is correct
30 Correct 213 ms 62520 KB Output is correct
31 Correct 261 ms 75068 KB Output is correct
32 Correct 2 ms 20828 KB Output is correct
33 Correct 2 ms 20828 KB Output is correct
34 Correct 2 ms 20828 KB Output is correct
35 Correct 2 ms 16732 KB Output is correct
36 Correct 2 ms 16732 KB Output is correct
37 Correct 2 ms 20928 KB Output is correct
38 Correct 2 ms 20828 KB Output is correct
39 Correct 2 ms 20824 KB Output is correct
40 Correct 2 ms 20828 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 2 ms 20828 KB Output is correct
43 Correct 3 ms 19292 KB Output is correct
44 Correct 5 ms 19408 KB Output is correct
45 Correct 111 ms 48488 KB Output is correct
46 Correct 163 ms 61384 KB Output is correct
47 Correct 169 ms 61124 KB Output is correct
48 Correct 3 ms 20828 KB Output is correct
49 Correct 2 ms 20828 KB Output is correct
50 Correct 2 ms 20828 KB Output is correct
51 Correct 2 ms 20828 KB Output is correct
52 Correct 3 ms 20828 KB Output is correct
53 Correct 2 ms 20828 KB Output is correct
54 Correct 2 ms 20828 KB Output is correct
55 Correct 262 ms 72232 KB Output is correct
56 Correct 2 ms 20824 KB Output is correct
57 Correct 4 ms 21340 KB Output is correct
58 Correct 7 ms 22500 KB Output is correct
59 Correct 9 ms 20768 KB Output is correct
60 Correct 117 ms 46832 KB Output is correct
61 Correct 175 ms 55868 KB Output is correct
62 Correct 206 ms 63192 KB Output is correct
63 Correct 253 ms 72260 KB Output is correct
64 Correct 2 ms 16732 KB Output is correct
65 Correct 2 ms 20828 KB Output is correct
66 Correct 2 ms 16732 KB Output is correct
67 Correct 314 ms 83936 KB Output is correct
68 Correct 315 ms 85104 KB Output is correct
69 Correct 325 ms 83908 KB Output is correct
70 Correct 5 ms 19804 KB Output is correct
71 Correct 8 ms 20572 KB Output is correct
72 Correct 109 ms 48004 KB Output is correct
73 Correct 181 ms 61452 KB Output is correct
74 Correct 241 ms 74916 KB Output is correct
75 Correct 264 ms 75976 KB Output is correct
76 Correct 311 ms 84672 KB Output is correct
77 Correct 5 ms 19800 KB Output is correct
78 Correct 8 ms 20964 KB Output is correct
79 Correct 117 ms 47532 KB Output is correct
80 Correct 170 ms 61156 KB Output is correct
81 Correct 232 ms 74180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20828 KB Output is correct
3 Correct 2 ms 16732 KB Output is correct
4 Correct 2 ms 20828 KB Output is correct
5 Correct 2 ms 20828 KB Output is correct
6 Correct 2 ms 18780 KB Output is correct
7 Correct 2 ms 18780 KB Output is correct
8 Correct 2 ms 18780 KB Output is correct
9 Correct 149 ms 52012 KB Output is correct
10 Correct 12 ms 24096 KB Output is correct
11 Correct 71 ms 37780 KB Output is correct
12 Correct 18 ms 25628 KB Output is correct
13 Correct 46 ms 30668 KB Output is correct
14 Correct 4 ms 19032 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 151 ms 52100 KB Output is correct
17 Correct 3 ms 20824 KB Output is correct
18 Correct 2 ms 20828 KB Output is correct
19 Correct 2 ms 18780 KB Output is correct
20 Correct 136 ms 69144 KB Output is correct
21 Correct 162 ms 74360 KB Output is correct
22 Correct 149 ms 69036 KB Output is correct
23 Correct 166 ms 74180 KB Output is correct
24 Correct 137 ms 50324 KB Output is correct
25 Correct 180 ms 72132 KB Output is correct
26 Correct 184 ms 72352 KB Output is correct
27 Correct 204 ms 83136 KB Output is correct
28 Correct 204 ms 83136 KB Output is correct
29 Correct 232 ms 83652 KB Output is correct
30 Correct 230 ms 83652 KB Output is correct
31 Correct 2 ms 20824 KB Output is correct
32 Correct 16 ms 24708 KB Output is correct
33 Correct 34 ms 33476 KB Output is correct
34 Correct 141 ms 73664 KB Output is correct
35 Correct 8 ms 21024 KB Output is correct
36 Correct 35 ms 29408 KB Output is correct
37 Correct 77 ms 40136 KB Output is correct
38 Correct 78 ms 41412 KB Output is correct
39 Correct 112 ms 48832 KB Output is correct
40 Correct 147 ms 57532 KB Output is correct
41 Correct 184 ms 64708 KB Output is correct
42 Correct 228 ms 73100 KB Output is correct
43 Correct 2 ms 20828 KB Output is correct
44 Correct 3 ms 20828 KB Output is correct
45 Correct 2 ms 20828 KB Output is correct
46 Correct 2 ms 16732 KB Output is correct
47 Correct 2 ms 16732 KB Output is correct
48 Correct 2 ms 20828 KB Output is correct
49 Correct 2 ms 20828 KB Output is correct
50 Correct 2 ms 20828 KB Output is correct
51 Correct 2 ms 20828 KB Output is correct
52 Correct 2 ms 16732 KB Output is correct
53 Correct 2 ms 20824 KB Output is correct
54 Correct 3 ms 19292 KB Output is correct
55 Correct 4 ms 19548 KB Output is correct
56 Correct 123 ms 48344 KB Output is correct
57 Correct 166 ms 61220 KB Output is correct
58 Correct 168 ms 61128 KB Output is correct
59 Correct 2 ms 16728 KB Output is correct
60 Correct 2 ms 20828 KB Output is correct
61 Correct 2 ms 16732 KB Output is correct
62 Correct 312 ms 83012 KB Output is correct
63 Correct 335 ms 84672 KB Output is correct
64 Correct 320 ms 84076 KB Output is correct
65 Correct 5 ms 19804 KB Output is correct
66 Correct 8 ms 20572 KB Output is correct
67 Correct 110 ms 47840 KB Output is correct
68 Correct 171 ms 61676 KB Output is correct
69 Correct 228 ms 74940 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20828 KB Output is correct
3 Correct 2 ms 16732 KB Output is correct
4 Correct 2 ms 20828 KB Output is correct
5 Correct 2 ms 20828 KB Output is correct
6 Correct 2 ms 18780 KB Output is correct
7 Correct 2 ms 18780 KB Output is correct
8 Correct 2 ms 18780 KB Output is correct
9 Correct 149 ms 52012 KB Output is correct
10 Correct 12 ms 24096 KB Output is correct
11 Correct 71 ms 37780 KB Output is correct
12 Correct 18 ms 25628 KB Output is correct
13 Correct 46 ms 30668 KB Output is correct
14 Correct 4 ms 19032 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 151 ms 52100 KB Output is correct
17 Correct 222 ms 83904 KB Output is correct
18 Correct 233 ms 84160 KB Output is correct
19 Correct 148 ms 74176 KB Output is correct
20 Correct 196 ms 71108 KB Output is correct
21 Correct 182 ms 72640 KB Output is correct
22 Correct 2 ms 20824 KB Output is correct
23 Correct 33 ms 29000 KB Output is correct
24 Correct 16 ms 23128 KB Output is correct
25 Correct 51 ms 33700 KB Output is correct
26 Correct 93 ms 44228 KB Output is correct
27 Correct 98 ms 46276 KB Output is correct
28 Correct 130 ms 53440 KB Output is correct
29 Correct 155 ms 60096 KB Output is correct
30 Correct 182 ms 66620 KB Output is correct
31 Correct 212 ms 72124 KB Output is correct
32 Correct 305 ms 76740 KB Output is correct
33 Correct 309 ms 85188 KB Output is correct
34 Correct 6 ms 19804 KB Output is correct
35 Correct 11 ms 20788 KB Output is correct
36 Correct 108 ms 47600 KB Output is correct
37 Correct 168 ms 61060 KB Output is correct
38 Correct 243 ms 74176 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20828 KB Output is correct
3 Correct 2 ms 16732 KB Output is correct
4 Correct 2 ms 20828 KB Output is correct
5 Correct 2 ms 20828 KB Output is correct
6 Correct 2 ms 18780 KB Output is correct
7 Correct 2 ms 18780 KB Output is correct
8 Correct 2 ms 18780 KB Output is correct
9 Correct 149 ms 52012 KB Output is correct
10 Correct 12 ms 24096 KB Output is correct
11 Correct 71 ms 37780 KB Output is correct
12 Correct 18 ms 25628 KB Output is correct
13 Correct 46 ms 30668 KB Output is correct
14 Correct 4 ms 19032 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 151 ms 52100 KB Output is correct
17 Correct 2 ms 20828 KB Output is correct
18 Correct 2 ms 20828 KB Output is correct
19 Correct 2 ms 20828 KB Output is correct
20 Correct 2 ms 20828 KB Output is correct
21 Correct 2 ms 18780 KB Output is correct
22 Correct 3 ms 20828 KB Output is correct
23 Correct 272 ms 74044 KB Output is correct
24 Correct 2 ms 20828 KB Output is correct
25 Correct 4 ms 21084 KB Output is correct
26 Correct 4 ms 19564 KB Output is correct
27 Correct 5 ms 19512 KB Output is correct
28 Correct 106 ms 41956 KB Output is correct
29 Correct 154 ms 52548 KB Output is correct
30 Correct 213 ms 62520 KB Output is correct
31 Correct 261 ms 75068 KB Output is correct
32 Correct 2 ms 20828 KB Output is correct
33 Correct 2 ms 20828 KB Output is correct
34 Correct 2 ms 20828 KB Output is correct
35 Correct 2 ms 16732 KB Output is correct
36 Correct 2 ms 16732 KB Output is correct
37 Correct 2 ms 20928 KB Output is correct
38 Correct 2 ms 20828 KB Output is correct
39 Correct 2 ms 20824 KB Output is correct
40 Correct 2 ms 20828 KB Output is correct
41 Correct 2 ms 16732 KB Output is correct
42 Correct 2 ms 20828 KB Output is correct
43 Correct 3 ms 19292 KB Output is correct
44 Correct 5 ms 19408 KB Output is correct
45 Correct 111 ms 48488 KB Output is correct
46 Correct 163 ms 61384 KB Output is correct
47 Correct 169 ms 61124 KB Output is correct
48 Correct 3 ms 20828 KB Output is correct
49 Correct 2 ms 20828 KB Output is correct
50 Correct 2 ms 20828 KB Output is correct
51 Correct 2 ms 20828 KB Output is correct
52 Correct 3 ms 20828 KB Output is correct
53 Correct 2 ms 20828 KB Output is correct
54 Correct 2 ms 20828 KB Output is correct
55 Correct 262 ms 72232 KB Output is correct
56 Correct 2 ms 20824 KB Output is correct
57 Correct 4 ms 21340 KB Output is correct
58 Correct 7 ms 22500 KB Output is correct
59 Correct 9 ms 20768 KB Output is correct
60 Correct 117 ms 46832 KB Output is correct
61 Correct 175 ms 55868 KB Output is correct
62 Correct 206 ms 63192 KB Output is correct
63 Correct 253 ms 72260 KB Output is correct
64 Correct 2 ms 16732 KB Output is correct
65 Correct 2 ms 20828 KB Output is correct
66 Correct 2 ms 16732 KB Output is correct
67 Correct 314 ms 83936 KB Output is correct
68 Correct 315 ms 85104 KB Output is correct
69 Correct 325 ms 83908 KB Output is correct
70 Correct 5 ms 19804 KB Output is correct
71 Correct 8 ms 20572 KB Output is correct
72 Correct 109 ms 48004 KB Output is correct
73 Correct 181 ms 61452 KB Output is correct
74 Correct 241 ms 74916 KB Output is correct
75 Correct 264 ms 75976 KB Output is correct
76 Correct 311 ms 84672 KB Output is correct
77 Correct 5 ms 19800 KB Output is correct
78 Correct 8 ms 20964 KB Output is correct
79 Correct 117 ms 47532 KB Output is correct
80 Correct 170 ms 61156 KB Output is correct
81 Correct 232 ms 74180 KB Output is correct
82 Correct 3 ms 20824 KB Output is correct
83 Correct 2 ms 20828 KB Output is correct
84 Correct 2 ms 18780 KB Output is correct
85 Correct 136 ms 69144 KB Output is correct
86 Correct 162 ms 74360 KB Output is correct
87 Correct 149 ms 69036 KB Output is correct
88 Correct 166 ms 74180 KB Output is correct
89 Correct 137 ms 50324 KB Output is correct
90 Correct 180 ms 72132 KB Output is correct
91 Correct 184 ms 72352 KB Output is correct
92 Correct 204 ms 83136 KB Output is correct
93 Correct 204 ms 83136 KB Output is correct
94 Correct 232 ms 83652 KB Output is correct
95 Correct 230 ms 83652 KB Output is correct
96 Correct 2 ms 20824 KB Output is correct
97 Correct 16 ms 24708 KB Output is correct
98 Correct 34 ms 33476 KB Output is correct
99 Correct 141 ms 73664 KB Output is correct
100 Correct 8 ms 21024 KB Output is correct
101 Correct 35 ms 29408 KB Output is correct
102 Correct 77 ms 40136 KB Output is correct
103 Correct 78 ms 41412 KB Output is correct
104 Correct 112 ms 48832 KB Output is correct
105 Correct 147 ms 57532 KB Output is correct
106 Correct 184 ms 64708 KB Output is correct
107 Correct 228 ms 73100 KB Output is correct
108 Correct 2 ms 20828 KB Output is correct
109 Correct 3 ms 20828 KB Output is correct
110 Correct 2 ms 20828 KB Output is correct
111 Correct 2 ms 16732 KB Output is correct
112 Correct 2 ms 16732 KB Output is correct
113 Correct 2 ms 20828 KB Output is correct
114 Correct 2 ms 20828 KB Output is correct
115 Correct 2 ms 20828 KB Output is correct
116 Correct 2 ms 20828 KB Output is correct
117 Correct 2 ms 16732 KB Output is correct
118 Correct 2 ms 20824 KB Output is correct
119 Correct 3 ms 19292 KB Output is correct
120 Correct 4 ms 19548 KB Output is correct
121 Correct 123 ms 48344 KB Output is correct
122 Correct 166 ms 61220 KB Output is correct
123 Correct 168 ms 61128 KB Output is correct
124 Correct 2 ms 16728 KB Output is correct
125 Correct 2 ms 20828 KB Output is correct
126 Correct 2 ms 16732 KB Output is correct
127 Correct 312 ms 83012 KB Output is correct
128 Correct 335 ms 84672 KB Output is correct
129 Correct 320 ms 84076 KB Output is correct
130 Correct 5 ms 19804 KB Output is correct
131 Correct 8 ms 20572 KB Output is correct
132 Correct 110 ms 47840 KB Output is correct
133 Correct 171 ms 61676 KB Output is correct
134 Correct 228 ms 74940 KB Output is correct
135 Correct 222 ms 83904 KB Output is correct
136 Correct 233 ms 84160 KB Output is correct
137 Correct 148 ms 74176 KB Output is correct
138 Correct 196 ms 71108 KB Output is correct
139 Correct 182 ms 72640 KB Output is correct
140 Correct 2 ms 20824 KB Output is correct
141 Correct 33 ms 29000 KB Output is correct
142 Correct 16 ms 23128 KB Output is correct
143 Correct 51 ms 33700 KB Output is correct
144 Correct 93 ms 44228 KB Output is correct
145 Correct 98 ms 46276 KB Output is correct
146 Correct 130 ms 53440 KB Output is correct
147 Correct 155 ms 60096 KB Output is correct
148 Correct 182 ms 66620 KB Output is correct
149 Correct 212 ms 72124 KB Output is correct
150 Correct 305 ms 76740 KB Output is correct
151 Correct 309 ms 85188 KB Output is correct
152 Correct 6 ms 19804 KB Output is correct
153 Correct 11 ms 20788 KB Output is correct
154 Correct 108 ms 47600 KB Output is correct
155 Correct 168 ms 61060 KB Output is correct
156 Correct 243 ms 74176 KB Output is correct
157 Correct 2 ms 20824 KB Output is correct
158 Correct 2 ms 16732 KB Output is correct
159 Correct 3 ms 20828 KB Output is correct
160 Correct 3 ms 20828 KB Output is correct
161 Correct 187 ms 67376 KB Output is correct
162 Correct 146 ms 73664 KB Output is correct
163 Correct 136 ms 72056 KB Output is correct
164 Correct 139 ms 73148 KB Output is correct
165 Correct 139 ms 68796 KB Output is correct
166 Correct 164 ms 67512 KB Output is correct
167 Incorrect 50 ms 30156 KB Solution announced impossible, but it is possible.
168 Halted 0 ms 0 KB -