Language: C++

#include <bits/stdc++.h>
#define N 200010
using namespace std;

int n, m, ans, fa[N], size[N];

inline int read(){
	int s = 0, w = 1;
	char ch = getchar();
	for (; ch < '0' || ch > '9'; ch = getchar()) w *= ch == '-' ? -1 : 1;
	for (; ch >= '0' && ch <= '9'; ch = getchar()) s = s * 10 + ch - '0';
	return s * w;
}

int findf(int x){
	if (x == fa[x]) return x;
	return fa[x] == findf(fa[x]);
}

int main(){
	n = read(), m = read();
	for (int i = 1; i <= n; ++i) fa[i] = i, size[i] = 1;
	for (int i = 1; i <= m; ++i){
		int x = read(), y = read();
		x = findf(x), y = findf(y);
		if (x != y) fa[x] = y, size[y] += size[x];
	}
	for (int i = 1; i <= n; ++i) ans = max(ans, size[i]);
	printf("%d\n", ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:49: error: reference to 'size' is ambiguous
   22 |         for (int i = 1; i <= n; ++i) fa[i] = i, size[i] = 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:5:23: note:                 'int size [200010]'
    5 | int n, m, ans, fa[N], size[N];
      |                       ^~~~
a.cc:26:40: error: reference to 'size' is ambiguous
   26 |                 if (x != y) 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:5:23: note:                 'int size [200010]'
    5 | int n, m, ans, fa[N], size[N];
      |                       ^~~~
a.cc:26:51: error: reference to 'size' is ambiguous
   26 |                 if (x != y) 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:5:23: note:                 'int size [200010]'
    5 | int n, m, ans, fa[N], size[N];
      |                       ^~~~
a.cc:28:53: error: reference to 'size' is ambiguous
   28 |         for (int i = 1; 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:5:23: note:                 'int size [200010]'
    5 | int n, m, ans, fa[N], size[N];
      |                       ^~~~