Submission #465880

# Submission time Handle Problem Language Result Execution time Memory
465880 2021-08-17T06:46:23 Z alexxela12345 Fountain Parks (IOI21_parks) C++17
100 / 100
1889 ms 75052 KB
#include "parks.h"
#include <bits/stdc++.h>

using namespace std;

random_device rddev;
mt19937 rd(rddev());

int randint(int l, int r) {
  int b = r - l + 1;
  if (b <= 0) {
    exit(228);
  }
  int a = rd() % b + b;
  a %= b;
  return a + l;
}

vector<int> pa, ra;

int get(int v) {
  if (pa[v] == v)
    return v;
  return pa[v] = get(pa[v]);
}

void merge(int a, int b) {
  a = get(a);
  b = get(b);
  assert(a != b);
  if (ra[b] > ra[a])
    swap(a, b);
  pa[b] = a;
  if (ra[a] == ra[b])
    ra[a]++;
}

vector<vector<int>> g;
vector<int> used;

void dfs(int v) {
  used[v] = 1;
  deque<int> q;
  q.push_back(v);
  while (!q.empty()) {
    int v = q.front();
    q.pop_front();
    for (int u : g[v]) {
      if (!used[u]) {
        used[u] = 1;
        q.push_back(u);
      }
    }
  }
}

