Submission #280396

#TimeUsernameProblemLanguageResultExecution timeMemory
280396caoashPark (BOI16_park)C++14
Compilation error
0 ms0 KiB
--- id: baltic-16-park title: Baltic OI 16 Park author: Michael Cao --- ## TL;DR Draw lines between circles and to borders, and use DSU to answer queries offline. ## Intuition In this problem, we're given a park with circles of differing radii and asked whether some circle can move from a corner of the park to another corner. Upon first glance, this task seems quite challenging and probably involves some not-so-fun geometry. However, the final solution turns out to be quite nice, and not too hard to implement either. Let's call the circle you are moving around between exits $x$. Given two other circles, $a$ and $b$, observe that it's optimal to move the center of $x$ through the midpoint of the line segment connecting the centers of $a$ and $b$. Using this observation, we claim that $x$ can move between two circles $a$ and $b$ as long as $dist(a, b) \leq x_r$, where $x_r$ denotes the radius of $x$ and $dist(a, b)$ denotes the distance between the borders of $a$ and $b$. Also, let's add horizontal and vertical line segments from each border of the park to each circle with the distance between them as well. Finally, observe that you can go from exit $e_1$ to exit $e_2$ as long as there isn't some chain of line segments with weight $\leq x_r$ that completely blocks off the path between exits. For example, you can go from the top-right exit to the bottom-left exit as long as there isn't a chain of line segments from the top border to the bottom, top to right, bottom to left, or left to right. ## Creating a Graph Now, you have some circles with weights between each other. Let's transform each of the line segments we defined before into an edge, and each circle and border into a node, creating $n ^ 2 + 4n$ edges overall and $n + 4$ nodes. The problem of checking whether we can go between two exits now becomes checking, for some $r$, whether edges with weight $\leq r$ connect certain borders (this involves some casework). ## Offline Queries and DSU To efficently answer queries of whether two borders are connected, let's process them in order of increasing $x_r$ and store a DSU. Now, we can add edges one by one as long as their weight $\leq x_r$, and then check connectivity between the border nodes. <Warning> When computing distance between two circles, make sure to subtract the radius of both. We want the distance between the borders, not the centers. </Warning> ## Code ```cpp #include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; #define pb push_back #define rsz resize #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() using pi = pair<int,int>; #define f first #define s second #define mp make_pair const int MX = 2006; vector<pair<ll, pair<pi, pi>>> ed; map<pi, int> cc; template<int SZ> struct DSU{ int p[SZ], sz[SZ]; void init(){ for(int i = 0; i < SZ; i++){ p[i] = i; sz[i] = 1; } } int find(int x){ return p[x] = (p[x] == x ? x : find(p[x])); } void merge(int u, int v){ int a = find(u); int b = find(v); if(a != b){ if(sz[a] < sz[b]){ swap(a,b); } p[b] = a; sz[a] += sz[b]; } } }; DSU<MX> dsu; bool ok[100005][4]; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, m, w, h; cin >> n >> m >> w >> h; vector<pair<pair<ll, ll>, int>> trees(n); set<pi> pts; auto dist = [&] (const int &x1, const int &y1, const int &x2, const int &y2) { return sqrt((1LL *(x2 - x1) * (x2 - x1)) + (1LL * (y2 - y1) * (y2 - y1))); }; auto add = [&] (const int &x1, const int &y1, const int &x2, const int &y2, const ll &r1, const ll &r2) { ll ndist = dist(x1, y1, x2, y2) - r1 - r2; ed.pb(mp(ndist, mp(mp(x1, y1), mp(x2, y2)))); }; for (int i = 0; i < n; i++) { cin >> trees[i].f.f >> trees[i].f.s >> trees[i].s; pts.insert(mp(trees[i].f.f, trees[i].f.s)); cc[mp(0, trees[i].f.s)] = 3; cc[mp(trees[i].f.f, h)] = 2; cc[mp(w, trees[i].f.s)] = 1; cc[mp(trees[i].f.f, 0)] = 0; add(trees[i].f.f, trees[i].f.s, 0, trees[i].f.s, trees[i].s, 0); add(trees[i].f.f, trees[i].f.s, trees[i].f.f, 0, trees[i].s, 0); add(trees[i].f.f, trees[i].f.s, w, trees[i].f.s, trees[i].s, 0); add(trees[i].f.f, trees[i].f.s, trees[i].f.f, h, trees[i].s, 0); } int cnt = 4; for (pi x : pts) { cc[x] = cnt++; } assert(cnt <= n + 4); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { add(trees[i].f.f, trees[i].f.s, trees[j].f.f, trees[j].f.s, trees[i].s, trees[j].s); } } vector<pair<pi, int>> qrs; for (int i = 0; i < m; i++) { int r, e; cin >> r >> e; e--; qrs.pb(mp(mp(2 * r, e), i)); } sort(all(qrs)); sort(all(ed)); dsu.init(); int p = 0; memset(ok, true, sizeof(ok)); for (auto v : ed) { while (p < sz(qrs) && qrs[p].f.f <= v.f){ bool conn[4][4]; pair<pi, int> curr = qrs[p]; for (int i = 0; i < 4; i++) { conn[i][i] = true; for (int j = i + 1; j < 4; j++) { conn[i][j] = (dsu.find(i) == dsu.find(j)); conn[j][i] = conn[i][j]; } } auto bad = [&] (const int &x) { return conn[(x - 1 < 0 ? 3 : x - 1)][x]; }; for (int i = 0; i < 4; i++) { if (curr.f.s == i) { continue; } if (bad(curr.f.s) || bad(i)) { ok[curr.s][i] = false; continue; } bool upok = conn[0][2]; bool sok = conn[1][3]; if (abs(curr.f.s - i) == 2) { if (upok || sok) { ok[curr.s][i] = false; continue; } } else if(curr.f.s + i == 3) { if (sok) { ok[curr.s][i] = false; continue; } } else { if (upok) { ok[curr.s][i] = false; } } } ++p; if (p >= sz(qrs)) break; } dsu.merge(cc[v.s.f], cc[v.s.s]); } for (int i = 0; i < m; i++) { string ret = ""; for (int j = 0; j < 4; j++) { if (ok[i][j]) ret += to_string(j + 1); } cout << ret << '\n'; } } ```

