Submission #1048106

# Submission time Handle Problem Language Result Execution time Memory
1048106 2024-08-07T22:43:10 Z vjudge1 Fountain Parks (IOI21_parks) C++17
70 / 100
1449 ms 82320 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;
    for(int i=0;i<n;i++)
        if(pts[x[i]][y[i]+2])
            E.push_back({i+1,pts[x[i]][y[i]+2],1});
    for(int i=0;i<n;i++)
        if(pts[x[i]+2][y[i]])
            E.push_back({i+1,pts[x[i]+2][y[i]],0});
    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;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20824 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 20924 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 175 ms 50996 KB Output is correct
10 Correct 12 ms 23972 KB Output is correct
11 Correct 68 ms 37060 KB Output is correct
12 Correct 17 ms 25448 KB Output is correct
13 Correct 46 ms 30156 KB Output is correct
14 Correct 3 ms 19036 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 182 ms 50980 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20824 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 20924 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 175 ms 50996 KB Output is correct
10 Correct 12 ms 23972 KB Output is correct
11 Correct 68 ms 37060 KB Output is correct
12 Correct 17 ms 25448 KB Output is correct
13 Correct 46 ms 30156 KB Output is correct
14 Correct 3 ms 19036 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 182 ms 50980 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 20928 KB Output is correct
20 Correct 3 ms 20828 KB Output is correct
21 Correct 2 ms 18780 KB Output is correct
22 Correct 2 ms 20828 KB Output is correct
23 Correct 414 ms 73720 KB Output is correct
24 Correct 3 ms 20828 KB Output is correct
25 Correct 3 ms 21184 KB Output is correct
26 Correct 5 ms 19548 KB Output is correct
27 Correct 6 ms 19548 KB Output is correct
28 Correct 140 ms 41432 KB Output is correct
29 Correct 211 ms 52676 KB Output is correct
30 Correct 306 ms 61740 KB Output is correct
31 Correct 418 ms 74424 KB Output is correct
32 Correct 2 ms 20828 KB Output is correct
33 Correct 2 ms 20824 KB Output is correct
34 Correct 2 ms 20824 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 20828 KB Output is correct
38 Correct 2 ms 20828 KB Output is correct
39 Correct 2 ms 20828 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 20824 KB Output is correct
43 Correct 4 ms 19316 KB Output is correct
44 Correct 4 ms 19548 KB Output is correct
45 Correct 180 ms 47204 KB Output is correct
46 Correct 284 ms 59624 KB Output is correct
47 Correct 265 ms 59588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20824 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 20924 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 175 ms 50996 KB Output is correct
10 Correct 12 ms 23972 KB Output is correct
11 Correct 68 ms 37060 KB Output is correct
12 Correct 17 ms 25448 KB Output is correct
13 Correct 46 ms 30156 KB Output is correct
14 Correct 3 ms 19036 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 182 ms 50980 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 20928 KB Output is correct
20 Correct 3 ms 20828 KB Output is correct
21 Correct 2 ms 18780 KB Output is correct
22 Correct 2 ms 20828 KB Output is correct
23 Correct 414 ms 73720 KB Output is correct
24 Correct 3 ms 20828 KB Output is correct
25 Correct 3 ms 21184 KB Output is correct
26 Correct 5 ms 19548 KB Output is correct
27 Correct 6 ms 19548 KB Output is correct
28 Correct 140 ms 41432 KB Output is correct
29 Correct 211 ms 52676 KB Output is correct
30 Correct 306 ms 61740 KB Output is correct
31 Correct 418 ms 74424 KB Output is correct
32 Correct 2 ms 20828 KB Output is correct
33 Correct 2 ms 20824 KB Output is correct
34 Correct 2 ms 20824 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 20828 KB Output is correct
38 Correct 2 ms 20828 KB Output is correct
39 Correct 2 ms 20828 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 20824 KB Output is correct
43 Correct 4 ms 19316 KB Output is correct
44 Correct 4 ms 19548 KB Output is correct
45 Correct 180 ms 47204 KB Output is correct
46 Correct 284 ms 59624 KB Output is correct
47 Correct 265 ms 59588 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 20824 KB Output is correct
51 Correct 2 ms 20828 KB Output is correct
52 Correct 2 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 396 ms 71664 KB Output is correct
56 Correct 3 ms 21080 KB Output is correct
57 Correct 4 ms 21196 KB Output is correct
58 Correct 9 ms 22488 KB Output is correct
59 Correct 12 ms 20904 KB Output is correct
60 Correct 168 ms 46788 KB Output is correct
61 Correct 244 ms 54780 KB Output is correct
62 Correct 322 ms 62960 KB Output is correct
63 Correct 391 ms 70996 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 457 ms 82320 KB Output is correct
68 Correct 395 ms 82080 KB Output is correct
69 Correct 410 ms 81932 KB Output is correct
70 Correct 6 ms 19804 KB Output is correct
71 Correct 9 ms 20484 KB Output is correct
72 Correct 178 ms 47644 KB Output is correct
73 Correct 277 ms 61368 KB Output is correct
74 Correct 404 ms 74484 KB Output is correct
75 Correct 408 ms 75348 KB Output is correct
76 Correct 412 ms 82188 KB Output is correct
77 Correct 7 ms 20056 KB Output is correct
78 Correct 11 ms 20828 KB Output is correct
79 Correct 174 ms 47556 KB Output is correct
80 Correct 290 ms 61124 KB Output is correct
81 Correct 398 ms 74352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20824 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 20924 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 175 ms 50996 KB Output is correct
10 Correct 12 ms 23972 KB Output is correct
11 Correct 68 ms 37060 KB Output is correct
12 Correct 17 ms 25448 KB Output is correct
13 Correct 46 ms 30156 KB Output is correct
14 Correct 3 ms 19036 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 182 ms 50980 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 18780 KB Output is correct
20 Correct 156 ms 67892 KB Output is correct
21 Correct 191 ms 72492 KB Output is correct
22 Correct 155 ms 67676 KB Output is correct
23 Correct 228 ms 71936 KB Output is correct
24 Correct 162 ms 47960 KB Output is correct
25 Correct 294 ms 69820 KB Output is correct
26 Correct 292 ms 69824 KB Output is correct
27 Correct 331 ms 80972 KB Output is correct
28 Correct 320 ms 81012 KB Output is correct
29 Correct 336 ms 81028 KB Output is correct
30 Correct 341 ms 81052 KB Output is correct
31 Correct 2 ms 20824 KB Output is correct
32 Correct 15 ms 24672 KB Output is correct
33 Correct 57 ms 32348 KB Output is correct
34 Correct 183 ms 72628 KB Output is correct
35 Correct 9 ms 20824 KB Output is correct
36 Correct 51 ms 28892 KB Output is correct
37 Correct 140 ms 38916 KB Output is correct
38 Correct 111 ms 40928 KB Output is correct
39 Correct 166 ms 48236 KB Output is correct
40 Correct 222 ms 56168 KB Output is correct
41 Correct 278 ms 63424 KB Output is correct
42 Correct 317 ms 71352 KB Output is correct
43 Correct 2 ms 20828 KB Output is correct
44 Correct 2 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 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 2 ms 16824 KB Output is correct
53 Correct 2 ms 20828 KB Output is correct
54 Correct 3 ms 19140 KB Output is correct
55 Correct 5 ms 19548 KB Output is correct
56 Correct 178 ms 47180 KB Output is correct
57 Correct 274 ms 59620 KB Output is correct
58 Correct 279 ms 59600 KB Output is correct
59 Correct 2 ms 16732 KB Output is correct
60 Correct 2 ms 20828 KB Output is correct
61 Correct 2 ms 16732 KB Output is correct
62 Correct 409 ms 81088 KB Output is correct
63 Correct 407 ms 81264 KB Output is correct
64 Correct 422 ms 80956 KB Output is correct
65 Correct 6 ms 19548 KB Output is correct
66 Correct 10 ms 20572 KB Output is correct
67 Correct 173 ms 46900 KB Output is correct
68 Correct 275 ms 60928 KB Output is correct
69 Correct 420 ms 73304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20824 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 20924 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 175 ms 50996 KB Output is correct
10 Correct 12 ms 23972 KB Output is correct
11 Correct 68 ms 37060 KB Output is correct
12 Correct 17 ms 25448 KB Output is correct
13 Correct 46 ms 30156 KB Output is correct
14 Correct 3 ms 19036 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 182 ms 50980 KB Output is correct
17 Correct 354 ms 81580 KB Output is correct
18 Correct 312 ms 81796 KB Output is correct
19 Correct 181 ms 74380 KB Output is correct
20 Correct 284 ms 68356 KB Output is correct
21 Correct 269 ms 69552 KB Output is correct
22 Correct 2 ms 20828 KB Output is correct
23 Correct 33 ms 28980 KB Output is correct
24 Correct 18 ms 22936 KB Output is correct
25 Correct 73 ms 33132 KB Output is correct
26 Correct 129 ms 42796 KB Output is correct
27 Correct 156 ms 45436 KB Output is correct
28 Correct 174 ms 51736 KB Output is correct
29 Correct 236 ms 57892 KB Output is correct
30 Correct 259 ms 64528 KB Output is correct
31 Correct 315 ms 70624 KB Output is correct
32 Correct 398 ms 74236 KB Output is correct
33 Correct 414 ms 81176 KB Output is correct
34 Correct 7 ms 19804 KB Output is correct
35 Correct 11 ms 20840 KB Output is correct
36 Correct 189 ms 46740 KB Output is correct
37 Correct 290 ms 60388 KB Output is correct
38 Correct 400 ms 73272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 18776 KB Output is correct
2 Correct 2 ms 20824 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 20924 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 175 ms 50996 KB Output is correct
10 Correct 12 ms 23972 KB Output is correct
11 Correct 68 ms 37060 KB Output is correct
12 Correct 17 ms 25448 KB Output is correct
13 Correct 46 ms 30156 KB Output is correct
14 Correct 3 ms 19036 KB Output is correct
15 Correct 4 ms 19292 KB Output is correct
16 Correct 182 ms 50980 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 20928 KB Output is correct
20 Correct 3 ms 20828 KB Output is correct
21 Correct 2 ms 18780 KB Output is correct
22 Correct 2 ms 20828 KB Output is correct
23 Correct 414 ms 73720 KB Output is correct
24 Correct 3 ms 20828 KB Output is correct
25 Correct 3 ms 21184 KB Output is correct
26 Correct 5 ms 19548 KB Output is correct
27 Correct 6 ms 19548 KB Output is correct
28 Correct 140 ms 41432 KB Output is correct
29 Correct 211 ms 52676 KB Output is correct
30 Correct 306 ms 61740 KB Output is correct
31 Correct 418 ms 74424 KB Output is correct
32 Correct 2 ms 20828 KB Output is correct
33 Correct 2 ms 20824 KB Output is correct
34 Correct 2 ms 20824 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 20828 KB Output is correct
38 Correct 2 ms 20828 KB Output is correct
39 Correct 2 ms 20828 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 20824 KB Output is correct
43 Correct 4 ms 19316 KB Output is correct
44 Correct 4 ms 19548 KB Output is correct
45 Correct 180 ms 47204 KB Output is correct
46 Correct 284 ms 59624 KB Output is correct
47 Correct 265 ms 59588 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 20824 KB Output is correct
51 Correct 2 ms 20828 KB Output is correct
52 Correct 2 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 396 ms 71664 KB Output is correct
56 Correct 3 ms 21080 KB Output is correct
57 Correct 4 ms 21196 KB Output is correct
58 Correct 9 ms 22488 KB Output is correct
59 Correct 12 ms 20904 KB Output is correct
60 Correct 168 ms 46788 KB Output is correct
61 Correct 244 ms 54780 KB Output is correct
62 Correct 322 ms 62960 KB Output is correct
63 Correct 391 ms 70996 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 457 ms 82320 KB Output is correct
68 Correct 395 ms 82080 KB Output is correct
69 Correct 410 ms 81932 KB Output is correct
70 Correct 6 ms 19804 KB Output is correct
71 Correct 9 ms 20484 KB Output is correct
72 Correct 178 ms 47644 KB Output is correct
73 Correct 277 ms 61368 KB Output is correct
74 Correct 404 ms 74484 KB Output is correct
75 Correct 408 ms 75348 KB Output is correct
76 Correct 412 ms 82188 KB Output is correct
77 Correct 7 ms 20056 KB Output is correct
78 Correct 11 ms 20828 KB Output is correct
79 Correct 174 ms 47556 KB Output is correct
80 Correct 290 ms 61124 KB Output is correct
81 Correct 398 ms 74352 KB Output is correct
82 Correct 2 ms 20828 KB Output is correct
83 Correct 2 ms 20828 KB Output is correct
84 Correct 2 ms 18780 KB Output is correct
85 Correct 156 ms 67892 KB Output is correct
86 Correct 191 ms 72492 KB Output is correct
87 Correct 155 ms 67676 KB Output is correct
88 Correct 228 ms 71936 KB Output is correct
89 Correct 162 ms 47960 KB Output is correct
90 Correct 294 ms 69820 KB Output is correct
91 Correct 292 ms 69824 KB Output is correct
92 Correct 331 ms 80972 KB Output is correct
93 Correct 320 ms 81012 KB Output is correct
94 Correct 336 ms 81028 KB Output is correct
95 Correct 341 ms 81052 KB Output is correct
96 Correct 2 ms 20824 KB Output is correct
97 Correct 15 ms 24672 KB Output is correct
98 Correct 57 ms 32348 KB Output is correct
99 Correct 183 ms 72628 KB Output is correct
100 Correct 9 ms 20824 KB Output is correct
101 Correct 51 ms 28892 KB Output is correct
102 Correct 140 ms 38916 KB Output is correct
103 Correct 111 ms 40928 KB Output is correct
104 Correct 166 ms 48236 KB Output is correct
105 Correct 222 ms 56168 KB Output is correct
106 Correct 278 ms 63424 KB Output is correct
107 Correct 317 ms 71352 KB Output is correct
108 Correct 2 ms 20828 KB Output is correct
109 Correct 2 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 3 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 16824 KB Output is correct
118 Correct 2 ms 20828 KB Output is correct
119 Correct 3 ms 19140 KB Output is correct
120 Correct 5 ms 19548 KB Output is correct
121 Correct 178 ms 47180 KB Output is correct
122 Correct 274 ms 59620 KB Output is correct
123 Correct 279 ms 59600 KB Output is correct
124 Correct 2 ms 16732 KB Output is correct
125 Correct 2 ms 20828 KB Output is correct
126 Correct 2 ms 16732 KB Output is correct
127 Correct 409 ms 81088 KB Output is correct
128 Correct 407 ms 81264 KB Output is correct
129 Correct 422 ms 80956 KB Output is correct
130 Correct 6 ms 19548 KB Output is correct
131 Correct 10 ms 20572 KB Output is correct
132 Correct 173 ms 46900 KB Output is correct
133 Correct 275 ms 60928 KB Output is correct
134 Correct 420 ms 73304 KB Output is correct
135 Correct 354 ms 81580 KB Output is correct
136 Correct 312 ms 81796 KB Output is correct
137 Correct 181 ms 74380 KB Output is correct
138 Correct 284 ms 68356 KB Output is correct
139 Correct 269 ms 69552 KB Output is correct
140 Correct 2 ms 20828 KB Output is correct
141 Correct 33 ms 28980 KB Output is correct
142 Correct 18 ms 22936 KB Output is correct
143 Correct 73 ms 33132 KB Output is correct
144 Correct 129 ms 42796 KB Output is correct
145 Correct 156 ms 45436 KB Output is correct
146 Correct 174 ms 51736 KB Output is correct
147 Correct 236 ms 57892 KB Output is correct
148 Correct 259 ms 64528 KB Output is correct
149 Correct 315 ms 70624 KB Output is correct
150 Correct 398 ms 74236 KB Output is correct
151 Correct 414 ms 81176 KB Output is correct
152 Correct 7 ms 19804 KB Output is correct
153 Correct 11 ms 20840 KB Output is correct
154 Correct 189 ms 46740 KB Output is correct
155 Correct 290 ms 60388 KB Output is correct
156 Correct 400 ms 73272 KB Output is correct
157 Correct 3 ms 20828 KB Output is correct
158 Correct 2 ms 16732 KB Output is correct
159 Correct 2 ms 20828 KB Output is correct
160 Correct 3 ms 20828 KB Output is correct
161 Incorrect 1449 ms 58848 KB Solution announced impossible, but it is possible.
162 Halted 0 ms 0 KB -