Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N=200000;
    int root[N];
    int Rank[N];
    int size[N];
    int find(int x){
        if(root[x]==x)return x;
        else return root[x]=find(root[x]);
    }
    void unite(int x,int y){
        int X=find(x);
        int Y=find(y);
        if(X==Y)return;
        if(Rank[X]<Rank[Y]){
            root[X]=Y;
            size[Y]+=size[X];
        }
        else{
            root[Y]=X;
            size[X]+=size[Y];
            if(Rank[X]==Rank[Y])Rank[X]++;
        }
        return;
    }
int main(){
    int n,m;
    cin>>n>>m;
    for(int i=0;i<n;i++){
        root[i]=i;
        Rank[i]=0;
        size[i]=1;
    }
    for(int i=0;i<m;i++){
        int a,b;
        cin>>a>>b;
        unite(a-1,b-1);
    }
    int ans=0;
    for(int i=0;i<n;i++)ans=max(ans,size[i]);
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'void unite(int, int)':
a.cc:17:13: error: reference to 'size' is ambiguous
   17 |             size[Y]+=size[X];
      |             ^~~~
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:6:9: note:                 'int size [200000]'
    6 |     int size[N];
      |         ^~~~
a.cc:17:22: error: reference to 'size' is ambiguous
   17 |             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:6:9: note:                 'int size [200000]'
    6 |     int size[N];
      |         ^~~~
a.cc:21:13: error: reference to 'size' is ambiguous
   21 |             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:6:9: note:                 'int size [200000]'
    6 |     int size[N];
      |         ^~~~
a.cc:21:22: error: reference to 'size' is ambiguous
   21 |             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:6:9: note:                 'int size [200000]'
    6 |     int size[N];
      |         ^~~~
a.cc: In function 'int main()':
a.cc:32:9: error: reference to 'size' is ambiguous
   32 |         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:6:9: note:                 'int size [200000]'
    6 |     int size[N];
      |         ^~~~
a.cc:40:37: error: reference to 'size' is ambiguous
   40 |     for(int i=0;i<n;i++)ans=max(ans,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:6:9: note:                 'int size [200000]'
    6 |     int size[N];
      |         ^~~~