Compilation message (stderr)

park.cpp:7:1: error: stray '##' in program
    7 | ## TL;DR
      | ^~
park.cpp:11:1: error: stray '##' in program
   11 | ## Intuition
      | ^~
park.cpp:13:20: warning: missing terminating ' character
   13 | In this problem, we're given a park with circles of differing radii and asked whether some circle can move from a corner of the park to another corner. Upon first glance, this task seems quite challenging and probably involves some not-so-fun geometry. However, the final solution turns out to be quite nice, and not too hard to implement either.
      |                    ^
park.cpp:13:20: error: missing terminating ' character
   13 | In this problem, we're given a park with circles of differing radii and asked whether some circle can move from a corner of the park to another corner. Upon first glance, this task seems quite challenging and probably involves some not-so-fun geometry. However, the final solution turns out to be quite nice, and not too hard to implement either.
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
park.cpp:15:4: warning: character constant too long for its type
   15 | Let's call the circle you are moving around between exits $x$. Given two other circles, $a$ and $b$, observe that it's optimal to move the center of $x$ through the midpoint of the line segment connecting the centers of $a$ and $b$. Using this observation, we claim that $x$ can move between two circles $a$ and $b$ as long as $dist(a, b) \leq x_r$, where $x_r$ denotes the radius of $x$ and $dist(a, b)$ denotes the distance between the borders of $a$ and $b$. Also, let's add horizontal and vertical line segments from each border of the park to each circle with the distance between them as well.
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
park.cpp:15:340: error: stray '\' in program
   15 | Let's call the circle you are moving around between exits $x$. Given two other circles, $a$ and $b$, observe that it's optimal to move the center of $x$ through the midpoint of the line segment connecting the centers of $a$ and $b$. Using this observation, we claim that $x$ can move between two circles $a$ and $b$ as long as $dist(a, b) \leq x_r$, where $x_r$ denotes the radius of $x$ and $dist(a, b)$ denotes the distance between the borders of $a$ and $b$. Also, let's add horizontal and vertical line segments from each border of the park to each circle with the distance between them as well.
      |                                                                                                                                                                                                                                                                                                                                                    ^
