foo.cc: In function 'void spfa(int)':
foo.cc:33:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<edge>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int i=0;i<G[v].size();i++){
| ~^~~~~~~~~~~~
foo.cc: At global scope:
foo.cc:70:11: error: redefinition of 'const int MAXN'
70 | const int MAXN=5010;
| ^~~~
foo.cc:7:11: note: 'const int MAXN' previously defined here
7 | const int MAXN=5010;
| ^~~~
foo.cc:72:11: error: redefinition of 'const int INF'
72 | const int INF=10000000;
| ^~~
foo.cc:9:11: note: 'const int INF' previously defined here
9 | const int INF=10000000;
| ^~~
foo.cc:74:8: error: redefinition of 'struct edge'
74 | struct edge{
| ^~~~
foo.cc:11:8: note: previous definition of 'struct edge'
11 | struct edge{
| ^~~~
foo.cc:78:13: error: redefinition of 'std::vector<edge> G [5010]'
78 | vector<edge>G[MAXN];
| ^
foo.cc:15:13: note: 'std::vector<edge> G [5010]' previously declared here
15 | vector<edge>G[MAXN];
| ^
foo.cc:80:5: error: redefinition of 'int d [5010]'
80 | int d[MAXN],n,m;
| ^
foo.cc:17:5: note: 'int d [5010]' previously declared here
17 | int d[MAXN],n,m;
| ^
foo.cc:80:13: error: redefinition of 'int n'
80 | int d[MAXN],n,m;
| ^
foo.cc:17:13: note: 'int n' previously declared here
17 | int d[MAXN],n,m;
| ^
foo.cc:80:15: error: redefinition of 'int m'
80 | int d[MAXN],n,m;
| ^
foo.cc:17:15: note: 'int m' previously declared here
17 | int d[MAXN],n,m;
| ^
foo.cc:82:6: error: redefinition of 'bool exist [5010]'
82 | bool exist[MAXN];
| ^~~~~
foo.cc:19:6: note: 'bool exist [5010]' previously declared here
19 | bool exist[MAXN];
| ^~~~~
foo.cc:84:11: error: redefinition of 'std::queue<int> q'
84 | queue<int>q;
| ^
foo.cc:21:11: note: 'std::queue<int> q' previously declared here
21 | queue<int>q;
| ^
foo.cc:86:6: error: redefinition of 'void spfa(int)'
86 | void spfa(int s){
| ^~~~
foo.cc:23:6: note: 'void spfa(int)' previously defined here
23 | void spfa(int s){
| ^~~~
foo.cc: In function 'void spfa(int)':
foo.cc:96:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<edge>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
96 | for (int i=0;i<G[v].size();i++){
| ~^~~~~~~~~~~~
foo.cc: At global scope:
foo.cc:108:5: error: redefinition of 'int main()'
108 | int main(){
| ^~~~
foo.cc:45:5: note: 'int main()' previously defined here
45 | int main(){
| ^~~~
[Hydro](https://hydro.ac)提供评测服务