QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#636364#8939. Permutationucup-team3627Compile Error//C++234.4kb2024-10-12 23:36:342024-10-12 23:36:34

詳細信息

answer.code: In function ‘int findSecondMaxPosition(int, int)’:
answer.code:41:16: error: ‘INT_MIN’ was not declared in this scope
   41 |     int max1 = INT_MIN, max2 = INT_MIN;
      |                ^~~~~~~
answer.code:19:1: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
   18 | #include <fstream>
  +++ |+#include <climits>
   19 | 
answer.code:46:13: error: ‘max2’ was not declared in this scope; did you mean ‘max1’?
   46 |             max2 = max1;
      |             ^~~~
      |             max1
answer.code:51:37: error: ‘max2’ was not declared in this scope; did you mean ‘max1’?
   51 |         } else if (permutation[i] > max2) {
      |                                     ^~~~
      |                                     max1