Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<utility>

using namespace std;

#define REP(i,n) for(int i=0;i<(n);i++)
#define ARREP(i,n,X) for(int i=0;i<(n);i++)cin>>X[i]
#define FOR(i,X,n) for(int i=(X);i<(n);i++)
#define EREP(i,n) for(int i=1;i<=n;i++)

#define DEB(X) if(mode==1)cout<< #X <<": "<<X<<" ";
#define DEB2(X) if(mode==1)cout<< #X <<": "<<" ";
#define ARDEB(i,X) if(mode==1)cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define FORDEB(n,X) if(mode==1)for(int i=0;i<(n);i++)ARDEB(i,X)
#define END if(mode==1)cout<<endl;

typedef long long int ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
#define ALL(X) X.begin(),X.end()
struct edge{int to,cost;};
//struct edge{int from,cost,to;};

const int INF=100000000;
int mode=1;

#define MAX_V 51 
ll C[MAX_V][MAX_V];
int d[MAX_V];
int cost[MAX_V][MAX_V];
bool used[MAX_V];
int X[MAX_V],Y[MAX_V];
int Ans,V,M;

void Dijkstra(int s,int x,int y){
	std::fill(d,d+V,INF);
	std::fill(used,used+V,false);
	d[s]=0;
	while(1){
		int v=-1;
		for(int u=0;u<V;u++){
			if(used[u]!=true && (v==-1 || d[u]<d[v])){
				v=u;
			}
		}
		if(v==-1)break;
		used[v]=true;
		for(int u=0;u<V;u++){
			d[u]=std::min(d[u],d[v]+
			((v==x && u==y)||(v==y && u==x)?INF:C[v][u]));
		}
	}
}

int main(){
	ios_base::sync_with_stdio(false);
	cin>>V>>M;
	for(int i=0;i<51;i++){
		for(int j=0;j<51;j++){
			C[i][j]=INF;
		}
	}
	for(int i=0;i<M;i++){
		int a,b;
		cin>>a>>b;
		C[a-1][b-1]=1,C[b-1][a-1]=1;
		X[i]=a-1,Y[i]=b-1;
	}
	for(int i=0;i<min(50,V*(V-1)*2);i++){
		Dijkstra(0,X[i],Y[i]);
		for(int j=0;j<V;j++){
			if(d[j]==INF){
				Ans++;
				break;
			}
		}
	}
	cout<<Ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'void Dijkstra(int, int, int)':
a.cc:58:38: error: no matching function for call to 'min(int&, long long int)'
   58 |                         d[u]=std::min(d[u],d[v]+
      |                              ~~~~~~~~^~~~~~~~~~~
   59 |                         ((v==x && u==y)||(v==y && u==x)?INF:C[v][u]));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 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/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:58:38: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   58 |                         d[u]=std::min(d[u],d[v]+
      |                              ~~~~~~~~^~~~~~~~~~~
   59 |                         ((v==x && u==y)||(v==y && u==x)?INF:C[v][u]));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:58:38: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   58 |                         d[u]=std::min(d[u],d[v]+
      |                              ~~~~~~~~^~~~~~~~~~~
   59 |                         ((v==x && u==y)||(v==y && u==x)?INF:C[v][u]));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~