Submission #591562

# Submission time Handle Problem Language Result Execution time Memory
591562 2022-07-07T15:04:58 Z Lucpp Fountain Parks (IOI21_parks) C++17
70 / 100
732 ms 99432 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;

map<pair<int, int>, int> mp;
vector<bool> vis;
vector<int> dx = {-2, 2, 0, 0};
vector<int> dy = {0, 0, -2, 2};
vector<pair<int, int>> roads;

void dfs(int x, int y){
    int u = mp[make_pair(x, y)];
    for(int i = 0; i < 4; i++){
        int x2 = x+dx[i], y2 = y+dy[i];
        if(mp.count(make_pair(x2, y2))){
            int v = mp[make_pair(x2, y2)];
            if(!vis[v]){
                vis[v] = true;
                dfs(x2, y2);
                roads.emplace_back(u, v);
            }
        }
    }
}

pair<pair<int, int>, pair<int, int>> getBench(int x1, int y1, int x2, int y2){
    if(x1 == x2) return {{x1+1, (y1+y2)/2}, {x1-1, (y1+y2)/2}};
    else return {{(x1+x2)/2, y1+1}, {(x1+x2)/2, y1-1}};
}

vector<vector<int>> g;
vector<int> match;

bool find_path(int u){
    for(int v : g[u]){
        if(!vis[v]){
            vis[v] = true;
            if(match[v] == -1 || find_path(match[v])){
                match[v] = u;
                match[u] = v;
                return true;
            }
        }
    }
    return false;
}

