Language: C++

//Ace
#include <bits/stdc++.h>
using namespace std;
using in = long long;
using str = string;
using pi = pair<in, in>;
using vi = vector<in>;
#define F first
#define S second
#define pb push_back
#define rep(i, k, n) for (in i = k; i < n; ++i)
#define repr(i, k, n) for (in i = k; i >= n; --i)
#define sz(x) (in) x.size()
#define all(x) begin(x), end(x)
const in MOD = 1e9 + 7;
const in N = 2e5 + 1;

in parent[N];
in 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_base::sync_with_stdio(false);
    cin.tie(NULL);
    in n, m;
    cin >> n >> m;

    rep(i, 0, n) make_set(i);

    rep(i, 0, m)
    {
        in x, y;
        cin >> x >> y;
        x--;
        y--;
        union_sets(x, y);
    }

    in ans = 0;
    rep(i, 0, n) ans = max(ans, size[i]);
    cout << ans;

    return 0;
}

Compiler output:
a.cc: In function 'void make_set(int)':
a.cc:24:5: error: reference to 'size' is ambiguous
   24 |     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:2:
/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:19:4: note:                 'in size [200001]'
   19 | in size[N];
      |    ^~~~
a.cc: In function 'void union_sets(int, int)':
a.cc:40:13: 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:19:4: note:                 'in size [200001]'
   19 | in size[N];
      |    ^~~~
a.cc:40:23: 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:19:4: note:                 'in size [200001]'
   19 | in size[N];
      |    ^~~~
a.cc:43:9: 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:19:4: note:                 'in size [200001]'
   19 | in size[N];
      |    ^~~~
a.cc:43:20: 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:19:4: note:                 'in size [200001]'
   19 | in size[N];
      |    ^~~~
a.cc: In function 'int main()':
a.cc:66:33: error: reference to 'size' is ambiguous
   66 |     rep(i, 0, n) 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:19:4: note:                 'in size [200001]'
   19 | in size[N];
      |    ^~~~