Submission #987228

# Submission time Handle Problem Language Result Execution time Memory
987228 2024-05-22T11:48:12 Z cig32 Fountain Parks (IOI21_parks) C++17
70 / 100
473 ms 68876 KB
#include "parks.h"
#include "bits/stdc++.h"
using namespace std;
const int MAXN = 2e5 + 12;
int dsu[MAXN];
int set_of(int u) {
  if(dsu[u] == u) return u;
  return dsu[u] = set_of(dsu[u]);
}
void union_(int u, int v) {
  dsu[set_of(u)] = set_of(v);
}

int construct_roads(std::vector<int> x, std::vector<int> y) {
  if (x.size() == 1) {
    build({}, {}, {}, {});
    return 1;
  }
  int n = x.size();
  pair<pair<int, int>, int> p[n];
  vector<int> stox = x, stoy = y;
  for(int i=0; i<n; i++) {
    p[i].first.first = x[i];
    p[i].first.second = y[i];
    p[i].second = i;
  }
  sort(p, p + n);
  for(int i=0; i<n; i++) x[i] = stox[p[i].second], y[i] = stoy[p[i].second];
  std::vector<int> u, v, a, b;
  map<pair<int, int>, int> mp;
  map<pair<int, int>, pair<int,int> > buh;
  set<pair<int, int>> bench;
  
  for(int i=0; i<n; i++) dsu[i] = i;
  for(int i=0; i<n; i++) {
    mp[{x[i], y[i]}] = i;
  }
  vector<pair<int,int>> edges;
  map<pair<int,int>, bool> wtf;
  for(int i=0; i<n; i++) {
    if(mp.count({x[i] + 2, y[i]})) {
      int U = i, V = mp[{x[i] + 2, y[i]}];
      wtf[{x[i], y[i]}] = 1;
      edges.push_back({U, V});
      union_(U, V);
    }
  }
  for(int i=0; i<n; i++) {
    if(mp.count({x[i], y[i] + 2})) {
      int U = i, V = mp[{x[i], y[i] + 2}];
      if(set_of(U) != set_of(V)) {
        edges.push_back({U, V});
        union_(U, V);
        if(!wtf.count({x[i] - 2, y[i] + 2}) && !wtf.count({x[i] - 2, y[i]})) {
          bench.insert({x[i] - 1, y[i] + 1});
          buh[{U, V}] = {x[i] - 1, y[i] + 1};
        }
        else if(!wtf.count({x[i], y[i]}) && !wtf.count({x[i], y[i] + 2})) {
          bench.insert({x[i] + 1, y[i] + 1});
          buh[{U, V}] = {x[i] + 1, y[i] + 1};
        }
        else if((x[i] + y[i]) % 4 == 2) {
          bench.insert({x[i] - 1, y[i] + 1});
          buh[{U, V}] = {x[i] - 1, y[i] + 1};
        }
        else {
          bench.insert({x[i] + 1, y[i] + 1});
          buh[{U, V}] = {x[i] + 1, y[i] + 1};
        }
      }
    }
  }
  for(int i=0; i<n; i++) {
    if(mp.count({x[i] + 2, y[i]})) {
      int U = i, V = mp[{x[i] + 2, y[i]}];
      if(!bench.count({x[i] + 1, y[i] - 1})) {
        bench.insert({x[i] + 1, y[i] - 1});
        buh[{U, V}] = {x[i] + 1, y[i] - 1};
      }
      else if(!bench.count({x[i] + 1, y[i] + 1})) {
        bench.insert({x[i] + 1, y[i] + 1});
        buh[{U, V}] = {x[i] + 1, y[i] + 1};
      }
      else return 0;
    }
  }
  for(int i=1; i<n; i++) if(set_of(i) != set_of(i-1)) return 0;
  for(auto x: edges) {
    int U = x.first, V = x.second;
    u.push_back(p[U].second);
    v.push_back(p[V].second);
    pair<int, int> wow = buh[{U, V}];
    a.push_back(wow.first);
    b.push_back(wow.second);
  }
  build(u, v, a, b);
  return 1;
}

