bosses.cpp: In function 'int dfs(int, int)':
bosses.cpp:12:3: error: reference to 'visit' is ambiguous
12 | visit[cur] = true;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from bosses.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
bosses.cpp:9:6: note: 'bool visit [5005]'
9 | bool visit[MAXN + 5];
| ^~~~~
bosses.cpp:15:9: error: reference to 'visit' is ambiguous
15 | if (visit[child]) continue;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from bosses.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
bosses.cpp:9:6: note: 'bool visit [5005]'
9 | bool visit[MAXN + 5];
| ^~~~~
bosses.cpp: In function 'int main()':
bosses.cpp:33:12: error: reference to 'visit' is ambiguous
33 | memset(visit, false, sizeof visit);
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from bosses.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
bosses.cpp:9:6: note: 'bool visit [5005]'
9 | bool visit[MAXN + 5];
| ^~~~~
bosses.cpp:33:33: error: reference to 'visit' is ambiguous
33 | memset(visit, false, sizeof visit);
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from bosses.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
bosses.cpp:9:6: note: 'bool visit [5005]'
9 | bool visit[MAXN + 5];
| ^~~~~