park.cpp:15:472: warning: missing terminating ' character
   15 | Let's call the circle you are moving around between exits $x$. Given two other circles, $a$ and $b$, observe that it's optimal to move the center of $x$ through the midpoint of the line segment connecting the centers of $a$ and $b$. Using this observation, we claim that $x$ can move between two circles $a$ and $b$ as long as $dist(a, b) \leq x_r$, where $x_r$ denotes the radius of $x$ and $dist(a, b)$ denotes the distance between the borders of $a$ and $b$. Also, let's add horizontal and vertical line segments from each border of the park to each circle with the distance between them as well.
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
park.cpp:15:472: error: missing terminating ' character
   15 | Let's call the circle you are moving around between exits $x$. Given two other circles, $a$ and $b$, observe that it's optimal to move the center of $x$ through the midpoint of the line segment connecting the centers of $a$ and $b$. Using this observation, we claim that $x$ can move between two circles $a$ and $b$ as long as $dist(a, b) \leq x_r$, where $x_r$ denotes the radius of $x$ and $dist(a, b)$ denotes the distance between the borders of $a$ and $b$. Also, let's add horizontal and vertical line segments from each border of the park to each circle with the distance between them as well.
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
park.cpp:17:84: warning: unknown escape sequence: '\l'
   17 | Finally, observe that you can go from exit $e_1$ to exit $e_2$ as long as there isn't some chain of line segments with weight $\leq x_r$ that completely blocks off the path between exits. For example, you can go from the top-right exit to the bottom-left exit as long as there isn't a chain of line segments from the top border to the bottom, top to right, bottom to left, or left to right.
      |                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
park.cpp:17:84: warning: character constant too long for its type
park.cpp:19:1: error: stray '##' in program
   19 | ## Creating a Graph
      | ^~
park.cpp:21:64: warning: missing terminating ' character
   21 | Now, you have some circles with weights between each other. Let's transform each of the line segments we defined before into an edge, and each circle and border into a node, creating $n ^ 2 + 4n$ edges overall and $n + 4$ nodes.
      |                                                                ^
park.cpp:21:64: error: missing terminating ' character
   21 | Now, you have some circles with weights between each other. Let's transform each of the line segments we defined before into an edge, and each circle and border into a node, creating $n ^ 2 + 4n$ edges overall and $n + 4$ nodes.
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
park.cpp:23:124: error: stray '\' in program
   23 | The problem of checking whether we can go between two exits now becomes checking, for some $r$, whether edges with weight $\leq r$ connect certain borders (this involves some casework).
      |                                                                                                                            ^
park.cpp:25:1: error: stray '##' in program
   25 | ## Offline Queries and DSU
      | ^~
park.cpp:27:71: warning: missing terminating ' character
   27 | To efficently answer queries of whether two borders are connected, let's process them in order of increasing $x_r$ and store a DSU. Now, we can add edges one by one as long as their weight $\leq x_r$, and then check connectivity between the border nodes.
      |                                                                       ^
park.cpp:27:71: error: missing terminating ' character
   27 | To efficently answer queries of whether two borders are connected, let's process them in order of increasing $x_r$ and store a DSU. Now, we can add edges one by one as long as their weight $\leq x_r$, and then check connectivity between the border nodes.
      |                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
park.cpp:33:1: error: stray '##' in program
   33 | ## Code
      | ^~
