QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#472087#4925. Adjacent PairsZhaoZiLongCompile Error//C++14727b2024-07-11 14:27:532024-07-11 14:27:54

Details

answer.code: In function ‘int main()’:
answer.code:31:32: error: increment of read-only location ‘std::max<int>(ans, (b[i] + c[id[t]]))’
   31 |                         ans=max(ans,b[i]+c[id[t]])      ++t;
      |                             ~~~^~~~~~~~~~~~~~~~~~~
answer.code:31:59: error: expected ‘;’ before ‘t’
   31 |                         ans=max(ans,b[i]+c[id[t]])      ++t;
      |                                                           ^
      |                                                           ;
answer.code:32:37: error: ‘c1’ was not declared in this scope; did you mean ‘y1’?
   32 |                         ans=max(ans,c1[i]+c2[id[t]]);
      |                                     ^~
      |                                     y1
answer.code:32:43: error: ‘c2’ was not declared in this scope; did you mean ‘c’?
   32 |                         ans=max(ans,c1[i]+c2[id[t]]);
      |                                           ^~
      |                                           c