/in/foo.cc: In function 'void spfa()':
/in/foo.cc:19:2: error: 'vector' was not declared in this scope
vector<int> q(3 * N);
^~~~~~
/in/foo.cc:19:2: note: suggested alternative:
In file included from /usr/include/c++/6/vector:64:0,
from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_vector.h:214:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
/in/foo.cc:19:9: error: expected primary-expression before 'int'
vector<int> q(3 * N);
^~~
/in/foo.cc:20:2: error: 'q' was not declared in this scope
q.emplace_back(0);
^
/in/foo.cc:24:17: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
int v = edge.first, w = edge.second;
^~~~~
/in/foo.cc:25:18: error: 'w' was not declared in this scope
if (dist[u] + w < dist[v]) {
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:52:21: error: 'n' was not declared in this scope
std::cout << dist[n - 1] << std::endl;
^