Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define scan(n) scanf("%d",&n)
#define ls(n) scanf("%lld",&n)
#define print(n) printf("%d",n)
#define pln(n) printf("%d\n",n)
#define lpln(n) printf("%lld\n",n)
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rev(i,a,n) for(int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define gcd __gcd
#define tc           ll t1; cin>>t1; while(t1--)
#define inp         ll n; cin>>n; ll arr[n]; rep(i,0,n) cin>>arr[i];
#define vect vector<ll>
#define sortv(v)       sort(v.begin(),v.end())
#define lower(v,n)    lower_bound(v.begin(),v.end(),n)-v.begin()
#define upper(v,n)    upper_bound(v.begin(),v.end(),n)-v.begin()
#define all(v)        v.begin(),v.end()
#define bitcount(n) __builtin_popcount(n)
#define ln <<endl
#define inf          1e12+5
#define ninf         -1e17
#define fast()         ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
const   ll mod=1e9+7;
const ll N=2e5+5;
int Arr[N];
int size[N];
void initialize()
    {
        for(int i = 0;i<N;i++)
        {
          Arr[i] = i ;
          size[i] = 1;
        }
    }


int root(int i)
    {
        while(Arr[i]!= i)
        {
            Arr[i] = Arr[Arr[i]] ; 
            i = Arr[i]; 
        }
    return i;
    }

void union1(int A,int B)
    {
        int root_A = root(A);
        int root_B = root(B);
        if(size[root_A]<size[root_B])
        {
          Arr[root_A] = Arr[root_B];
          size[root_B]+= size[root_A];
        }
        else
        {
          Arr[root_B] = Arr[root_A];
          size[root_A] += size[root_B];
        }

    }



int main() 
{ 
          fast();
          
          initialize();
          int n,m;
          cin >> n >> m;
          while(m--){
            int a,b;
            cin >> a >> b;
            if(root(a)!=root(b))
            union1(a,b);
          }
          set<int> s;
          for(int i=1;i<=n;i++)
            s.insert(root(i));
          int maxi=0;
          for(auto i=s.begin();i!=s.end();i++)
            if(size[*i]>maxi)
              maxi=size[*i];

            cout<<maxi;

          

          
           return 0; 

} 

Compiler output:
a.cc: In function 'void initialize()':
a.cc:37:11: error: reference to 'size' is ambiguous
   37 |           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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc: In function 'void union1(int, int)':
a.cc:56:12: error: reference to 'size' is ambiguous
   56 |         if(size[root_A]<size[root_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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc:56:25: error: reference to 'size' is ambiguous
   56 |         if(size[root_A]<size[root_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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc:59:11: error: reference to 'size' is ambiguous
   59 |           size[root_B]+= size[root_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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc:59:26: error: reference to 'size' is ambiguous
   59 |           size[root_B]+= size[root_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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc:64:11: error: reference to 'size' is ambiguous
   64 |           size[root_A] += size[root_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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc:64:27: error: reference to 'size' is ambiguous
   64 |           size[root_A] += size[root_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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc: In function 'int main()':
a.cc:89:16: error: reference to 'size' is ambiguous
   89 |             if(size[*i]>maxi)
      |                ^~~~
/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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~
a.cc:90:20: error: reference to 'size' is ambiguous
   90 |               maxi=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:31:5: note:                 'int size [200005]'
   31 | int size[N];
      |     ^~~~