Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <sstream>
#include <queue>
#include <deque>
#define LL long long
#define MP make_pair
#define PII pair<int, int>
#define F first
#define S second
using namespace std;
int n,m;
vector<PII> v[60];
int res=0,t;
bool visit[60];
void dfs(int x)
{
	//cout <<x<<" ##\n";
	visit[x]=1;
	for (int i=0;i<v[x].size();i++)
	{
		int xi=v[x][i].first;
		int yi=v[x][i].second;
		if (yi==t) continue;
		if (visit[xi]) continue;
		dfs(xi);
	}
}
int main()
{
	cin >>n>>m;
	for (int i=0;i<m;i++)
	{
		int x,y;
		cin >>x>>y;
		x--,y--;
		v[x].push_back(MP(y,i));
		v[y].push_back(MP(x,i));
	}
	for (int i=0;i<m;i++)
	{
		t=i;
		fill(visit,visit+n,0);
		//cout <<i<<" ############\n";
		dfs(0);
		if (count(visit,visit+n,0)) res++;
	}
	cout <<res;
	return 0;
}
#include <sstream>
#include <queue>
#include <deque>
#define LL long long
#define MP make_pair
#define PII pair<int, int>
#define F first
#define S second
using namespace std;
int n,m;
vector<PII> v[60];
int res=0,t;
bool visit[60];
void dfs(int x)
{
	//cout <<x<<" ##\n";
	visit[x]=1;
	for (int i=0;i<v[x].size();i++)
	{
		int xi=v[x][i].first;
		int yi=v[x][i].second;
		if (yi==t) continue;
		if (visit[xi]) continue;
		dfs(xi);
	}
}
int main()
{
	cin >>n>>m;
	for (int i=0;i<n;i++)
	{
		int x,y;
		cin >>x>>y;
		x--,y--;
		v[x].push_back(MP(y,i));
		v[y].push_back(MP(x,i));
	}
	for (int i=0;i<m;i++)
	{
		t=i;
		fill(visit,visit+n,0);
		//cout <<i<<" ############\n";
		dfs(0);
		if (count(visit,visit+n,0)) res++;
	}
	cout <<res;
	return 0;
}

Compiler output:
a.cc:5:15: warning: extra tokens at end of #include directive
    5 | #include <map>#include <iostream>
      |               ^
a.cc:67:5: error: redefinition of 'int n'
   67 | int n,m;
      |     ^
a.cc:19:5: note: 'int n' previously declared here
   19 | int n,m;
      |     ^
a.cc:67:7: error: redefinition of 'int m'
   67 | int n,m;
      |       ^
a.cc:19:7: note: 'int m' previously declared here
   19 | int n,m;
      |       ^
a.cc:68:13: error: redefinition of 'std::vector<std::pair<int, int> > v [60]'
   68 | vector<PII> v[60];
      |             ^
a.cc:20:13: note: 'std::vector<std::pair<int, int> > v [60]' previously declared here
   20 | vector<PII> v[60];
      |             ^
a.cc:69:5: error: redefinition of 'int res'
   69 | int res=0,t;
      |     ^~~
a.cc:21:5: note: 'int res' previously defined here
   21 | int res=0,t;
      |     ^~~
a.cc:69:11: error: redefinition of 'int t'
   69 | int res=0,t;
      |           ^
a.cc:21:11: note: 'int t' previously declared here
   21 | int res=0,t;
      |           ^
a.cc:70:6: error: redefinition of 'bool visit [60]'
   70 | bool visit[60];
      |      ^~~~~
a.cc:22:6: note: 'bool visit [60]' previously declared here
   22 | bool visit[60];
      |      ^~~~~
a.cc:71:6: error: redefinition of 'void dfs(int)'
   71 | void dfs(int x)
      |      ^~~
a.cc:23:6: note: 'void dfs(int)' previously defined here
   23 | void dfs(int x)
      |      ^~~
a.cc:84:5: error: redefinition of 'int main()'
   84 | int main()
      |     ^~~~
a.cc:36:5: note: 'int main()' previously defined here
   36 | int main()
      |     ^~~~