Language: C++

#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <algorithm>

#include <cstdio>

using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rrepc(i, s, n) for (int i = (s); i >= (n); i--)
typedef long long ll;
typedef unsigned long long ull;

#define NMAX (51)

int N, M;
vector<int> G[NMAX];

bool visited[NMAX] = { false };
int ord[NMAX];
int lowlink[NMAX];
int depth[NMAX];
int time = 1;
int ans = 0;

void dfs(int node, int src)
{
	int next;

	visited[node] = true;
	ord[node] = time;
	lowlink[node] = time;
	time++;

	if (src == -1) depth[node] = 0;
	else depth[node] = depth[src] + 1;

	rep(i, G[node].size()) {
		next = G[node][i];

		if (!visited[next]) {
			dfs(next, node);
			lowlink[node] = min(lowlink[node], lowlink[next]);
		}
		else if (src != next) {
			lowlink[node] = min(lowlink[node], ord[next]);
		}
	}
}

void bridge()
{
	int peer, parent, des;

	dfs(1, -1);

	repc(i, 1, N) {
		rep(j, G[i].size()) {
			peer = G[i][j];

			if (depth[i] < depth[peer]) {
				parent = i;
				des = peer;
			}
			else {
				parent = peer;
				des = i;
			}

			if (ord[parent] < lowlink[des]) ans++;
		}
	}
}

int main()
{
	int a, b;

	cin >> N >> M;
	rep(i, M) {
		cin >> a >> b;
		G[a].push_back(b);
		G[b].push_back(a);
	}

	bridge();

	cout << ans / 2 << endl;

	return 0;
}

Compiler output:
a.cc:30:5: error: 'int time' redeclared as different kind of entity
   30 | int time = 1;
      |     ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'void dfs(int, int)':
a.cc:38:21: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   38 |         ord[node] = time;
      |                     ^~~~
      |                     |
      |                     time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:39:25: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   39 |         lowlink[node] = time;
      |                         ^~~~
      |                         |
      |                         time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:40:9: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
   40 |         time++;
      |         ^~~~
a.cc:40:13: error: lvalue required as increment operand
   40 |         time++;
      |             ^~