Submission #436383

# Submission time Handle Problem Language Result Execution time Memory
436383 2021-06-24T13:06:32 Z VEGAnn Fountain Parks (IOI21_parks) C++17
100 / 100
556 ms 41632 KB
#include "parks.h"

#include <algorithm>
#include <queue>
#include <vector>

const int kMax = 200005;

std::vector<std::pair<int, int>> fountains[kMax];

bool isConnected(std::vector<std::vector<int>> adj) {
  int n = adj.size();
  std::vector<bool> vis(n);
  std::queue<int> q;
  q.push(0); vis[0] = true;

  while (!q.empty()) {
    int u = q.front();
    q.pop();

    for (int v : adj[u]) {
      if (vis[v]) continue;
      vis[v] = true;
      q.push(v);
    }
  }

  return all_of(vis.begin(), vis.end(), [](bool visited) { return visited; });
}

int construct_roads(std::vector<int> x, std::vector<int> y) {
  int n = x.size();
  for (int i = 0; i < n; ++i) {
    fountains[x[i]].emplace_back(y[i], i);
  }
  for (int i = 0; i < kMax; ++i) {
    std::sort(fountains[i].begin(), fountains[i].end());
  }
  
  std::vector<std::tuple<int, int, int, int, int>> pathways;
  std::vector<std::vector<int>> adj(n);
  for (int i = 0; i < n; ++i) {
    auto it = std::lower_bound(fountains[x[i] + 2].begin(), fountains[x[i] + 2].end(),
                               std::make_pair(y[i], -1));
    if (it != fountains[x[i] + 2].end() && it->first == y[i]) {
      int ny = x[i] + y[i] & 2 ? y[i] + 1 : y[i] - 1;
      pathways.emplace_back(x[i] + 1, ny, x[i] + y[i], i, it->second);
      adj[i].emplace_back(it->second);
      adj[it->second].emplace_back(i);
    }
    it = std::lower_bound(fountains[x[i]].begin(), fountains[x[i]].end(),
                          std::make_pair(y[i] + 2, -1));
    if (it != fountains[x[i]].end() && it->first == y[i] + 2) {
      int nx = x[i] + y[i] & 2 ? x[i] - 1 : x[i] + 1;
      pathways.emplace_back(nx, y[i] + 1, x[i] + y[i], i, it->second);
      adj[i].emplace_back(it->second);
      adj[it->second].emplace_back(i);
    }
  }

  if (!isConnected(adj)) return 0;

  std::sort(pathways.begin(), pathways.end());

  std::vector<int> u, v, a, b;
  for (int i = 0; i < static_cast<int>(pathways.size()); ++i) {
    if (i > 0 && std::get<0>(pathways[i]) == std::get<0>(pathways[i - 1]) &&
        std::get<1>(pathways[i]) == std::get<1>(pathways[i - 1])) {
      continue;
    }
    
    u.emplace_back(std::get<3>(pathways[i]));
    v.emplace_back(std::get<4>(pathways[i]));
    a.emplace_back(std::get<0>(pathways[i]));
    b.emplace_back(std::get<1>(pathways[i]));
  }

  build(u, v, a, b);
  return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:46:21: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
   46 |       int ny = x[i] + y[i] & 2 ? y[i] + 1 : y[i] - 1;
parks.cpp:54:21: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
   54 |       int nx = x[i] + y[i] & 2 ? x[i] - 1 : x[i] + 1;
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4972 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4968 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 169 ms 20212 KB Output is correct
10 Correct 13 ms 6448 KB Output is correct
11 Correct 62 ms 13232 KB Output is correct
12 Correct 22 ms 7208 KB Output is correct
13 Correct 31 ms 11640 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 6 ms 5196 KB Output is correct
16 Correct 169 ms 20232 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4972 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4968 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 169 ms 20212 KB Output is correct
10 Correct 13 ms 6448 KB Output is correct
11 Correct 62 ms 13232 KB Output is correct
12 Correct 22 ms 7208 KB Output is correct
13 Correct 31 ms 11640 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 6 ms 5196 KB Output is correct
16 Correct 169 ms 20232 KB Output is correct
17 Correct 4 ms 4940 KB Output is correct
18 Correct 5 ms 4940 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 5 ms 4940 KB Output is correct
21 Correct 5 ms 4940 KB Output is correct
22 Correct 4 ms 4940 KB Output is correct
23 Correct 459 ms 37900 KB Output is correct
24 Correct 4 ms 4940 KB Output is correct
25 Correct 7 ms 5196 KB Output is correct
26 Correct 6 ms 5452 KB Output is correct
27 Correct 8 ms 5632 KB Output is correct
28 Correct 174 ms 18356 KB Output is correct
29 Correct 243 ms 24556 KB Output is correct
30 Correct 343 ms 31612 KB Output is correct
31 Correct 476 ms 37968 KB Output is correct
32 Correct 4 ms 4940 KB Output is correct
33 Correct 4 ms 4940 KB Output is correct
34 Correct 4 ms 4940 KB Output is correct
35 Correct 4 ms 4980 KB Output is correct
36 Correct 4 ms 4940 KB Output is correct
37 Correct 5 ms 4940 KB Output is correct
38 Correct 4 ms 4940 KB Output is correct
39 Correct 5 ms 4940 KB Output is correct
40 Correct 5 ms 4940 KB Output is correct
41 Correct 4 ms 4940 KB Output is correct
42 Correct 4 ms 4940 KB Output is correct
43 Correct 6 ms 5268 KB Output is correct
44 Correct 6 ms 5324 KB Output is correct
45 Correct 174 ms 20172 KB Output is correct
46 Correct 310 ms 28276 KB Output is correct
47 Correct 288 ms 28228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4972 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4968 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 169 ms 20212 KB Output is correct
10 Correct 13 ms 6448 KB Output is correct
11 Correct 62 ms 13232 KB Output is correct
12 Correct 22 ms 7208 KB Output is correct
13 Correct 31 ms 11640 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 6 ms 5196 KB Output is correct
16 Correct 169 ms 20232 KB Output is correct
17 Correct 4 ms 4940 KB Output is correct
18 Correct 5 ms 4940 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 5 ms 4940 KB Output is correct
21 Correct 5 ms 4940 KB Output is correct
22 Correct 4 ms 4940 KB Output is correct
23 Correct 459 ms 37900 KB Output is correct
24 Correct 4 ms 4940 KB Output is correct
25 Correct 7 ms 5196 KB Output is correct
26 Correct 6 ms 5452 KB Output is correct
27 Correct 8 ms 5632 KB Output is correct
28 Correct 174 ms 18356 KB Output is correct
29 Correct 243 ms 24556 KB Output is correct
30 Correct 343 ms 31612 KB Output is correct
31 Correct 476 ms 37968 KB Output is correct
32 Correct 4 ms 4940 KB Output is correct
33 Correct 4 ms 4940 KB Output is correct
34 Correct 4 ms 4940 KB Output is correct
35 Correct 4 ms 4980 KB Output is correct
36 Correct 4 ms 4940 KB Output is correct
37 Correct 5 ms 4940 KB Output is correct
38 Correct 4 ms 4940 KB Output is correct
39 Correct 5 ms 4940 KB Output is correct
40 Correct 5 ms 4940 KB Output is correct
41 Correct 4 ms 4940 KB Output is correct
42 Correct 4 ms 4940 KB Output is correct
43 Correct 6 ms 5268 KB Output is correct
44 Correct 6 ms 5324 KB Output is correct
45 Correct 174 ms 20172 KB Output is correct
46 Correct 310 ms 28276 KB Output is correct
47 Correct 288 ms 28228 KB Output is correct
48 Correct 4 ms 4940 KB Output is correct
49 Correct 5 ms 4940 KB Output is correct
50 Correct 4 ms 4960 KB Output is correct
51 Correct 5 ms 4940 KB Output is correct
52 Correct 4 ms 4940 KB Output is correct
53 Correct 5 ms 4940 KB Output is correct
54 Correct 5 ms 4940 KB Output is correct
55 Correct 556 ms 38556 KB Output is correct
56 Correct 6 ms 4992 KB Output is correct
57 Correct 11 ms 5324 KB Output is correct
58 Correct 23 ms 5928 KB Output is correct
59 Correct 13 ms 6612 KB Output is correct
60 Correct 195 ms 21704 KB Output is correct
61 Correct 359 ms 28288 KB Output is correct
62 Correct 383 ms 33384 KB Output is correct
63 Correct 518 ms 38552 KB Output is correct
64 Correct 5 ms 4940 KB Output is correct
65 Correct 4 ms 4940 KB Output is correct
66 Correct 4 ms 4940 KB Output is correct
67 Correct 389 ms 35524 KB Output is correct
68 Correct 414 ms 35472 KB Output is correct
69 Correct 397 ms 35372 KB Output is correct
70 Correct 7 ms 5580 KB Output is correct
71 Correct 10 ms 6112 KB Output is correct
72 Correct 163 ms 20188 KB Output is correct
73 Correct 300 ms 28500 KB Output is correct
74 Correct 423 ms 35492 KB Output is correct
75 Correct 454 ms 37244 KB Output is correct
76 Correct 392 ms 35536 KB Output is correct
77 Correct 9 ms 5708 KB Output is correct
78 Correct 14 ms 6396 KB Output is correct
79 Correct 175 ms 20716 KB Output is correct
80 Correct 313 ms 29812 KB Output is correct
81 Correct 501 ms 36448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4972 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4968 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 169 ms 20212 KB Output is correct
10 Correct 13 ms 6448 KB Output is correct
11 Correct 62 ms 13232 KB Output is correct
12 Correct 22 ms 7208 KB Output is correct
13 Correct 31 ms 11640 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 6 ms 5196 KB Output is correct
16 Correct 169 ms 20232 KB Output is correct
17 Correct 6 ms 4940 KB Output is correct
18 Correct 4 ms 4940 KB Output is correct
19 Correct 5 ms 4940 KB Output is correct
20 Correct 488 ms 37068 KB Output is correct
21 Correct 495 ms 36472 KB Output is correct
22 Correct 432 ms 36484 KB Output is correct
23 Correct 345 ms 32696 KB Output is correct
24 Correct 94 ms 19216 KB Output is correct
25 Correct 254 ms 35660 KB Output is correct
26 Correct 231 ms 35468 KB Output is correct
27 Correct 393 ms 35544 KB Output is correct
28 Correct 371 ms 35612 KB Output is correct
29 Correct 424 ms 35904 KB Output is correct
30 Correct 400 ms 36140 KB Output is correct
31 Correct 5 ms 4940 KB Output is correct
32 Correct 22 ms 7208 KB Output is correct
33 Correct 64 ms 14272 KB Output is correct
34 Correct 425 ms 37048 KB Output is correct
35 Correct 12 ms 6440 KB Output is correct
36 Correct 54 ms 12828 KB Output is correct
37 Correct 104 ms 20616 KB Output is correct
38 Correct 124 ms 17696 KB Output is correct
39 Correct 221 ms 22224 KB Output is correct
40 Correct 260 ms 27876 KB Output is correct
41 Correct 303 ms 32408 KB Output is correct
42 Correct 404 ms 36460 KB Output is correct
43 Correct 5 ms 4940 KB Output is correct
44 Correct 6 ms 5068 KB Output is correct
45 Correct 4 ms 4940 KB Output is correct
46 Correct 4 ms 4900 KB Output is correct
47 Correct 4 ms 4940 KB Output is correct
48 Correct 4 ms 4940 KB Output is correct
49 Correct 4 ms 4940 KB Output is correct
50 Correct 4 ms 4940 KB Output is correct
51 Correct 4 ms 4940 KB Output is correct
52 Correct 4 ms 4940 KB Output is correct
53 Correct 5 ms 4940 KB Output is correct
54 Correct 6 ms 5196 KB Output is correct
55 Correct 6 ms 5324 KB Output is correct
56 Correct 167 ms 20176 KB Output is correct
57 Correct 270 ms 28160 KB Output is correct
58 Correct 269 ms 28196 KB Output is correct
59 Correct 5 ms 4940 KB Output is correct
60 Correct 5 ms 4940 KB Output is correct
61 Correct 4 ms 4940 KB Output is correct
62 Correct 403 ms 35544 KB Output is correct
63 Correct 397 ms 35548 KB Output is correct
64 Correct 398 ms 35360 KB Output is correct
65 Correct 8 ms 5580 KB Output is correct
66 Correct 10 ms 6220 KB Output is correct
67 Correct 166 ms 20244 KB Output is correct
68 Correct 272 ms 28360 KB Output is correct
69 Correct 400 ms 35480 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4972 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4968 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 169 ms 20212 KB Output is correct
10 Correct 13 ms 6448 KB Output is correct
11 Correct 62 ms 13232 KB Output is correct
12 Correct 22 ms 7208 KB Output is correct
13 Correct 31 ms 11640 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 6 ms 5196 KB Output is correct
16 Correct 169 ms 20232 KB Output is correct
17 Correct 411 ms 36276 KB Output is correct
18 Correct 425 ms 36312 KB Output is correct
19 Correct 418 ms 36648 KB Output is correct
20 Correct 427 ms 37860 KB Output is correct
21 Correct 348 ms 33752 KB Output is correct
22 Correct 4 ms 4940 KB Output is correct
23 Correct 49 ms 10108 KB Output is correct
24 Correct 21 ms 8120 KB Output is correct
25 Correct 71 ms 16084 KB Output is correct
26 Correct 146 ms 24164 KB Output is correct
27 Correct 175 ms 21392 KB Output is correct
28 Correct 256 ms 26876 KB Output is correct
29 Correct 305 ms 30780 KB Output is correct
30 Correct 363 ms 34204 KB Output is correct
31 Correct 438 ms 37760 KB Output is correct
32 Correct 466 ms 37192 KB Output is correct
33 Correct 386 ms 35512 KB Output is correct
34 Correct 8 ms 5708 KB Output is correct
35 Correct 12 ms 6312 KB Output is correct
36 Correct 169 ms 20616 KB Output is correct
37 Correct 312 ms 29912 KB Output is correct
38 Correct 447 ms 36436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4972 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4968 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 169 ms 20212 KB Output is correct
10 Correct 13 ms 6448 KB Output is correct
11 Correct 62 ms 13232 KB Output is correct
12 Correct 22 ms 7208 KB Output is correct
13 Correct 31 ms 11640 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 6 ms 5196 KB Output is correct
16 Correct 169 ms 20232 KB Output is correct
17 Correct 4 ms 4940 KB Output is correct
18 Correct 5 ms 4940 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 5 ms 4940 KB Output is correct
21 Correct 5 ms 4940 KB Output is correct
22 Correct 4 ms 4940 KB Output is correct
23 Correct 459 ms 37900 KB Output is correct
24 Correct 4 ms 4940 KB Output is correct
25 Correct 7 ms 5196 KB Output is correct
26 Correct 6 ms 5452 KB Output is correct
27 Correct 8 ms 5632 KB Output is correct
28 Correct 174 ms 18356 KB Output is correct
29 Correct 243 ms 24556 KB Output is correct
30 Correct 343 ms 31612 KB Output is correct
31 Correct 476 ms 37968 KB Output is correct
32 Correct 4 ms 4940 KB Output is correct
33 Correct 4 ms 4940 KB Output is correct
34 Correct 4 ms 4940 KB Output is correct
35 Correct 4 ms 4980 KB Output is correct
36 Correct 4 ms 4940 KB Output is correct
37 Correct 5 ms 4940 KB Output is correct
38 Correct 4 ms 4940 KB Output is correct
39 Correct 5 ms 4940 KB Output is correct
40 Correct 5 ms 4940 KB Output is correct
41 Correct 4 ms 4940 KB Output is correct
42 Correct 4 ms 4940 KB Output is correct
43 Correct 6 ms 5268 KB Output is correct
44 Correct 6 ms 5324 KB Output is correct
45 Correct 174 ms 20172 KB Output is correct
46 Correct 310 ms 28276 KB Output is correct
47 Correct 288 ms 28228 KB Output is correct
48 Correct 4 ms 4940 KB Output is correct
49 Correct 5 ms 4940 KB Output is correct
50 Correct 4 ms 4960 KB Output is correct
51 Correct 5 ms 4940 KB Output is correct
52 Correct 4 ms 4940 KB Output is correct
53 Correct 5 ms 4940 KB Output is correct
54 Correct 5 ms 4940 KB Output is correct
55 Correct 556 ms 38556 KB Output is correct
56 Correct 6 ms 4992 KB Output is correct
57 Correct 11 ms 5324 KB Output is correct
58 Correct 23 ms 5928 KB Output is correct
59 Correct 13 ms 6612 KB Output is correct
60 Correct 195 ms 21704 KB Output is correct
61 Correct 359 ms 28288 KB Output is correct
62 Correct 383 ms 33384 KB Output is correct
63 Correct 518 ms 38552 KB Output is correct
64 Correct 5 ms 4940 KB Output is correct
65 Correct 4 ms 4940 KB Output is correct
66 Correct 4 ms 4940 KB Output is correct
67 Correct 389 ms 35524 KB Output is correct
68 Correct 414 ms 35472 KB Output is correct
69 Correct 397 ms 35372 KB Output is correct
70 Correct 7 ms 5580 KB Output is correct
71 Correct 10 ms 6112 KB Output is correct
72 Correct 163 ms 20188 KB Output is correct
73 Correct 300 ms 28500 KB Output is correct
74 Correct 423 ms 35492 KB Output is correct
75 Correct 454 ms 37244 KB Output is correct
76 Correct 392 ms 35536 KB Output is correct
77 Correct 9 ms 5708 KB Output is correct
78 Correct 14 ms 6396 KB Output is correct
79 Correct 175 ms 20716 KB Output is correct
80 Correct 313 ms 29812 KB Output is correct
81 Correct 501 ms 36448 KB Output is correct
82 Correct 6 ms 4940 KB Output is correct
83 Correct 4 ms 4940 KB Output is correct
84 Correct 5 ms 4940 KB Output is correct
85 Correct 488 ms 37068 KB Output is correct
86 Correct 495 ms 36472 KB Output is correct
87 Correct 432 ms 36484 KB Output is correct
88 Correct 345 ms 32696 KB Output is correct
89 Correct 94 ms 19216 KB Output is correct
90 Correct 254 ms 35660 KB Output is correct
91 Correct 231 ms 35468 KB Output is correct
92 Correct 393 ms 35544 KB Output is correct
93 Correct 371 ms 35612 KB Output is correct
94 Correct 424 ms 35904 KB Output is correct
95 Correct 400 ms 36140 KB Output is correct
96 Correct 5 ms 4940 KB Output is correct
97 Correct 22 ms 7208 KB Output is correct
98 Correct 64 ms 14272 KB Output is correct
99 Correct 425 ms 37048 KB Output is correct
100 Correct 12 ms 6440 KB Output is correct
101 Correct 54 ms 12828 KB Output is correct
102 Correct 104 ms 20616 KB Output is correct
103 Correct 124 ms 17696 KB Output is correct
104 Correct 221 ms 22224 KB Output is correct
105 Correct 260 ms 27876 KB Output is correct
106 Correct 303 ms 32408 KB Output is correct
107 Correct 404 ms 36460 KB Output is correct
108 Correct 5 ms 4940 KB Output is correct
109 Correct 6 ms 5068 KB Output is correct
110 Correct 4 ms 4940 KB Output is correct
111 Correct 4 ms 4900 KB Output is correct
112 Correct 4 ms 4940 KB Output is correct
113 Correct 4 ms 4940 KB Output is correct
114 Correct 4 ms 4940 KB Output is correct
115 Correct 4 ms 4940 KB Output is correct
116 Correct 4 ms 4940 KB Output is correct
117 Correct 4 ms 4940 KB Output is correct
118 Correct 5 ms 4940 KB Output is correct
119 Correct 6 ms 5196 KB Output is correct
120 Correct 6 ms 5324 KB Output is correct
121 Correct 167 ms 20176 KB Output is correct
122 Correct 270 ms 28160 KB Output is correct
123 Correct 269 ms 28196 KB Output is correct
124 Correct 5 ms 4940 KB Output is correct
125 Correct 5 ms 4940 KB Output is correct
126 Correct 4 ms 4940 KB Output is correct
127 Correct 403 ms 35544 KB Output is correct
128 Correct 397 ms 35548 KB Output is correct
129 Correct 398 ms 35360 KB Output is correct
130 Correct 8 ms 5580 KB Output is correct
131 Correct 10 ms 6220 KB Output is correct
132 Correct 166 ms 20244 KB Output is correct
133 Correct 272 ms 28360 KB Output is correct
134 Correct 400 ms 35480 KB Output is correct
135 Correct 411 ms 36276 KB Output is correct
136 Correct 425 ms 36312 KB Output is correct
137 Correct 418 ms 36648 KB Output is correct
138 Correct 427 ms 37860 KB Output is correct
139 Correct 348 ms 33752 KB Output is correct
140 Correct 4 ms 4940 KB Output is correct
141 Correct 49 ms 10108 KB Output is correct
142 Correct 21 ms 8120 KB Output is correct
143 Correct 71 ms 16084 KB Output is correct
144 Correct 146 ms 24164 KB Output is correct
145 Correct 175 ms 21392 KB Output is correct
146 Correct 256 ms 26876 KB Output is correct
147 Correct 305 ms 30780 KB Output is correct
148 Correct 363 ms 34204 KB Output is correct
149 Correct 438 ms 37760 KB Output is correct
150 Correct 466 ms 37192 KB Output is correct
151 Correct 386 ms 35512 KB Output is correct
152 Correct 8 ms 5708 KB Output is correct
153 Correct 12 ms 6312 KB Output is correct
154 Correct 169 ms 20616 KB Output is correct
155 Correct 312 ms 29912 KB Output is correct
156 Correct 447 ms 36436 KB Output is correct
157 Correct 4 ms 4940 KB Output is correct
158 Correct 4 ms 4940 KB Output is correct
159 Correct 4 ms 4940 KB Output is correct
160 Correct 4 ms 4940 KB Output is correct
161 Correct 461 ms 39924 KB Output is correct
162 Correct 436 ms 37024 KB Output is correct
163 Correct 472 ms 39408 KB Output is correct
164 Correct 450 ms 39588 KB Output is correct
165 Correct 475 ms 41044 KB Output is correct
166 Correct 533 ms 41632 KB Output is correct
167 Correct 79 ms 13044 KB Output is correct
168 Correct 32 ms 10136 KB Output is correct
169 Correct 93 ms 18976 KB Output is correct
170 Correct 214 ms 31080 KB Output is correct
171 Correct 293 ms 39856 KB Output is correct
172 Correct 208 ms 22896 KB Output is correct
173 Correct 246 ms 26052 KB Output is correct
174 Correct 288 ms 30856 KB Output is correct
175 Correct 422 ms 34068 KB Output is correct
176 Correct 430 ms 36808 KB Output is correct
177 Correct 514 ms 40516 KB Output is correct