QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#44997#4561. Catfish FarmZhaoZiLongCompile Error//C++171.2kb2022-08-22 12:24:082022-08-22 12:24:09

Details

answer.code: In function ‘int64_t max_weights(int, int, std::vector<int>, std::vector<int>*, std::vector<int>*)’:
answer.code:29:25: error: no match for ‘operator[]’ (operand types are ‘int64_t [3010]’ {aka ‘long int [3010]’} and ‘std::vector<int>’)
   29 |                 dp[X[i]][Y[i]] += W[i];
      |                         ^
answer.code:30:29: error: no match for ‘operator+=’ (operand types are ‘int64_t’ {aka ‘long int’} and ‘std::vector<int>’)
   30 |                 maxim[X[i]] += W[i];
      |                 ~~~~~~~~~~~~^~~~~~~
answer.code:31:23: error: no match for ‘operator+=’ (operand types are ‘long long int’ and ‘std::vector<int>’)
   31 |                 total += W[i];
      |                 ~~~~~~^~~~~~~