Submission #479204

# Submission time Handle Problem Language Result Execution time Memory
479204 2021-10-10T15:35:06 Z couplefire Fountain Parks (IOI21_parks) C++17
100 / 100
3375 ms 82040 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define f first
#define s second

int n, m;
vector<pii> pts, sqrs;
map<pii, int> pid, sid;
vector<int> fa, u_ans, v_ans, a_ans, b_ans;
vector<vector<pair<int, pii>>> adj;
vector<bool> vis;
set<pii> roads;

int find(int v){return v==fa[v]?v:fa[v]=find(fa[v]);}

void unite(int u, int v){
    u = find(u), v = find(v);
    if(u==v) return;
    fa[u] = v;
}

pii get(pii a, pii b){
    if(a.f==b.f){
        if(a.s>b.s) swap(a, b);
        int x = pid[{a.f-1, a.s+1}], y = pid[{a.f+1, a.s+1}];
        if(x>y) swap(x, y);
        return {x, y};
    }
    if(a.f>b.f) swap(a, b);
    int x = pid[{a.f+1, a.s+1}], y = pid[{a.f+1, a.s-1}];
    if(x>y) swap(x, y);
    return {x, y};
}

bool horz(pii a){
    return ((a.f+a.s)/2)&1;
}

void dfs(int v){
    vis[v] = 1;
    for(auto u : adj[v])
        if(!vis[u.f]) roads.erase(u.s), dfs(u.f);
}

