Language: C++

/*
	---------O7Oo7oO7O-------------
*/

#include <bits/stdc++.h>

#define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int long long
using namespace std;
#define all(v) v.begin(),v.end()

const int mod = 1000*1000*1000 +7;

const int mxN = 2e5 + 5;

int parent[mxN],size[mxN],a[mxN];

void init()
{
	for(int i=0;i<mxN;i++)
	{
		parent[i] = i;
		size[i] = 1;
	}
}

int find(int v)
{
	if(v == parent[v])
		return v;
	else
	 	return parent[v] = find(parent[v]);
}
int mx;

void Union(int a,int b)
{
	int x = find(a);
	int y = find(b);

	if(x!=y)
	{
		if(size[x] < size[y])
			swap(x,y);

		parent[y] = x;
		size[x] += size[y];
		
		mx = max(mx,size[x]);
	}
}
int Bin_expo(int n, int b)
{
	int res = 1;
	while (b > 0)
	{
		if (b & 1)
		{
			res = (res * n) % mod;

		}
		n = (n * n)  % mod;


		b /= 2;

	}
	return res % mod;
}


int32_t main()
{
	IOS

      
	int n,m;
	cin>>n>>m;
	init();
	mx = -1e9;
	for(int i=0;i<m;i++)
	{
		int a,b;
		cin>>a>>b;
		Union(a,b);
		
	}

	cout<<mx<<"\n";

	

	return 0;
}




Compiler output:
a.cc: In function 'void init()':
a.cc:23:17: error: reference to 'size' is ambiguous
   23 |                 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:5:
/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:16:17: note:                 'long long int size [200005]'
   16 | int parent[mxN],size[mxN],a[mxN];
      |                 ^~~~
a.cc: In function 'void Union(long long int, long long int)':
a.cc:43:20: error: reference to 'size' is ambiguous
   43 |                 if(size[x] < size[y])
      |                    ^~~~
/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:16:17: note:                 'long long int size [200005]'
   16 | int parent[mxN],size[mxN],a[mxN];
      |                 ^~~~
a.cc:43:30: error: reference to 'size' is ambiguous
   43 |                 if(size[x] < size[y])
      |                              ^~~~
/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:16:17: note:                 'long long int size [200005]'
   16 | int parent[mxN],size[mxN],a[mxN];
      |                 ^~~~
a.cc:47:17: error: reference to 'size' is ambiguous
   47 |                 size[x] += size[y];
      |                 ^~~~
/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:16:17: note:                 'long long int size [200005]'
   16 | int parent[mxN],size[mxN],a[mxN];
      |                 ^~~~
a.cc:47:28: error: reference to 'size' is ambiguous
   47 |                 size[x] += size[y];
      |                            ^~~~
/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:16:17: note:                 'long long int size [200005]'
   16 | int parent[mxN],size[mxN],a[mxN];
      |                 ^~~~
a.cc:49:29: error: reference to 'size' is ambiguous
   49 |                 mx = max(mx,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:16:17: note:                 'long long int size [200005]'
   16 | int parent[mxN],size[mxN],a[mxN];
      |                 ^~~~