park.cpp:35:1: error: stray '`' in program
   35 | ```cpp
      | ^
park.cpp:35:2: error: stray '`' in program
   35 | ```cpp
      |  ^
park.cpp:35:3: error: stray '`' in program
   35 | ```cpp
      |   ^
park.cpp:181:1: error: stray '`' in program
  181 | ```
      | ^
park.cpp:181:2: error: stray '`' in program
  181 | ```
      |  ^
park.cpp:181:3: error: stray '`' in program
  181 | ```
      |   ^
park.cpp:1:1: error: expected unqualified-id before '--' token
    1 | ---
      | ^~
park.cpp:7:7: error: 'DR' does not name a type
    7 | ## TL;DR
      |       ^~
In file included from /usr/include/c++/9/cmath:43,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
                 from park.cpp:36:
/usr/include/c++/9/ext/type_traits.h:162:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
  162 |   __is_null_pointer(std::nullptr_t)
      |                                   ^
/usr/include/c++/9/ext/type_traits.h:157:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)'
  157 |     __is_null_pointer(_Type)
      |     ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/type_traits.h:162:26: error: 'nullptr_t' is not a member of 'std'
  162 |   __is_null_pointer(std::nullptr_t)
      |                          ^~~~~~~~~
In file included from /usr/include/c++/9/bits/exception_ptr.h:40,
                 from /usr/include/c++/9/exception:143,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from park.cpp:36:
/usr/include/c++/9/new:125:50: error: declaration of 'operator new' as non-function
  125 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                                  ^
/usr/include/c++/9/new:125:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  125 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                            ^~~~~~
In file included from /usr/include/stdlib.h:32,
                 from /usr/include/c++/9/bits/std_abs.h:38,
                 from /usr/include/c++/9/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
                 from park.cpp:36:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/9/bits/exception_ptr.h:40,
                 from /usr/include/c++/9/exception:143,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from park.cpp:36:
/usr/include/c++/9/new:126:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  126 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/9/new:127:52: error: declaration of 'operator new []' as non-function
  127 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                                    ^
/usr/include/c++/9/new:127:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  127 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                              ^~~~~~
In file included from /usr/include/stdlib.h:32,
                 from /usr/include/c++/9/bits/std_abs.h:38,
                 from /usr/include/c++/9/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
                 from park.cpp:36:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/9/bits/exception_ptr.h:40,
                 from /usr/include/c++/9/exception:143,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from park.cpp:36:
/usr/include/c++/9/new:128:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  128 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/9/new:134:34: error: 'std::size_t' has not been declared
  134 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                                  ^~~~~~
/usr/include/c++/9/new:136:36: error: 'std::size_t' has not been declared
  136 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                                    ^~~~~~
/usr/include/c++/9/new:139:44: error: declaration of 'operator new' as non-function
  139 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                            ^~~~~~
/usr/include/c++/9/new:139:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/stdlib.h:32,
                 from /usr/include/c++/9/bits/std_abs.h:38,
                 from /usr/include/c++/9/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
                 from park.cpp:36:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/9/bits/exception_ptr.h:40,
                 from /usr/include/c++/9/exception:143,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from park.cpp:36:
/usr/include/c++/9/new:139:52: error: expected primary-expression before 'const'
  139 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                    ^~~~~
/usr/include/c++/9/new:141:46: error: declaration of 'operator new []' as non-function
  141 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                              ^~~~~~
/usr/include/c++/9/new:141:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/stdlib.h:32,
                 from /usr/include/c++/9/bits/std_abs.h:38,
                 from /usr/include/c++/9/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
                 from park.cpp:36:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/9/bits/exception_ptr.h:40,
                 from /usr/include/c++/9/exception:143,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from park.cpp:36:
/usr/include/c++/9/new:141:54: error: expected primary-expression before 'const'
  141 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                      ^~~~~
/usr/include/c++/9/new:173:51: error: declaration of 'operator new' as non-function
  173 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                                   ^~~~~~
/usr/include/c++/9/new:173:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
In file included from /usr/include/stdlib.h:32,
                 from /usr/include/c++/9/bits/std_abs.h:38,
                 from /usr/include/c++/9/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
                 from park.cpp:36:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/9/bits/exception_ptr.h:40,
                 from /usr/include/c++/9/exception:143,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from park.cpp:36:
/usr/include/c++/9/new:173:59: error: expected primary-expression before 'void'
  173 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |