Language: C++

#include <bits/stdc++.h>

using namespace std;
const int N = 2e5 + 100;

int n, m, fa[N], size[N], ans = 1;
inline int Find(int x) {return x == fa[x] ? x : fa[x] = Find(fa[x]);}
inline int Union(int x, int y) {
	x = Find(x); y = Find(y);
	if(x == y) return 0;
	fa[x] = y; size[y] += size[x];
	ans = max(ans, size[y]);
}

int main() {
	scanf("%d%d", &n, &m);
	for(int i = 1;i <= n; ++i)
		fa[i] = i, size[i] = 1;
	for(int i = 1;i <= m; ++i) {
		int u, v; scanf("%d%d", &u, &v);
		Union(u, v);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int Union(int, int)':
a.cc:11:20: error: reference to 'size' is ambiguous
   11 |         fa[x] = y; 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:18: note:                 'int size [200100]'
    6 | int n, m, fa[N], size[N], ans = 1;
      |                  ^~~~
a.cc:11:31: error: reference to 'size' is ambiguous
   11 |         fa[x] = y; 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:18: note:                 'int size [200100]'
    6 | int n, m, fa[N], size[N], ans = 1;
      |                  ^~~~
a.cc:12:24: error: reference to 'size' is ambiguous
   12 |         ans = max(ans, 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:18: note:                 'int size [200100]'
    6 | int n, m, fa[N], size[N], ans = 1;
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:18:28: error: reference to 'size' is ambiguous
   18 |                 fa[i] = i, 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:18: note:                 'int size [200100]'
    6 | int n, m, fa[N], size[N], ans = 1;
      |                  ^~~~
a.cc: In function 'int Union(int, int)':
a.cc:11:15: warning: control reaches end of non-void function [-Wreturn-type]
   11 |         fa[x] = y; size[y] += size[x];
      |         ~~~~~~^~~