For this Question: Given a undirected graph with N nodes and M edges. Find the maximum number of edges that you can remove, so that the graph is still connected. If there does not exist any way, print -1. The graph could contain self loops and multiple edges.The first line of input contains four space- separated integers N and M.
Next M lines contain two integers u and v each, denoting that there is an edge from node u to node v.

Constraints:-
1 <= N <= 100000
1 <= M <= 200000
1<= u, v <= NPrint a single integer denoting the maximum number of edges you can remove, so that the graph is still connected.Sample Input 1:
3 3
1 2
2 3
3 3

Output 
1

Explanation:
You can remove the edge (3,3).

Sample Input 2:
5 3
1 2
2 3
3 4

Output
-1

Explanation
The graph is disconnected initially and there are no ways we could remove edges and the graph becomes connected., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #define pbds tree<pair<int,int>, null_type,less<pair<int,int>>, rb_tree_tag,tree_order_statistics_node_update>
#define endl            "\n"
#define ll				long long int
#define f(n) 			for(int i=0;i<n;i++)
#define fo(n)			for(int j=0;j<n;j++)
#define foo(n)			for(int i=1;i<=n;i++)
#define ff 				first
#define ss 				second
#define pb 				push_back
#define pii 			pair<int,int>
#define vi 				vector<int>
#define vp 				vector<pii>
#define test            int tt; cin>>tt; while(tt--)
#define mod 			1000000007
void fastio()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("ain.txt", "r", stdin);
	freopen("aout.txt", "w", stdout);
#endif
}
vi g[100001];
int vis[100001];
void dfs(int node) {
	vis[node] = true;
	for (auto x : g[node]) {
		if (!vis[x]) {
			dfs(x);
		}
	}
}

int main() {
	fastio();
	int n, m;
	cin >> n >> m;
	f(m) {
		int u, v;
		cin >> u >> v;
		if (u != v) {
			g[u].pb(v);
			g[v].pb(u);
		}
	}
	dfs(1);
	bool ans = true;
	for (int i = 1; i <= n; i++) {
		if (!vis[i]) {
			ans = false;
		}
	}
	if (ans == false)cout << -1;
	else {
		cout << m - n + 1;
	}
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?