Submission #492856

# Submission time Handle Problem Language Result Execution time Memory
492856 2021-12-09T10:54:49 Z Sunset Fountain Parks (IOI21_parks) C++17
100 / 100
920 ms 71828 KB
#include "parks.h"
#include <bits/stdc++.h>
#define X first
#define Y second
#define sz(x) ((int)(x).size())

using namespace std;
typedef pair<int, int> ipair;
const ipair D[4] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};

ipair operator + (ipair const& a, ipair const& b) { return {a.X+b.X, a.Y+b.Y}; }
ipair operator - (ipair const& a, ipair const& b) { return {a.X-b.X, a.Y-b.Y}; }
ipair operator * (ipair const& a, int b) { return {a.X*b, a.Y*b}; }

int construct_roads(std::vector<int> ix, std::vector<int> iy) {
  int n = sz(ix);
  map<ipair, int> fs;
  set<pair<ipair, ipair>> roads;
  for (int i = 0; i < n; ++i)
    fs[{ix[i], iy[i]}] = i;

  vector<int> ansA, ansB, ansX, ansY;

  set<ipair> q;
  set<ipair> vis;
  set<ipair> done;
  ipair p0 = fs.begin()->first;
  q.insert(p0);
  vis.insert(p0);

  bool isFirst = true;
  while (!q.empty()) {
    ipair p = *q.begin();
    q.erase(p);

    if (!isFirst) {
      for (int i = 0; i < 4; ++i) {
        ipair d = D[i];
        ipair p2 = p + d * 2;
        if (!done.count(p2)) continue;
        ipair d2;
        if (((p.X + p.Y) / 2) & 1) {
          d2 = D[(i + 1) % 4];
        } else {
          d2 = D[(i + 3) % 4];
        }
        if (roads.count({p + d2 * 2, p2 + d2 * 2})) continue;
        roads.insert({p, p2});
        roads.insert({p2, p});
        ansA.push_back(fs[p]);
        ansB.push_back(fs[p2]);
        ipair pp = p + d + d2;
        ansX.push_back(pp.X);
        ansY.push_back(pp.Y);
        break;
      }
    }
    isFirst = false;
    done.insert(p);

    for (auto d : D)
      if (fs.count(p + d * 2) && !vis.count(p + d * 2)) {
        q.insert(p + d * 2);
        vis.insert(p + d * 2);
      }
  }

  if (sz(vis) != n) return 0;
  build(ansA, ansB, ansX, ansY);
  return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 313 ms 34732 KB Output is correct
10 Correct 25 ms 3904 KB Output is correct
11 Correct 155 ms 18852 KB Output is correct
12 Correct 36 ms 5640 KB Output is correct
13 Correct 79 ms 10792 KB Output is correct
14 Correct 1 ms 460 KB Output is correct
15 Correct 3 ms 460 KB Output is correct
16 Correct 331 ms 34876 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 313 ms 34732 KB Output is correct
10 Correct 25 ms 3904 KB Output is correct
11 Correct 155 ms 18852 KB Output is correct
12 Correct 36 ms 5640 KB Output is correct
13 Correct 79 ms 10792 KB Output is correct
14 Correct 1 ms 460 KB Output is correct
15 Correct 3 ms 460 KB Output is correct
16 Correct 331 ms 34876 KB Output is correct
17 Correct 0 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 0 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 870 ms 70852 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 716 KB Output is correct
26 Correct 4 ms 844 KB Output is correct
27 Correct 4 ms 716 KB Output is correct
28 Correct 297 ms 28504 KB Output is correct
29 Correct 468 ms 42660 KB Output is correct
30 Correct 701 ms 56700 KB Output is correct
31 Correct 875 ms 71032 KB Output is correct
32 Correct 1 ms 224 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 296 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 292 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 2 ms 588 KB Output is correct
44 Correct 2 ms 588 KB Output is correct
45 Correct 331 ms 35544 KB Output is correct
46 Correct 536 ms 51436 KB Output is correct
47 Correct 520 ms 51412 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 313 ms 34732 KB Output is correct
10 Correct 25 ms 3904 KB Output is correct
11 Correct 155 ms 18852 KB Output is correct
12 Correct 36 ms 5640 KB Output is correct
13 Correct 79 ms 10792 KB Output is correct
14 Correct 1 ms 460 KB Output is correct
15 Correct 3 ms 460 KB Output is correct
16 Correct 331 ms 34876 KB Output is correct
17 Correct 0 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 0 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 870 ms 70852 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 716 KB Output is correct
26 Correct 4 ms 844 KB Output is correct
27 Correct 4 ms 716 KB Output is correct
28 Correct 297 ms 28504 KB Output is correct
29 Correct 468 ms 42660 KB Output is correct
30 Correct 701 ms 56700 KB Output is correct
31 Correct 875 ms 71032 KB Output is correct
32 Correct 1 ms 224 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 296 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 292 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 2 ms 588 KB Output is correct
44 Correct 2 ms 588 KB Output is correct
45 Correct 331 ms 35544 KB Output is correct
46 Correct 536 ms 51436 KB Output is correct
47 Correct 520 ms 51412 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 0 ms 204 KB Output is correct
50 Correct 0 ms 204 KB Output is correct
51 Correct 1 ms 288 KB Output is correct
52 Correct 0 ms 204 KB Output is correct
53 Correct 1 ms 288 KB Output is correct
54 Correct 1 ms 204 KB Output is correct
55 Correct 920 ms 70772 KB Output is correct
56 Correct 1 ms 204 KB Output is correct
57 Correct 4 ms 844 KB Output is correct
58 Correct 16 ms 2428 KB Output is correct
59 Correct 7 ms 1612 KB Output is correct
60 Correct 392 ms 35448 KB Output is correct
61 Correct 573 ms 47760 KB Output is correct
62 Correct 705 ms 58544 KB Output is correct
63 Correct 919 ms 70768 KB Output is correct
64 Correct 1 ms 204 KB Output is correct
65 Correct 1 ms 204 KB Output is correct
66 Correct 0 ms 204 KB Output is correct
67 Correct 692 ms 70976 KB Output is correct
68 Correct 745 ms 70812 KB Output is correct
69 Correct 727 ms 70424 KB Output is correct
70 Correct 6 ms 1100 KB Output is correct
71 Correct 8 ms 1356 KB Output is correct
72 Correct 396 ms 35516 KB Output is correct
73 Correct 598 ms 53256 KB Output is correct
74 Correct 819 ms 70872 KB Output is correct
75 Correct 811 ms 70916 KB Output is correct
76 Correct 731 ms 70884 KB Output is correct
77 Correct 7 ms 1228 KB Output is correct
78 Correct 7 ms 1380 KB Output is correct
79 Correct 407 ms 35512 KB Output is correct
80 Correct 649 ms 53304 KB Output is correct
81 Correct 903 ms 70876 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 313 ms 34732 KB Output is correct
10 Correct 25 ms 3904 KB Output is correct
11 Correct 155 ms 18852 KB Output is correct
12 Correct 36 ms 5640 KB Output is correct
13 Correct 79 ms 10792 KB Output is correct
14 Correct 1 ms 460 KB Output is correct
15 Correct 3 ms 460 KB Output is correct
16 Correct 331 ms 34876 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 743 ms 69164 KB Output is correct
21 Correct 798 ms 71500 KB Output is correct
22 Correct 651 ms 71400 KB Output is correct
23 Correct 561 ms 60568 KB Output is correct
24 Correct 148 ms 17592 KB Output is correct
25 Correct 158 ms 17632 KB Output is correct
26 Correct 156 ms 17592 KB Output is correct
27 Correct 694 ms 70732 KB Output is correct
28 Correct 597 ms 70876 KB Output is correct
29 Correct 793 ms 70808 KB Output is correct
30 Correct 792 ms 70956 KB Output is correct
31 Correct 0 ms 204 KB Output is correct
32 Correct 41 ms 5540 KB Output is correct
33 Correct 66 ms 9368 KB Output is correct
34 Correct 690 ms 71704 KB Output is correct
35 Correct 13 ms 2380 KB Output is correct
36 Correct 48 ms 7200 KB Output is correct
37 Correct 84 ms 11812 KB Output is correct
38 Correct 281 ms 29032 KB Output is correct
39 Correct 383 ms 39584 KB Output is correct
40 Correct 511 ms 50352 KB Output is correct
41 Correct 636 ms 61076 KB Output is correct
42 Correct 764 ms 71732 KB Output is correct
43 Correct 0 ms 204 KB Output is correct
44 Correct 0 ms 204 KB Output is correct
45 Correct 0 ms 204 KB Output is correct
46 Correct 0 ms 204 KB Output is correct
47 Correct 1 ms 204 KB Output is correct
48 Correct 1 ms 204 KB Output is correct
49 Correct 0 ms 204 KB Output is correct
50 Correct 0 ms 204 KB Output is correct
51 Correct 0 ms 204 KB Output is correct
52 Correct 0 ms 292 KB Output is correct
53 Correct 0 ms 204 KB Output is correct
54 Correct 2 ms 588 KB Output is correct
55 Correct 2 ms 588 KB Output is correct
56 Correct 335 ms 35628 KB Output is correct
57 Correct 495 ms 51376 KB Output is correct
58 Correct 508 ms 51428 KB Output is correct
59 Correct 0 ms 204 KB Output is correct
60 Correct 1 ms 292 KB Output is correct
61 Correct 0 ms 204 KB Output is correct
62 Correct 652 ms 70780 KB Output is correct
63 Correct 687 ms 70768 KB Output is correct
64 Correct 687 ms 70700 KB Output is correct
65 Correct 5 ms 1100 KB Output is correct
66 Correct 7 ms 1356 KB Output is correct
67 Correct 373 ms 35564 KB Output is correct
68 Correct 586 ms 53176 KB Output is correct
69 Correct 821 ms 70920 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 313 ms 34732 KB Output is correct
10 Correct 25 ms 3904 KB Output is correct
11 Correct 155 ms 18852 KB Output is correct
12 Correct 36 ms 5640 KB Output is correct
13 Correct 79 ms 10792 KB Output is correct
14 Correct 1 ms 460 KB Output is correct
15 Correct 3 ms 460 KB Output is correct
16 Correct 331 ms 34876 KB Output is correct
17 Correct 706 ms 69344 KB Output is correct
18 Correct 697 ms 71300 KB Output is correct
19 Correct 701 ms 71448 KB Output is correct
20 Correct 701 ms 69656 KB Output is correct
21 Correct 633 ms 62348 KB Output is correct
22 Correct 0 ms 292 KB Output is correct
23 Correct 92 ms 11728 KB Output is correct
24 Correct 29 ms 4520 KB Output is correct
25 Correct 59 ms 9300 KB Output is correct
26 Correct 106 ms 13992 KB Output is correct
27 Correct 333 ms 35904 KB Output is correct
28 Correct 430 ms 45172 KB Output is correct
29 Correct 559 ms 54096 KB Output is correct
30 Correct 681 ms 62688 KB Output is correct
31 Correct 758 ms 71828 KB Output is correct
32 Correct 782 ms 70940 KB Output is correct
33 Correct 704 ms 70792 KB Output is correct
34 Correct 6 ms 1324 KB Output is correct
35 Correct 7 ms 1484 KB Output is correct
36 Correct 368 ms 35500 KB Output is correct
37 Correct 565 ms 53248 KB Output is correct
38 Correct 812 ms 70796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 313 ms 34732 KB Output is correct
10 Correct 25 ms 3904 KB Output is correct
11 Correct 155 ms 18852 KB Output is correct
12 Correct 36 ms 5640 KB Output is correct
13 Correct 79 ms 10792 KB Output is correct
14 Correct 1 ms 460 KB Output is correct
15 Correct 3 ms 460 KB Output is correct
16 Correct 331 ms 34876 KB Output is correct
17 Correct 0 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 0 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 870 ms 70852 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 4 ms 716 KB Output is correct
26 Correct 4 ms 844 KB Output is correct
27 Correct 4 ms 716 KB Output is correct
28 Correct 297 ms 28504 KB Output is correct
29 Correct 468 ms 42660 KB Output is correct
30 Correct 701 ms 56700 KB Output is correct
31 Correct 875 ms 71032 KB Output is correct
32 Correct 1 ms 224 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 0 ms 204 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 296 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 292 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 2 ms 588 KB Output is correct
44 Correct 2 ms 588 KB Output is correct
45 Correct 331 ms 35544 KB Output is correct
46 Correct 536 ms 51436 KB Output is correct
47 Correct 520 ms 51412 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 0 ms 204 KB Output is correct
50 Correct 0 ms 204 KB Output is correct
51 Correct 1 ms 288 KB Output is correct
52 Correct 0 ms 204 KB Output is correct
53 Correct 1 ms 288 KB Output is correct
54 Correct 1 ms 204 KB Output is correct
55 Correct 920 ms 70772 KB Output is correct
56 Correct 1 ms 204 KB Output is correct
57 Correct 4 ms 844 KB Output is correct
58 Correct 16 ms 2428 KB Output is correct
59 Correct 7 ms 1612 KB Output is correct
60 Correct 392 ms 35448 KB Output is correct
61 Correct 573 ms 47760 KB Output is correct
62 Correct 705 ms 58544 KB Output is correct
63 Correct 919 ms 70768 KB Output is correct
64 Correct 1 ms 204 KB Output is correct
65 Correct 1 ms 204 KB Output is correct
66 Correct 0 ms 204 KB Output is correct
67 Correct 692 ms 70976 KB Output is correct
68 Correct 745 ms 70812 KB Output is correct
69 Correct 727 ms 70424 KB Output is correct
70 Correct 6 ms 1100 KB Output is correct
71 Correct 8 ms 1356 KB Output is correct
72 Correct 396 ms 35516 KB Output is correct
73 Correct 598 ms 53256 KB Output is correct
74 Correct 819 ms 70872 KB Output is correct
75 Correct 811 ms 70916 KB Output is correct
76 Correct 731 ms 70884 KB Output is correct
77 Correct 7 ms 1228 KB Output is correct
78 Correct 7 ms 1380 KB Output is correct
79 Correct 407 ms 35512 KB Output is correct
80 Correct 649 ms 53304 KB Output is correct
81 Correct 903 ms 70876 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 743 ms 69164 KB Output is correct
86 Correct 798 ms 71500 KB Output is correct
87 Correct 651 ms 71400 KB Output is correct
88 Correct 561 ms 60568 KB Output is correct
89 Correct 148 ms 17592 KB Output is correct
90 Correct 158 ms 17632 KB Output is correct
91 Correct 156 ms 17592 KB Output is correct
92 Correct 694 ms 70732 KB Output is correct
93 Correct 597 ms 70876 KB Output is correct
94 Correct 793 ms 70808 KB Output is correct
95 Correct 792 ms 70956 KB Output is correct
96 Correct 0 ms 204 KB Output is correct
97 Correct 41 ms 5540 KB Output is correct
98 Correct 66 ms 9368 KB Output is correct
99 Correct 690 ms 71704 KB Output is correct
100 Correct 13 ms 2380 KB Output is correct
101 Correct 48 ms 7200 KB Output is correct
102 Correct 84 ms 11812 KB Output is correct
103 Correct 281 ms 29032 KB Output is correct
104 Correct 383 ms 39584 KB Output is correct
105 Correct 511 ms 50352 KB Output is correct
106 Correct 636 ms 61076 KB Output is correct
107 Correct 764 ms 71732 KB Output is correct
108 Correct 0 ms 204 KB Output is correct
109 Correct 0 ms 204 KB Output is correct
110 Correct 0 ms 204 KB Output is correct
111 Correct 0 ms 204 KB Output is correct
112 Correct 1 ms 204 KB Output is correct
113 Correct 1 ms 204 KB Output is correct
114 Correct 0 ms 204 KB Output is correct
115 Correct 0 ms 204 KB Output is correct
116 Correct 0 ms 204 KB Output is correct
117 Correct 0 ms 292 KB Output is correct
118 Correct 0 ms 204 KB Output is correct
119 Correct 2 ms 588 KB Output is correct
120 Correct 2 ms 588 KB Output is correct
121 Correct 335 ms 35628 KB Output is correct
122 Correct 495 ms 51376 KB Output is correct
123 Correct 508 ms 51428 KB Output is correct
124 Correct 0 ms 204 KB Output is correct
125 Correct 1 ms 292 KB Output is correct
126 Correct 0 ms 204 KB Output is correct
127 Correct 652 ms 70780 KB Output is correct
128 Correct 687 ms 70768 KB Output is correct
129 Correct 687 ms 70700 KB Output is correct
130 Correct 5 ms 1100 KB Output is correct
131 Correct 7 ms 1356 KB Output is correct
132 Correct 373 ms 35564 KB Output is correct
133 Correct 586 ms 53176 KB Output is correct
134 Correct 821 ms 70920 KB Output is correct
135 Correct 706 ms 69344 KB Output is correct
136 Correct 697 ms 71300 KB Output is correct
137 Correct 701 ms 71448 KB Output is correct
138 Correct 701 ms 69656 KB Output is correct
139 Correct 633 ms 62348 KB Output is correct
140 Correct 0 ms 292 KB Output is correct
141 Correct 92 ms 11728 KB Output is correct
142 Correct 29 ms 4520 KB Output is correct
143 Correct 59 ms 9300 KB Output is correct
144 Correct 106 ms 13992 KB Output is correct
145 Correct 333 ms 35904 KB Output is correct
146 Correct 430 ms 45172 KB Output is correct
147 Correct 559 ms 54096 KB Output is correct
148 Correct 681 ms 62688 KB Output is correct
149 Correct 758 ms 71828 KB Output is correct
150 Correct 782 ms 70940 KB Output is correct
151 Correct 704 ms 70792 KB Output is correct
152 Correct 6 ms 1324 KB Output is correct
153 Correct 7 ms 1484 KB Output is correct
154 Correct 368 ms 35500 KB Output is correct
155 Correct 565 ms 53248 KB Output is correct
156 Correct 812 ms 70796 KB Output is correct
157 Correct 1 ms 204 KB Output is correct
158 Correct 0 ms 204 KB Output is correct
159 Correct 1 ms 204 KB Output is correct
160 Correct 0 ms 204 KB Output is correct
161 Correct 844 ms 71176 KB Output is correct
162 Correct 723 ms 71704 KB Output is correct
163 Correct 645 ms 71572 KB Output is correct
164 Correct 674 ms 71684 KB Output is correct
165 Correct 770 ms 71436 KB Output is correct
166 Correct 761 ms 71212 KB Output is correct
167 Correct 149 ms 16788 KB Output is correct
168 Correct 42 ms 6212 KB Output is correct
169 Correct 70 ms 10224 KB Output is correct
170 Correct 148 ms 16972 KB Output is correct
171 Correct 170 ms 20004 KB Output is correct
172 Correct 340 ms 36004 KB Output is correct
173 Correct 435 ms 43196 KB Output is correct
174 Correct 521 ms 50196 KB Output is correct
175 Correct 589 ms 57292 KB Output is correct
176 Correct 665 ms 64864 KB Output is correct
177 Correct 750 ms 71684 KB Output is correct