记录详情

Compile Error

/in/foo.cc: In function 'int findminpos(std::vector<int>&)':
/in/foo.cc:14:15: error: 'INT_MAX' was not declared in this scope
   14 |     int val = INT_MAX;
      |               ^~~~~~~
/in/foo.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
    2 | #include<vector>
  +++ |+#include <climits>
    3 | using namespace std;
/in/foo.cc:17:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     for (int j = 0; j < arr.size(); j++) {
      |                     ~~^~~~~~~~~~~~

信息

递交者
类型
递交
题目
A9-2 数组中最小正数的下标
比赛
2025年暑期编程训练营之二
语言
C++
递交时间
2025-07-05 08:58:18
评测时间
2025-07-05 08:58:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes