/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:14:2: error: 'vector' was not declared in this scope
  vector<vector<int>> dp(n, vector<int>(2, 1));
  ^~~~~~
/in/foo.cc:14: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:14:16: error: expected primary-expression before 'int'
  vector<vector<int>> dp(n, vector<int>(2, 1));
                ^~~
/in/foo.cc:18:5: error: 'dp' was not declared in this scope
     dp[i][0] = max(dp[i][0], dp[j][1] + 1);
     ^~
/in/foo.cc:21:5: error: 'dp' was not declared in this scope
     dp[i][1] = max(dp[i][1], dp[j][0] + 1);
     ^~
/in/foo.cc:25:22: error: 'dp' was not declared in this scope
   printf("%d\n", max(dp[n - 1][0], dp[n - 1][1]));
                      ^~

信息

递交者
类型
自测
题目
P1845 花匠
语言
C++
递交时间
2020-02-16 00:15:54
评测时间
2020-02-16 00:15:54
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes