/ Vijos /

记录详情

Compile Error

/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;
                     ^

信息

递交者
类型
自测
题目
P2030 逛公园
语言
C++
递交时间
2018-02-05 15:33:40
评测时间
2018-02-05 15:33:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes