Problem closedrooms
User Samyeobeo
Submission Time 2025-06-06 21:56:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

closedrooms.cpp: In function ‘int main()’:
closedrooms.cpp:33:2: error: reference to ‘visit’ is ambiguous
33 | visit[sx][sy] = true;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:133,
from closedrooms.cpp:1:
/usr/include/c++/9/variant:1658:5: note: candidates are: ‘template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)’
1658 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
closedrooms.cpp:8:6: note: ‘bool visit [800][800]’
8 | bool visit[N][N];
| ^~~~~
closedrooms.cpp:40:52: error: reference to ‘visit’ is ambiguous
40 | if (nx >= 0 && nx < m && ny >= 0 && ny < n && !visit[nx][ny] && s[nx][ny] != '#') {
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:133