Language: C++

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

const int N = 200009;
int n, m, a[N], b[N], fa[N], size[N], ans;

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

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) scanf("%d", &a[i]);
	for (int i = 1; i <= m; ++ i) scanf("%d", &b[i]);
	for (int i = 1; i <= m; ++ i) {
		int fx = get(a[i]), fy = get(b[i]);
		if (fx == fy) continue;
		fa[fx] = fy;
		size[fy] += size[fx];
	}
	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:14:50: error: reference to 'size' is ambiguous
   14 |         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:30: note:                 'int size [200009]'
    5 | int n, m, a[N], b[N], fa[N], size[N], ans;
      |                              ^~~~
a.cc:21:17: error: reference to 'size' is ambiguous
   21 |                 size[fy] += size[fx];
      |                 ^~~~
/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:30: note:                 'int size [200009]'
    5 | int n, m, a[N], b[N], fa[N], size[N], ans;
      |                              ^~~~
a.cc:21:29: error: reference to 'size' is ambiguous
   21 |                 size[fy] += size[fx];
      |                             ^~~~
/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:30: note:                 'int size [200009]'
    5 | int n, m, a[N], b[N], fa[N], size[N], ans;
      |                              ^~~~
a.cc:23:54: error: reference to 'size' is ambiguous
   23 |         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:30: note:                 'int size [200009]'
    5 | int n, m, a[N], b[N], fa[N], size[N], ans;
      |                              ^~~~