답안 #529329

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
529329 2022-02-22T19:14:26 Z SHZhang 분수 공원 (IOI21_parks) C++17
100 / 100
997 ms 65396 KB
#include "parks.h"
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <utility>

using namespace std;

int n;
int uf[200005];

map<pair<int, int>, int> pt2idx;

int fin(int x)
{
    if (uf[x] == x) return x;
    return uf[x] = fin(uf[x]);
}

void un(int x, int y)
{
    x = fin(x);
    y = fin(y);
    if (x != y) uf[x] = y;
}

vector<int> ansu, ansv, ansa, ansb;

bool build_edge(int x1, int y1, int x2, int y2, int bx, int by)
{
    int p1 = pt2idx[make_pair(x1, y1)];
    int p2 = pt2idx[make_pair(x2, y2)];
    if (fin(p1) == fin(p2)) return false;
    un(p1, p2);
    ansu.push_back(p1);
    ansv.push_back(p2);
    ansa.push_back(bx);
    ansb.push_back(by);
    return true;
}

int construct_roads(vector<int> x, vector<int> y) {
    n = x.size();
    for (int i = 0; i < n; i++) uf[i] = i;
    set<pair<int, int> > st, bench;
    for (int i = 0; i < n; i++) {
        st.insert(make_pair(x[i], y[i]));
        pt2idx[make_pair(x[i], y[i])] = i;
        bench.insert(make_pair(x[i]-1, y[i]-1));
        bench.insert(make_pair(x[i]-1, y[i]+1));
        bench.insert(make_pair(x[i]+1, y[i]-1));
        bench.insert(make_pair(x[i]+1, y[i]+1));
    }
    while (!bench.empty()) {
        pair<int, int> cur = *(bench.begin());
        bench.erase(bench.begin());
        if ((cur.first + cur.second) % 4 == 0) {
            if (st.count(make_pair(cur.first - 1, cur.second - 1)) &&
                st.count(make_pair(cur.first + 1, cur.second - 1))) {
                if (build_edge(cur.first - 1, cur.second - 1,
                    cur.first + 1, cur.second - 1, cur.first, cur.second)) continue;
            }
            if (st.count(make_pair(cur.first - 1, cur.second + 1)) &&
                st.count(make_pair(cur.first + 1, cur.second + 1))) {
                build_edge(cur.first - 1, cur.second + 1,
                    cur.first + 1, cur.second + 1, cur.first, cur.second);
            }
        } else {
            if (st.count(make_pair(cur.first - 1, cur.second - 1)) &&
                st.count(make_pair(cur.first - 1, cur.second + 1))) {
                if (build_edge(cur.first - 1, cur.second - 1,
                    cur.first - 1, cur.second + 1, cur.first, cur.second)) continue;
            }
            if (st.count(make_pair(cur.first + 1, cur.second - 1)) &&
                st.count(make_pair(cur.first + 1, cur.second + 1))) {
                build_edge(cur.first + 1, cur.second - 1,
                    cur.first + 1, cur.second + 1, cur.first, cur.second);
            }
        }
    }
    if (ansa.size() < n - 1) {
        return 0;
    }
    build(ansu, ansv, ansa, ansb);
    return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:83:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   83 |     if (ansa.size() < n - 1) {
      |         ~~~~~~~~~~~~^~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 328 ms 28196 KB Output is correct
10 Correct 21 ms 3276 KB Output is correct
11 Correct 114 ms 15332 KB Output is correct
12 Correct 42 ms 4676 KB Output is correct
13 Correct 79 ms 11364 KB Output is correct
14 Correct 3 ms 460 KB Output is correct
15 Correct 4 ms 680 KB Output is correct
16 Correct 338 ms 28224 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 328 ms 28196 KB Output is correct
10 Correct 21 ms 3276 KB Output is correct
11 Correct 114 ms 15332 KB Output is correct
12 Correct 42 ms 4676 KB Output is correct
13 Correct 79 ms 11364 KB Output is correct
14 Correct 3 ms 460 KB Output is correct
15 Correct 4 ms 680 KB Output is correct
16 Correct 338 ms 28224 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 0 ms 288 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 0 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 810 ms 52604 KB Output is correct
24 Correct 0 ms 204 KB Output is correct
25 Correct 4 ms 548 KB Output is correct
26 Correct 5 ms 972 KB Output is correct
27 Correct 8 ms 1100 KB Output is correct
28 Correct 268 ms 21284 KB Output is correct
29 Correct 413 ms 31852 KB Output is correct
30 Correct 603 ms 42264 KB Output is correct
31 Correct 847 ms 52672 KB Output is correct
32 Correct 0 ms 204 KB Output is correct
33 Correct 0 ms 204 KB Output is correct
34 Correct 0 ms 204 KB Output is correct
35 Correct 2 ms 288 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 204 KB Output is correct
38 Correct 0 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 3 ms 204 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 2 ms 204 KB Output is correct
43 Correct 4 ms 716 KB Output is correct
44 Correct 6 ms 1060 KB Output is correct
45 Correct 402 ms 28292 KB Output is correct
46 Correct 678 ms 40784 KB Output is correct
47 Correct 583 ms 40720 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 328 ms 28196 KB Output is correct
10 Correct 21 ms 3276 KB Output is correct
11 Correct 114 ms 15332 KB Output is correct
12 Correct 42 ms 4676 KB Output is correct
13 Correct 79 ms 11364 KB Output is correct
14 Correct 3 ms 460 KB Output is correct
15 Correct 4 ms 680 KB Output is correct
16 Correct 338 ms 28224 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 0 ms 288 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 0 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 810 ms 52604 KB Output is correct
24 Correct 0 ms 204 KB Output is correct
25 Correct 4 ms 548 KB Output is correct
26 Correct 5 ms 972 KB Output is correct
27 Correct 8 ms 1100 KB Output is correct
28 Correct 268 ms 21284 KB Output is correct
29 Correct 413 ms 31852 KB Output is correct
30 Correct 603 ms 42264 KB Output is correct
31 Correct 847 ms 52672 KB Output is correct
32 Correct 0 ms 204 KB Output is correct
33 Correct 0 ms 204 KB Output is correct
34 Correct 0 ms 204 KB Output is correct
35 Correct 2 ms 288 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 204 KB Output is correct
38 Correct 0 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 3 ms 204 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 2 ms 204 KB Output is correct
43 Correct 4 ms 716 KB Output is correct
44 Correct 6 ms 1060 KB Output is correct
45 Correct 402 ms 28292 KB Output is correct
46 Correct 678 ms 40784 KB Output is correct
47 Correct 583 ms 40720 KB Output is correct
48 Correct 0 ms 244 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 284 KB Output is correct
51 Correct 1 ms 288 KB Output is correct
52 Correct 0 ms 288 KB Output is correct
53 Correct 1 ms 204 KB Output is correct
54 Correct 0 ms 204 KB Output is correct
55 Correct 784 ms 50552 KB Output is correct
56 Correct 2 ms 204 KB Output is correct
57 Correct 4 ms 716 KB Output is correct
58 Correct 11 ms 1912 KB Output is correct
59 Correct 44 ms 2596 KB Output is correct
60 Correct 363 ms 25504 KB Output is correct
61 Correct 466 ms 34192 KB Output is correct
62 Correct 659 ms 42012 KB Output is correct
63 Correct 828 ms 50628 KB Output is correct
64 Correct 0 ms 204 KB Output is correct
65 Correct 1 ms 264 KB Output is correct
66 Correct 0 ms 204 KB Output is correct
67 Correct 775 ms 56200 KB Output is correct
68 Correct 808 ms 56700 KB Output is correct
69 Correct 784 ms 56128 KB Output is correct
70 Correct 14 ms 1220 KB Output is correct
71 Correct 27 ms 2180 KB Output is correct
72 Correct 434 ms 27672 KB Output is correct
73 Correct 619 ms 41464 KB Output is correct
74 Correct 997 ms 55176 KB Output is correct
75 Correct 846 ms 53492 KB Output is correct
76 Correct 920 ms 56764 KB Output is correct
77 Correct 10 ms 1476 KB Output is correct
78 Correct 19 ms 2464 KB Output is correct
79 Correct 360 ms 27060 KB Output is correct
80 Correct 630 ms 40516 KB Output is correct
81 Correct 865 ms 53900 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 328 ms 28196 KB Output is correct
10 Correct 21 ms 3276 KB Output is correct
11 Correct 114 ms 15332 KB Output is correct
12 Correct 42 ms 4676 KB Output is correct
13 Correct 79 ms 11364 KB Output is correct
14 Correct 3 ms 460 KB Output is correct
15 Correct 4 ms 680 KB Output is correct
16 Correct 338 ms 28224 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 292 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Correct 817 ms 57452 KB Output is correct
21 Correct 846 ms 56936 KB Output is correct
22 Correct 808 ms 56988 KB Output is correct
23 Correct 657 ms 48296 KB Output is correct
24 Correct 812 ms 65396 KB Output is correct
25 Correct 829 ms 49820 KB Output is correct
26 Correct 686 ms 49824 KB Output is correct
27 Correct 756 ms 55984 KB Output is correct
28 Correct 764 ms 55964 KB Output is correct
29 Correct 847 ms 56092 KB Output is correct
30 Correct 850 ms 55952 KB Output is correct
31 Correct 1 ms 204 KB Output is correct
32 Correct 32 ms 4516 KB Output is correct
33 Correct 321 ms 28656 KB Output is correct
34 Correct 754 ms 57556 KB Output is correct
35 Correct 21 ms 2712 KB Output is correct
36 Correct 164 ms 12184 KB Output is correct
37 Correct 315 ms 24040 KB Output is correct
38 Correct 299 ms 22216 KB Output is correct
39 Correct 391 ms 30008 KB Output is correct
40 Correct 519 ms 38104 KB Output is correct
41 Correct 692 ms 46328 KB Output is correct
42 Correct 841 ms 54512 KB Output is correct
43 Correct 1 ms 288 KB Output is correct
44 Correct 1 ms 288 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 288 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 0 ms 204 KB Output is correct
50 Correct 0 ms 272 KB Output is correct
51 Correct 0 ms 204 KB Output is correct
52 Correct 0 ms 204 KB Output is correct
53 Correct 1 ms 288 KB Output is correct
54 Correct 4 ms 684 KB Output is correct
55 Correct 5 ms 976 KB Output is correct
56 Correct 340 ms 28172 KB Output is correct
57 Correct 544 ms 40772 KB Output is correct
58 Correct 558 ms 40892 KB Output is correct
59 Correct 0 ms 204 KB Output is correct
60 Correct 0 ms 284 KB Output is correct
61 Correct 0 ms 204 KB Output is correct
62 Correct 722 ms 56064 KB Output is correct
63 Correct 753 ms 56796 KB Output is correct
64 Correct 726 ms 56152 KB Output is correct
65 Correct 7 ms 1188 KB Output is correct
66 Correct 14 ms 2224 KB Output is correct
67 Correct 336 ms 27784 KB Output is correct
68 Correct 582 ms 41396 KB Output is correct
69 Correct 785 ms 55064 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 328 ms 28196 KB Output is correct
10 Correct 21 ms 3276 KB Output is correct
11 Correct 114 ms 15332 KB Output is correct
12 Correct 42 ms 4676 KB Output is correct
13 Correct 79 ms 11364 KB Output is correct
14 Correct 3 ms 460 KB Output is correct
15 Correct 4 ms 680 KB Output is correct
16 Correct 338 ms 28224 KB Output is correct
17 Correct 732 ms 56996 KB Output is correct
18 Correct 734 ms 56824 KB Output is correct
19 Correct 746 ms 56996 KB Output is correct
20 Correct 740 ms 48812 KB Output is correct
21 Correct 684 ms 47568 KB Output is correct
22 Correct 0 ms 272 KB Output is correct
23 Correct 84 ms 9420 KB Output is correct
24 Correct 39 ms 5060 KB Output is correct
25 Correct 189 ms 16552 KB Output is correct
26 Correct 373 ms 27848 KB Output is correct
27 Correct 327 ms 26344 KB Output is correct
28 Correct 454 ms 33192 KB Output is correct
29 Correct 544 ms 39856 KB Output is correct
30 Correct 647 ms 45684 KB Output is correct
31 Correct 799 ms 52540 KB Output is correct
32 Correct 759 ms 53392 KB Output is correct
33 Correct 729 ms 56664 KB Output is correct
34 Correct 9 ms 1500 KB Output is correct
35 Correct 17 ms 2516 KB Output is correct
36 Correct 331 ms 27008 KB Output is correct
37 Correct 545 ms 40444 KB Output is correct
38 Correct 790 ms 53876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 328 ms 28196 KB Output is correct
10 Correct 21 ms 3276 KB Output is correct
11 Correct 114 ms 15332 KB Output is correct
12 Correct 42 ms 4676 KB Output is correct
13 Correct 79 ms 11364 KB Output is correct
14 Correct 3 ms 460 KB Output is correct
15 Correct 4 ms 680 KB Output is correct
16 Correct 338 ms 28224 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 0 ms 288 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 0 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 810 ms 52604 KB Output is correct
24 Correct 0 ms 204 KB Output is correct
25 Correct 4 ms 548 KB Output is correct
26 Correct 5 ms 972 KB Output is correct
27 Correct 8 ms 1100 KB Output is correct
28 Correct 268 ms 21284 KB Output is correct
29 Correct 413 ms 31852 KB Output is correct
30 Correct 603 ms 42264 KB Output is correct
31 Correct 847 ms 52672 KB Output is correct
32 Correct 0 ms 204 KB Output is correct
33 Correct 0 ms 204 KB Output is correct
34 Correct 0 ms 204 KB Output is correct
35 Correct 2 ms 288 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 204 KB Output is correct
38 Correct 0 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 3 ms 204 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 2 ms 204 KB Output is correct
43 Correct 4 ms 716 KB Output is correct
44 Correct 6 ms 1060 KB Output is correct
45 Correct 402 ms 28292 KB Output is correct
46 Correct 678 ms 40784 KB Output is correct
47 Correct 583 ms 40720 KB Output is correct
48 Correct 0 ms 244 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 284 KB Output is correct
51 Correct 1 ms 288 KB Output is correct
52 Correct 0 ms 288 KB Output is correct
53 Correct 1 ms 204 KB Output is correct
54 Correct 0 ms 204 KB Output is correct
55 Correct 784 ms 50552 KB Output is correct
56 Correct 2 ms 204 KB Output is correct
57 Correct 4 ms 716 KB Output is correct
58 Correct 11 ms 1912 KB Output is correct
59 Correct 44 ms 2596 KB Output is correct
60 Correct 363 ms 25504 KB Output is correct
61 Correct 466 ms 34192 KB Output is correct
62 Correct 659 ms 42012 KB Output is correct
63 Correct 828 ms 50628 KB Output is correct
64 Correct 0 ms 204 KB Output is correct
65 Correct 1 ms 264 KB Output is correct
66 Correct 0 ms 204 KB Output is correct
67 Correct 775 ms 56200 KB Output is correct
68 Correct 808 ms 56700 KB Output is correct
69 Correct 784 ms 56128 KB Output is correct
70 Correct 14 ms 1220 KB Output is correct
71 Correct 27 ms 2180 KB Output is correct
72 Correct 434 ms 27672 KB Output is correct
73 Correct 619 ms 41464 KB Output is correct
74 Correct 997 ms 55176 KB Output is correct
75 Correct 846 ms 53492 KB Output is correct
76 Correct 920 ms 56764 KB Output is correct
77 Correct 10 ms 1476 KB Output is correct
78 Correct 19 ms 2464 KB Output is correct
79 Correct 360 ms 27060 KB Output is correct
80 Correct 630 ms 40516 KB Output is correct
81 Correct 865 ms 53900 KB Output is correct
82 Correct 1 ms 204 KB Output is correct
83 Correct 1 ms 292 KB Output is correct
84 Correct 0 ms 204 KB Output is correct
85 Correct 817 ms 57452 KB Output is correct
86 Correct 846 ms 56936 KB Output is correct
87 Correct 808 ms 56988 KB Output is correct
88 Correct 657 ms 48296 KB Output is correct
89 Correct 812 ms 65396 KB Output is correct
90 Correct 829 ms 49820 KB Output is correct
91 Correct 686 ms 49824 KB Output is correct
92 Correct 756 ms 55984 KB Output is correct
93 Correct 764 ms 55964 KB Output is correct
94 Correct 847 ms 56092 KB Output is correct
95 Correct 850 ms 55952 KB Output is correct
96 Correct 1 ms 204 KB Output is correct
97 Correct 32 ms 4516 KB Output is correct
98 Correct 321 ms 28656 KB Output is correct
99 Correct 754 ms 57556 KB Output is correct
100 Correct 21 ms 2712 KB Output is correct
101 Correct 164 ms 12184 KB Output is correct
102 Correct 315 ms 24040 KB Output is correct
103 Correct 299 ms 22216 KB Output is correct
104 Correct 391 ms 30008 KB Output is correct
105 Correct 519 ms 38104 KB Output is correct
106 Correct 692 ms 46328 KB Output is correct
107 Correct 841 ms 54512 KB Output is correct
108 Correct 1 ms 288 KB Output is correct
109 Correct 1 ms 288 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 288 KB Output is correct
113 Correct 0 ms 204 KB Output is correct
114 Correct 0 ms 204 KB Output is correct
115 Correct 0 ms 272 KB Output is correct
116 Correct 0 ms 204 KB Output is correct
117 Correct 0 ms 204 KB Output is correct
118 Correct 1 ms 288 KB Output is correct
119 Correct 4 ms 684 KB Output is correct
120 Correct 5 ms 976 KB Output is correct
121 Correct 340 ms 28172 KB Output is correct
122 Correct 544 ms 40772 KB Output is correct
123 Correct 558 ms 40892 KB Output is correct
124 Correct 0 ms 204 KB Output is correct
125 Correct 0 ms 284 KB Output is correct
126 Correct 0 ms 204 KB Output is correct
127 Correct 722 ms 56064 KB Output is correct
128 Correct 753 ms 56796 KB Output is correct
129 Correct 726 ms 56152 KB Output is correct
130 Correct 7 ms 1188 KB Output is correct
131 Correct 14 ms 2224 KB Output is correct
132 Correct 336 ms 27784 KB Output is correct
133 Correct 582 ms 41396 KB Output is correct
134 Correct 785 ms 55064 KB Output is correct
135 Correct 732 ms 56996 KB Output is correct
136 Correct 734 ms 56824 KB Output is correct
137 Correct 746 ms 56996 KB Output is correct
138 Correct 740 ms 48812 KB Output is correct
139 Correct 684 ms 47568 KB Output is correct
140 Correct 0 ms 272 KB Output is correct
141 Correct 84 ms 9420 KB Output is correct
142 Correct 39 ms 5060 KB Output is correct
143 Correct 189 ms 16552 KB Output is correct
144 Correct 373 ms 27848 KB Output is correct
145 Correct 327 ms 26344 KB Output is correct
146 Correct 454 ms 33192 KB Output is correct
147 Correct 544 ms 39856 KB Output is correct
148 Correct 647 ms 45684 KB Output is correct
149 Correct 799 ms 52540 KB Output is correct
150 Correct 759 ms 53392 KB Output is correct
151 Correct 729 ms 56664 KB Output is correct
152 Correct 9 ms 1500 KB Output is correct
153 Correct 17 ms 2516 KB Output is correct
154 Correct 331 ms 27008 KB Output is correct
155 Correct 545 ms 40444 KB Output is correct
156 Correct 790 ms 53876 KB Output is correct
157 Correct 0 ms 204 KB Output is correct
158 Correct 1 ms 204 KB Output is correct
159 Correct 0 ms 204 KB Output is correct
160 Correct 0 ms 204 KB Output is correct
161 Correct 715 ms 46956 KB Output is correct
162 Correct 735 ms 57460 KB Output is correct
163 Correct 710 ms 54064 KB Output is correct
164 Correct 707 ms 54104 KB Output is correct
165 Correct 679 ms 49592 KB Output is correct
166 Correct 683 ms 47624 KB Output is correct
167 Correct 116 ms 11880 KB Output is correct
168 Correct 57 ms 6752 KB Output is correct
169 Correct 202 ms 17052 KB Output is correct
170 Correct 460 ms 31784 KB Output is correct
171 Correct 660 ms 41884 KB Output is correct
172 Correct 322 ms 24152 KB Output is correct
173 Correct 374 ms 29076 KB Output is correct
174 Correct 527 ms 33724 KB Output is correct
175 Correct 536 ms 38304 KB Output is correct
176 Correct 621 ms 43420 KB Output is correct
177 Correct 718 ms 48156 KB Output is correct