답안 #1057909

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1057909 2024-08-14T07:16:53 Z erray 분수 공원 (IOI21_parks) C++17
100 / 100
397 ms 37708 KB
#include "parks.h"
#include <bits/stdc++.h>

using namespace std;

#ifdef DEBUG 
  #include "/home/hp/contests/debug.h"
#else 
  #define debug(...) void(37)
#endif

struct DSU {
  vector<int> link;
  DSU(int n) {
    link.resize(n);
    iota(link.begin(), link.end(), 0);
  }
  int get(int v) {
    return link[v] = (link[v] == v ? v : get(link[v]));
  }
  bool unite(int x, int y) {
    x = get(x), y = get(y);
    if (x == y) return false;
    link[y] = x;
    return true;
  }
};

int construct_roads(std::vector<int> X, std::vector<int> Y) {
  debug(X, Y);
  int N = int(X.size()); 
  map<array<int, 2>, int> id;
  for (int i = 0; i < N; ++i) {
    id[{X[i], Y[i]}] = i;
  }
  auto Get = [&](int x, int y) {
    if (id.count({x, y}) == 0) return -1;
    return id[{x, y}];
  };
  vector<array<int, 2>> positions;
  constexpr int dx[] = {-1, -1, +1, +1}, dy[] = {-1, +1, +1, -1};
  for (int i = 0; i < N; ++i) {
    for (int d = 0; d < 4; ++d) {
      positions.push_back({X[i] + dx[d], Y[i] + dy[d]});
    }
  }
  DSU comp(N);
  sort(positions.begin(), positions.end());
  positions.erase(unique(positions.begin(), positions.end()), positions.end());
  vector<int> U, V, A, B;
  for (auto[x, y] : positions) {
    int parity = (x + y) / 2 % 2;
    vector<int> take;
    if (parity) {
      take = {0, 2};
    } else {
      take = {1, 3};
    }
    debug(x, y, take);
    for (auto t : take) {
      int f = Get(x + dx[t], y + dy[t]);
      int s = Get(x + dx[(t + 1) % 4], y + dy[(t + 1) % 4]);
      debug(s, f);
      if (min(f, s) > -1 && comp.unite(f, s)) {
        U.push_back(f);
        V.push_back(s);
        A.push_back(x);
        B.push_back(y);
        break;
      }
    }
  }
  bool good = true;
  for (int i = 0; i < N; ++i) {
    good &= comp.get(i) == comp.get(0);
  }
  if (good) {
    build(U, V, A, B);
    return 1;
  } else {
    return 0;
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 436 KB Output is correct
9 Correct 141 ms 17580 KB Output is correct
10 Correct 11 ms 2012 KB Output is correct
11 Correct 78 ms 9540 KB Output is correct
12 Correct 17 ms 2772 KB Output is correct
13 Correct 57 ms 6864 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 180 ms 17480 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 436 KB Output is correct
9 Correct 141 ms 17580 KB Output is correct
10 Correct 11 ms 2012 KB Output is correct
11 Correct 78 ms 9540 KB Output is correct
12 Correct 17 ms 2772 KB Output is correct
13 Correct 57 ms 6864 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 180 ms 17480 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 360 ms 34952 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 4 ms 1008 KB Output is correct
28 Correct 105 ms 14520 KB Output is correct
29 Correct 171 ms 21032 KB Output is correct
30 Correct 274 ms 30520 KB Output is correct
31 Correct 329 ms 35236 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 344 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 604 KB Output is correct
44 Correct 4 ms 856 KB Output is correct
45 Correct 177 ms 17960 KB Output is correct
46 Correct 231 ms 26704 KB Output is correct
47 Correct 232 ms 27580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 436 KB Output is correct
9 Correct 141 ms 17580 KB Output is correct
10 Correct 11 ms 2012 KB Output is correct
11 Correct 78 ms 9540 KB Output is correct
12 Correct 17 ms 2772 KB Output is correct
13 Correct 57 ms 6864 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 180 ms 17480 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 360 ms 34952 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 4 ms 1008 KB Output is correct
28 Correct 105 ms 14520 KB Output is correct
29 Correct 171 ms 21032 KB Output is correct
30 Correct 274 ms 30520 KB Output is correct
31 Correct 329 ms 35236 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 344 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 604 KB Output is correct
44 Correct 4 ms 856 KB Output is correct
45 Correct 177 ms 17960 KB Output is correct
46 Correct 231 ms 26704 KB Output is correct
47 Correct 232 ms 27580 KB Output is correct
48 Correct 0 ms 344 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 287 ms 36144 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 2 ms 604 KB Output is correct
58 Correct 6 ms 1344 KB Output is correct
59 Correct 9 ms 1748 KB Output is correct
60 Correct 129 ms 17684 KB Output is correct
61 Correct 179 ms 26128 KB Output is correct
62 Correct 245 ms 30132 KB Output is correct
63 Correct 294 ms 36280 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 319 ms 36496 KB Output is correct
68 Correct 350 ms 36012 KB Output is correct
69 Correct 322 ms 36536 KB Output is correct
70 Correct 4 ms 860 KB Output is correct
71 Correct 8 ms 1504 KB Output is correct
72 Correct 158 ms 17848 KB Output is correct
73 Correct 300 ms 27412 KB Output is correct
74 Correct 336 ms 35516 KB Output is correct
75 Correct 327 ms 36092 KB Output is correct
76 Correct 354 ms 34996 KB Output is correct
77 Correct 5 ms 1116 KB Output is correct
78 Correct 9 ms 1752 KB Output is correct
79 Correct 151 ms 17416 KB Output is correct
80 Correct 293 ms 28656 KB Output is correct
81 Correct 366 ms 35024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 436 KB Output is correct
9 Correct 141 ms 17580 KB Output is correct
10 Correct 11 ms 2012 KB Output is correct
11 Correct 78 ms 9540 KB Output is correct
12 Correct 17 ms 2772 KB Output is correct
13 Correct 57 ms 6864 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 180 ms 17480 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 344 KB Output is correct
20 Correct 368 ms 37708 KB Output is correct
21 Correct 343 ms 37360 KB Output is correct
22 Correct 397 ms 36644 KB Output is correct
23 Correct 280 ms 32700 KB Output is correct
24 Correct 340 ms 27444 KB Output is correct
25 Correct 296 ms 31436 KB Output is correct
26 Correct 297 ms 31548 KB Output is correct
27 Correct 314 ms 35168 KB Output is correct
28 Correct 327 ms 34840 KB Output is correct
29 Correct 365 ms 35660 KB Output is correct
30 Correct 332 ms 34972 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 19 ms 2776 KB Output is correct
33 Correct 155 ms 14188 KB Output is correct
34 Correct 323 ms 37560 KB Output is correct
35 Correct 11 ms 2008 KB Output is correct
36 Correct 58 ms 7892 KB Output is correct
37 Correct 137 ms 15544 KB Output is correct
38 Correct 130 ms 15552 KB Output is correct
39 Correct 189 ms 19644 KB Output is correct
40 Correct 228 ms 26912 KB Output is correct
41 Correct 287 ms 31664 KB Output is correct
42 Correct 362 ms 36116 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 344 KB Output is correct
51 Correct 0 ms 344 KB Output is correct
52 Correct 0 ms 604 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 2 ms 604 KB Output is correct
55 Correct 3 ms 860 KB Output is correct
56 Correct 180 ms 18020 KB Output is correct
57 Correct 231 ms 26436 KB Output is correct
58 Correct 245 ms 26896 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 318 ms 35220 KB Output is correct
63 Correct 345 ms 36012 KB Output is correct
64 Correct 326 ms 36276 KB Output is correct
65 Correct 4 ms 860 KB Output is correct
66 Correct 8 ms 1504 KB Output is correct
67 Correct 153 ms 17420 KB Output is correct
68 Correct 223 ms 28592 KB Output is correct
69 Correct 319 ms 36040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 436 KB Output is correct
9 Correct 141 ms 17580 KB Output is correct
10 Correct 11 ms 2012 KB Output is correct
11 Correct 78 ms 9540 KB Output is correct
12 Correct 17 ms 2772 KB Output is correct
13 Correct 57 ms 6864 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 180 ms 17480 KB Output is correct
17 Correct 330 ms 35548 KB Output is correct
18 Correct 299 ms 37304 KB Output is correct
19 Correct 305 ms 36532 KB Output is correct
20 Correct 289 ms 35004 KB Output is correct
21 Correct 265 ms 32540 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 40 ms 5824 KB Output is correct
24 Correct 22 ms 3540 KB Output is correct
25 Correct 84 ms 11452 KB Output is correct
26 Correct 155 ms 18372 KB Output is correct
27 Correct 135 ms 18104 KB Output is correct
28 Correct 181 ms 22100 KB Output is correct
29 Correct 218 ms 28596 KB Output is correct
30 Correct 262 ms 31672 KB Output is correct
31 Correct 302 ms 36536 KB Output is correct
32 Correct 291 ms 36296 KB Output is correct
33 Correct 320 ms 36020 KB Output is correct
34 Correct 5 ms 1116 KB Output is correct
35 Correct 9 ms 1724 KB Output is correct
36 Correct 142 ms 17416 KB Output is correct
37 Correct 226 ms 28572 KB Output is correct
38 Correct 329 ms 35500 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 436 KB Output is correct
9 Correct 141 ms 17580 KB Output is correct
10 Correct 11 ms 2012 KB Output is correct
11 Correct 78 ms 9540 KB Output is correct
12 Correct 17 ms 2772 KB Output is correct
13 Correct 57 ms 6864 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 180 ms 17480 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 360 ms 34952 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 4 ms 1008 KB Output is correct
28 Correct 105 ms 14520 KB Output is correct
29 Correct 171 ms 21032 KB Output is correct
30 Correct 274 ms 30520 KB Output is correct
31 Correct 329 ms 35236 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 344 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 604 KB Output is correct
44 Correct 4 ms 856 KB Output is correct
45 Correct 177 ms 17960 KB Output is correct
46 Correct 231 ms 26704 KB Output is correct
47 Correct 232 ms 27580 KB Output is correct
48 Correct 0 ms 344 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 287 ms 36144 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 2 ms 604 KB Output is correct
58 Correct 6 ms 1344 KB Output is correct
59 Correct 9 ms 1748 KB Output is correct
60 Correct 129 ms 17684 KB Output is correct
61 Correct 179 ms 26128 KB Output is correct
62 Correct 245 ms 30132 KB Output is correct
63 Correct 294 ms 36280 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 319 ms 36496 KB Output is correct
68 Correct 350 ms 36012 KB Output is correct
69 Correct 322 ms 36536 KB Output is correct
70 Correct 4 ms 860 KB Output is correct
71 Correct 8 ms 1504 KB Output is correct
72 Correct 158 ms 17848 KB Output is correct
73 Correct 300 ms 27412 KB Output is correct
74 Correct 336 ms 35516 KB Output is correct
75 Correct 327 ms 36092 KB Output is correct
76 Correct 354 ms 34996 KB Output is correct
77 Correct 5 ms 1116 KB Output is correct
78 Correct 9 ms 1752 KB Output is correct
79 Correct 151 ms 17416 KB Output is correct
80 Correct 293 ms 28656 KB Output is correct
81 Correct 366 ms 35024 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 344 KB Output is correct
85 Correct 368 ms 37708 KB Output is correct
86 Correct 343 ms 37360 KB Output is correct
87 Correct 397 ms 36644 KB Output is correct
88 Correct 280 ms 32700 KB Output is correct
89 Correct 340 ms 27444 KB Output is correct
90 Correct 296 ms 31436 KB Output is correct
91 Correct 297 ms 31548 KB Output is correct
92 Correct 314 ms 35168 KB Output is correct
93 Correct 327 ms 34840 KB Output is correct
94 Correct 365 ms 35660 KB Output is correct
95 Correct 332 ms 34972 KB Output is correct
96 Correct 0 ms 344 KB Output is correct
97 Correct 19 ms 2776 KB Output is correct
98 Correct 155 ms 14188 KB Output is correct
99 Correct 323 ms 37560 KB Output is correct
100 Correct 11 ms 2008 KB Output is correct
101 Correct 58 ms 7892 KB Output is correct
102 Correct 137 ms 15544 KB Output is correct
103 Correct 130 ms 15552 KB Output is correct
104 Correct 189 ms 19644 KB Output is correct
105 Correct 228 ms 26912 KB Output is correct
106 Correct 287 ms 31664 KB Output is correct
107 Correct 362 ms 36116 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 0 ms 348 KB Output is correct
111 Correct 1 ms 348 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 0 ms 348 KB Output is correct
114 Correct 0 ms 348 KB Output is correct
115 Correct 0 ms 344 KB Output is correct
116 Correct 0 ms 344 KB Output is correct
117 Correct 0 ms 604 KB Output is correct
118 Correct 0 ms 348 KB Output is correct
119 Correct 2 ms 604 KB Output is correct
120 Correct 3 ms 860 KB Output is correct
121 Correct 180 ms 18020 KB Output is correct
122 Correct 231 ms 26436 KB Output is correct
123 Correct 245 ms 26896 KB Output is correct
124 Correct 0 ms 348 KB Output is correct
125 Correct 0 ms 348 KB Output is correct
126 Correct 0 ms 348 KB Output is correct
127 Correct 318 ms 35220 KB Output is correct
128 Correct 345 ms 36012 KB Output is correct
129 Correct 326 ms 36276 KB Output is correct
130 Correct 4 ms 860 KB Output is correct
131 Correct 8 ms 1504 KB Output is correct
132 Correct 153 ms 17420 KB Output is correct
133 Correct 223 ms 28592 KB Output is correct
134 Correct 319 ms 36040 KB Output is correct
135 Correct 330 ms 35548 KB Output is correct
136 Correct 299 ms 37304 KB Output is correct
137 Correct 305 ms 36532 KB Output is correct
138 Correct 289 ms 35004 KB Output is correct
139 Correct 265 ms 32540 KB Output is correct
140 Correct 0 ms 348 KB Output is correct
141 Correct 40 ms 5824 KB Output is correct
142 Correct 22 ms 3540 KB Output is correct
143 Correct 84 ms 11452 KB Output is correct
144 Correct 155 ms 18372 KB Output is correct
145 Correct 135 ms 18104 KB Output is correct
146 Correct 181 ms 22100 KB Output is correct
147 Correct 218 ms 28596 KB Output is correct
148 Correct 262 ms 31672 KB Output is correct
149 Correct 302 ms 36536 KB Output is correct
150 Correct 291 ms 36296 KB Output is correct
151 Correct 320 ms 36020 KB Output is correct
152 Correct 5 ms 1116 KB Output is correct
153 Correct 9 ms 1724 KB Output is correct
154 Correct 142 ms 17416 KB Output is correct
155 Correct 226 ms 28572 KB Output is correct
156 Correct 329 ms 35500 KB Output is correct
157 Correct 1 ms 344 KB Output is correct
158 Correct 0 ms 348 KB Output is correct
159 Correct 0 ms 348 KB Output is correct
160 Correct 0 ms 348 KB Output is correct
161 Correct 247 ms 36816 KB Output is correct
162 Correct 328 ms 37072 KB Output is correct
163 Correct 282 ms 36508 KB Output is correct
164 Correct 283 ms 36540 KB Output is correct
165 Correct 256 ms 36028 KB Output is correct
166 Correct 245 ms 37088 KB Output is correct
167 Correct 54 ms 8608 KB Output is correct
168 Correct 28 ms 4824 KB Output is correct
169 Correct 83 ms 13972 KB Output is correct
170 Correct 165 ms 25780 KB Output is correct
171 Correct 229 ms 31420 KB Output is correct
172 Correct 123 ms 18896 KB Output is correct
173 Correct 152 ms 21184 KB Output is correct
174 Correct 191 ms 27664 KB Output is correct
175 Correct 202 ms 30652 KB Output is correct
176 Correct 244 ms 33540 KB Output is correct
177 Correct 276 ms 36780 KB Output is correct