/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:109:87: error: cannot bind non-const lvalue reference of type 'BigNum&' to an rvalue of type 'BigNum'
  109 |                                         dp[q][i][i + len] = Max(dp[q][i][i + len + 1] + helppper[m-len]*BigNum(nums[q][i + len]), dp[q][i][i + len]);
      |                                                                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:84:20: note:   initializing argument 1 of 'BigNum Max(BigNum&, BigNum&)'
   84 | BigNum Max(BigNum &a,BigNum &b) {
      |            ~~~~~~~~^
foo.cc:111:87: error: cannot bind non-const lvalue reference of type 'BigNum&' to an rvalue of type 'BigNum'
  111 |                                         dp[q][i][i + len] = Max(dp[q][i - 1][i + len] + helppper[m-len]*BigNum(nums[q][i - 1]), dp[q][i][i + len]);
      |                                                                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:84:20: note:   initializing argument 1 of 'BigNum Max(BigNum&, BigNum&)'
   84 | BigNum Max(BigNum &a,BigNum &b) {
      |            ~~~~~~~~^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1378 矩阵取数游戏
语言
C++
递交时间
2022-08-16 22:42:36
评测时间
2022-08-16 22:42:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes