QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#260691#7743. Grand FinaleflowerCompile Error//C++202.4kb2023-11-22 14:15:362023-11-22 14:15:37

Details

answer.code: In lambda function:
answer.code:72:67: error: cannot bind non-const lvalue reference of type ‘int&’ to a value of type ‘short int’
   72 |                                         chkmx(dp[i + 1][j - 1 + o1] , dp[i][j] + O1);
      |                                               ~~~~~~~~~~~~~~~~~~~~^
answer.code:6:24: note:   initializing argument 1 of ‘void chkmx(int&, int)’
    6 | inline void chkmx(int &a, int b) {
      |                   ~~~~~^
answer.code:75:63: error: cannot bind non-const lvalue reference of type ‘int&’ to a value of type ‘short int’
   75 |                                         chkmx(dp[i + 2][j + o1], dp[i][j] - 1 + O1);
      |                                               ~~~~~~~~~~~~~~~~^
answer.code:6:24: note:   initializing argument 1 of ‘void chkmx(int&, int)’
    6 | inline void chkmx(int &a, int b) {
      |                   ~~~~~^