Language: C++

#include<bits/stdc++.h>
#define ls ch[x][0]
#define rs ch[x][1]
#define ll long long
using namespace std;

inline ll read(){
	ll num=0,neg=1;char c=getchar();
	while(!isdigit(c)){if(c=='-')neg=-1;c=getchar();}
	while(isdigit(c)){num=(num<<3)+(num<<1)+c-'0';c=getchar();}
	return num*neg;
}

int fa[200010],size[200010],ans,n,m;
inline int find(int x){return x==fa[x]?x:fa[x]=find(fa[x]);}

int main(){
	n=read(),m=read();for(int i=1;i<=n;i++) fa[i]=i,size[i]=1;
	for(int i=1,x,y;i<=m;i++)
	{
		x=read(),y=read();
		x=find(x),y=find(y);
		if(x==y)continue;
		size[x]+=size[y],fa[y]=x;
	}
	for(int i=1;i<=n;i++) ans=max(ans,size[i]);
	cout<<ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:57: error: reference to 'size' is ambiguous
   18 |         n=read(),m=read();for(int i=1;i<=n;i++) fa[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:14:16: note:                 'int size [200010]'
   14 | int fa[200010],size[200010],ans,n,m;
      |                ^~~~
a.cc:24:17: error: reference to 'size' is ambiguous
   24 |                 size[x]+=size[y],fa[y]=x;
      |                 ^~~~
/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:14:16: note:                 'int size [200010]'
   14 | int fa[200010],size[200010],ans,n,m;
      |                ^~~~
a.cc:24:26: error: reference to 'size' is ambiguous
   24 |                 size[x]+=size[y],fa[y]=x;
      |                          ^~~~
/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:14:16: note:                 'int size [200010]'
   14 | int fa[200010],size[200010],ans,n,m;
      |                ^~~~
a.cc:26:43: error: reference to 'size' is ambiguous
   26 |         for(int 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:14:16: note:                 'int size [200010]'
   14 | int fa[200010],size[200010],ans,n,m;
      |                ^~~~