Language: C++

//
//	Low Link
//
//	
//	  
//
//
//



struct low_link {
public :
	vector<int> articulation;
	vector<pair<int, int>> bridge;
private :
	int n;
	vector<vector<int>> g;
	vector<int> order, low;
	vector<bool> seen;

	int dfs (int v, int p, int ord) {
		seen[v] = true;
		order[v] = ord++;
		low[v] = order[v];
		int child = 0;
		bool isart = false;
		for (int u : g[v]) if (u != p) {
			if (seen[u]) {
				low[v] = min(low[v], order[u]);
			} else {
				child++;
				ord = dfs(u, v, ord);
				low[v] = min(low[v], low[u]);
				if (p != -1) isart |= (order[v] <= low[u]);
				if (order[v] < low[u]) bridge.push_back(minmax(v, u));
			}
		}
		isart |= (p == -1 and child >= 2);
		if (isart) articulation.push_back(v);
		return ord;
	}

public :
	low_link (int n) : n(n), g(n), order(n), low(n), seen(n) { }

	void add_edge (int v, int u) {
		g[v].push_back(u);
		g[u].push_back(v);
	}

	void build (int r = 0) {
		bridge.clear();
		articulation.clear();
		fill(seen.begin(), seen.end(), false);
		for (int s = 0; s < g.size(); s++) {
			if (not seen[s]) dfs(s, -1, 0);
		}
	}

};



int main() {
	int n, m;
	cin >> n >> m;
	low_link g(n);
	for (int i = 0; i < m; i++) {
		int a, b;
		cin >> a >> b;
		a--; b--;
		g.add_edge(a, b);
	}
	
	g.build();
	
	cout << g.bridge.size() << endl;
	
	return 0;
}

Compiler output:
a.cc:14:9: error: 'vector' does not name a type
   14 |         vector<int> articulation;
      |         ^~~~~~
a.cc:15:9: error: 'vector' does not name a type
   15 |         vector<pair<int, int>> bridge;
      |         ^~~~~~
a.cc:18:9: error: 'vector' does not name a type
   18 |         vector<vector<int>> g;
      |         ^~~~~~
a.cc:19:9: error: 'vector' does not name a type
   19 |         vector<int> order, low;
      |         ^~~~~~
a.cc:20:9: error: 'vector' does not name a type
   20 |         vector<bool> seen;
      |         ^~~~~~
a.cc: In member function 'int low_link::dfs(int, int, int)':
a.cc:23:17: error: 'seen' was not declared in this scope
   23 |                 seen[v] = true;
      |                 ^~~~
a.cc:24:17: error: 'order' was not declared in this scope; did you mean 'ord'?
   24 |                 order[v] = ord++;
      |                 ^~~~~
      |                 ord
a.cc:25:17: error: 'low' was not declared in this scope
   25 |                 low[v] = order[v];
      |                 ^~~
a.cc:28:30: error: 'g' was not declared in this scope
   28 |                 for (int u : g[v]) if (u != p) {
      |                              ^
a.cc:30:42: error: 'min' was not declared in this scope
   30 |                                 low[v] = min(low[v], order[u]);
      |                                          ^~~
a.cc:34:42: error: 'min' was not declared in this scope
   34 |                                 low[v] = min(low[v], low[u]);
      |                                          ^~~
a.cc:36:56: error: 'bridge' was not declared in this scope
   36 |                                 if (order[v] < low[u]) bridge.push_back(minmax(v, u));
      |                                                        ^~~~~~
a.cc:36:73: error: 'minmax' was not declared in this scope
   36 |                                 if (order[v] < low[u]) bridge.push_back(minmax(v, u));
      |                                                                         ^~~~~~
a.cc:40:28: error: 'articulation' was not declared in this scope
   40 |                 if (isart) articulation.push_back(v);
      |                            ^~~~~~~~~~~~
a.cc: In constructor 'low_link::low_link(int)':
a.cc:45:34: error: class 'low_link' does not have any field named 'g'
   45 |         low_link (int n) : n(n), g(n), order(n), low(n), seen(n) { }
      |                                  ^
a.cc:45:40: error: class 'low_link' does not have any field named 'order'
   45 |         low_link (int n) : n(n), g(n), order(n), low(n), seen(n) { }
      |                                        ^~~~~
a.cc:45:50: error: class 'low_link' does not have any field named 'low'
   45 |         low_link (int n) : n(n), g(n), order(n), low(n), seen(n) { }
      |                                                  ^~~
a.cc:45:58: error: class 'low_link' does not have any field named 'seen'
   45 |         low_link (int n) : n(n), g(n), order(n), low(n), seen(n) { }
      |                                                          ^~~~
a.cc: In member function 'void low_link::add_edge(int, int)':
a.cc:48:17: error: 'g' was not declared in this scope
   48 |                 g[v].push_back(u);
      |                 ^
a.cc: In member function 'void low_link::build(int)':
a.cc:53:17: error: 'bridge' was not declared in this scope
   53 |                 bridge.clear();
      |                 ^~~~~~
a.cc:54:17: error: 'articulation' was not declared in this scope
   54 |                 articulation.clear();
      |                 ^~~~~~~~~~~~
a.cc:55:22: error: 'seen' was not declared in this scope
   55 |                 fill(seen.begin(), seen.end(), false);
      |                      ^~~~
a.cc:55:17: error: 'fill' was not declared in this scope
   55 |                 fill(seen.begin(), seen.end(), false);
      |                 ^~~~
a.cc:56:37: error: 'g' was not declared in this scope
   56 |                 for (int s = 0; s < g.size(); s++) {
      |                                     ^
a.cc: In function 'int main()':
a.cc:67:9: error: 'cin' was not declared in this scope
   67 |         cin >> n >> m;
      |         ^~~
a.cc:78:9: error: 'cout' was not declared in this scope
   78 |         cout << g.bridge.size() << endl;
      |         ^~~~
a.cc:78:19: error: 'struct low_link' has no member named 'bridge'
   78 |         cout << g.bridge.size() << endl;
      |                   ^~~~~~
a.cc:78:36: error: 'endl' was not declared in this scope
   78 |         cout << g.bridge.size() << endl;
      |                                    ^~~~