Language: C++

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;
using namespace std;
// using cd = complex<double>;
// template <typename T>
// using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,
//     tree_order_statistics_node_update>;
 

typedef long long int ll;
typedef long double ld;
const ll N = 1e6 + 9;
const ll mod = 1e9 + 7;
const ll inf= 1e14;

const double PI = acos(-1);
#define x first
#define y second
#define pb push_back
#define mp make_pair    
#define pii pair<ll,ll>
#define pld pair<ld,ld>
ll powm(ll a, ll b,ll mod) { a = a%mod;ll res = 1; while (b) { if (b & 1) res = (res * a) % mod; a = (a * a) % mod; b >>= 1; } return res; }
ll parent[N],size[N];
void make_set(int v) {
    parent[v] = v;
    size[v] = 1;
}
int find_set(int v) {
    if (v == parent[v])
        return v;
    return parent[v] = find_set(parent[v]);
}
void union_sets(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a != b) {
        if (size[a] < size[b])
            swap(a, b);
        parent[b] = a;
        size[a] += size[b];
    }
}


int main() {    
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif
    ll T = 1;
    // cin>>t;

    while(T--){
        ll n,m;cin>>n>>m;
        for(int i = 1;i<=n;i++){
            make_set(i);
        }
        for(int i = 0;i<m;i++){
            ll u,v;cin>>u>>v;
            union_sets(u,v);
        }
        ll ans = 0;
        for(int i = 1;i<=n;i++){
            ans = max(ans,size[find_set(i)]);
        }
        cout<<ans<<'\n';
    }
}

Compiler output:
a.cc: In function 'void make_set(int)':
a.cc:30:5: error: reference to 'size' is ambiguous
   30 |     size[v] = 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:27:14: note:                 'll size [1000009]'
   27 | ll parent[N],size[N];
      |              ^~~~
a.cc: In function 'void union_sets(int, int)':
a.cc:41:13: error: reference to 'size' is ambiguous
   41 |         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:27:14: note:                 'll size [1000009]'
   27 | ll parent[N],size[N];
      |              ^~~~
a.cc:41:23: error: reference to 'size' is ambiguous
   41 |         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:27:14: note:                 'll size [1000009]'
   27 | ll parent[N],size[N];
      |              ^~~~
a.cc:44:9: error: reference to 'size' is ambiguous
   44 |         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:27:14: note:                 'll size [1000009]'
   27 | ll parent[N],size[N];
      |              ^~~~
a.cc:44:20: error: reference to 'size' is ambiguous
   44 |         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:27:14: note:                 'll size [1000009]'
   27 | ll parent[N],size[N];
      |              ^~~~
a.cc: In function 'int main()':
a.cc:71:27: error: reference to 'size' is ambiguous
   71 |             ans = max(ans,size[find_set(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:27:14: note:                 'll size [1000009]'
   27 | ll parent[N],size[N];
      |              ^~~~