Language: C++

/**So..a**/
#include<bits/stdc++.h>

using namespace std;
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#define PB(x, v) x.push_back(v);
#define M_P(a, b) make_pair(a, b)
#define pll pair<ll, ll>
#define ll long long
#define mll map<ll, ll>
#define vl vector<ll>
#define fa(x, v) for(auto x: v)
#define fr(i, a, b) for(int i= a;i <=b; i++)
#define TEST  ll Test; cin >> Test; while(Test--)

#define B_ begin()
#define E_ end()
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define NL_ "\n"
#define F first
#define S second
#define FF first.first
#define FS first.second
#define SF second.first
#define SS second.second

#define mod(a) a%1000000007

#define  ull unsigned long long
#define MAX  200010
 ll n, m;
 vector<ll> v[MAX];
 ll  visit[MAX];
 ll a, b;
 ll cnt;
 void dfs(ll node)
 {
         cnt++;
     visit[node] = 0;
     for(ll i=0; i< v[node].size(); i++)
     {
         if(visit[v[node][i]]) dfs(v[node][i]);
     }
     return ;

 }


int main()
{

    FAST;
     cin >> n >> m;
     fr(i, 1, n) visit[i] = 1;
     fr(i, 1, m)
     {
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
     }
     ll ans = 0;
     fr(i, 1, n)
     {
         if(visit[i] and v[i].size()>0)
         {
                cnt = 0;
             dfs(i);
             ans = max(cnt, ans);
         }
     }
     cout << ans;

    return 0;
}


Compiler output:
a.cc: In function 'void dfs(long long int)':
a.cc:41:6: error: reference to 'visit' is ambiguous
   41 |      visit[node] = 0;
      |      ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:2:
/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:35:6: note:                 'long long int visit [200010]'
   35 |  ll  visit[MAX];
      |      ^~~~~
a.cc:44:13: error: reference to 'visit' is ambiguous
   44 |          if(visit[v[node][i]]) dfs(v[node][i]);
      |             ^~~~~
/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:35:6: note:                 'long long int visit [200010]'
   35 |  ll  visit[MAX];
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:56:18: error: reference to 'visit' is ambiguous
   56 |      fr(i, 1, n) visit[i] = 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:35:6: note:                 'long long int visit [200010]'
   35 |  ll  visit[MAX];
      |      ^~~~~
a.cc:66:13: error: reference to 'visit' is ambiguous
   66 |          if(visit[i] and v[i].size()>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:35:6: note:                 'long long int visit [200010]'
   35 |  ll  visit[MAX];
      |      ^~~~~