Language: C++

#include<bits/stdc++.h>
#define SORT(v) sort(v.rbegin() , v.rend())
#define si(n) scanf( "%d" , &n)
#define sii(n , m) scanf( "%d %d" , &n , &m)
#define sl(n) scanf( "%lld" , &n)
#define sll(n , m) scanf( "%lld %lld" , &n, &m)
#define ss(cad) scanf( "%s" , cad)
#define sz(x) (int)x.size()
#define PB push_back
#define fst first
#define scn second
#define DBG(x) cerr << #x << " = " << (x) << endl
#define M 1000000007
#define N_MAX 1000010
#define EPS 1e-9

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<ll> vll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef vector<pi> vp;

vector<vi> gr;
vb visit;
int dfs(int nodo){
	int cnt = 1;
	visit[nodo] = 1;
	for(int x: gr[nodo]){
		if(visit[x] == false)
			cnt += dfs(x);
	}
	return cnt;
}

int main(){
	int n, m;
	sii(n, m);
	gr.resize(n);
	visit.resize(n);
	while(m--){
		int a, b;
		sii(a, b);
		a--;
		b--;
		gr[a].push_back(b);
		gr[b].push_back(a);
	}
	int ans = 1;
	for(int i = 0; i < n; i++){
		if(visit[i] == 0)
			ans = max(ans, dfs(i));
	}
	printf("%d\n", ans);
    return 0;
}

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:31:9: error: reference to 'visit' is ambiguous
   31 |         visit[nodo] = 1;
      |         ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:28:4: note:                 'vb visit'
   28 | vb visit;
      |    ^~~~~
a.cc:33:20: error: reference to 'visit' is ambiguous
   33 |                 if(visit[x] == false)
      |                    ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:28:4: note:                 'vb visit'
   28 | vb visit;
      |    ^~~~~
a.cc: In function 'int main()':
a.cc:43:9: error: reference to 'visit' is ambiguous
   43 |         visit.resize(n);
      |         ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:28:4: note:                 'vb visit'
   28 | vb visit;
      |    ^~~~~
a.cc:54:20: error: reference to 'visit' is ambiguous
   54 |                 if(visit[i] == 0)
      |                    ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:28:4: note:                 'vb visit'
   28 | vb visit;
      |    ^~~~~