/*

#!/bin/bash

problem=parks
grader_name=grady

g++ -std=c++17 -O2 -o "${problem}" "${grader_name}.cpp" "${problem}.cpp"
./parks < input.txt
*/
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 452 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 158 ms 29536 KB Output is correct
10 Correct 12 ms 3340 KB Output is correct
11 Correct 75 ms 15824 KB Output is correct
12 Correct 24 ms 4916 KB Output is correct
13 Correct 46 ms 10700 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 860 KB Output is correct
16 Correct 159 ms 29356 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 452 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 158 ms 29536 KB Output is correct
10 Correct 12 ms 3340 KB Output is correct
11 Correct 75 ms 15824 KB Output is correct
12 Correct 24 ms 4916 KB Output is correct
13 Correct 46 ms 10700 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 860 KB Output is correct
16 Correct 159 ms 29356 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 379 ms 63604 KB Output is correct
24 Correct 1 ms 348 KB Output is correct
25 Correct 3 ms 604 KB Output is correct
26 Correct 3 ms 1116 KB Output is correct
27 Correct 5 ms 1372 KB Output is correct
28 Correct 143 ms 25800 KB Output is correct
29 Correct 230 ms 37976 KB Output is correct
30 Correct 299 ms 51580 KB Output is correct
31 Correct 396 ms 63580 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 756 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 2 ms 860 KB Output is correct
44 Correct 3 ms 972 KB Output is correct
45 Correct 186 ms 30556 KB Output is correct
46 Correct 286 ms 45124 KB Output is correct
47 Correct 290 ms 44992 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 452 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 158 ms 29536 KB Output is correct
10 Correct 12 ms 3340 KB Output is correct
11 Correct 75 ms 15824 KB Output is correct
12 Correct 24 ms 4916 KB Output is correct
13 Correct 46 ms 10700 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 860 KB Output is correct
16 Correct 159 ms 29356 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 379 ms 63604 KB Output is correct
24 Correct 1 ms 348 KB Output is correct
25 Correct 3 ms 604 KB Output is correct
26 Correct 3 ms 1116 KB Output is correct
27 Correct 5 ms 1372 KB Output is correct
28 Correct 143 ms 25800 KB Output is correct
29 Correct 230 ms 37976 KB Output is correct
30 Correct 299 ms 51580 KB Output is correct
31 Correct 396 ms 63580 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 756 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 2 ms 860 KB Output is correct
44 Correct 3 ms 972 KB Output is correct
45 Correct 186 ms 30556 KB Output is correct
46 Correct 286 ms 45124 KB Output is correct
47 Correct 290 ms 44992 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 1 ms 348 KB Output is correct
55 Correct 413 ms 65092 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 3 ms 860 KB Output is correct
58 Correct 9 ms 2396 KB Output is correct
59 Correct 12 ms 2956 KB Output is correct
60 Correct 196 ms 32764 KB Output is correct
61 Correct 267 ms 44992 KB Output is correct
62 Correct 349 ms 54464 KB Output is correct
63 Correct 425 ms 65216 KB Output is correct
64 Correct 1 ms 348 KB Output is correct
65 Correct 1 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 329 ms 57128 KB Output is correct
68 Correct 315 ms 57360 KB Output is correct
69 Correct 331 ms 56260 KB Output is correct
70 Correct 5 ms 1568 KB Output is correct
71 Correct 9 ms 2396 KB Output is correct
72 Correct 194 ms 30516 KB Output is correct
73 Correct 289 ms 46504 KB Output is correct
74 Correct 430 ms 60720 KB Output is correct
75 Correct 411 ms 61972 KB Output is correct
76 Correct 346 ms 57280 KB Output is correct
77 Correct 7 ms 1624 KB Output is correct
78 Correct 10 ms 2652 KB Output is correct
79 Correct 193 ms 30588 KB Output is correct
80 Correct 322 ms 46492 KB Output is correct
81 Correct 389 ms 61000 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 452 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 158 ms 29536 KB Output is correct
10 Correct 12 ms 3340 KB Output is correct
11 Correct 75 ms 15824 KB Output is correct
12 Correct 24 ms 4916 KB Output is correct
13 Correct 46 ms 10700 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 860 KB Output is correct
16 Correct 159 ms 29356 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 453 ms 63464 KB Output is correct
21 Correct 445 ms 64732 KB Output is correct
22 Correct 416 ms 63192 KB Output is correct
23 Correct 319 ms 56000 KB Output is correct
24 Correct 127 ms 22352 KB Output is correct
25 Correct 344 ms 58308 KB Output is correct
26 Correct 283 ms 45816 KB Output is correct
27 Correct 340 ms 56000 KB Output is correct
28 Correct 342 ms 56004 KB Output is correct
29 Correct 432 ms 68544 KB Output is correct
30 Correct 473 ms 68384 KB Output is correct
31 Correct 1 ms 344 KB Output is correct
32 Correct 23 ms 4884 KB Output is correct
33 Correct 84 ms 11968 KB Output is correct
34 Correct 394 ms 64860 KB Output is correct
35 Correct 13 ms 2904 KB Output is correct
36 Correct 72 ms 13484 KB Output is correct
37 Correct 168 ms 26592 KB Output is correct
38 Correct 159 ms 25896 KB Output is correct
39 Correct 229 ms 34948 KB Output is correct
40 Correct 323 ms 45544 KB Output is correct
41 Correct 380 ms 54544 KB Output is correct
42 Correct 452 ms 63576 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 1 ms 344 KB Output is correct
45 Correct 1 ms 348 KB Output is correct
46 Correct 1 ms 444 KB Output is correct
47 Correct 1 ms 344 KB Output is correct
48 Correct 1 ms 360 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 604 KB Output is correct
52 Correct 1 ms 348 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 2 ms 856 KB Output is correct
55 Correct 4 ms 1112 KB Output is correct
56 Correct 188 ms 30664 KB Output is correct
57 Correct 286 ms 44920 KB Output is correct
58 Correct 298 ms 44992 KB Output is correct
59 Correct 1 ms 348 KB Output is correct
60 Correct 1 ms 348 KB Output is correct
61 Correct 1 ms 348 KB Output is correct
62 Correct 320 ms 57144 KB Output is correct
63 Correct 326 ms 57216 KB Output is correct
64 Correct 346 ms 56268 KB Output is correct
65 Correct 5 ms 1372 KB Output is correct
66 Correct 9 ms 2392 KB Output is correct
67 Correct 198 ms 30432 KB Output is correct
68 Correct 320 ms 46596 KB Output is correct
69 Correct 436 ms 60820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 452 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 158 ms 29536 KB Output is correct
10 Correct 12 ms 3340 KB Output is correct
11 Correct 75 ms 15824 KB Output is correct
12 Correct 24 ms 4916 KB Output is correct
13 Correct 46 ms 10700 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 860 KB Output is correct
16 Correct 159 ms 29356 KB Output is correct
17 Correct 401 ms 63320 KB Output is correct
18 Correct 397 ms 63516 KB Output is correct
19 Correct 432 ms 63948 KB Output is correct
20 Correct 431 ms 63176 KB Output is correct
21 Correct 395 ms 55488 KB Output is correct
22 Correct 1 ms 344 KB Output is correct
23 Correct 62 ms 10648 KB Output is correct
24 Correct 37 ms 5580 KB Output is correct
25 Correct 109 ms 19036 KB Output is correct
26 Correct 196 ms 32476 KB Output is correct
27 Correct 206 ms 32832 KB Output is correct
28 Correct 282 ms 40508 KB Output is correct
29 Correct 313 ms 49904 KB Output is correct
30 Correct 399 ms 56884 KB Output is correct
31 Correct 453 ms 64856 KB Output is correct
32 Correct 431 ms 61960 KB Output is correct
33 Correct 321 ms 57280 KB Output is correct
34 Correct 6 ms 1624 KB Output is correct
35 Correct 10 ms 2652 KB Output is correct
36 Correct 186 ms 30464 KB Output is correct
37 Correct 325 ms 46632 KB Output is correct
38 Correct 420 ms 60868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 452 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 158 ms 29536 KB Output is correct
10 Correct 12 ms 3340 KB Output is correct
11 Correct 75 ms 15824 KB Output is correct
12 Correct 24 ms 4916 KB Output is correct
13 Correct 46 ms 10700 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 860 KB Output is correct
16 Correct 159 ms 29356 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 379 ms 63604 KB Output is correct
24 Correct 1 ms 348 KB Output is correct
25 Correct 3 ms 604 KB Output is correct
26 Correct 3 ms 1116 KB Output is correct
27 Correct 5 ms 1372 KB Output is correct
28 Correct 143 ms 25800 KB Output is correct
29 Correct 230 ms 37976 KB Output is correct
30 Correct 299 ms 51580 KB Output is correct
31 Correct 396 ms 63580 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 756 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 1 ms 344 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 2 ms 860 KB Output is correct
44 Correct 3 ms 972 KB Output is correct
45 Correct 186 ms 30556 KB Output is correct
46 Correct 286 ms 45124 KB Output is correct
47 Correct 290 ms 44992 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 1 ms 348 KB Output is correct
55 Correct 413 ms 65092 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 3 ms 860 KB Output is correct
58 Correct 9 ms 2396 KB Output is correct
59 Correct 12 ms 2956 KB Output is correct
60 Correct 196 ms 32764 KB Output is correct
61 Correct 267 ms 44992 KB Output is correct
62 Correct 349 ms 54464 KB Output is correct
63 Correct 425 ms 65216 KB Output is correct
64 Correct 1 ms 348 KB Output is correct
65 Correct 1 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 329 ms 57128 KB Output is correct
68 Correct 315 ms 57360 KB Output is correct
69 Correct 331 ms 56260 KB Output is correct
70 Correct 5 ms 1568 KB Output is correct
71 Correct 9 ms 2396 KB Output is correct
72 Correct 194 ms 30516 KB Output is correct
73 Correct 289 ms 46504 KB Output is correct
74 Correct 430 ms 60720 KB Output is correct
75 Correct 411 ms 61972 KB Output is correct
76 Correct 346 ms 57280 KB Output is correct
77 Correct 7 ms 1624 KB Output is correct
78 Correct 10 ms 2652 KB Output is correct
79 Correct 193 ms 30588 KB Output is correct
80 Correct 322 ms 46492 KB Output is correct
81 Correct 389 ms 61000 KB Output is correct
82 Correct 1 ms 344 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 1 ms 348 KB Output is correct
85 Correct 453 ms 63464 KB Output is correct
86 Correct 445 ms 64732 KB Output is correct
87 Correct 416 ms 63192 KB Output is correct
88 Correct 319 ms 56000 KB Output is correct
89 Correct 127 ms 22352 KB Output is correct
90 Correct 344 ms 58308 KB Output is correct
91 Correct 283 ms 45816 KB Output is correct
92 Correct 340 ms 56000 KB Output is correct
93 Correct 342 ms 56004 KB Output is correct
94 Correct 432 ms 68544 KB Output is correct
95 Correct 473 ms 68384 KB Output is correct
96 Correct 1 ms 344 KB Output is correct
97 Correct 23 ms 4884 KB Output is correct
98 Correct 84 ms 11968 KB Output is correct
99 Correct 394 ms 64860 KB Output is correct
100 Correct 13 ms 2904 KB Output is correct
101 Correct 72 ms 13484 KB Output is correct
102 Correct 168 ms 26592 KB Output is correct
103 Correct 159 ms 25896 KB Output is correct
104 Correct 229 ms 34948 KB Output is correct
105 Correct 323 ms 45544 KB Output is correct
106 Correct 380 ms 54544 KB Output is correct
107 Correct 452 ms 63576 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 1 ms 344 KB Output is correct
110 Correct 1 ms 348 KB Output is correct
111 Correct 1 ms 444 KB Output is correct
112 Correct 1 ms 344 KB Output is correct
113 Correct 1 ms 360 KB Output is correct
114 Correct 1 ms 348 KB Output is correct
115 Correct 1 ms 348 KB Output is correct
116 Correct 1 ms 604 KB Output is correct
117 Correct 1 ms 348 KB Output is correct
118 Correct 1 ms 348 KB Output is correct
119 Correct 2 ms 856 KB Output is correct
120 Correct 4 ms 1112 KB Output is correct
121 Correct 188 ms 30664 KB Output is correct
122 Correct 286 ms 44920 KB Output is correct
123 Correct 298 ms 44992 KB Output is correct
124 Correct 1 ms 348 KB Output is correct
125 Correct 1 ms 348 KB Output is correct
126 Correct 1 ms 348 KB Output is correct
127 Correct 320 ms 57144 KB Output is correct
128 Correct 326 ms 57216 KB Output is correct
129 Correct 346 ms 56268 KB Output is correct
130 Correct 5 ms 1372 KB Output is correct
131 Correct 9 ms 2392 KB Output is correct
132 Correct 198 ms 30432 KB Output is correct
133 Correct 320 ms 46596 KB Output is correct
134 Correct 436 ms 60820 KB Output is correct
135 Correct 401 ms 63320 KB Output is correct
136 Correct 397 ms 63516 KB Output is correct
137 Correct 432 ms 63948 KB Output is correct
138 Correct 431 ms 63176 KB Output is correct
139 Correct 395 ms 55488 KB Output is correct
140 Correct 1 ms 344 KB Output is correct
141 Correct 62 ms 10648 KB Output is correct
142 Correct 37 ms 5580 KB Output is correct
143 Correct 109 ms 19036 KB Output is correct
144 Correct 196 ms 32476 KB Output is correct
145 Correct 206 ms 32832 KB Output is correct
146 Correct 282 ms 40508 KB Output is correct
147 Correct 313 ms 49904 KB Output is correct
148 Correct 399 ms 56884 KB Output is correct
149 Correct 453 ms 64856 KB Output is correct
150 Correct 431 ms 61960 KB Output is correct
151 Correct 321 ms 57280 KB Output is correct
152 Correct 6 ms 1624 KB Output is correct
153 Correct 10 ms 2652 KB Output is correct
154 Correct 186 ms 30464 KB Output is correct
155 Correct 325 ms 46632 KB Output is correct
156 Correct 420 ms 60868 KB Output is correct
157 Correct 1 ms 348 KB Output is correct
158 Correct 1 ms 348 KB Output is correct
159 Correct 1 ms 348 KB Output is correct
160 Correct 1 ms 348 KB Output is correct
161 Correct 440 ms 68876 KB Output is correct
162 Correct 463 ms 65032 KB Output is correct
163 Correct 471 ms 66328 KB Output is correct
164 Correct 401 ms 66284 KB Output is correct
165 Correct 429 ms 67828 KB Output is correct
166 Correct 455 ms 68532 KB Output is correct
167 Incorrect 46 ms 9160 KB Solution announced impossible, but it is possible.
168 Halted 0 ms 0 KB -