Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,m,i,j,xx,yy,x,y,ans;
int f[200001],size[200001];

inline int get(int x){
if (f[x]==x) return x;
else return f[x]=get(f[x]);
}

int main(){
scanf("%d%d",&n,&m);
for (i=1; i<=n; i++) f[i]=i,size[i]=1;
for (i=1; i<=m; i++)
{
scanf("%d%d",&x,&y);
xx=get(x); yy=get(y);
if (xx!=yy)
{
f[xx]=yy;
size[yy]+=size[xx];
}
//for (j=1; j<=n; j++) printf("%d ",get(f[j])); puts(""); 
}
for (i=1; i<=n; ++i) ans=max(ans,size[i]);
printf("%d\n",ans);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: reference to 'size' is ambiguous
   13 | for (i=1; i<=n; i++) f[i]=i,size[i]=1;
      |                             ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:4:15: note:                 'int size [200001]'
    4 | int f[200001],size[200001];
      |               ^~~~
a.cc:21:1: error: reference to 'size' is ambiguous
   21 | size[yy]+=size[xx];
      | ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:4:15: note:                 'int size [200001]'
    4 | int f[200001],size[200001];
      |               ^~~~
a.cc:21:11: error: reference to 'size' is ambiguous
   21 | size[yy]+=size[xx];
      |           ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:4:15: note:                 'int size [200001]'
    4 | int f[200001],size[200001];
      |               ^~~~
a.cc:25:34: error: reference to 'size' is ambiguous
   25 | for (i=1; i<=n; ++i) ans=max(ans,size[i]);
      |                                  ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:4:15: note:                 'int size [200001]'
    4 | int f[200001],size[200001];
      |               ^~~~