Submission #1040678

# Submission time Handle Problem Language Result Execution time Memory
1040678 2024-08-01T08:25:20 Z 우민규(#10996) The Ties That Guide Us (CEOI23_incursion) C++17
100 / 100
242 ms 17100 KB
#include <vector>
#include "incursion.h"
#include <cstdio>
#include <bits/stdc++.h>
using namespace std;

std::vector<int> mark(std::vector<std::pair<int, int>> f, int safe) {
  int n = f.size() + 1;
  safe -= 1;
  vector<int> sz(n), maxsz(n);
  vector<vector<int>> adj(n);
  vector<int> par(n, -1), to_safe(n, -2);
  for (auto [u, v] : f) {
    adj[u - 1].push_back(v - 1);
    adj[v - 1].push_back(u - 1);
  }
  function<void(int, int)> dfs_sz = [&](int node, int par) {
    sz[node] = 1;
    maxsz[node] = 0;
    for (auto v : adj[node]) {
      if (v == par) continue;
      dfs_sz(v, node);
      maxsz[node] = max(maxsz[node], sz[v]);
      sz[node] += sz[v];
    }
    maxsz[node] = max(maxsz[node], n - sz[node]);
  };
  dfs_sz(0, -1);
  // check centroid count
  int cent_req = *min_element(maxsz.begin(), maxsz.end());
  vector<int> centroids;
  for (int i = 0; i < n; ++i) {
    if (maxsz[i] == cent_req) {
      centroids.push_back(i);
    }
  }
  assert(0 < centroids.size() && centroids.size() <= 2);

  
  function<void(int, vector<int>&)> dfs_par = [&](int node, vector<int>& par) {
    for (auto v : adj[node]) {
      if (v == par[node]) continue;
      par[v] = node;
      dfs_par(v, par);
    }
  };

  dfs_par(centroids[0], par);
  dfs_par(safe, to_safe);
  if (centroids.size() == 2) {
    par[centroids[0]] = centroids[1];
  }
  vector<int> ret;
  // true -> go to parent
  // false -> go to other child
  for (int i = 0; i < n; ++i) {
    if (to_safe[i] == par[i]) {
      ret.push_back(true);
    } else {
      ret.push_back(false);
    }
  }

  return ret;
}

void locate(std::vector<std::pair<int, int>> F, int node, int t) {
  node -= 1;
  int n = F.size() + 1;
  vector<vector<int>> adj(n);
  vector<int> sz(n), maxsz(n);
  vector<int> par(n, -1);
  vector<bool> visited(n, false);
  visited[node] = true;
  for (auto [u, v] : F) {
    adj[u - 1].push_back(v - 1);
    adj[v - 1].push_back(u - 1);
  }

  function<void(int, int)> dfs_sz = [&](int node, int par) {
    sz[node] = 1;
    maxsz[node] = 0;
    for (auto v : adj[node]) {
      if (v == par) continue;
      dfs_sz(v, node);
      maxsz[node] = max(maxsz[node], sz[v]);
      sz[node] += sz[v];
    }
    maxsz[node] = max(maxsz[node], n - sz[node]);
  };
  dfs_sz(0, -1);
  // check centroid count
  int cent_req = *min_element(maxsz.begin(), maxsz.end());
  vector<int> centroids;
  for (int i = 0; i < n; ++i) {
    if (maxsz[i] == cent_req) {
      centroids.push_back(i);
    }
  }
  assert(0 < centroids.size() && centroids.size() <= 2);

  function<void(int, vector<int>&)> dfs_par = [&](int node, vector<int>& par) {
    sort(adj[node].begin(), adj[node].end(), [&](int u, int v) { return sz[u] > sz[v]; });
    for (auto v : adj[node]) {
      if (v == par[node]) continue;
      par[v] = node;
      dfs_par(v, par);
    }
  };
  dfs_par(centroids[0], par);

  if (centroids.size() == 2) {
    par[centroids[0]] = centroids[1];
  }

  auto go = [&](int node) {
    visited[node] = true;
    return visit(node + 1);
  };


  while (true) {
    if (t) {
      if (visited[par[node]]) {
        go(par[node]);
        break;
      }
      t = go(par[node]);
      node = par[node];
      continue;
    }
    
    // try all ways
    bool moved = false;
    for (auto v : adj[node]) {
      if (v == par[node]) continue;
      if (visited[v]) continue;
      int ct = go(v);
      if (ct) {
        go(node);
      } else {
        t = ct;
        node = v;
        moved = true;
        break;
      }
    }
    if (!moved) break;
  }
}

#ifndef EVAL
#include "sample_grader.cpp"
#endif

Compilation message

interface.cpp: In function 'int main()':
interface.cpp:44:55: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   44 |     if(fread(T.data(), sizeof(int), 2 * N - 2, stdin) != 2 * N - 2) exit(0);
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
interface.cpp:50:33: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   50 |         int l = (numbers.size() == N ? N : 0);
      |                  ~~~~~~~~~~~~~~~^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 768 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 179 ms 15300 KB Correct
2 Correct 180 ms 16296 KB Correct
3 Correct 105 ms 16452 KB Correct
4 Correct 97 ms 16264 KB Correct
5 Correct 174 ms 16296 KB Correct
6 Correct 74 ms 16224 KB Correct
7 Correct 74 ms 14236 KB Correct
8 Correct 200 ms 15720 KB Correct
9 Correct 168 ms 16948 KB Correct
10 Correct 119 ms 15152 KB Correct
11 Correct 98 ms 16216 KB Correct
12 Correct 209 ms 15196 KB Correct
13 Correct 84 ms 13980 KB Correct
14 Correct 77 ms 14424 KB Correct
15 Correct 188 ms 16036 KB Correct
16 Correct 179 ms 16804 KB Correct
17 Correct 109 ms 14624 KB Correct
18 Correct 91 ms 14416 KB Correct
19 Correct 159 ms 13660 KB Correct
20 Correct 84 ms 15788 KB Correct
21 Correct 81 ms 14436 KB Correct
22 Correct 190 ms 15988 KB Correct
23 Correct 189 ms 16320 KB Correct
24 Correct 83 ms 14364 KB Correct
25 Correct 78 ms 15284 KB Correct
26 Correct 75 ms 14236 KB Correct
27 Correct 72 ms 14244 KB Correct
28 Correct 77 ms 15228 KB Correct
29 Correct 181 ms 17100 KB Correct
30 Correct 189 ms 15380 KB Correct
31 Correct 80 ms 16220 KB Correct
32 Correct 233 ms 15260 KB Correct
33 Correct 218 ms 15520 KB Correct
34 Correct 78 ms 14040 KB Correct
35 Correct 77 ms 13340 KB Correct
36 Correct 187 ms 16296 KB Correct
37 Correct 181 ms 16880 KB Correct
38 Correct 227 ms 15784 KB Correct
39 Correct 122 ms 16372 KB Correct
40 Correct 159 ms 15500 KB Correct
41 Correct 76 ms 15316 KB Correct
42 Correct 78 ms 14960 KB Correct
43 Correct 187 ms 16328 KB Correct
44 Correct 183 ms 15372 KB Correct
45 Correct 82 ms 14680 KB Correct
46 Correct 81 ms 15456 KB Correct
47 Correct 89 ms 15856 KB Correct
48 Correct 80 ms 13588 KB Correct
49 Correct 74 ms 15644 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 69 ms 8800 KB Correct
2 Correct 75 ms 8792 KB Correct
3 Correct 72 ms 8736 KB Correct
4 Correct 76 ms 12700 KB Correct
5 Correct 115 ms 11904 KB Correct
6 Correct 141 ms 12116 KB Correct
7 Correct 69 ms 8536 KB Correct
8 Correct 77 ms 8268 KB Correct
9 Correct 69 ms 8532 KB Correct
10 Correct 66 ms 8328 KB Correct
11 Correct 68 ms 8888 KB Correct
12 Correct 71 ms 8512 KB Correct
13 Correct 71 ms 8468 KB Correct
14 Correct 53 ms 6408 KB Correct
15 Correct 51 ms 6388 KB Correct
16 Correct 65 ms 8356 KB Correct
17 Correct 72 ms 8356 KB Correct
18 Correct 65 ms 8356 KB Correct
19 Correct 75 ms 8576 KB Correct
20 Correct 52 ms 6408 KB Correct
21 Correct 46 ms 6412 KB Correct
22 Correct 49 ms 6376 KB Correct
23 Correct 53 ms 6500 KB Correct
24 Correct 53 ms 6640 KB Correct
25 Correct 51 ms 6408 KB Correct
26 Correct 70 ms 8720 KB Correct
27 Correct 73 ms 8848 KB Correct
28 Correct 74 ms 8624 KB Correct
29 Correct 68 ms 8484 KB Correct
30 Correct 70 ms 8736 KB Correct
31 Correct 74 ms 8792 KB Correct
32 Correct 66 ms 8832 KB Correct
33 Correct 64 ms 8784 KB Correct
34 Correct 75 ms 8740 KB Correct
35 Correct 76 ms 8776 KB Correct
36 Correct 68 ms 8860 KB Correct
37 Correct 76 ms 8728 KB Correct
38 Correct 67 ms 8868 KB Correct
39 Correct 73 ms 8800 KB Correct
40 Correct 69 ms 9004 KB Correct
41 Correct 78 ms 8604 KB Correct
42 Correct 66 ms 8740 KB Correct
43 Correct 79 ms 8872 KB Correct
44 Correct 74 ms 8776 KB Correct
45 Correct 73 ms 8476 KB Correct
46 Correct 74 ms 8720 KB Correct
47 Correct 75 ms 8720 KB Correct
48 Correct 81 ms 8792 KB Correct
49 Correct 71 ms 8476 KB Correct
50 Correct 69 ms 8536 KB Correct
51 Correct 74 ms 8684 KB Correct
52 Correct 70 ms 8760 KB Correct
53 Correct 71 ms 8488 KB Correct
54 Correct 75 ms 8784 KB Correct
55 Correct 83 ms 8484 KB Correct
56 Correct 81 ms 8788 KB Correct
57 Correct 80 ms 8784 KB Correct
58 Correct 69 ms 9048 KB Correct
59 Correct 75 ms 8916 KB Correct
60 Correct 59 ms 8796 KB Correct
61 Correct 68 ms 8700 KB Correct
62 Correct 74 ms 9316 KB Correct
63 Correct 71 ms 8788 KB Correct
64 Correct 77 ms 8792 KB Correct
65 Correct 59 ms 8824 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 768 KB Correct
2 Correct 179 ms 15300 KB Correct
3 Correct 180 ms 16296 KB Correct
4 Correct 105 ms 16452 KB Correct
5 Correct 97 ms 16264 KB Correct
6 Correct 174 ms 16296 KB Correct
7 Correct 74 ms 16224 KB Correct
8 Correct 74 ms 14236 KB Correct
9 Correct 200 ms 15720 KB Correct
10 Correct 168 ms 16948 KB Correct
11 Correct 119 ms 15152 KB Correct
12 Correct 98 ms 16216 KB Correct
13 Correct 209 ms 15196 KB Correct
14 Correct 84 ms 13980 KB Correct
15 Correct 77 ms 14424 KB Correct
16 Correct 188 ms 16036 KB Correct
17 Correct 179 ms 16804 KB Correct
18 Correct 109 ms 14624 KB Correct
19 Correct 91 ms 14416 KB Correct
20 Correct 159 ms 13660 KB Correct
21 Correct 84 ms 15788 KB Correct
22 Correct 81 ms 14436 KB Correct
23 Correct 190 ms 15988 KB Correct
24 Correct 189 ms 16320 KB Correct
25 Correct 83 ms 14364 KB Correct
26 Correct 78 ms 15284 KB Correct
27 Correct 75 ms 14236 KB Correct
28 Correct 72 ms 14244 KB Correct
29 Correct 77 ms 15228 KB Correct
30 Correct 181 ms 17100 KB Correct
31 Correct 189 ms 15380 KB Correct
32 Correct 80 ms 16220 KB Correct
33 Correct 233 ms 15260 KB Correct
34 Correct 218 ms 15520 KB Correct
35 Correct 78 ms 14040 KB Correct
36 Correct 77 ms 13340 KB Correct
37 Correct 187 ms 16296 KB Correct
38 Correct 181 ms 16880 KB Correct
39 Correct 227 ms 15784 KB Correct
40 Correct 122 ms 16372 KB Correct
41 Correct 159 ms 15500 KB Correct
42 Correct 76 ms 15316 KB Correct
43 Correct 78 ms 14960 KB Correct
44 Correct 187 ms 16328 KB Correct
45 Correct 183 ms 15372 KB Correct
46 Correct 82 ms 14680 KB Correct
47 Correct 81 ms 15456 KB Correct
48 Correct 89 ms 15856 KB Correct
49 Correct 80 ms 13588 KB Correct
50 Correct 74 ms 15644 KB Correct
51 Correct 69 ms 8800 KB Correct
52 Correct 75 ms 8792 KB Correct
53 Correct 72 ms 8736 KB Correct
54 Correct 76 ms 12700 KB Correct
55 Correct 115 ms 11904 KB Correct
56 Correct 141 ms 12116 KB Correct
57 Correct 69 ms 8536 KB Correct
58 Correct 77 ms 8268 KB Correct
59 Correct 69 ms 8532 KB Correct
60 Correct 66 ms 8328 KB Correct
61 Correct 68 ms 8888 KB Correct
62 Correct 71 ms 8512 KB Correct
63 Correct 71 ms 8468 KB Correct
64 Correct 53 ms 6408 KB Correct
65 Correct 51 ms 6388 KB Correct
66 Correct 65 ms 8356 KB Correct
67 Correct 72 ms 8356 KB Correct
68 Correct 65 ms 8356 KB Correct
69 Correct 75 ms 8576 KB Correct
70 Correct 52 ms 6408 KB Correct
71 Correct 46 ms 6412 KB Correct
72 Correct 49 ms 6376 KB Correct
73 Correct 53 ms 6500 KB Correct
74 Correct 53 ms 6640 KB Correct
75 Correct 51 ms 6408 KB Correct
76 Correct 70 ms 8720 KB Correct
77 Correct 73 ms 8848 KB Correct
78 Correct 74 ms 8624 KB Correct
79 Correct 68 ms 8484 KB Correct
80 Correct 70 ms 8736 KB Correct
81 Correct 74 ms 8792 KB Correct
82 Correct 66 ms 8832 KB Correct
83 Correct 64 ms 8784 KB Correct
84 Correct 75 ms 8740 KB Correct
85 Correct 76 ms 8776 KB Correct
86 Correct 68 ms 8860 KB Correct
87 Correct 76 ms 8728 KB Correct
88 Correct 67 ms 8868 KB Correct
89 Correct 73 ms 8800 KB Correct
90 Correct 69 ms 9004 KB Correct
91 Correct 78 ms 8604 KB Correct
92 Correct 66 ms 8740 KB Correct
93 Correct 79 ms 8872 KB Correct
94 Correct 74 ms 8776 KB Correct
95 Correct 73 ms 8476 KB Correct
96 Correct 74 ms 8720 KB Correct
97 Correct 75 ms 8720 KB Correct
98 Correct 81 ms 8792 KB Correct
99 Correct 71 ms 8476 KB Correct
100 Correct 69 ms 8536 KB Correct
101 Correct 74 ms 8684 KB Correct
102 Correct 70 ms 8760 KB Correct
103 Correct 71 ms 8488 KB Correct
104 Correct 75 ms 8784 KB Correct
105 Correct 83 ms 8484 KB Correct
106 Correct 81 ms 8788 KB Correct
107 Correct 80 ms 8784 KB Correct
108 Correct 69 ms 9048 KB Correct
109 Correct 75 ms 8916 KB Correct
110 Correct 59 ms 8796 KB Correct
111 Correct 68 ms 8700 KB Correct
112 Correct 74 ms 9316 KB Correct
113 Correct 71 ms 8788 KB Correct
114 Correct 77 ms 8792 KB Correct
115 Correct 59 ms 8824 KB Correct
116 Correct 82 ms 8604 KB Correct
117 Correct 76 ms 9116 KB Correct
118 Correct 60 ms 8716 KB Correct
119 Correct 77 ms 8732 KB Correct
120 Correct 78 ms 8780 KB Correct
121 Correct 87 ms 8808 KB Correct
122 Correct 74 ms 8736 KB Correct
123 Correct 82 ms 12724 KB Correct
124 Correct 141 ms 12160 KB Correct
125 Correct 153 ms 12132 KB Correct
126 Correct 76 ms 8508 KB Correct
127 Correct 70 ms 8280 KB Correct
128 Correct 69 ms 8364 KB Correct
129 Correct 66 ms 8336 KB Correct
130 Correct 65 ms 8284 KB Correct
131 Correct 80 ms 8456 KB Correct
132 Correct 73 ms 8464 KB Correct
133 Correct 51 ms 6412 KB Correct
134 Correct 52 ms 6384 KB Correct
135 Correct 75 ms 8232 KB Correct
136 Correct 69 ms 8332 KB Correct
137 Correct 62 ms 8328 KB Correct
138 Correct 67 ms 8476 KB Correct
139 Correct 52 ms 6512 KB Correct
140 Correct 59 ms 6392 KB Correct
141 Correct 53 ms 6412 KB Correct
142 Correct 53 ms 6404 KB Correct
143 Correct 56 ms 6312 KB Correct
144 Correct 55 ms 6532 KB Correct
145 Correct 82 ms 8860 KB Correct
146 Correct 72 ms 8480 KB Correct
147 Correct 80 ms 8808 KB Correct
148 Correct 81 ms 8600 KB Correct
149 Correct 75 ms 8764 KB Correct
150 Correct 75 ms 8728 KB Correct
151 Correct 66 ms 8860 KB Correct
152 Correct 68 ms 8724 KB Correct
153 Correct 79 ms 8864 KB Correct
154 Correct 87 ms 8804 KB Correct
155 Correct 75 ms 8788 KB Correct
156 Correct 72 ms 8648 KB Correct
157 Correct 68 ms 8692 KB Correct
158 Correct 70 ms 8808 KB Correct
159 Correct 71 ms 8612 KB Correct
160 Correct 74 ms 9060 KB Correct
161 Correct 66 ms 8788 KB Correct
162 Correct 78 ms 8736 KB Correct
163 Correct 74 ms 8860 KB Correct
164 Correct 83 ms 8728 KB Correct
165 Correct 74 ms 8804 KB Correct
166 Correct 79 ms 8780 KB Correct
167 Correct 71 ms 8780 KB Correct
168 Correct 81 ms 8784 KB Correct
169 Correct 76 ms 8544 KB Correct
170 Correct 73 ms 8572 KB Correct
171 Correct 67 ms 8796 KB Correct
172 Correct 76 ms 8740 KB Correct
173 Correct 70 ms 8800 KB Correct
174 Correct 68 ms 8540 KB Correct
175 Correct 61 ms 8844 KB Correct
176 Correct 72 ms 8788 KB Correct
177 Correct 78 ms 8776 KB Correct
178 Correct 72 ms 9032 KB Correct
179 Correct 73 ms 8704 KB Correct
180 Correct 76 ms 8720 KB Correct
181 Correct 69 ms 9056 KB Correct
182 Correct 78 ms 8920 KB Correct
183 Correct 75 ms 8880 KB Correct
184 Correct 68 ms 8780 KB Correct
185 Correct 195 ms 15196 KB Correct
186 Correct 193 ms 16292 KB Correct
187 Correct 106 ms 16676 KB Correct
188 Correct 112 ms 16220 KB Correct
189 Correct 187 ms 16372 KB Correct
190 Correct 71 ms 16028 KB Correct
191 Correct 74 ms 14236 KB Correct
192 Correct 208 ms 15532 KB Correct
193 Correct 208 ms 16944 KB Correct
194 Correct 134 ms 15176 KB Correct
195 Correct 98 ms 16200 KB Correct
196 Correct 206 ms 15384 KB Correct
197 Correct 84 ms 13984 KB Correct
198 Correct 78 ms 14492 KB Correct
199 Correct 171 ms 16268 KB Correct
200 Correct 208 ms 16768 KB Correct
201 Correct 124 ms 14536 KB Correct
202 Correct 89 ms 14608 KB Correct
203 Correct 124 ms 13856 KB Correct
204 Correct 91 ms 15776 KB Correct
205 Correct 94 ms 14352 KB Correct
206 Correct 203 ms 16084 KB Correct
207 Correct 210 ms 16412 KB Correct
208 Correct 88 ms 14428 KB Correct
209 Correct 83 ms 15160 KB Correct
210 Correct 87 ms 14096 KB Correct
211 Correct 77 ms 14420 KB Correct
212 Correct 80 ms 15100 KB Correct
213 Correct 193 ms 17020 KB Correct
214 Correct 201 ms 15308 KB Correct
215 Correct 94 ms 16212 KB Correct
216 Correct 202 ms 14988 KB Correct
217 Correct 213 ms 15248 KB Correct
218 Correct 78 ms 14104 KB Correct
219 Correct 63 ms 13324 KB Correct
220 Correct 172 ms 16068 KB Correct
221 Correct 195 ms 16800 KB Correct
222 Correct 242 ms 15816 KB Correct
223 Correct 135 ms 16252 KB Correct
224 Correct 174 ms 15512 KB Correct
225 Correct 74 ms 15204 KB Correct
226 Correct 82 ms 15064 KB Correct
227 Correct 181 ms 16320 KB Correct
228 Correct 200 ms 15320 KB Correct
229 Correct 78 ms 14740 KB Correct
230 Correct 93 ms 15460 KB Correct
231 Correct 103 ms 15856 KB Correct
232 Correct 84 ms 13728 KB Correct
233 Correct 89 ms 15696 KB Correct
234 Correct 92 ms 12160 KB Correct
235 Correct 87 ms 12124 KB Correct
236 Correct 51 ms 6252 KB Correct
237 Correct 58 ms 6520 KB Correct
238 Correct 62 ms 6380 KB Correct
239 Correct 53 ms 4988 KB Correct
240 Correct 80 ms 8476 KB Correct
241 Correct 75 ms 8476 KB Correct
242 Correct 86 ms 8740 KB Correct
243 Correct 89 ms 8772 KB Correct
244 Correct 77 ms 8528 KB Correct
245 Correct 82 ms 8476 KB Correct
246 Correct 80 ms 8604 KB Correct
247 Correct 73 ms 8532 KB Correct
248 Correct 79 ms 8720 KB Correct
249 Correct 77 ms 8744 KB Correct
250 Correct 76 ms 8728 KB Correct
251 Correct 70 ms 8692 KB Correct
252 Correct 84 ms 8624 KB Correct
253 Correct 66 ms 8716 KB Correct
254 Correct 84 ms 8784 KB Correct
255 Correct 73 ms 8652 KB Correct
256 Correct 70 ms 8748 KB Correct
257 Correct 74 ms 8712 KB Correct
258 Correct 80 ms 8492 KB Correct
259 Correct 67 ms 8688 KB Correct
260 Correct 92 ms 8608 KB Correct
261 Correct 70 ms 8808 KB Correct
262 Correct 77 ms 8524 KB Correct
263 Correct 77 ms 8708 KB Correct
264 Correct 72 ms 8780 KB Correct
265 Correct 57 ms 6468 KB Correct
266 Correct 59 ms 6464 KB Correct
267 Correct 54 ms 6484 KB Correct
268 Correct 61 ms 6616 KB Correct
269 Correct 53 ms 6480 KB Correct
270 Correct 54 ms 6396 KB Correct
271 Correct 60 ms 6484 KB Correct
272 Correct 52 ms 6392 KB Correct
273 Correct 53 ms 6176 KB Correct
274 Correct 46 ms 6492 KB Correct
275 Correct 51 ms 6400 KB Correct
276 Correct 65 ms 6396 KB Correct
277 Correct 55 ms 6500 KB Correct
278 Correct 52 ms 6304 KB Correct
279 Correct 50 ms 6432 KB Correct
280 Correct 73 ms 9036 KB Correct
281 Correct 78 ms 9056 KB Correct
282 Correct 78 ms 8852 KB Correct
283 Correct 71 ms 8860 KB Correct
284 Correct 74 ms 9040 KB Correct
285 Correct 75 ms 8928 KB Correct
286 Correct 72 ms 8860 KB Correct
287 Correct 69 ms 8972 KB Correct
288 Correct 78 ms 9036 KB Correct
289 Correct 73 ms 8804 KB Correct