For this Question: Given a directed graph of N vertices, Print 1 if you can perform a topological sort on the given graph. Otherwise print 0.First line consists of two space separated integers denoting N and M.
Each of the following M lines consists of two space separated integers X and Y denoting there is an from X directed towards Y.

1 <= N, M <= 2*10^5
1 <= X, Y <= NPrint 1 if topological sort can be done correctly. Otherwise print 0 .Input
5 6
1 2
1 3
2 3
2 4
3 4
3 5

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 vis[sz];
int ch=1;
vector<int> NEB[sz];
void dfs(int s)
{
	if(vis[s]==1) ch=0;
	vis[s]=1;
    for(auto it:NEB[s])
    {
    	if(vis[it]==0)
    	{
    		dfs(it);
    	}else if(vis[it]==1) ch=0;
    }

	vis[s]=2;
}
signed main()
{
	


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