0_0_39306308_8340.cpp:16:20: error: reference to 'size' is ambiguous
16 | vector<Node> nodes(size); // 创建一个向量来存储节点
| ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/deque:68,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/stack:62,
from 0_0_39306308_8340.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
274 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
264 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
0_0_39306308_8340.cpp:14:11: note: 'const int size'
14 | const int size = 512 + 1;
| ^~~~
0_0_39306308_8340.cpp:17:7: error: reference to 'size' is ambiguous
17 | int X[size];
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
274 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
264 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
0_0_39306308_8340.cpp:14:11: note: 'const int size'
14 | const int size = 512 + 1;
| ^~~~
0_0_39306308_8340.cpp:18:7: error: reference to 'size' is ambiguous
18 | int Y[size];
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
274 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
264 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
0_0_39306308_8340.cpp:14:11: note: 'const int size'
14 | const int size = 512 + 1;
| ^~~~
0_0_39306308_8340.cpp:19:12: error: reference to 'size' is ambiguous
19 | bool visit[size];
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
274 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
264 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
0_0_39306308_8340.cpp:14:11: note: 'const int size'
14 | const int size = 512 + 1;
| ^~~~
0_0_39306308_8340.cpp: In function 'void init()':
0_0_39306308_8340.cpp:28:12: error: 'X' was not declared in this scope
28 | memset(X, 0, (size_x + 1) * sizeof(int));
| ^
0_0_39306308_8340.cpp:29:12: error: 'Y' was not declared in this scope
29 | memset(Y, 0, (size_y + 1) * sizeof(int));
| ^
0_0_39306308_8340.cpp: In function 'bool dfs(int)':
0_0_39306308_8340.cpp:52:5: error: 'visit' was not declared in this scope
52 | visit[x] = true;
| ^~~~~
0_0_39306308_8340.cpp:6:1: note: 'std::visit' is defined in header '<variant>'; did you forget to '#include <variant>'?
5 | #include <vector>
+++ |+#include <variant>
6 | using namespace std;
0_0_39306308_8340.cpp:57:13: error: 'Y' was not declared in this scope
57 | Y[p->ord] = x;
| ^
0_0_39306308_8340.cpp: In function 'void solve()':
0_0_39306308_8340.cpp:71:16: error: 'visit' was not declared in this scope
71 | memset(visit, false, size_y + 1);
| ^~~~~
0_0_39306308_8340.cpp:71:16: note: 'std::visit' is defined in header '<variant>'; did you forget to '#include <variant>'?
0_0_39306308_8340.cpp:78:17: error: 'Y' was not declared in this scope
78 | Y[top] = stk.top();
| ^
0_0_39306308_8340.cpp:79:17: error: 'X' was not declared in this scope
79 | X[stk.top()] = top;
| ^
0_0_39306308_8340.cpp: In function 'void output()':
0_0_39306308_8340.cpp:91:13: error: 'X' was not declared in this scope
91 | if (X[i]) count++;
| ^
|