foo.cc:25:1: error: 'vector' does not name a type
vector<edge> g[30];
^~~~~~
foo.cc: In function 'void insert(int, int, int)':
foo.cc:27:5: error: 'g' was not declared in this scope
g[x].pb(edge{y,w});
^
foo.cc: In function 'bool bellmanford()':
foo.cc:34:28: error: 'g' was not declared in this scope
for (int k=0;k<g[j].size();k++) {
^
foo.cc:36:32: error: 'w' was not declared in this scope
if (d[to]>d[j]+w) {
^
foo.cc: In function 'int main()':
foo.cc:57:25: error: 'g' was not declared in this scope
REP(i,0,25) g[i].clear();
^
自豪的采用jd5进行评测(github.com/masnn/jd5)