Language: C++

#include<bits/stdc++.h>
using namespace std;
#define lli long long int
# define rep(i,n) for(int i=0;i<n;i++)
int p[200005];
int size[200005];
int find(int x){
    if(x ==p[x])
        return x;
    return p[x] = find(p[x]);
}
void uni(int u,int v){
    int pu =find(u);
    int pv =find(v);
    if(pu==pv)
    return;
    else{
        p[pu] = pv;
        size[pv]+=size[pu];
        size[pu]=0;
    }
}
void solve(){
    int n,m;
    cin>>n>>m;
    for(int i=1;i<=n;i++)
    {
        p[i]=i;
        size[i]=1;
    }

    rep(i,m){
        int u,v;
        cin>>u>>v;
        uni(u,v);
    }
    int ans =0;
    for(int i=1;i<=n;i++)
    ans=max(ans,size[i]);
    cout<<ans<<endl;


}
int main()
{
    int t;
    //cin>>t;
    
    t=1;
    while(t--){
        solve();
    }
}

Compiler output:
a.cc: In function 'void uni(int, int)':
a.cc:19:9: error: reference to 'size' is ambiguous
   19 |         size[pv]+=size[pu];
      |         ^~~~
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:5: note:                 'int size [200005]'
    6 | int size[200005];
      |     ^~~~
a.cc:19:19: error: reference to 'size' is ambiguous
   19 |         size[pv]+=size[pu];
      |                   ^~~~
/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:5: note:                 'int size [200005]'
    6 | int size[200005];
      |     ^~~~
a.cc:20:9: error: reference to 'size' is ambiguous
   20 |         size[pu]=0;
      |         ^~~~
/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:5: note:                 'int size [200005]'
    6 | int size[200005];
      |     ^~~~
a.cc: In function 'void solve()':
a.cc:29:9: error: reference to 'size' is ambiguous
   29 |         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:5: note:                 'int size [200005]'
    6 | int size[200005];
      |     ^~~~
a.cc:39:17: error: reference to 'size' is ambiguous
   39 |     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:5: note:                 'int size [200005]'
    6 | int size[200005];
      |     ^~~~