int construct_roads(vector<int> x, vector<int> y) {
    if (x.size() == 1) {
	build({}, {}, {}, {});
        return 1;
    }
    int n = (int)x.size();
    for(int i = 0; i < n; i++){
        mp.emplace(make_pair(x[i], y[i]), i);
    }
    vis.resize(n);
    vis[0] = true;
    dfs(x[0], y[0]);
    for(int i = 0; i < n; i++){
        if(!vis[i]) return 0;
    }
    g.resize(n-1);
    vector<pair<int, int>> benches;
    map<pair<int, int>, int> ind;
    for(int i = 0; i < n-1; i++){
        int u = roads[i].first, v = roads[i].second;
        auto [a, b] = getBench(x[u], y[u], x[v], y[v]);
        if(!ind.count(a)){
            ind[a] = (int)benches.size();
            benches.push_back(a);
        }
        if(!ind.count(b)){
            ind[b] = (int)benches.size();
            benches.push_back(b);
        }
        g[i].push_back(ind[a]+n-1);
        g[i].push_back(ind[b]+n-1);
    }
    int m = n+(int)ind.size();
    match.assign(m, -1);
    int sz = 0;
    while(true){
        int old = sz;
        vis.assign(m, false);
        for(int u = 0; u < n-1; u++){
            if(match[u] == -1) sz += find_path(u);
        }
        if(sz == old) break;
    }
    assert(sz == n-1);

    vector<int> u, v, a, b;
    for(int i = 0; i < n-1; i++){
        u.push_back(roads[i].first);
        v.push_back(roads[i].second);
        a.push_back(benches[match[i]-n+1].first);
        b.push_back(benches[match[i]-n+1].second);
    }
    build(u, v, a, b);
    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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 308 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 239 ms 48700 KB Output is correct
10 Correct 21 ms 5288 KB Output is correct
11 Correct 127 ms 26844 KB Output is correct
12 Correct 29 ms 7684 KB Output is correct
13 Correct 37 ms 8652 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 444 KB Output is correct
16 Correct 246 ms 42808 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 308 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 239 ms 48700 KB Output is correct
10 Correct 21 ms 5288 KB Output is correct
11 Correct 127 ms 26844 KB Output is correct
12 Correct 29 ms 7684 KB Output is correct
13 Correct 37 ms 8652 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 444 KB Output is correct
16 Correct 246 ms 42808 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 300 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 533 ms 82148 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 2 ms 692 KB Output is correct
26 Correct 2 ms 596 KB Output is correct
27 Correct 2 ms 596 KB Output is correct
28 Correct 183 ms 34100 KB Output is correct
29 Correct 287 ms 47008 KB Output is correct
30 Correct 430 ms 67092 KB Output is correct
31 Correct 537 ms 79616 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 2 ms 604 KB Output is correct
45 Correct 219 ms 39888 KB Output is correct
46 Correct 325 ms 59452 KB Output is correct
47 Correct 329 ms 58524 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 308 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 239 ms 48700 KB Output is correct
10 Correct 21 ms 5288 KB Output is correct
11 Correct 127 ms 26844 KB Output is correct
12 Correct 29 ms 7684 KB Output is correct
13 Correct 37 ms 8652 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 444 KB Output is correct
16 Correct 246 ms 42808 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 300 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 533 ms 82148 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 2 ms 692 KB Output is correct
26 Correct 2 ms 596 KB Output is correct
27 Correct 2 ms 596 KB Output is correct
28 Correct 183 ms 34100 KB Output is correct
29 Correct 287 ms 47008 KB Output is correct
30 Correct 430 ms 67092 KB Output is correct
31 Correct 537 ms 79616 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 2 ms 604 KB Output is correct
45 Correct 219 ms 39888 KB Output is correct
46 Correct 325 ms 59452 KB Output is correct
47 Correct 329 ms 58524 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 304 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 541 ms 77080 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 3 ms 980 KB Output is correct
58 Correct 11 ms 2780 KB Output is correct
59 Correct 5 ms 1364 KB Output is correct
60 Correct 240 ms 41588 KB Output is correct
61 Correct 350 ms 56448 KB Output is correct
62 Correct 418 ms 65288 KB Output is correct
63 Correct 525 ms 76152 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 559 ms 90904 KB Output is correct
68 Correct 513 ms 91332 KB Output is correct
69 Correct 515 ms 93980 KB Output is correct
70 Correct 3 ms 724 KB Output is correct
71 Correct 6 ms 1080 KB Output is correct
72 Correct 248 ms 35344 KB Output is correct
73 Correct 353 ms 57480 KB Output is correct
74 Correct 506 ms 71168 KB Output is correct
75 Correct 532 ms 84288 KB Output is correct
76 Correct 538 ms 99024 KB Output is correct
77 Correct 4 ms 980 KB Output is correct
78 Correct 6 ms 1452 KB Output is correct
79 Correct 275 ms 38104 KB Output is correct
80 Correct 429 ms 59108 KB Output is correct
81 Correct 566 ms 77968 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 308 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 239 ms 48700 KB Output is correct
10 Correct 21 ms 5288 KB Output is correct
11 Correct 127 ms 26844 KB Output is correct
12 Correct 29 ms 7684 KB Output is correct
13 Correct 37 ms 8652 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 444 KB Output is correct
16 Correct 246 ms 42808 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 304 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 550 ms 86304 KB Output is correct
21 Correct 543 ms 80436 KB Output is correct
22 Correct 530 ms 77308 KB Output is correct
23 Correct 464 ms 76352 KB Output is correct
24 Correct 164 ms 17624 KB Output is correct
25 Correct 130 ms 17584 KB Output is correct
26 Correct 126 ms 17596 KB Output is correct
27 Correct 471 ms 70968 KB Output is correct
28 Correct 518 ms 70920 KB Output is correct
29 Correct 642 ms 70888 KB Output is correct
30 Correct 663 ms 70904 KB Output is correct
31 Correct 1 ms 304 KB Output is correct
32 Correct 29 ms 5524 KB Output is correct
33 Correct 57 ms 9348 KB Output is correct
34 Correct 529 ms 81908 KB Output is correct
35 Correct 9 ms 1328 KB Output is correct
36 Correct 38 ms 5036 KB Output is correct
37 Correct 62 ms 9548 KB Output is correct
38 Correct 189 ms 25252 KB Output is correct
39 Correct 275 ms 33692 KB Output is correct
40 Correct 384 ms 44012 KB Output is correct
41 Correct 449 ms 52808 KB Output is correct
42 Correct 557 ms 61588 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 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 2 ms 672 KB Output is correct
55 Correct 2 ms 596 KB Output is correct
56 Correct 242 ms 39864 KB Output is correct
57 Correct 387 ms 59512 KB Output is correct
58 Correct 402 ms 58540 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 732 ms 90776 KB Output is correct
63 Correct 563 ms 91232 KB Output is correct
64 Correct 539 ms 94040 KB Output is correct
65 Correct 3 ms 724 KB Output is correct
66 Correct 5 ms 1236 KB Output is correct
67 Correct 250 ms 35360 KB Output is correct
68 Correct 390 ms 57448 KB Output is correct
69 Correct 565 ms 71264 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 308 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 239 ms 48700 KB Output is correct
10 Correct 21 ms 5288 KB Output is correct
11 Correct 127 ms 26844 KB Output is correct
12 Correct 29 ms 7684 KB Output is correct
13 Correct 37 ms 8652 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 444 KB Output is correct
16 Correct 246 ms 42808 KB Output is correct
17 Correct 564 ms 99432 KB Output is correct
18 Correct 568 ms 96992 KB Output is correct
19 Correct 684 ms 86552 KB Output is correct
20 Correct 661 ms 76020 KB Output is correct
21 Correct 545 ms 70192 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 75 ms 10920 KB Output is correct
24 Correct 19 ms 2844 KB Output is correct
25 Correct 47 ms 7344 KB Output is correct
26 Correct 92 ms 12200 KB Output is correct
27 Correct 279 ms 37372 KB Output is correct
28 Correct 367 ms 46760 KB Output is correct
29 Correct 479 ms 56940 KB Output is correct
30 Correct 547 ms 65708 KB Output is correct
31 Correct 636 ms 74800 KB Output is correct
32 Correct 579 ms 84340 KB Output is correct
33 Correct 611 ms 98956 KB Output is correct
34 Correct 4 ms 956 KB Output is correct
35 Correct 8 ms 1376 KB Output is correct
36 Correct 266 ms 38032 KB Output is correct
37 Correct 395 ms 59092 KB Output is correct
38 Correct 538 ms 78064 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 308 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 239 ms 48700 KB Output is correct
10 Correct 21 ms 5288 KB Output is correct
11 Correct 127 ms 26844 KB Output is correct
12 Correct 29 ms 7684 KB Output is correct
13 Correct 37 ms 8652 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 444 KB Output is correct
16 Correct 246 ms 42808 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 300 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 533 ms 82148 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 2 ms 692 KB Output is correct
26 Correct 2 ms 596 KB Output is correct
27 Correct 2 ms 596 KB Output is correct
28 Correct 183 ms 34100 KB Output is correct
29 Correct 287 ms 47008 KB Output is correct
30 Correct 430 ms 67092 KB Output is correct
31 Correct 537 ms 79616 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 2 ms 604 KB Output is correct
45 Correct 219 ms 39888 KB Output is correct
46 Correct 325 ms 59452 KB Output is correct
47 Correct 329 ms 58524 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 304 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 541 ms 77080 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 3 ms 980 KB Output is correct
58 Correct 11 ms 2780 KB Output is correct
59 Correct 5 ms 1364 KB Output is correct
60 Correct 240 ms 41588 KB Output is correct
61 Correct 350 ms 56448 KB Output is correct
62 Correct 418 ms 65288 KB Output is correct
63 Correct 525 ms 76152 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 559 ms 90904 KB Output is correct
68 Correct 513 ms 91332 KB Output is correct
69 Correct 515 ms 93980 KB Output is correct
70 Correct 3 ms 724 KB Output is correct
71 Correct 6 ms 1080 KB Output is correct
72 Correct 248 ms 35344 KB Output is correct
73 Correct 353 ms 57480 KB Output is correct
74 Correct 506 ms 71168 KB Output is correct
75 Correct 532 ms 84288 KB Output is correct
76 Correct 538 ms 99024 KB Output is correct
77 Correct 4 ms 980 KB Output is correct
78 Correct 6 ms 1452 KB Output is correct
79 Correct 275 ms 38104 KB Output is correct
80 Correct 429 ms 59108 KB Output is correct
81 Correct 566 ms 77968 KB Output is correct
82 Correct 1 ms 340 KB Output is correct
83 Correct 1 ms 304 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 550 ms 86304 KB Output is correct
86 Correct 543 ms 80436 KB Output is correct
87 Correct 530 ms 77308 KB Output is correct
88 Correct 464 ms 76352 KB Output is correct
89 Correct 164 ms 17624 KB Output is correct
90 Correct 130 ms 17584 KB Output is correct
91 Correct 126 ms 17596 KB Output is correct
92 Correct 471 ms 70968 KB Output is correct
93 Correct 518 ms 70920 KB Output is correct
94 Correct 642 ms 70888 KB Output is correct
95 Correct 663 ms 70904 KB Output is correct
96 Correct 1 ms 304 KB Output is correct
97 Correct 29 ms 5524 KB Output is correct
98 Correct 57 ms 9348 KB Output is correct
99 Correct 529 ms 81908 KB Output is correct
100 Correct 9 ms 1328 KB Output is correct
101 Correct 38 ms 5036 KB Output is correct
102 Correct 62 ms 9548 KB Output is correct
103 Correct 189 ms 25252 KB Output is correct
104 Correct 275 ms 33692 KB Output is correct
105 Correct 384 ms 44012 KB Output is correct
106 Correct 449 ms 52808 KB Output is correct
107 Correct 557 ms 61588 KB Output is correct
108 Correct 1 ms 212 KB Output is correct
109 Correct 1 ms 212 KB Output is correct
110 Correct 1 ms 212 KB Output is correct
111 Correct 1 ms 212 KB Output is correct
112 Correct 1 ms 212 KB Output is correct
113 Correct 1 ms 212 KB Output is correct
114 Correct 1 ms 212 KB Output is correct
115 Correct 1 ms 212 KB Output is correct
116 Correct 1 ms 212 KB Output is correct
117 Correct 0 ms 212 KB Output is correct
118 Correct 1 ms 212 KB Output is correct
119 Correct 2 ms 672 KB Output is correct
120 Correct 2 ms 596 KB Output is correct
121 Correct 242 ms 39864 KB Output is correct
122 Correct 387 ms 59512 KB Output is correct
123 Correct 402 ms 58540 KB Output is correct
124 Correct 1 ms 212 KB Output is correct
125 Correct 1 ms 212 KB Output is correct
126 Correct 0 ms 212 KB Output is correct
127 Correct 732 ms 90776 KB Output is correct
128 Correct 563 ms 91232 KB Output is correct
129 Correct 539 ms 94040 KB Output is correct
130 Correct 3 ms 724 KB Output is correct
131 Correct 5 ms 1236 KB Output is correct
132 Correct 250 ms 35360 KB Output is correct
133 Correct 390 ms 57448 KB Output is correct
134 Correct 565 ms 71264 KB Output is correct
135 Correct 564 ms 99432 KB Output is correct
136 Correct 568 ms 96992 KB Output is correct
137 Correct 684 ms 86552 KB Output is correct
138 Correct 661 ms 76020 KB Output is correct
139 Correct 545 ms 70192 KB Output is correct
140 Correct 1 ms 212 KB Output is correct
141 Correct 75 ms 10920 KB Output is correct
142 Correct 19 ms 2844 KB Output is correct
143 Correct 47 ms 7344 KB Output is correct
144 Correct 92 ms 12200 KB Output is correct
145 Correct 279 ms 37372 KB Output is correct
146 Correct 367 ms 46760 KB Output is correct
147 Correct 479 ms 56940 KB Output is correct
148 Correct 547 ms 65708 KB Output is correct
149 Correct 636 ms 74800 KB Output is correct
150 Correct 579 ms 84340 KB Output is correct
151 Correct 611 ms 98956 KB Output is correct
152 Correct 4 ms 956 KB Output is correct
153 Correct 8 ms 1376 KB Output is correct
154 Correct 266 ms 38032 KB Output is correct
155 Correct 395 ms 59092 KB Output is correct
156 Correct 538 ms 78064 KB Output is correct
157 Correct 1 ms 212 KB Output is correct
158 Correct 1 ms 212 KB Output is correct
159 Correct 0 ms 212 KB Output is correct
160 Correct 1 ms 300 KB Output is correct
161 Correct 639 ms 75052 KB Output is correct
162 Correct 574 ms 77616 KB Output is correct
163 Correct 643 ms 70340 KB Output is correct
164 Correct 490 ms 69372 KB Output is correct
165 Correct 505 ms 83276 KB Output is correct
166 Correct 548 ms 84980 KB Output is correct
167 Runtime error 104 ms 26060 KB Execution killed with signal 6
168 Halted 0 ms 0 KB -