Problem swimming
User elainagrey
Submission Time 2023-02-15 18:13:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swimming.cpp: In function ‘int main()’:
swimming.cpp:54:8: error: reference to ‘visit’ is ambiguous
54 | if(visit[it.f][it.s]) continue;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:133,
from swimming.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)
| ^~~~~
swimming.cpp:14:22: note: ‘bool visit [1010][1010]’
14 | bool vis[1010][1010],visit[1010][1010];
| ^~~~~
swimming.cpp:55:5: error: reference to ‘visit’ is ambiguous
55 | visit[it.f][it.s]=1;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:133,
from swimming.cpp:1:
/usr/include/c++/9/variant:1658