广度优先搜索+queue实现的spfa算法
#include<bits/stdc++.h>
using namespace std;
#define mod 1e9+7
#define N 100
#define inf 0x3f3f3f3f
const double PI = atan(1.0)*4.0;
typedef long long ll;
int visit[N],dis[N],head[N];
int m,n;
int x,y,z;
struct edge
{
int u,v,next,s;
}e[N];
int cnt;
void init()
{
for(int i=0;i<=N;i++)
{
visit[i]=false;
dis[i]=inf;
head[i]=-1;
}
cnt=0;