int construct_roads(std::vector<int> x, std::vector<int> y) {
  if (x.size() == 1) {
    build({}, {}, {}, {});
    return 1;
  }
  map<pair<int, int>, int> byc;
  int n = x.size();
  for (int i = 0; i < n; i++) {
    byc[{x[i], y[i]}] = i;
  }
  g.clear();
  g.resize(n);
  map<pair<int, int>, int> cnt;
  pa.assign(n, 0);
  ra.assign(n, 0);
  iota(pa.begin(), pa.end(), 0);
  set<pair<int, int>> alive;

  auto add = [&](int i, int j) {
    if (i < j) {
      alive.insert({i, j});
      g[i].push_back(j);
      g[j].push_back(i);
      if (x[i] == x[j]) {
        cnt[{x[i] + 1, (y[i] + y[j]) / 2}] += 1;
        cnt[{x[i] - 1, (y[i] + y[j]) / 2}] += 1;
      } else {
        cnt[{(x[i] + x[j]) / 2, y[i] + 1}] += 1;
        cnt[{(x[i] + x[j]) / 2, y[i] - 1}] += 1;
      }
    }
  };
  for (int i = 0; i < n; i++) {
    {
      pair<int, int> pp = {x[i], y[i]};
      pp.first += 2;
      if (byc.count(pp)) {
        add(i, byc[pp]);
      }
    }
    {
      pair<int, int> pp = {x[i], y[i]};
      pp.second += 2;
      if (byc.count(pp)) {
        add(i, byc[pp]);
      }
    }
    {
      pair<int, int> pp = {x[i], y[i]};
      pp.first -= 2;
      if (byc.count(pp)) {
        add(i, byc[pp]);
      }
    }
    {
      pair<int, int> pp = {x[i], y[i]};
      pp.second -= 2;
      if (byc.count(pp)) {
        add(i, byc[pp]);
      }
    }
  }
  used.assign(n, 0);
  dfs(0);
  if (*min_element(used.begin(), used.end()) == 0) {
    return 0;
  }
  vector<int> u, v, a, b;

  for (auto [xy, _] : cnt) {
    pair<int, int> RU, RD, LD, LU;
    RU = RD = LD = LU = xy;
    RU.first++, RU.second++;
    RD.first++, RD.second--;
    LU.first--, LU.second++;
    LD.first--, LD.second--;
    if ((xy.first + xy.second) % 4) {
      // left right
      if (byc.count(RU) && byc.count(RD)) {
	u.push_back(byc[RU]);
	v.push_back(byc[RD]);
	a.push_back(xy.first);
	b.push_back(xy.second);
      } else if (byc.count(LU) && byc.count(LD)) {
	u.push_back(byc[LU]);
	v.push_back(byc[LD]);
	a.push_back(xy.first);
	b.push_back(xy.second);
      }
    } else {
      if (byc.count(RU) && byc.count(LU)) {
	u.push_back(byc[RU]);
	v.push_back(byc[LU]);
	a.push_back(xy.first);
	b.push_back(xy.second);
      } else if (byc.count(RD) && byc.count(LD)) {
        u.push_back(byc[RD]);
        v.push_back(byc[LD]);
        a.push_back(xy.first);
        b.push_back(xy.second);
      }
    }
  }

  g.clear();
  g.resize(n);

  for (int i = 0; i < (int)u.size(); i++) {
    g[u[i]].push_back(v[i]);
    g[v[i]].push_back(u[i]);
  }
  used.assign(n, 0);
  dfs(0);
  assert(*min_element(used.begin(), used.end()) == 1);

  build(u, v, a, b);
  return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 224 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 632 ms 36740 KB Output is correct
10 Correct 29 ms 4172 KB Output is correct
11 Correct 208 ms 20044 KB Output is correct
12 Correct 47 ms 5956 KB Output is correct
13 Correct 104 ms 14264 KB Output is correct
14 Correct 2 ms 588 KB Output is correct
15 Correct 4 ms 844 KB Output is correct
16 Correct 624 ms 36808 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 224 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 632 ms 36740 KB Output is correct
10 Correct 29 ms 4172 KB Output is correct
11 Correct 208 ms 20044 KB Output is correct
12 Correct 47 ms 5956 KB Output is correct
13 Correct 104 ms 14264 KB Output is correct
14 Correct 2 ms 588 KB Output is correct
15 Correct 4 ms 844 KB Output is correct
16 Correct 624 ms 36808 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 0 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 1738 ms 71672 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 716 KB Output is correct
26 Correct 8 ms 1100 KB Output is correct
27 Correct 10 ms 1504 KB Output is correct
28 Correct 540 ms 28920 KB Output is correct
29 Correct 912 ms 43124 KB Output is correct
30 Correct 1311 ms 57576 KB Output is correct
31 Correct 1632 ms 71644 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 0 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 288 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 6 ms 844 KB Output is correct
44 Correct 7 ms 1100 KB Output is correct
45 Correct 616 ms 32940 KB Output is correct
46 Correct 922 ms 48964 KB Output is correct
47 Correct 1049 ms 48736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 224 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 632 ms 36740 KB Output is correct
10 Correct 29 ms 4172 KB Output is correct
11 Correct 208 ms 20044 KB Output is correct
12 Correct 47 ms 5956 KB Output is correct
13 Correct 104 ms 14264 KB Output is correct
14 Correct 2 ms 588 KB Output is correct
15 Correct 4 ms 844 KB Output is correct
16 Correct 624 ms 36808 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 0 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 1738 ms 71672 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 716 KB Output is correct
26 Correct 8 ms 1100 KB Output is correct
27 Correct 10 ms 1504 KB Output is correct
28 Correct 540 ms 28920 KB Output is correct
29 Correct 912 ms 43124 KB Output is correct
30 Correct 1311 ms 57576 KB Output is correct
31 Correct 1632 ms 71644 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 0 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 288 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 6 ms 844 KB Output is correct
44 Correct 7 ms 1100 KB Output is correct
45 Correct 616 ms 32940 KB Output is correct
46 Correct 922 ms 48964 KB Output is correct
47 Correct 1049 ms 48736 KB Output is correct
48 Correct 1 ms 204 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 300 KB Output is correct
51 Correct 1 ms 204 KB Output is correct
52 Correct 1 ms 204 KB Output is correct
53 Correct 1 ms 204 KB Output is correct
54 Correct 1 ms 204 KB Output is correct
55 Correct 1753 ms 73020 KB Output is correct
56 Correct 1 ms 204 KB Output is correct
57 Correct 6 ms 972 KB Output is correct
58 Correct 24 ms 2544 KB Output is correct
59 Correct 33 ms 3380 KB Output is correct
60 Correct 757 ms 36456 KB Output is correct
61 Correct 1071 ms 49204 KB Output is correct
62 Correct 1377 ms 60292 KB Output is correct
63 Correct 1778 ms 72860 KB Output is correct
64 Correct 1 ms 204 KB Output is correct
65 Correct 0 ms 204 KB Output is correct
66 Correct 1 ms 308 KB Output is correct
67 Correct 1330 ms 75052 KB Output is correct
68 Correct 1378 ms 74956 KB Output is correct
69 Correct 1464 ms 74676 KB Output is correct
70 Correct 9 ms 1356 KB Output is correct
71 Correct 19 ms 2516 KB Output is correct
72 Correct 624 ms 33320 KB Output is correct
73 Correct 1066 ms 50028 KB Output is correct
74 Correct 1494 ms 66580 KB Output is correct
75 Correct 1634 ms 73732 KB Output is correct
76 Correct 1391 ms 75016 KB Output is correct
77 Correct 12 ms 1740 KB Output is correct
78 Correct 26 ms 2920 KB Output is correct
79 Correct 656 ms 34900 KB Output is correct
80 Correct 1131 ms 52468 KB Output is correct
81 Correct 1563 ms 69772 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 224 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 632 ms 36740 KB Output is correct
10 Correct 29 ms 4172 KB Output is correct
11 Correct 208 ms 20044 KB Output is correct
12 Correct 47 ms 5956 KB Output is correct
13 Correct 104 ms 14264 KB Output is correct
14 Correct 2 ms 588 KB Output is correct
15 Correct 4 ms 844 KB Output is correct
16 Correct 624 ms 36808 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 0 ms 204 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Correct 1248 ms 60676 KB Output is correct
21 Correct 1360 ms 63188 KB Output is correct
22 Correct 1349 ms 63048 KB Output is correct
23 Correct 1230 ms 64156 KB Output is correct
24 Correct 465 ms 24644 KB Output is correct
25 Correct 1201 ms 65248 KB Output is correct
26 Correct 1097 ms 65296 KB Output is correct
27 Correct 1488 ms 74940 KB Output is correct
28 Correct 1471 ms 75028 KB Output is correct
29 Correct 1631 ms 74908 KB Output is correct
30 Correct 1593 ms 74872 KB Output is correct
31 Correct 1 ms 204 KB Output is correct
32 Correct 57 ms 5348 KB Output is correct
33 Correct 145 ms 12840 KB Output is correct
34 Correct 1171 ms 63220 KB Output is correct
35 Correct 26 ms 2996 KB Output is correct
36 Correct 183 ms 14244 KB Output is correct
37 Correct 468 ms 28284 KB Output is correct
38 Correct 465 ms 26564 KB Output is correct
39 Correct 713 ms 36300 KB Output is correct
40 Correct 991 ms 46272 KB Output is correct
41 Correct 1265 ms 55892 KB Output is correct
42 Correct 1536 ms 65628 KB Output is correct
43 Correct 1 ms 204 KB Output is correct
44 Correct 1 ms 204 KB Output is correct
45 Correct 1 ms 204 KB Output is correct
46 Correct 1 ms 300 KB Output is correct
47 Correct 1 ms 204 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 204 KB Output is correct
51 Correct 1 ms 204 KB Output is correct
52 Correct 1 ms 204 KB Output is correct
53 Correct 1 ms 204 KB Output is correct
54 Correct 6 ms 844 KB Output is correct
55 Correct 7 ms 1100 KB Output is correct
56 Correct 653 ms 33788 KB Output is correct
57 Correct 966 ms 48808 KB Output is correct
58 Correct 1010 ms 48800 KB Output is correct
59 Correct 1 ms 204 KB Output is correct
60 Correct 1 ms 204 KB Output is correct
61 Correct 0 ms 204 KB Output is correct
62 Correct 1373 ms 75012 KB Output is correct
63 Correct 1399 ms 74928 KB Output is correct
64 Correct 1395 ms 74536 KB Output is correct
65 Correct 9 ms 1356 KB Output is correct
66 Correct 19 ms 2536 KB Output is correct
67 Correct 637 ms 33384 KB Output is correct
68 Correct 1125 ms 49940 KB Output is correct
69 Correct 1456 ms 66628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 224 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 632 ms 36740 KB Output is correct
10 Correct 29 ms 4172 KB Output is correct
11 Correct 208 ms 20044 KB Output is correct
12 Correct 47 ms 5956 KB Output is correct
13 Correct 104 ms 14264 KB Output is correct
14 Correct 2 ms 588 KB Output is correct
15 Correct 4 ms 844 KB Output is correct
16 Correct 624 ms 36808 KB Output is correct
17 Correct 1394 ms 73384 KB Output is correct
18 Correct 1386 ms 73216 KB Output is correct
19 Correct 1282 ms 60924 KB Output is correct
20 Correct 1668 ms 71492 KB Output is correct
21 Correct 1359 ms 65032 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 142 ms 11084 KB Output is correct
24 Correct 65 ms 6196 KB Output is correct
25 Correct 382 ms 21008 KB Output is correct
26 Correct 663 ms 35588 KB Output is correct
27 Correct 688 ms 35572 KB Output is correct
28 Correct 981 ms 44592 KB Output is correct
29 Correct 1139 ms 53388 KB Output is correct
30 Correct 1375 ms 61780 KB Output is correct
31 Correct 1649 ms 70776 KB Output is correct
32 Correct 1615 ms 73532 KB Output is correct
33 Correct 1378 ms 75028 KB Output is correct
34 Correct 12 ms 1740 KB Output is correct
35 Correct 22 ms 2912 KB Output is correct
36 Correct 637 ms 35032 KB Output is correct
37 Correct 1096 ms 52412 KB Output is correct
38 Correct 1585 ms 69728 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 224 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 632 ms 36740 KB Output is correct
10 Correct 29 ms 4172 KB Output is correct
11 Correct 208 ms 20044 KB Output is correct
12 Correct 47 ms 5956 KB Output is correct
13 Correct 104 ms 14264 KB Output is correct
14 Correct 2 ms 588 KB Output is correct
15 Correct 4 ms 844 KB Output is correct
16 Correct 624 ms 36808 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 0 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 1738 ms 71672 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 716 KB Output is correct
26 Correct 8 ms 1100 KB Output is correct
27 Correct 10 ms 1504 KB Output is correct
28 Correct 540 ms 28920 KB Output is correct
29 Correct 912 ms 43124 KB Output is correct
30 Correct 1311 ms 57576 KB Output is correct
31 Correct 1632 ms 71644 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 0 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 288 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 6 ms 844 KB Output is correct
44 Correct 7 ms 1100 KB Output is correct
45 Correct 616 ms 32940 KB Output is correct
46 Correct 922 ms 48964 KB Output is correct
47 Correct 1049 ms 48736 KB Output is correct
48 Correct 1 ms 204 KB Output is correct
49 Correct 1 ms 204 KB Output is correct
50 Correct 1 ms 300 KB Output is correct
51 Correct 1 ms 204 KB Output is correct
52 Correct 1 ms 204 KB Output is correct
53 Correct 1 ms 204 KB Output is correct
54 Correct 1 ms 204 KB Output is correct
55 Correct 1753 ms 73020 KB Output is correct
56 Correct 1 ms 204 KB Output is correct
57 Correct 6 ms 972 KB Output is correct
58 Correct 24 ms 2544 KB Output is correct
59 Correct 33 ms 3380 KB Output is correct
60 Correct 757 ms 36456 KB Output is correct
61 Correct 1071 ms 49204 KB Output is correct
62 Correct 1377 ms 60292 KB Output is correct
63 Correct 1778 ms 72860 KB Output is correct
64 Correct 1 ms 204 KB Output is correct
65 Correct 0 ms 204 KB Output is correct
66 Correct 1 ms 308 KB Output is correct
67 Correct 1330 ms 75052 KB Output is correct
68 Correct 1378 ms 74956 KB Output is correct
69 Correct 1464 ms 74676 KB Output is correct
70 Correct 9 ms 1356 KB Output is correct
71 Correct 19 ms 2516 KB Output is correct
72 Correct 624 ms 33320 KB Output is correct
73 Correct 1066 ms 50028 KB Output is correct
74 Correct 1494 ms 66580 KB Output is correct
75 Correct 1634 ms 73732 KB Output is correct
76 Correct 1391 ms 75016 KB Output is correct
77 Correct 12 ms 1740 KB Output is correct
78 Correct 26 ms 2920 KB Output is correct
79 Correct 656 ms 34900 KB Output is correct
80 Correct 1131 ms 52468 KB Output is correct
81 Correct 1563 ms 69772 KB Output is correct
82 Correct 1 ms 204 KB Output is correct
83 Correct 0 ms 204 KB Output is correct
84 Correct 0 ms 204 KB Output is correct
85 Correct 1248 ms 60676 KB Output is correct
86 Correct 1360 ms 63188 KB Output is correct
87 Correct 1349 ms 63048 KB Output is correct
88 Correct 1230 ms 64156 KB Output is correct
89 Correct 465 ms 24644 KB Output is correct
90 Correct 1201 ms 65248 KB Output is correct
91 Correct 1097 ms 65296 KB Output is correct
92 Correct 1488 ms 74940 KB Output is correct
93 Correct 1471 ms 75028 KB Output is correct
94 Correct 1631 ms 74908 KB Output is correct
95 Correct 1593 ms 74872 KB Output is correct
96 Correct 1 ms 204 KB Output is correct
97 Correct 57 ms 5348 KB Output is correct
98 Correct 145 ms 12840 KB Output is correct
99 Correct 1171 ms 63220 KB Output is correct
100 Correct 26 ms 2996 KB Output is correct
101 Correct 183 ms 14244 KB Output is correct
102 Correct 468 ms 28284 KB Output is correct
103 Correct 465 ms 26564 KB Output is correct
104 Correct 713 ms 36300 KB Output is correct
105 Correct 991 ms 46272 KB Output is correct
106 Correct 1265 ms 55892 KB Output is correct
107 Correct 1536 ms 65628 KB Output is correct
108 Correct 1 ms 204 KB Output is correct
109 Correct 1 ms 204 KB Output is correct
110 Correct 1 ms 204 KB Output is correct
111 Correct 1 ms 300 KB Output is correct
112 Correct 1 ms 204 KB Output is correct
113 Correct 0 ms 204 KB Output is correct
114 Correct 1 ms 204 KB Output is correct
115 Correct 1 ms 204 KB Output is correct
116 Correct 1 ms 204 KB Output is correct
117 Correct 1 ms 204 KB Output is correct
118 Correct 1 ms 204 KB Output is correct
119 Correct 6 ms 844 KB Output is correct
120 Correct 7 ms 1100 KB Output is correct
121 Correct 653 ms 33788 KB Output is correct
122 Correct 966 ms 48808 KB Output is correct
123 Correct 1010 ms 48800 KB Output is correct
124 Correct 1 ms 204 KB Output is correct
125 Correct 1 ms 204 KB Output is correct
126 Correct 0 ms 204 KB Output is correct
127 Correct 1373 ms 75012 KB Output is correct
128 Correct 1399 ms 74928 KB Output is correct
129 Correct 1395 ms 74536 KB Output is correct
130 Correct 9 ms 1356 KB Output is correct
131 Correct 19 ms 2536 KB Output is correct
132 Correct 637 ms 33384 KB Output is correct
133 Correct 1125 ms 49940 KB Output is correct
134 Correct 1456 ms 66628 KB Output is correct
135 Correct 1394 ms 73384 KB Output is correct
136 Correct 1386 ms 73216 KB Output is correct
137 Correct 1282 ms 60924 KB Output is correct
138 Correct 1668 ms 71492 KB Output is correct
139 Correct 1359 ms 65032 KB Output is correct
140 Correct 1 ms 204 KB Output is correct
141 Correct 142 ms 11084 KB Output is correct
142 Correct 65 ms 6196 KB Output is correct
143 Correct 382 ms 21008 KB Output is correct
144 Correct 663 ms 35588 KB Output is correct
145 Correct 688 ms 35572 KB Output is correct
146 Correct 981 ms 44592 KB Output is correct
147 Correct 1139 ms 53388 KB Output is correct
148 Correct 1375 ms 61780 KB Output is correct
149 Correct 1649 ms 70776 KB Output is correct
150 Correct 1615 ms 73532 KB Output is correct
151 Correct 1378 ms 75028 KB Output is correct
152 Correct 12 ms 1740 KB Output is correct
153 Correct 22 ms 2912 KB Output is correct
154 Correct 637 ms 35032 KB Output is correct
155 Correct 1096 ms 52412 KB Output is correct
156 Correct 1585 ms 69728 KB Output is correct
157 Correct 1 ms 204 KB Output is correct
158 Correct 0 ms 304 KB Output is correct
159 Correct 0 ms 204 KB Output is correct
160 Correct 1 ms 204 KB Output is correct
161 Correct 1789 ms 72104 KB Output is correct
162 Correct 1274 ms 63264 KB Output is correct
163 Correct 1371 ms 66240 KB Output is correct
164 Correct 1384 ms 66380 KB Output is correct
165 Correct 1667 ms 70264 KB Output is correct
166 Correct 1867 ms 71532 KB Output is correct
167 Correct 287 ms 16972 KB Output is correct
168 Correct 149 ms 9648 KB Output is correct
169 Correct 510 ms 25200 KB Output is correct
170 Correct 1062 ms 47088 KB Output is correct
171 Correct 1558 ms 62524 KB Output is correct
172 Correct 807 ms 36432 KB Output is correct
173 Correct 1002 ms 43876 KB Output is correct
174 Correct 1284 ms 50916 KB Output is correct
175 Correct 1452 ms 58012 KB Output is correct
176 Correct 1704 ms 65364 KB Output is correct
177 Correct 1889 ms 72480 KB Output is correct