Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
const ll mod=1e9 +7;
#define vi vector<int>
#define pb emplace_back
ll poww(ll n,ll x)
{
    ll res=1;
    
    while(x>0)
    {
        if(x&1)
          res*=n;
        
        x=x>>1;
        n*=n;
    }
    return res;
}

int parent[200005];
int size[200005];
int find(int node)
{
	if(parent[node]==node)
	  return node;
	 
	return parent[node]= find(parent[node]);
}

void union1(int a,int b)
{
	a=find(a);
	b=find(b);
	
	
	if(a!=b)
	{
		 if(size[a]<size[b])
	      swap(a,b);
	    
	    size[a]+= size[b];
		parent[b]=a;
	}
	   
}


int main() 
{
	   ios::sync_with_stdio(0);
	   cin.tie(0);
	   cout.tie(0);
       
       ll n,m,x,y;
       cin>>n>>m;
       for(int i=1;i<=n;i++)
       {
       	  parent[i]=i;
       	  size[i]=1;
       }
       
       while(m--)
       {
       	cin>>x>>y;
       //x--,y--;
       	union1(x,y);
       }
       
       map<int,int> mp1;
       for(int i=1;i<=n;i++)
       {
       	//cout<<parent[i]<<' ';
       	mp1[parent[i]]++;
       }
      // cout<<endl;
       
       int mx=INT_MIN;
        for(auto k: mp1)
           mx=max(k.second,mx);
       cout<<mx;
//        
       
}

Compiler output:
a.cc: In function 'void union1(int, int)':
a.cc:40:21: error: reference to 'size' is ambiguous
   40 |                  if(size[a]<size[b])
      |                     ^~~~
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:23:5: note:                 'int size [200005]'
   23 | int size[200005];
      |     ^~~~
a.cc:40:29: error: reference to 'size' is ambiguous
   40 |                  if(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:23:5: note:                 'int size [200005]'
   23 | int size[200005];
      |     ^~~~
a.cc:43:13: error: reference to 'size' is ambiguous
   43 |             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:23:5: note:                 'int size [200005]'
   23 | int size[200005];
      |     ^~~~
a.cc:43:23: error: reference to 'size' is ambiguous
   43 |             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:23:5: note:                 'int size [200005]'
   23 | int size[200005];
      |     ^~~~
a.cc: In function 'int main()':
a.cc:61:11: error: reference to 'size' is ambiguous
   61 |           size[i]=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:23:5: note:                 'int size [200005]'
   23 | int size[200005];
      |     ^~~~