Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;
int fa[N],size[N],n,m;
int find(int x){
	if(x==fa[x])return x;
	else return fa[x]=find(fa[x]);
}
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++){
		fa[i]=i;
		size[i]=1;
	}
	for(int i=1,x,y;i<=m;i++){
		scanf("%d%d",&x,&y);
		x=find(x),y=find(y);
		if(x!=y){
			fa[x]=y;
			size[y]+=size[x];
		}
	}
	int res=0;
	for(int i=1;i<=n;i++){
		if(fa[i]==i){
			res=max(res,size[i]);
		}
	}
	printf("%d\n",*max_element(size+1,size+1+n));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: reference to 'size' is ambiguous
   13 |                 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:11: note:                 'int size [200010]'
    4 | int fa[N],size[N],n,m;
      |           ^~~~
a.cc:20:25: error: reference to 'size' is ambiguous
   20 |                         size[y]+=size[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:4:11: note:                 'int size [200010]'
    4 | int fa[N],size[N],n,m;
      |           ^~~~
a.cc:20:34: error: reference to 'size' is ambiguous
   20 |                         size[y]+=size[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:4:11: note:                 'int size [200010]'
    4 | int fa[N],size[N],n,m;
      |           ^~~~
a.cc:26:37: error: reference to 'size' is ambiguous
   26 |                         res=max(res,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:11: note:                 'int size [200010]'
    4 | int fa[N],size[N],n,m;
      |           ^~~~
a.cc:29:36: error: reference to 'size' is ambiguous
   29 |         printf("%d\n",*max_element(size+1,size+1+n));
      |                                    ^~~~
/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:11: note:                 'int size [200010]'
    4 | int fa[N],size[N],n,m;
      |           ^~~~
a.cc:29:43: error: reference to 'size' is ambiguous
   29 |         printf("%d\n",*max_element(size+1,size+1+n));
      |                                           ^~~~
/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:11: note:                 'int size [200010]'
    4 | int fa[N],size[N],n,m;
      |           ^~~~