For this Question: Given an undirected graph of N nodes and E edges. Edges are given in the form of x y if there is an edge between x and y. Print 1 if graph is connected else print 0.Two integers denoting N and E.
Then E lines follow, in each line two integers u, v denoting there is an edge between them.

Constraints 
1<= N <=100000
0<= M <=100000
1<= u, v <=N
Print 1 if graph is connected else print 0.Input :
4 6
1 2
2 3
3 4
4 2
1 3
2 4

Output:
1, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define pu push_back
#define fi first
#define se second
#define mp make_pair
#define int long long
#define pii pair<int,int>
#define mm (s+e)/2
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(int i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define sz 200000
int dist[sz];
int vis[sz];
int cnt=0;
vector<int> NEB[sz];

void dfs(int s)
{
	vis[s]=1;
	cnt++;
	for(auto it:NEB[s])
	{
		if(vis[it]==0)
		{
			dfs(it);
		}
	}
}
signed main()
{
	
		int n,m;
		cin>>n>>m;
		for(int i=1;i<=m;i++)
		{
         int a,b;
         cin>>a>>b;
         NEB[a].pu(b);
         NEB[b].pu(a);
         
		}
		
		dfs(1);
		if(cnt==n) cout<<1<<endl;
		else cout<<0<<endl; 
	
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?