criyle/codenet-compile-errors huggingface dataset:
Language: C++

int N, M;
int A[101], B[101];

void _main() {
    cin >> N >> M;
    rep(i, 0, M) cin >> A[i] >> B[i], A[i]--, B[i]--;
 
    int ans = 0;
    rep(i, 0, M) {
        UnionFind uf(N);
        rep(j, 0, M) if (j != i) uf(A[j], B[j]);
        int c = 0;
        rep(j, 0, N) if (j == uf[j]) c++;
        if (1 < c) ans++;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'void _main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> N >> M;
      |     ^~~
a.cc:6:9: error: 'i' was not declared in this scope
    6 |     rep(i, 0, M) cin >> A[i] >> B[i], A[i]--, B[i]--;
      |         ^
a.cc:6:5: error: 'rep' was not declared in this scope
    6 |     rep(i, 0, M) cin >> A[i] >> B[i], A[i]--, B[i]--;
      |     ^~~
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << ans << endl;
      |     ^~~~
a.cc:16:20: error: 'endl' was not declared in this scope
   16 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORD(i,a,b) for(int i=a;i>=b;i--)
#define FORL(i,x) for(int i=head[x];i;i=nxt[i])
#define ALL(a)  (a).begin(),(a).end()
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define PB push_back
#define MP make_pair
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

// union by size + path having
class UnionFind {
public:
    vector <ll> par; // 各元の親を表す配列
    vector <ll> siz; // 素集合のサイズを表す配列(1 で初期化)

    // Constructor
    UnionFind(ll sz_): par(sz_), siz(sz_, 1LL) {
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }
    void init(ll sz_) {
        par.resize(sz_);
        siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }

    // Member Function
    // Find
    ll root(ll x) { // 根の検索
        while (par[x] != x) {
            x = par[x] = par[par[x]]; // x の親の親を x の親とする
        }
        return x;
    }

    // Union(Unite, Merge)
    bool merge(ll x, ll y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        // merge technique（データ構造をマージするテク．小を大にくっつける）
        if (siz[x] < siz[y]) swap(x, y);
        siz[x] += siz[y];
        par[y] = x;
        return true;
    }

    bool issame(ll x, ll y) { // 連結判定
        return root(x) == root(y);
    }

    ll size(ll x) { // 素集合のサイズ
        return siz[root(x)];
    }
};


int main() {
    ll N, M, a, b;
    cin >> N >> M;
    vector<pll> vec(M);
    FOR(i,0,M) {
        cin >> a >> b; --a, --b;
        vec[i].first = a;
        vec[i].second = b;
    }

    // calculation
    UnionFind uf(N);
    ll res = 0;
    FOR(i,0,M) {
        uf.init(N);
        FOR(j,0,M) {
            if (j == i) continue;
            uf.merge(vec[j].first, vec[j].second);
        }
        if (uf.size(0) != N) res++;
    }

    cout << res << endl;

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:67:12: error: 'pll' was not declared in this scope; did you mean 'll'?
   67 |     vector<pll> vec(M);
      |            ^~~
      |            ll
a.cc:67:15: error: template argument 1 is invalid
   67 |     vector<pll> vec(M);
      |               ^
a.cc:67:15: error: template argument 2 is invalid
a.cc:70:12: error: invalid types 'int[int]' for array subscript
   70 |         vec[i].first = a;
      |            ^
a.cc:71:12: error: invalid types 'int[int]' for array subscript
   71 |         vec[i].second = b;
      |            ^
a.cc:81:25: error: invalid types 'int[int]' for array subscript
   81 |             uf.merge(vec[j].first, vec[j].second);
      |                         ^
a.cc:81:39: error: invalid types 'int[int]' for array subscript
   81 |             uf.merge(vec[j].first, vec[j].second);
      |                                       ^
Language: C++

#include<algorithm>
#include<iostream>
#include<cmath>
#include<cstdio>
#include<iomanip>
#include<stack>
#include<queue>
#include<ctime>
#include<osstream>//
#include<isstream>// 
using namespace std;
const int maxn=500;
vector<int> G[maxn];
int dfn[maxn],low[maxn];
int n,m,u,v,dep,ans;

void init()
{
    dep=ans=0;
    memset(dfn,0,sizeof(dfn));
    memset(low,0,sizeof(low));
    for(int i=0;i<=n;i++) G[i].clear();
}

void Tarjan(int u,int fa)
{
    dfn[u]=low[u]=++dep;
    for(int i=0;i<G[u].size();i++){
        int v=G[u][i];
        if(!dfn[v]){
            Tarjan(v,u);
            low[u]=min(low[u],low[v]);
            if(low[v]>dfn[u]) ans++;
        }else if(v!=fa)
            low[u]=min(low[u],dfn[v]);
    }
}

int main()
{
    while(cin>>n>>m)
    {
        init();
        for(int i=0;i<m;i++){
            cin>>u>>v;
            G[u].push_back(v);
            G[v].push_back(u);
        }
        Tarjan(1,-1);
        cout<<ans<<endl;
    }
    return 0;
}

Compiler output:
a.cc:9:9: fatal error: osstream: No such file or directory
    9 | #include<osstream>//
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

def dfs(v):
    visited[v] = True
    for v2 in range(n):
        if G[v][v2]==1 and visited[v2]==False:
            dfs(v2)
    

n, m = map(int, input().split())
a = [0]*m
b = [0]*m
G = [[0]*n for _ in range(n)]
visited = [False]*n

for i in range(m):
    a[i], b[i] = map(int, input().split())
    a[i] -= 1
    b[i] -= 1
    G[a[i]][b[i]] = G[b[i]][a[i]] = 1

cnt = 0
for i in range(m):
    G[a[i]][b[i]] = G[b[i]][a[i]] = 0
    for j in range(n):
        visited[j] = False
    
    dfs(0)

    if False in visited:
        cnt += 1

    G[a[i]][b[i]] = G[b[i]][a[i]] = 1

print(cnt)

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def dfs(v):
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

const int limit = 50;

int n, m;
int a[limit], b[limit];

bool graph[limit][limit];
bool visited[limit];

void dfs(int v)
{
  visited[v] = true;
  for (int v2 = 0; i < n; v2++) {
    if (graph[v][v2]) == false) continue;
    if (visited[v2] == true) continue;
    dfs(v2);
  }
}

int main()
{
  cin >> n >> m;

  for (int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
    a[i]--; b[i]--;
    graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
  }

  int ans = 0;

  for (int i = 0; i < m; i++) {
      graph[a[i]][b[i]] = graph[b[i]][a[i]] = false;
      for (int j = 0; j < n; j++) visited[j] = false;
      dfs(0);

      bool bridge = false;
      for (int j = 0; j < n; j++) if (visietd[j] == false) bridge = true;
      if (bridge) ans += 1;

      graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
    }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:15:20: error: 'i' was not declared in this scope
   15 |   for (int v2 = 0; i < n; v2++) {
      |                    ^
a.cc:16:23: error: expected primary-expression before '==' token
   16 |     if (graph[v][v2]) == false) continue;
      |                       ^~
a.cc: In function 'int main()':
a.cc:40:39: error: 'visietd' was not declared in this scope; did you mean 'visited'?
   40 |       for (int j = 0; j < n; j++) if (visietd[j] == false) bridge = true;
      |                                       ^~~~~~~
      |                                       visited
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include <cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back

void Yes(){
	cout<<"Yes"<<endl;
	exit(0);
}
 
void No(){
	cout<<"No"<<endl;
	exit(0);
}

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

bool used[55];
void dfs(int s) {
    if(used[s]) return;
    used[s] = true;
    for(auto t : G[s]) {
        dfs(t);
    }
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
    cin >> N >> M;
    rep(i, M) {
        int a, b; cin >> a >> b;
        a --; b --;
        G[a].pb(b); G[b].pb(a);
    }
    int cnt = 0;
    rep(i, N) {
        for(auto v : G[i]) {
            if(v < i) break;
            G[a].erase(b);
            G[b].erase(a);
            rep(i, N) used[i] = false;
            dfs(0);
            bool flag = true;
            rep(i, N) {
                if(used[i] == false) flag = false;
            }
            if(flag) cnt ++;
            G[a].pb(b);
            G[b].pb(a);
        }
    }
    cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:15: error: 'a' was not declared in this scope
   79 |             G[a].erase(b);
      |               ^
a.cc:79:24: error: 'b' was not declared in this scope
   79 |             G[a].erase(b);
      |                        ^
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include <cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back

void Yes(){
	cout<<"Yes"<<endl;
	exit(0);
}
 
void No(){
	cout<<"No"<<endl;
	exit(0);
}

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

bool used[55];
void dfs(int s) {
    if(used[s]) return;
    used[s] = true;
    for(auto t : G[s]) {
        dfs(t);
    }
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
    cin >> N >> M;
    rep(i, M) {
        int a, b; cin >> a >> b;
        a --; b --;
        G[a].pb(b); G[b].pb(a);
    }
    int cnt = 0;
    for(i, N) {
        for(auto v : G[i]) {
            if(v < i) break;
            G[a].erase(b);
            G[b].erase(a);
            rep(i, N) used[i] = false;
            dfs(0);
            bool flag = true;
            rep(i, N) {
                if(used[i] == false) flag = false;
            }
            if(flag) cnt ++;
            G[a].pb(b);
            G[b].pb(a);
        }
    }
    cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:76:9: error: 'i' was not declared in this scope; did you mean 'ui'?
   76 |     for(i, N) {
      |         ^
      |         ui
a.cc:93:9: error: expected primary-expression before 'return'
   93 |         return 0;
      |         ^~~~~~
a.cc:92:25: error: expected ')' before 'return'
   92 |     cout << cnt << endl;
      |                         ^
      |                         )
   93 |         return 0;
      |         ~~~~~~           
a.cc:76:8: note: to match this '('
   76 |     for(i, N) {
      |        ^
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include <cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back

void Yes(){
	cout<<"Yes"<<endl;
	exit(0);
}
 
void No(){
	cout<<"No"<<endl;
	exit(0);
}

int N, M;
vactor<int> G[55];

bool used[55];
void dfs(int s) {
    if(used[s]) return;
    used[s] = true;
    for(auto t : G[s]) {
        dfs(t);
    }
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
    cin >> N >> M;
    rep(i, M) {
        int a, b; cin >> a >> b;
        a --; b --;
        G[a].pb(b); G[b].pb(a);
    }
    int cnt = 0;
    for(i, N) {
        for(auto v : G[i]) {
            if(v < i) break;
            G[a].erase(b);
            G[b].erase(a);
            rep(i, N) used[i] = false;
            dfs(0);
            bool flag = true;
            rep(i, N) {
                if(used[i] == false) flag = false;
            }
            if(flag) cnt ++;
            G[a].pb(b);
            G[b].pb(a);
        }
    }
    cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc:55:1: error: 'vactor' does not name a type
   55 | vactor<int> G[55];
      | ^~~~~~
a.cc: In function 'void dfs(int)':
a.cc:61:18: error: 'G' was not declared in this scope
   61 |     for(auto t : G[s]) {
      |                  ^
a.cc: In function 'int main()':
a.cc:73:9: error: 'G' was not declared in this scope
   73 |         G[a].pb(b); G[b].pb(a);
      |         ^
a.cc:76:9: error: 'i' was not declared in this scope; did you mean 'ui'?
   76 |     for(i, N) {
      |         ^
      |         ui
a.cc:93:9: error: expected primary-expression before 'return'
   93 |         return 0;
      |         ^~~~~~
a.cc:92:25: error: expected ')' before 'return'
   92 |     cout << cnt << endl;
      |                         ^
      |                         )
   93 |         return 0;
      |         ~~~~~~           
a.cc:76:8: note: to match this '('
   76 |     for(i, N) {
      |        ^
Language: C++

#include <iostream>
#include <vector>
#include <map>

using namespace std;

int limit = 50;

int n, m;

vector<int> a(limit,0), b(limit,0);

vector<vector<bool>> G(50,vector<bool> (50,false));
vector<bool> visit(50,false);

//dfsで訪問検査
//無向グラフ隣接行列
//bool G[limit][limit];
//2次元のbool行列を作り、a,bが繋がっている場合
//G[a][b] = true,G[b][a] = true;
void dfs(int v){
  visit[v] = true;
  for(int v2; v2 < n; v2++){
    if(G[v][v2]) continue;
    if(visit[v2]) continue;
    dfs[v2];
  }
}

int main(void){
  cin >> n >> m;
  
  //グラフ生成
  for(int i = 0; i < m; i++){
    cin >> a[i] >> b[i];
    a[i]--,b[i]--;
    G[a[i]][b[i]] = G[b[i]][a[i]] = true; 
  }
  
  int  ans = 0;
  for(int i = 0; i < m; i++){
    //隣接を一つ外す;
    G[a[i]][b[i]] = G[b[i]][a[i]] = false;
    
    //visitを初期化
    for(int i = 0; i < n; i++) visit[n] = false;
    
    dfs(0);
    
    bool bridge = false;
    for(int i = 0; i < n; i++) if(visit[i] == false) bridge = true;
    if(bridge) ans++;
    
    //隣接をもとに戻す
    G[a[i]][b[i]] = G[b[i]][a[i]] = true;
  
  }
　cout << ans;
}


Compiler output:
a.cc:58:1: error: extended character 　 is not valid in an identifier
   58 | 　cout << ans;
      | ^
a.cc: In function 'void dfs(int)':
a.cc:26:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   26 |     dfs[v2];
      |           ^
a.cc: In function 'int main()':
a.cc:58:1: error: '\U00003000cout' was not declared in this scope
   58 | 　cout << ans;
      | ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <map>

int  N, M;

using namespace std;

int is_bridge(vector<map<int , int>> &G, int ko, vector<bool> &checked){ //knock out
  int cnt = 1;
  int nextkey = -1;
  int key = 1;
  for(int i = 0; i < M; i++){
    if(i == ko) continue;
    if(checked[key]) break;
    nextkey = G[key];
    checked[key] = true; 
    cnt++;
  }
  if(cnt == N) return 1;
  else return 0;
}

int main(){
  cin >> N >> M;
  map<int , int> m;
  vector<pair<int , int>> p(M, pair<int,int>);
  for(i = 0 ; i < M; i++){
    int a, b;
    cin >> a >> b;
    m[a] = b;
  }
  
  int c;
  
  for(i = 0; i < M; i++){
    int ko = i;
    vector<bool> checked(M,0);
    if(is_bridge(m,i,checked)) c++;
  }
  cout << c;
}


Compiler output:
a.cc: In function 'int is_bridge(std::vector<std::map<int, int> >&, int, std::vector<bool>&)':
a.cc:16:20: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::map<int, int> >, std::map<int, int> >::value_type' {aka 'std::map<int, int>'} to 'int' in assignment
   16 |     nextkey = G[key];
      |                    ^
a.cc: In function 'int main()':
a.cc:27:45: error: expected primary-expression before ')' token
   27 |   vector<pair<int , int>> p(M, pair<int,int>);
      |                                             ^
a.cc:28:7: error: 'i' was not declared in this scope
   28 |   for(i = 0 ; i < M; i++){
      |       ^
a.cc:36:7: error: 'i' was not declared in this scope
   36 |   for(i = 0; i < M; i++){
      |       ^
Language: C++

#include <iostream>
#include <vector>
#include <map>

int  N, M;

using namespace std;

int is_bridge(vector<map<int , int>> &G, int ko, vector<bool> &checked){ //knock out
  int cnt = 1;
  int nextkey = -1:
  int key = 1;
  for(int i = 0; i < M; i++){
    if(i == ko) continue;
    if(checked[key]) break;
    nextkey = G[key];
    checked[key] = true; 
    cnt++;
  }
  if(cnt == N) return 1;
  else return 0;
}

int main(){
  cin >> N >> M;
  map<int , int> m;
  vector<pair<int , int>> p(M, pair<int,int>);
  for(i = 0 ; i < M; i++){
    int a, b;
    cin >> a >> b;
    m[a] = b;
  }
  
  int c;
  
  for(i = 0; i < M; i++){
    int ko = i;
    vector<bool> checked(M,0);
    if(is_bridge(m,i,checked)) c++;
  }
  cout << c;
}


Compiler output:
a.cc: In function 'int is_bridge(std::vector<std::map<int, int> >&, int, std::vector<bool>&)':
a.cc:11:19: error: expected ',' or ';' before ':' token
   11 |   int nextkey = -1:
      |                   ^
a.cc:15:16: error: 'key' was not declared in this scope
   15 |     if(checked[key]) break;
      |                ^~~
a.cc:16:17: error: 'key' was not declared in this scope
   16 |     nextkey = G[key];
      |                 ^~~
a.cc: In function 'int main()':
a.cc:27:45: error: expected primary-expression before ')' token
   27 |   vector<pair<int , int>> p(M, pair<int,int>);
      |                                             ^
a.cc:28:7: error: 'i' was not declared in this scope
   28 |   for(i = 0 ; i < M; i++){
      |       ^
a.cc:36:7: error: 'i' was not declared in this scope
   36 |   for(i = 0; i < M; i++){
      |       ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include<queue>
#include <sstream>
#include <set>
typedef  long long ll;
const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};
const int dr[4] = {-1, 0, 1, 0};
const int dc[4] = { 0, 1, 0,-1};
const int INF = 1e9;
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
using namespace std;

const int limit = 50;
int n,m;
bool vis[limit];
bool vec[limit][limit];


void dfs(int x){
    if(vis[x]) return;

    vis[x] = true;

    for(int i=0;i<n;i++){
        if(vec[i][x]){
            dfs(i);
        }
    }
}
int main(){
    int a,b,cnt = 0;
    cin >> n >> m;
    vector<pair<int, int>> edge(limit);
    REP(i,m){
        cin >> a,b;
        a--;
        b--;
        edge[i] = {a,b};
        vec[a][b] = true;
        vec[b][a] = true;
    }

    REP(i,m){
        REP(l,n) vis[l] = false;

        vec[edge[i].first][edge[i].second] = false;
        vec[edge[i].second][edge[i].first] = false;

        DFS(0);

        bool fl = true;

        REP(j,n){
            if(!vis[j]){
                fl = false;
                break;
            }
        }

        if(fl) cnt ++;

        vec[edge[i].first][edge[i].second] = true;
        vec[edge[i].second][edge[i].first] = true;
    }

    cout << cnt  <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:9: error: 'DFS' was not declared in this scope
   56 |         DFS(0);
      |         ^~~
Language: C++

#include <iostream>
#include <math.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <stdlib.h>
#include <deque>  
#include <iomanip>

using namespace std;

#define ll long long
#define INF 1e9
#define MOD 1e9 + 7
#define rep(i, n) for(int i = 0; i < n; i++)
#define loop(i, a, n) for(int i = a; i < n; i++)
#define all(in) in.begin(), in.end()

const int MAX_N = 50;
int N, M;
bool Graph[MAX_N + 1][MAX_N + 1];
bool visited[MAX_N + 1]; 
int dfs(int v){
    visited[v] = true;
    for(int v2 = 0; v2 < N; v2++){
        if(Graph[v][v2] == false)continue;
        if(visited[v2] == true) continue;
        dfs(v2);
    }
}
int main(){
    int N, M;
    cin >> N >> M;
    vector<int> a(M), b(M);
    rep(i, N){
        cin >> a[i] >> b[i];
        a[i]--, b[i]--;
        Graph[a[i]] = true;
        Graph[b[i]] = true;
    }
    int ans = 0;
    for(int i = 0; i < M; i++){
        Graph[a[i]] = false;
        Graph[b[i]] = false;
        rep(i, N) visited[i] = false;
        dfs(0);
        bool bridge = false;
        rep(i, N)if(visited[i] == false)bridge = true;
        if(bridge)ans++;
        Graph[a[i]] = false;
        Graph[b[i]] = false;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:35:1: warning: no return statement in function returning non-void [-Wreturn-type]
   35 | }
      | ^
a.cc: In function 'int main()':
a.cc:43:21: error: incompatible types in assignment of 'bool' to 'bool [51]'
   43 |         Graph[a[i]] = true;
      |         ~~~~~~~~~~~~^~~~~~
a.cc:44:21: error: incompatible types in assignment of 'bool' to 'bool [51]'
   44 |         Graph[b[i]] = true;
      |         ~~~~~~~~~~~~^~~~~~
a.cc:48:21: error: incompatible types in assignment of 'bool' to 'bool [51]'
   48 |         Graph[a[i]] = false;
      |         ~~~~~~~~~~~~^~~~~~~
a.cc:49:21: error: incompatible types in assignment of 'bool' to 'bool [51]'
   49 |         Graph[b[i]] = false;
      |         ~~~~~~~~~~~~^~~~~~~
a.cc:55:21: error: incompatible types in assignment of 'bool' to 'bool [51]'
   55 |         Graph[a[i]] = false;
      |         ~~~~~~~~~~~~^~~~~~~
a.cc:56:21: error: incompatible types in assignment of 'bool' to 'bool [51]'
   56 |         Graph[b[i]] = false;
      |         ~~~~~~~~~~~~^~~~~~~
Language: C++

#include <iostream>
#include <math.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <stdlib.h>
#include <deque>  
#include <iomanip>

using namespace std;

#define ll long long
#define INF 1e9
#define MOD 1e9 + 7
#define rep(i, n) for(int i = 0; i < n; i++)
#define loop(i, a, n) for(int i = a; i < n; i++)
#define all(in) in.begin(), in.end()

const int MAX_N = 50;
int N, M;
bool Graph[MAX_N + 1][MAX_N + 1];
bool visited[MAX_N + 1]; 
int dfs(int v){
    visited[v] = true;
    for(int v2 = 0; v2 < N; v2++){
        if(Graph[v][v2] == false)continue;
        if(visited[v2] == true) continue;
        dfs(v2);
    }
}
int main(){
    int N, M;
    cin >> N >> M;
    vector<int> a(M), b(M);
    rep(i, N){
        cin >> a[i] >> b[i];
        a[i]--, b[i]--;
        Graph[a[i]] = Graph[b[i]] = true;
    }
    int ans = 0;
    for(int i = 0; i < m; i++){
        Graph[a[i]] = Graph[b[i]] = false;
        rep(i, N) visited[i] = false;
        dfs(0);
        bool bridge = false;
        rep(i, N)if(visited[i] == false)bridge = true;
        if(bridge)ans++;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:35:1: warning: no return statement in function returning non-void [-Wreturn-type]
   35 | }
      | ^
a.cc: In function 'int main()':
a.cc:43:35: error: incompatible types in assignment of 'bool' to 'bool [51]'
   43 |         Graph[a[i]] = Graph[b[i]] = true;
      |                       ~~~~~~~~~~~~^~~~~~
a.cc:46:24: error: 'm' was not declared in this scope
   46 |     for(int i = 0; i < m; i++){
      |                        ^
a.cc:47:35: error: incompatible types in assignment of 'bool' to 'bool [51]'
   47 |         Graph[a[i]] = Graph[b[i]] = false;
      |                       ~~~~~~~~~~~~^~~~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
const int limit = 50;

int n,m;
int a[limit],b[limit];

bool graph[limit][limit];
bool visted[limit];

void dfs(int v){
  visited[v] = true;
  for(int v2=0;v2<n;v2++){
    if(graph[v][v2] == false)
    continue;
    if(visited[v2] == true)
    continue;

    dfs(v2);
  }
}

int main(void){
cin >> n >> m;

for(int i=0:i<m;i++){
  cin >> a[i] >> b[i];
  a[i]--;
  b[i]--;
  graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
}

int ans = 0;

for(int i=0;i<m;i++){
  graph[a[i]][b[i]] = graph[b[i]][a[i]] = false;

  for(int j=0;j<n;j++){
    visited[j] = false;
  }

  dfs(0);

  bool bridge = false;
  for(int j=0;j<n;j++){
    if(visited[j] == false)
    brigde = true;
  }
    if(bridge)
    ans++;

    graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
  }

  cout << ans << endl;

  return 0;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:13:3: error: 'visited' was not declared in this scope; did you mean 'visted'?
   13 |   visited[v] = true;
      |   ^~~~~~~
      |   visted
a.cc: In function 'int main()':
a.cc:27:10: error: initializer in range-based 'for' loop
   27 | for(int i=0:i<m;i++){
      |          ^
a.cc:27:16: error: expected ')' before ';' token
   27 | for(int i=0:i<m;i++){
      |    ~           ^
      |                )
a.cc:27:17: error: 'i' was not declared in this scope
   27 | for(int i=0:i<m;i++){
      |                 ^
a.cc:40:5: error: 'visited' was not declared in this scope; did you mean 'visted'?
   40 |     visited[j] = false;
      |     ^~~~~~~
      |     visted
a.cc:47:8: error: 'visited' was not declared in this scope; did you mean 'visted'?
   47 |     if(visited[j] == false)
      |        ^~~~~~~
      |        visted
a.cc:48:5: error: 'brigde' was not declared in this scope; did you mean 'bridge'?
   48 |     brigde = true;
      |     ^~~~~~
      |     bridge
Language: Java

import java.util.*;

public class UnionFind1 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        int[] as = new int[m];
        int[] bs = new int[m];
        for(int i = 0; i < m ; i++){
            as[i] = sc.nextInt() - 1;
            bs[i] = sc.nextInt() - 1;
        }

        solveUnionFindTree(n ,m ,as, bs);
    }

    static void solveUnionFindTree(int N, int M, int[] as, int[] bs){
        int ans = 0;
        for(int r1 = 0; r1 < M; r1++) { //繋がないリンク
            // 木作成
            UnionFindTree road = new UnionFindTree(N);
            for(int r2 = 0; r2 < M; r2++) {
                if(r1 == r2) continue;   //結合しない
                road.union(as[r2], bs[r2]);
            }
            
            //同じ木かどうか
            Set<Integer> root = new HashSet<>();
            for(int n = 0; n < N; n++) {
                root.add(road.find(n));
            }

            //全て同じ木に含まれている場合はSetなのでsizeは1になる
            if(root.size() != 1){
                ans++;
            }
        }
        System.out.println(ans);
    }

    static class UnionFindTree {

        int[] parent; //インデックスにとノードを対応させ、そのルートノードのインデックスを格納
        int[] rank; //parentと同様に、木の高さを格納

        public UnionFindTree(int size) {
            this.parent = new int[size];
            this.rank = new int[size];

            for (int i = 0; i < size; i++) {
                makeSet(i);
            }
        }

        public void makeSet(int i) {
            parent[i] = i;
            rank[i] = 0; //集合の高さ
        }

        public void union(int x, int y) {
            int xRoot = find(x);
            int yRoot = find(y);

            //xが属する木の方が大きい場合
            if (rank[xRoot] > rank[yRoot]) {
                parent[yRoot] = xRoot; //yの親をxに更新

            } else if(rank[xRoot] < rank[yRoot]) {
                parent[xRoot] = yRoot;

            } else if (xRoot != yRoot){
                parent[yRoot] = xRoot;
                rank[xRoot]++; //同じ高さの木がルートの子として着くから大きさ++;
            }
        }

        //引数の属する木のルートのidを返す
        public int find(int i) {
            if (i != parent[i]) {
                parent[i] = find(parent[i]);
            }
            return parent[i];
        }

        //同じ木に属しているか
        public boolean same(int x, int y) {
            return find(x) == find(y);
        }
    }
}

Compiler output:
Main.java:3: error: class UnionFind1 is public, should be declared in a file named UnionFind1.java
public class UnionFind1 {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct edge{
	int a;
  	int b;
};
int main(void){
	int i,n,m;
  	cin >> n >> m;
  	edge es[n];
  	for(i=0;i<m;i++){
      	cin >> es[i].a >> es[i].b;
    }
  	for(i=0;i<m,i++){
    	
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before ')' token
   14 |         for(i=0;i<m,i++){
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct edge{
	int a;
  	int b;
};
int main(void){
	int i,n,m;
  	cin >> n >> m;
  	edge es[n];
  	for(i=0;i<m;i++){
      	cin >> es[i] -> a >> es[i] -> b;
    }
  	for(i=0;i<m,i++){
    	
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: base operand of '->' has non-pointer type 'edge'
   12 |         cin >> es[i] -> a >> es[i] -> b;
      |                      ^~
a.cc:12:36: error: base operand of '->' has non-pointer type 'edge'
   12 |         cin >> es[i] -> a >> es[i] -> b;
      |                                    ^~
a.cc:14:24: error: expected ';' before ')' token
   14 |         for(i=0;i<m,i++){
      |                        ^
      |                        ;
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include "boost/multiprecision/cpp_int.hpp"
using ll = long long;
using ull = unsigned long long;
namespace mp = boost::multiprecision;

int main() {

	std::cin.tie(nullptr); std::ios::sync_with_stdio(false);

	int N, M; std::cin >> N >> M;
	std::vector<std::vector<int>> nodes(N);
	std::vector<std::pair<int, int>> edges;

	int ans = 0;

	for (int i = 0; i < M; i++) {
		int a, b; std::cin >> a >> b;
		nodes[a - 1].push_back(b - 1);
		nodes[b - 1].push_back(a - 1);
		edges.push_back(std::make_pair(a - 1, b - 1));
	}

	for (int i = 0; i < M; i++) {
		std::vector<bool> memo(N, false);
		std::queue<int> q;
		q.push(0);
		while (!q.empty()) {
			int from = q.front;
			q.pop();
			memo[from] = true;
			for (auto& to : nodes[from]) {
				if ((edges[i].first == from && edges[i].second == to) || (edges[i].first == to && edges[i].second == from)) {
					continue;
				}
				if (!memo[to]) {
					q.push(to);
				}
			}
		}

		if (std::any_of(memo.begin(), memo.end(), [](auto a) {return !a; }))ans++;

	}

	std::cout << ans;


	return 0;

}

Compiler output:
a.cc:9:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    9 | #include "boost/multiprecision/cpp_int.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
const int limit = 50;

int n, m;
int a[limit], b[limit];

bool graph[limit][limit];
bool visited[limit];

void dfs(int v){
    visited[v] = true;
    for (int v2=0; v2<n;++v2){
        if (graph[v][v2]==false) continue;
        if (visited[v2]==true) continue;
        dfs(v2);
    }
}

int main(void){
    cin >> n >> m;
    for (int i=0; i<m; ++i){
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = false;
        for (int j=0; j<n; ++j) visited[j] = false;
        dfs(0);
        bool bridge = false;
        for (j=0; j<n; ++j) if (visited[j] == false) bridge = true;
        if (bridge) ans += 1;
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
        }
    cout << ans << endl;
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   20 |     cin >> n >> m;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:26:14: error: 'j' was not declared in this scope
   26 |         for (j=0; j<n; ++j) if (visited[j] == false) bridge = true;
      |              ^
a.cc:27:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |         if (bridge) ans += 1;
      |                     ^~~
      |                     abs
a.cc:30:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |     cout << ans << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |     cout << ans << endl;
      |             ^~~
      |             abs
a.cc:30:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |     cout << ans << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

const int limit = 50;

int n, m;
int a[limit], b[limit];

bool graph[limit][limit];
bool visited[limit];

void dfs(int v){
    visited[v] = true;
    for (int v2=0; v2<n;++v2){
        if (graph[v][v2]==false) continue;
        if (visited[v2]==true) continue;
        dfs(v2);
    }
}

int main(void){
    cin >> n >> m;
    for (int i=0; i<m; ++i){
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = false;
        for (int j=0; j<n; ++j) visited[j] = false;
        dfs(0);
        bool bridge = false;
        for (j=0; j<n; ++j) if (visited[j] == false) bridge = true;
        if (bridge) ans += 1;
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
        }
    cout << ans << endl;
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'cin' was not declared in this scope
   19 |     cin >> n >> m;
      |     ^~~
a.cc:25:14: error: 'j' was not declared in this scope
   25 |         for (j=0; j<n; ++j) if (visited[j] == false) bridge = true;
      |              ^
a.cc:26:21: error: 'ans' was not declared in this scope
   26 |         if (bridge) ans += 1;
      |                     ^~~
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout << ans << endl;
      |     ^~~~
a.cc:29:13: error: 'ans' was not declared in this scope
   29 |     cout << ans << endl;
      |             ^~~
a.cc:29:20: error: 'endl' was not declared in this scope
   29 |     cout << ans << endl;
      |                    ^~~~
Language: Java

import java.util.*;
//System.out.println("")

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); 
        int m = sc.nextInt();
        int[] a = new int[m];
        int[] b = new int[m];
        for (int i=0; i<m; i++){
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        int ans = 0;
        for(int i=0; i<m; i++){
            UF.init();　//初期化
            //一つ辺を除外してつなげてみる。
            for(int j=0; j<m; i++){
                if(i!=j){
                    UF.unite(a[j], b[j]);
                }
            }
            //グラフが非連結なら根は違う。
            //つまり分断されているということなので除外した辺は橋。
            for(int j=2; j<=n; j++){
                //根が同じかを確認して違うならばカウントしてBreak
                if(!UF.same(1,j)){
                    ++ans;
                    break;
                }
            }
    
        }
        System.out.println(ans);
    }
    static class UF{
        static int size=51;
        static int[] par=new int[size];
        //初期化
        static void init(){
            for (int i = 1; i <size ; i++) {
                par[i]=i;
            }
        }
        //根をたどる
        static int root(int x){
            if(par[x]==x){
                return x;
            }else{
                return par[x]=root(par[x]);
            }
        }
        //同じ根をもつか(同じ集合に属するか)判定
        static boolean same(int x,int y){
            return root(x)==root(y);
        }
        //合体
        static void unite(int x,int y){
            x=root(x);
            y=root(y);
            if(x==y)return;
            par[x]=y;
        }
        
    }
}
//class UnionFindTree{
//     
//    int[] par;
//    int[] rank;
//    
//    //Constractor
//    public UnionFindTree(int size){
//        this.par = new int[size];
//        this.rank = new int[size];
//        
//        for(int i=0; i<size; i++){
//            makeSet(i);
//        }
//    }
//    
//    public void makeSet(int i){
//        par[i] = i;
//        rank[i] = 0;
//    }
//    
//    public void union(int x, int y){
//        int xRoot = find(x);
//        int yRoot = find(y);
//        
//        //xが属する木のほうが大きいとき
//        if(rank[xRoot]>rank[yRoot]){
//            par[yRoot] = xRoot;
//        }else if (rank[xRoot] < rank[yRoot]){
//            par[xRoot] = yRoot;
//        }else if(xRoot != yRoot){
//            par[yRoot] = xRoot;
//            rank[xRoot]++;
//        }
//    }
//    
//    public int find(int i){
//        if(i != par[i]){
//            par[i] = find(par[i]);
//        }
//        return par[i];
//    }
//    
//    public boolean same(int x, int y){
//        return find(x) == find(y);
//    }
//
//}

Compiler output:
Main.java:17: error: illegal character: '\u3000'
            UF.init();?//???
                      ^
1 error
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int m,n,__,e[20000][20000],root,inf=0x3f3f3f3f;
int low[100001],num[100001],book[100001],cnt=0;
int main(int a,int b)
{
	return a<b?a:b;
}
void gd(int cur,int fa)
{
    int ez=0;
    __++;
    num[cur]=__;
    low[cur]=__;
    for(int i=1;i<=m;i++)
        {
            if(e[cur][i]==1)
                {
                    if(num[i]==0)
                    {	
                        ez++;
                        gd(i,cur);
                        low[cur]=min(low[cur],low[i]);
                        if(cur!=root&&low[i]>num[cur])
                            book[cur]=1;
                        if(cur==root&&ez==2)
                            book[cur]=1;
                    }
                else if(fa!=i)
                    low[cur]=min(low[cur],num[i]);
                }
        
        }
    return;
}
int main()
{
    int a,b;
    cin>>m>>n;
    for(int i=1;i<=n;i++)
        {
            cin>>a>>b;
            e[a][b]=1;
            e[b][a]=1;
        }
    root=1;
    gd(1,root);
    for(int i=1;i<=m;i++)
        {
            if(book[i]==1)
                cnt++;		
        }
    cout<<cnt<<endl;
   
    return 0;
}

Compiler output:
a.cc:6:5: warning: second argument of 'int main(int, int)' should be 'char **' [-Wmain]
    6 | int main(int a,int b)
      |     ^~~~
a.cc:37:5: error: conflicting declaration of C function 'int main()'
   37 | int main()
      |     ^~~~
a.cc:6:5: note: previous declaration 'int main(int, int)'
    6 | int main(int a,int b)
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;
const int INF = numeric_limits<int>::max();
const int Maxn = 60;

int g[Maxn][Maxn];
int d[Maxn];

int n, m;

void dfs(int x){
    for (int y = 0; y < n; ++y) {
        if (g[x][y] && d[y] == INF){
            d[y] = 0;
            dfs(y);
        }
    }
}

int main() {
    cin >> n >> m;
    vector<int> a(n), b(n);
    for (int i = 0; i < m; ++i) {
        int x, y;
        cin >> x >> y;
        --x; --y;
        a[i] = x; b[i] = y;
        g[x][y] = g[y][x] = 1;
    }

    int ans = 0;
    for (int i = 0; i < m; ++i) {
        g[a[i]][b[i]] = g[b[i]][a[i]] = 0;
        for (int j = 0; j < n; ++j) {
            d[j] = INF;
        }
        d[a[i]] = 0;
        dfs(a[i]);
        if (d[b[i]] == INF){
            ++ans;
        }
        g[a[i]][b[i]] = g[b[i]][a[i]] = 1;
    }

    cout << ans << endl;
}



Compiler output:
a.cc:5:17: error: 'numeric_limits' was not declared in this scope
    5 | const int INF = numeric_limits<int>::max();
      |                 ^~~~~~~~~~~~~~
a.cc:5:32: error: expected primary-expression before 'int'
    5 | const int INF = numeric_limits<int>::max();
      |                                ^~~
Language: C++

# encoding:utf-8
import copy
import numpy as np
import random
import bisect #bisect_left　これで二部探索の大小検索が行える

N,M = map(int,input().split())

edge = []
pass_edge = []
for i in range(M):
    a,b = map(int,input().split())
    if a < b:
        a,b = b,a#つねaの方が大きい
    if a==b:
        pass_edge.append([a,b])
    else:
        edge.append([a,b])

sorted_edge = sorted(edge)

bridge = {}
for i in range(1,N+1):
    bridge[i] = []

latest_bridge = [0,0]
for edge_i in sorted_edge:
    #edge = [a,b]
    if latest_bridge == edge_i:
        pass_edge.append(edge)
        pass
    else:
        latest_bridge = edge_i
        for port in range(2):
            bridge[edge_i[port]] = bridge[edge_i[port]]+[edge_i[port-1]]

# print(bridge)

def check(ie):
    a,b = ie
    used.append(a)
    copy_bridge = copy.deepcopy(bridge)
    copy_bridge[a] = list(set(copy_bridge[a])-set([b]))
    move = copy_bridge[a]
    isolate = 1
    while len(move)>0:
        pos = move.pop()
        if pos in used:
            pass
        elif pos == b:
            isolate = 0
        else:
            move = move+list(set(copy_bridge[pos]+used)-set(used))
            used.append(pos)
    return isolate

ans = 0

for ie in edge:
    # print("bi",ie)
    if ie in pass_edge:
        pass
    else:
        used = []

        ans += check(ie)
        # print(ans)

print(ans)


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #encoding
    1 | # encoding:utf-8
      |   ^~~~~~~~
a.cc:5:15: error: stray '#' in program
    5 | import bisect #bisect_left　これで二部探索の大小検索が行える
      |               ^
a.cc:5:16: error: extended character 　 is not valid in an identifier
    5 | import bisect #bisect_left　これで二部探索の大小検索が行える
      |                ^
a.cc:14:18: error: stray '#' in program
   14 |         a,b = b,a#つねaの方が大きい
      |                  ^
a.cc:28:6: error: invalid preprocessing directive #edge
   28 |     #edge = [a,b]
      |      ^~~~
a.cc:37:3: error: invalid preprocessing directive #print
   37 | # print(bridge)
      |   ^~~~~
a.cc:60:7: error: invalid preprocessing directive #print
   60 |     # print("bi",ie)
      |       ^~~~~
a.cc:67:11: error: invalid preprocessing directive #print
   67 |         # print(ans)
      |           ^~~~~
a.cc:2:1: error: 'import' does not name a type
    2 | import copy
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:23:1: error: expected unqualified-id before 'for'
   23 | for i in range(1,N+1):
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,m,a[10000],b[10000],col[10000],cnt,ret,vector<int>x[100];
void dfs(int pos)
{
	if(col[pos]>=1)
	return;
    col[pos]=cnt;
    for(int j=0;j<x[pos].size();j++)
    dfs(x[pos][j]);
}
int main()
{
	cin >>n>>m;
	for(int i=0;i<m;i++)
	cin >>a[i]>>b[i];
	for(int i=0;i<m;i++)
	{
		for(int j=0;j<=n;j++)
		{
			x[j].clear();
			col[j]=0;
		}
		for(int j=0;j<m;j++)
		{
			if(i!=j)
			{
				x[a[j]].push_back(b[i]);
				x[b[j]].push_back(a[j]);
			}
		}
		cnt=0;
		for(int j=1;j<=n;j++)
		{
			if(col[j]>=1)
			continue;
			cnt++;
			dfs(j);
		}
		if(cnt>=2)
		ret++;
	}
	cout <<ret<<endl;
	return 0;
}

Compiler output:
a.cc:3:57: error: invalid declarator before 'x'
    3 | int n,m,a[10000],b[10000],col[10000],cnt,ret,vector<int>x[100];
      |                                                         ^
a.cc: In function 'void dfs(int)':
a.cc:9:19: error: 'x' was not declared in this scope
    9 |     for(int j=0;j<x[pos].size();j++)
      |                   ^
a.cc: In function 'int main()':
a.cc:21:25: error: 'x' was not declared in this scope
   21 |                         x[j].clear();
      |                         ^
a.cc:28:33: error: 'x' was not declared in this scope
   28 |                                 x[a[j]].push_back(b[i]);
      |                                 ^
Language: C

#include <iostream>
#define LIMIT 51
using namespace std;

void dfs(int v, int n, bool **graph, bool *visited) {
    visited[v] = true;
    for(int v2 = 0; v2 < n; ++v2) {
        if (graph[v][v2] == false) { continue; }
        if (visited[v2] == true) { continue; }
        dfs(v2, n, graph, visited);
    }
}

int main()
{
    int n, m;
    cin >> n >> m;
    int *a = (int*)malloc(LIMIT * sizeof(int));
    int *b = (int*)malloc(LIMIT * sizeof(int));
    bool **graph = (bool**)malloc(LIMIT * sizeof(bool*));
    for(int i = 0; i < LIMIT; ++i) {
        graph[i] = (bool*)malloc(LIMIT * sizeof(bool));
    }
    bool *visited = (bool*)malloc(LIMIT * sizeof(bool));

    for(int i = 0; i < m; ++i) {
        cin >> a[i] >> b[i];
        a[i]--; b[i]--;
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
    }

    int ans = 0;

    for(int i = 0; i < m; ++i) {
        //辺を切り離す
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = false;

        for(int j = 0; j < n; ++j) { visited[j] = false; }

        dfs(0, n, graph, visited);

        bool bridge = false;
        for(int j = 0; j < n; ++j) {
            if(visited[j] == false) { bridge = true; }
        }
        if(bridge) { ans += 1; }
        
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;
    }

    cout << ans << endl;
    free(a); free(b); free(graph); free(visited);
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.