Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,m,fa[200001],a,b,size[200001];
int ancestor(int x){
	if(fa[x]!=x) return fa[x]=ancestor(fa[x]);
	return x;
}
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		fa[i]=i;
		size[i]=1;
	}
	for(int i=1;i<=m;i++){
		cin>>a>>b;
		if(ancestor(a)!=ancestor(b)){
			if(size[a]<size[b]) swap(a,b);
			fa[b]=fa[a];
			size[a]=size[a]+size[b];
			size[b]=size[a];
		}
	}
	int maxv=0;
	for(int i=1;i<=n;i++){
		maxv=max(maxv,size[i]);
	}
	cout<<maxv; 
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: reference to 'size' is ambiguous
   12 |                 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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:17:28: error: reference to 'size' is ambiguous
   17 |                         if(size[a]<size[b]) swap(a,b);
      |                            ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:17:36: error: reference to 'size' is ambiguous
   17 |                         if(size[a]<size[b]) swap(a,b);
      |                                    ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:19:25: error: reference to 'size' is ambiguous
   19 |                         size[a]=size[a]+size[b];
      |                         ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:19:33: error: reference to 'size' is ambiguous
   19 |                         size[a]=size[a]+size[b];
      |                                 ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:19:41: error: reference to 'size' is ambiguous
   19 |                         size[a]=size[a]+size[b];
      |                                         ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:20:25: error: reference to 'size' is ambiguous
   20 |                         size[b]=size[a];
      |                         ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:20:33: error: reference to 'size' is ambiguous
   20 |                         size[b]=size[a];
      |                                 ^~~~
/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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~
a.cc:25:31: error: reference to 'size' is ambiguous
   25 |                 maxv=max(maxv,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:3:24: note:                 'int size [200001]'
    3 | int n,m,fa[200001],a,b,size[200001];
      |                        ^~~~