QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#215061#5606. A Musical QuestionHuangHanShengCompile Error//C++171.6kb2023-10-15 02:50:152023-10-15 02:50:15

Details

answer.code: In function ‘int main()’:
answer.code:46:13: error: expected ‘,’ or ‘;’ before ‘int’
   46 |             int best_diff = abs(best.first - best.second);
      |             ^~~
answer.code:48:70: error: ‘best_diff’ was not declared in this scope
   48 |             if (total > best_total || (total == best_total && diff < best_diff)) {
      |                                                                      ^~~~~~~~~