int construct_roads(vector<int> _x, vector<int> _y){
    n = _x.size();
    for(int i = 0; i<n; ++i)
        pts.push_back({_x[i], _y[i]}), pid[pts.back()] = i;
    fa.resize(n);
    iota(fa.begin(), fa.end(), 0);
    for(int i = 0; i<n; ++i){
        pii npt = {pts[i].f+2, pts[i].s};
        if(pid.count(npt)) unite(i, pid[npt]);
        npt = {pts[i].f, pts[i].s+2};
        if(pid.count(npt)) unite(i, pid[npt]);       
    }
    for(int i = 1; i<n; ++i)
        if(find(0)!=find(i)) return 0;
    for(int i = 0; i<n; ++i){
        pii ap = {pts[i].f+2, pts[i].s}, bp = {pts[i].f, pts[i].s+2};
        if(pid.count(ap)) roads.insert({min(i, pid[ap]), max(i, pid[ap])});
        if(pid.count(bp)) roads.insert({min(i, pid[bp]), max(i, pid[bp])});
    }
    for(int i = 0; i<n; ++i){
        pii bl = pts[i], br = {bl.f+2, bl.s}, tl = {bl.f, bl.s+2}, tr = {bl.f+2, bl.s+2};
        if(pid.count(bl) && pid.count(br) && pid.count(tl) && pid.count(tr))
            sqrs.push_back({bl.f+1, bl.s+1}), sid[sqrs.back()] = (int)sqrs.size()-1;
    }
    m = (int)sqrs.size();
    adj.resize(m+1);
    vis.assign(m+1, 0);
    for(int i = 0; i<m; ++i){
        pii as, bs;
        if(horz(sqrs[i]))
            as = {sqrs[i].f+2, sqrs[i].s}, bs = {sqrs[i].f-2, sqrs[i].s};
        else as = {sqrs[i].f, sqrs[i].s+2}, bs = {sqrs[i].f, sqrs[i].s-2};
        if(sid.count(as)) adj[sid[as]].push_back({i, get(sqrs[i], as)});
        if(sid.count(bs)) adj[sid[bs]].push_back({i, get(sqrs[i], bs)});
        if(!sid.count(as)) adj[m].push_back({i, get(sqrs[i], as)});
        if(!sid.count(bs)) adj[m].push_back({i, get(sqrs[i], bs)});
    } dfs(m);
    for(auto [x, y] : roads){
        u_ans.push_back(x), v_ans.push_back(y);
        pii a = pts[x], b = pts[y];
        if(a.f==b.f){
            if(a.s>b.s) swap(a, b);
            if(horz({a.f-1, a.s+1})) a_ans.push_back(a.f-1), b_ans.push_back(a.s+1);
            else a_ans.push_back(a.f+1), b_ans.push_back({a.s+1});
        } else{
            if(a.f>b.f) swap(a, b);
            if(!horz({a.f+1, a.s-1})) a_ans.push_back(a.f+1), b_ans.push_back(a.s-1);
            else a_ans.push_back(a.f+1), b_ans.push_back(a.s+1);
        }
    }
    build(u_ans, v_ans, a_ans, b_ans);
    return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 316 ms 20364 KB Output is correct
10 Correct 19 ms 2508 KB Output is correct
11 Correct 111 ms 11624 KB Output is correct
12 Correct 27 ms 3404 KB Output is correct
13 Correct 35 ms 4700 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 2 ms 460 KB Output is correct
16 Correct 308 ms 20376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 316 ms 20364 KB Output is correct
10 Correct 19 ms 2508 KB Output is correct
11 Correct 111 ms 11624 KB Output is correct
12 Correct 27 ms 3404 KB Output is correct
13 Correct 35 ms 4700 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 2 ms 460 KB Output is correct
16 Correct 308 ms 20376 KB Output is correct
17 Correct 0 ms 280 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1704 ms 60184 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 588 KB Output is correct
26 Correct 3 ms 556 KB Output is correct
27 Correct 5 ms 588 KB Output is correct
28 Correct 462 ms 23920 KB Output is correct
29 Correct 840 ms 35976 KB Output is correct
30 Correct 1198 ms 48064 KB Output is correct
31 Correct 1681 ms 60172 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 1 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 2 ms 484 KB Output is correct
44 Correct 3 ms 588 KB Output is correct
45 Correct 362 ms 21192 KB Output is correct
46 Correct 614 ms 31388 KB Output is correct
47 Correct 632 ms 31500 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 316 ms 20364 KB Output is correct
10 Correct 19 ms 2508 KB Output is correct
11 Correct 111 ms 11624 KB Output is correct
12 Correct 27 ms 3404 KB Output is correct
13 Correct 35 ms 4700 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 2 ms 460 KB Output is correct
16 Correct 308 ms 20376 KB Output is correct
17 Correct 0 ms 280 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1704 ms 60184 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 588 KB Output is correct
26 Correct 3 ms 556 KB Output is correct
27 Correct 5 ms 588 KB Output is correct
28 Correct 462 ms 23920 KB Output is correct
29 Correct 840 ms 35976 KB Output is correct
30 Correct 1198 ms 48064 KB Output is correct
31 Correct 1681 ms 60172 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 1 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 2 ms 484 KB Output is correct
44 Correct 3 ms 588 KB Output is correct
45 Correct 362 ms 21192 KB Output is correct
46 Correct 614 ms 31388 KB Output is correct
47 Correct 632 ms 31500 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 204 KB Output is correct
51 Correct 0 ms 204 KB Output is correct
52 Correct 0 ms 204 KB Output is correct
53 Correct 0 ms 204 KB Output is correct
54 Correct 1 ms 204 KB Output is correct
55 Correct 2040 ms 75112 KB Output is correct
56 Correct 1 ms 204 KB Output is correct
57 Correct 6 ms 844 KB Output is correct
58 Correct 23 ms 2636 KB Output is correct
59 Correct 10 ms 1228 KB Output is correct
60 Correct 752 ms 38048 KB Output is correct
61 Correct 1200 ms 53064 KB Output is correct
62 Correct 1573 ms 60760 KB Output is correct
63 Correct 2361 ms 74868 KB Output is correct
64 Correct 0 ms 204 KB Output is correct
65 Correct 1 ms 204 KB Output is correct
66 Correct 1 ms 204 KB Output is correct
67 Correct 969 ms 42156 KB Output is correct
68 Correct 974 ms 42120 KB Output is correct
69 Correct 839 ms 42108 KB Output is correct
70 Correct 3 ms 588 KB Output is correct
71 Correct 7 ms 972 KB Output is correct
72 Correct 382 ms 20988 KB Output is correct
73 Correct 700 ms 32400 KB Output is correct
74 Correct 1082 ms 42228 KB Output is correct
75 Correct 1124 ms 46272 KB Output is correct
76 Correct 810 ms 42120 KB Output is correct
77 Correct 5 ms 716 KB Output is correct
78 Correct 8 ms 1216 KB Output is correct
79 Correct 408 ms 22032 KB Output is correct
80 Correct 724 ms 34200 KB Output is correct
81 Correct 1110 ms 44484 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 316 ms 20364 KB Output is correct
10 Correct 19 ms 2508 KB Output is correct
11 Correct 111 ms 11624 KB Output is correct
12 Correct 27 ms 3404 KB Output is correct
13 Correct 35 ms 4700 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 2 ms 460 KB Output is correct
16 Correct 308 ms 20376 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 0 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1029 ms 41452 KB Output is correct
21 Correct 1022 ms 41444 KB Output is correct
22 Correct 1049 ms 41208 KB Output is correct
23 Correct 744 ms 35352 KB Output is correct
24 Correct 302 ms 18304 KB Output is correct
25 Correct 416 ms 18432 KB Output is correct
26 Correct 373 ms 18372 KB Output is correct
27 Correct 995 ms 40464 KB Output is correct
28 Correct 952 ms 40464 KB Output is correct
29 Correct 1178 ms 40720 KB Output is correct
30 Correct 1191 ms 40656 KB Output is correct
31 Correct 1 ms 204 KB Output is correct
32 Correct 41 ms 3140 KB Output is correct
33 Correct 108 ms 9272 KB Output is correct
34 Correct 969 ms 41408 KB Output is correct
35 Correct 11 ms 1228 KB Output is correct
36 Correct 62 ms 4852 KB Output is correct
37 Correct 149 ms 9272 KB Output is correct
38 Correct 315 ms 17064 KB Output is correct
39 Correct 488 ms 22692 KB Output is correct
40 Correct 687 ms 30048 KB Output is correct
41 Correct 972 ms 35704 KB Output is correct
42 Correct 1187 ms 41616 KB Output is correct
43 Correct 1 ms 204 KB Output is correct
44 Correct 1 ms 204 KB Output is correct
45 Correct 1 ms 204 KB Output is correct
46 Correct 1 ms 204 KB Output is correct
47 Correct 1 ms 204 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 204 KB Output is correct
51 Correct 0 ms 204 KB Output is correct
52 Correct 1 ms 204 KB Output is correct
53 Correct 0 ms 204 KB Output is correct
54 Correct 2 ms 460 KB Output is correct
55 Correct 3 ms 460 KB Output is correct
56 Correct 382 ms 20264 KB Output is correct
57 Correct 622 ms 30212 KB Output is correct
58 Correct 631 ms 30272 KB Output is correct
59 Correct 1 ms 204 KB Output is correct
60 Correct 0 ms 204 KB Output is correct
61 Correct 0 ms 204 KB Output is correct
62 Correct 817 ms 40644 KB Output is correct
63 Correct 862 ms 40572 KB Output is correct
64 Correct 830 ms 40380 KB Output is correct
65 Correct 4 ms 588 KB Output is correct
66 Correct 7 ms 972 KB Output is correct
67 Correct 380 ms 20312 KB Output is correct
68 Correct 703 ms 31228 KB Output is correct
69 Correct 1051 ms 40648 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 316 ms 20364 KB Output is correct
10 Correct 19 ms 2508 KB Output is correct
11 Correct 111 ms 11624 KB Output is correct
12 Correct 27 ms 3404 KB Output is correct
13 Correct 35 ms 4700 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 2 ms 460 KB Output is correct
16 Correct 308 ms 20376 KB Output is correct
17 Correct 922 ms 41032 KB Output is correct
18 Correct 926 ms 41076 KB Output is correct
19 Correct 1016 ms 41420 KB Output is correct
20 Correct 1291 ms 46408 KB Output is correct
21 Correct 984 ms 38168 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 101 ms 7036 KB Output is correct
24 Correct 22 ms 2100 KB Output is correct
25 Correct 93 ms 6628 KB Output is correct
26 Correct 205 ms 11192 KB Output is correct
27 Correct 463 ms 22856 KB Output is correct
28 Correct 633 ms 28004 KB Output is correct
29 Correct 837 ms 35380 KB Output is correct
30 Correct 1038 ms 40228 KB Output is correct
31 Correct 1275 ms 45784 KB Output is correct
32 Correct 1166 ms 44736 KB Output is correct
33 Correct 816 ms 40712 KB Output is correct
34 Correct 4 ms 716 KB Output is correct
35 Correct 8 ms 1172 KB Output is correct
36 Correct 385 ms 21284 KB Output is correct
37 Correct 716 ms 32868 KB Output is correct
38 Correct 1123 ms 42744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 316 ms 20364 KB Output is correct
10 Correct 19 ms 2508 KB Output is correct
11 Correct 111 ms 11624 KB Output is correct
12 Correct 27 ms 3404 KB Output is correct
13 Correct 35 ms 4700 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 2 ms 460 KB Output is correct
16 Correct 308 ms 20376 KB Output is correct
17 Correct 0 ms 280 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1704 ms 60184 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 588 KB Output is correct
26 Correct 3 ms 556 KB Output is correct
27 Correct 5 ms 588 KB Output is correct
28 Correct 462 ms 23920 KB Output is correct
29 Correct 840 ms 35976 KB Output is correct
30 Correct 1198 ms 48064 KB Output is correct
31 Correct 1681 ms 60172 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 1 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 2 ms 484 KB Output is correct
44 Correct 3 ms 588 KB Output is correct
45 Correct 362 ms 21192 KB Output is correct
46 Correct 614 ms 31388 KB Output is correct
47 Correct 632 ms 31500 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 204 KB Output is correct
51 Correct 0 ms 204 KB Output is correct
52 Correct 0 ms 204 KB Output is correct
53 Correct 0 ms 204 KB Output is correct
54 Correct 1 ms 204 KB Output is correct
55 Correct 2040 ms 75112 KB Output is correct
56 Correct 1 ms 204 KB Output is correct
57 Correct 6 ms 844 KB Output is correct
58 Correct 23 ms 2636 KB Output is correct
59 Correct 10 ms 1228 KB Output is correct
60 Correct 752 ms 38048 KB Output is correct
61 Correct 1200 ms 53064 KB Output is correct
62 Correct 1573 ms 60760 KB Output is correct
63 Correct 2361 ms 74868 KB Output is correct
64 Correct 0 ms 204 KB Output is correct
65 Correct 1 ms 204 KB Output is correct
66 Correct 1 ms 204 KB Output is correct
67 Correct 969 ms 42156 KB Output is correct
68 Correct 974 ms 42120 KB Output is correct
69 Correct 839 ms 42108 KB Output is correct
70 Correct 3 ms 588 KB Output is correct
71 Correct 7 ms 972 KB Output is correct
72 Correct 382 ms 20988 KB Output is correct
73 Correct 700 ms 32400 KB Output is correct
74 Correct 1082 ms 42228 KB Output is correct
75 Correct 1124 ms 46272 KB Output is correct
76 Correct 810 ms 42120 KB Output is correct
77 Correct 5 ms 716 KB Output is correct
78 Correct 8 ms 1216 KB Output is correct
79 Correct 408 ms 22032 KB Output is correct
80 Correct 724 ms 34200 KB Output is correct
81 Correct 1110 ms 44484 KB Output is correct
82 Correct 1 ms 204 KB Output is correct
83 Correct 0 ms 204 KB Output is correct
84 Correct 1 ms 204 KB Output is correct
85 Correct 1029 ms 41452 KB Output is correct
86 Correct 1022 ms 41444 KB Output is correct
87 Correct 1049 ms 41208 KB Output is correct
88 Correct 744 ms 35352 KB Output is correct
89 Correct 302 ms 18304 KB Output is correct
90 Correct 416 ms 18432 KB Output is correct
91 Correct 373 ms 18372 KB Output is correct
92 Correct 995 ms 40464 KB Output is correct
93 Correct 952 ms 40464 KB Output is correct
94 Correct 1178 ms 40720 KB Output is correct
95 Correct 1191 ms 40656 KB Output is correct
96 Correct 1 ms 204 KB Output is correct
97 Correct 41 ms 3140 KB Output is correct
98 Correct 108 ms 9272 KB Output is correct
99 Correct 969 ms 41408 KB Output is correct
100 Correct 11 ms 1228 KB Output is correct
101 Correct 62 ms 4852 KB Output is correct
102 Correct 149 ms 9272 KB Output is correct
103 Correct 315 ms 17064 KB Output is correct
104 Correct 488 ms 22692 KB Output is correct
105 Correct 687 ms 30048 KB Output is correct
106 Correct 972 ms 35704 KB Output is correct
107 Correct 1187 ms 41616 KB Output is correct
108 Correct 1 ms 204 KB Output is correct
109 Correct 1 ms 204 KB Output is correct
110 Correct 1 ms 204 KB Output is correct
111 Correct 1 ms 204 KB Output is correct
112 Correct 1 ms 204 KB Output is correct
113 Correct 0 ms 204 KB Output is correct
114 Correct 1 ms 204 KB Output is correct
115 Correct 1 ms 204 KB Output is correct
116 Correct 0 ms 204 KB Output is correct
117 Correct 1 ms 204 KB Output is correct
118 Correct 0 ms 204 KB Output is correct
119 Correct 2 ms 460 KB Output is correct
120 Correct 3 ms 460 KB Output is correct
121 Correct 382 ms 20264 KB Output is correct
122 Correct 622 ms 30212 KB Output is correct
123 Correct 631 ms 30272 KB Output is correct
124 Correct 1 ms 204 KB Output is correct
125 Correct 0 ms 204 KB Output is correct
126 Correct 0 ms 204 KB Output is correct
127 Correct 817 ms 40644 KB Output is correct
128 Correct 862 ms 40572 KB Output is correct
129 Correct 830 ms 40380 KB Output is correct
130 Correct 4 ms 588 KB Output is correct
131 Correct 7 ms 972 KB Output is correct
132 Correct 380 ms 20312 KB Output is correct
133 Correct 703 ms 31228 KB Output is correct
134 Correct 1051 ms 40648 KB Output is correct
135 Correct 922 ms 41032 KB Output is correct
136 Correct 926 ms 41076 KB Output is correct
137 Correct 1016 ms 41420 KB Output is correct
138 Correct 1291 ms 46408 KB Output is correct
139 Correct 984 ms 38168 KB Output is correct
140 Correct 1 ms 204 KB Output is correct
141 Correct 101 ms 7036 KB Output is correct
142 Correct 22 ms 2100 KB Output is correct
143 Correct 93 ms 6628 KB Output is correct
144 Correct 205 ms 11192 KB Output is correct
145 Correct 463 ms 22856 KB Output is correct
146 Correct 633 ms 28004 KB Output is correct
147 Correct 837 ms 35380 KB Output is correct
148 Correct 1038 ms 40228 KB Output is correct
149 Correct 1275 ms 45784 KB Output is correct
150 Correct 1166 ms 44736 KB Output is correct
151 Correct 816 ms 40712 KB Output is correct
152 Correct 4 ms 716 KB Output is correct
153 Correct 8 ms 1172 KB Output is correct
154 Correct 385 ms 21284 KB Output is correct
155 Correct 716 ms 32868 KB Output is correct
156 Correct 1123 ms 42744 KB Output is correct
157 Correct 1 ms 204 KB Output is correct
158 Correct 1 ms 204 KB Output is correct
159 Correct 1 ms 204 KB Output is correct
160 Correct 1 ms 204 KB Output is correct
161 Correct 2968 ms 81444 KB Output is correct
162 Correct 914 ms 43932 KB Output is correct
163 Correct 1355 ms 56076 KB Output is correct
164 Correct 1365 ms 56196 KB Output is correct
165 Correct 2276 ms 77380 KB Output is correct
166 Correct 2862 ms 78536 KB Output is correct
167 Correct 304 ms 16604 KB Output is correct
168 Correct 40 ms 3392 KB Output is correct
169 Correct 127 ms 8444 KB Output is correct
170 Correct 332 ms 15672 KB Output is correct
171 Correct 503 ms 20776 KB Output is correct
172 Correct 1132 ms 41396 KB Output is correct
173 Correct 1433 ms 48812 KB Output is correct
174 Correct 1803 ms 58548 KB Output is correct
175 Correct 2203 ms 65740 KB Output is correct
176 Correct 2698 ms 74640 KB Output is correct
177 Correct 3375 ms 82040 KB Output is correct