Problem grassplant
User chenweilian
Submission Time 2023-11-01 18:17:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

grassplant.cpp: In function ‘void dfs1(int, int)’:
grassplant.cpp:26:5: error: reference to ‘size’ is ambiguous
26 | size[x]=1;
| ^~~~
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from grassplant.cpp:2:
/usr/include/c++/9/bits/range_access.h:252:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
252 | size(const _Tp (&/*__array*/)[_Nm]) noexcept
| ^~~~
/usr/include/c++/9/bits/range_access.h:242:5: note: ‘template<class _Container> constexpr decltype (__co