Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int               long long
#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            (x).begin(),(x).end()
#define uniq(v)           (v).erase(unique(all(v)),(v).end())
#define sz(x)             (int)((x).size())
#define fr                first
#define sc                second
#define pii               pair<int,int>
#define loop(i,a,b)        for(int i=a;i<b;i++)
#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll
#define br                break
#define con               continue

template<typename T1,typename T2>istream& operator>>(istream& in,pair<T1,T2> &a){in>>a.fr>>a.sc;return in;}
template<typename T1,typename T2>ostream& operator<<(ostream& out,pair<T1,T2> a){out<<a.fr<<" "<<a.sc;return out;}
template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;}
 
const long long INF=1e18;
const int32_t M=1e9+7;
const int32_t MM=998244353;

priority_queue<pii, vector<pii>, greater<pii> >q;
vector<int>ad[200005];
bool visit[200005];
int dfs(int z){
	int ans=0;
	if(visit[z]==false){
		visit[z]=true;
		ans++;
		for(auto v:ad[z])ans+=dfs(v);
	}
    return ans;

}
signed main(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output1.txt","w",stdout);
	#endif
    ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	memset(visit,false,sizeof(visit));
	loop(i,0,m){
		cin>>x>>y;
		x-=1;
		y-=1;
	    ad[x].pb(y);
	    ad[y].pb(x);
	}
	int mx=0;
	for(int i=0;i<n;i++){
		mx=max(mx,dfs(i));
	}
    cout<<mx<<endl;
 
}

Compiler output:
a.cc: In function 'long long int dfs(long long int)':
a.cc:36:12: error: reference to 'visit' is ambiguous
   36 |         if(visit[z]==false){
      |            ^~~~~
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:33:6: note:                 'bool visit [200005]'
   33 | bool visit[200005];
      |      ^~~~~
a.cc:37:17: error: reference to 'visit' is ambiguous
   37 |                 visit[z]=true;
      |                 ^~~~~
/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:33:6: note:                 'bool visit [200005]'
   33 | bool visit[200005];
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:53:16: error: reference to 'visit' is ambiguous
   53 |         memset(visit,false,sizeof(visit));
      |                ^~~~~
/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:33:6: note:                 'bool visit [200005]'
   33 | bool visit[200005];
      |      ^~~~~
a.cc:53:35: error: reference to 'visit' is ambiguous
   53 |         memset(visit,false,sizeof(visit));
      |                                   ^~~~~
/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:33:6: note:                 'bool visit [200005]'
   33 | bool visit[200005];
      |      ^~~~~