/ Vijos /

记录详情

Compile Error

foo.cc:15:1: error: ‘vector’ does not name a type
   15 | vector<int> max_vec(vector<int> A, vector<int> B)
      | ^~~~~~
foo.cc:33:1: error: ‘vector’ does not name a type
   33 | vector<int> mul(vector<int> &A, int b)
      | ^~~~~~
foo.cc:51:1: error: ‘vector’ does not name a type
   51 | vector<int> div(vector<int> &A, int b)
      | ^~~~~~
foo.cc: In function ‘int main()’:
foo.cc:80:5: error: ‘vector’ was not declared in this scope
   80 |     vector<int> t(1, a[0].l), res(1, 0);
      |     ^~~~~~
foo.cc:4:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | 
foo.cc:80:12: error: expected primary-expression before ‘int’
   80 |     vector<int> t(1, a[0].l), res(1, 0);
      |            ^~~
foo.cc:83:9: error: ‘res’ was not declared in this scope
   83 |         res = max_vec(res, div(t, a[i].r));
      |         ^~~
foo.cc:83:32: error: ‘t’ was not declared in this scope
   83 |         res = max_vec(res, div(t, a[i].r));
      |                                ^
foo.cc:83:15: error: ‘max_vec’ was not declared in this scope
   83 |         res = max_vec(res, div(t, a[i].r));
      |               ^~~~~~~
foo.cc:84:13: error: ‘mul’ was not declared in this scope
   84 |         t = mul(t, a[i].l);
      |             ^~~
foo.cc:87:17: error: ‘res’ was not declared in this scope
   87 |     for(int i = res.size() - 1; i >= 0; i --)
      |                 ^~~

信息

递交者
类型
递交
题目
P1779 国王游戏
语言
C++
递交时间
2024-10-02 21:29:48
评测时间
2024-10-02 21:29:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes