Language: C++

#include <bits/stdc++.h>
using namespace std;
int f[200007], have[200007], size[200007], ans = 1;
int find(int x){
	if(f[x] == x) return x;
	return f[x] = find(f[x]);
}
void merge(int x, int y){
	x = find(x);
	y = find(y);
	if(x == y) return;
	size[x] += size[y];
	ans = max(size[x], ans);
	f[y] = x; 
}
int main(){
	for(int i = 0; i < 200007; i++) f[i] = i, size[i] = 1;
	int n, m;
	cin >> n >> m;
	for(int x, y, i = 0; i < m; i++){
		cin >> x >> y;
		merge(x, y);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void merge(int, int)':
a.cc:12:9: error: reference to 'size' is ambiguous
   12 |         size[x] += size[y];
      |         ^~~~
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:3:30: note:                 'int size [200007]'
    3 | int f[200007], have[200007], size[200007], ans = 1;
      |                              ^~~~
a.cc:12:20: error: reference to 'size' is ambiguous
   12 |         size[x] += 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:3:30: note:                 'int size [200007]'
    3 | int f[200007], have[200007], size[200007], ans = 1;
      |                              ^~~~
a.cc:13:19: error: reference to 'size' is ambiguous
   13 |         ans = max(size[x], ans);
      |                   ^~~~
/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:3:30: note:                 'int size [200007]'
    3 | int f[200007], have[200007], size[200007], ans = 1;
      |                              ^~~~
a.cc: In function 'int main()':
a.cc:17:51: error: reference to 'size' is ambiguous
   17 |         for(int i = 0; i < 200007; i++) f[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:3:30: note:                 'int size [200007]'
    3 | int f[200007], have[200007], size[200007], ans = 1;
      |                              ^~~~