island.cpp: In function 'void unite(int, int)':
island.cpp:32:9: error: reference to 'size' is ambiguous
32 | if (size[x]<size[y])
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from island.cpp:1:
/usr/include/c++/10/bits/range_access.h:254:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
254 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:245:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
island.cpp:10:17: note: 'int size [300000]'
10 | int link[MAXN], size[MAXN], cindex[MAXN];
| ^~~~
island.cpp:32:17: error: reference to 'size' is ambiguous
32 | if (size[x]<size[y])
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from island.cpp:1:
/usr/include/c++/10/bits/range_access.h:254:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
254 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:245:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
island.cpp:10:17: note: 'int size [300000]'
10 | int link[MAXN], size[MAXN], cindex[MAXN];
| ^~~~
island.cpp:34:5: error: reference to 'size' is ambiguous
34 | size[x]=size[x]+size[y];
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from island.cpp:1:
/usr/include/c++/10/bits/range_access.h:254:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
254 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:245:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
island.cpp:10:17: note: 'int size [300000]'
10 | int link[MAXN], size[MAXN], cindex[MAXN];
| ^~~~
island.cpp:34:13: error: reference to 'size' is ambiguous
34 | size[x]=size[x]+size[y];
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from island.cpp:1:
/usr/include/c++/10/bits/range_access.h:254:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
254 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:245:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
island.cpp:10:17: note: 'int size [300000]'
10 | int link[MAXN], size[MAXN], cindex[MAXN];
| ^~~~
island.cpp:34:21: error: reference to 'size' is ambiguous
34 | size[x]=size[x]+size[y];
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from island.cpp:1:
/usr/include/c++/10/bits/range_access.h:254:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
254 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:245:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
island.cpp:10:17: note: 'int size [300000]'
10 | int link[MAXN], size[MAXN], cindex[MAXN];
| ^~~~
island.cpp: In function 'int main()':
island.cpp:81:9: error: reference to 'size' is ambiguous
81 | size[i]=1;
| ^~~~
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from island.cpp:1:
/usr/include/c++/10/bits/range_access.h:254:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
254 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/10/bits/range_access.h:245:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
island.cpp:10:17: note: 'int size [300000]'
10 | int link[MAXN], size[MAXN], cindex[MAXN];
| ^~~~