记录详情

Compile Error

foo.cc: In function 'int getMinSwaps(std::vector<int>&)':
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 i = 0; i < sortedNums.size(); i++)mp[sortedNums[i]] = i ;//记录下标索引
      |                     ~~^~~~~~~~~~~~~~~~~~~
foo.cc:20:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |     for (int i = 0; i < nums.size();i++)
      |                     ~~^~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:39:18: error: expected '}' at end of input
   39 |         return 0;
      |                  ^
foo.cc:31:11: note: to match this '{'
   31 | int main(){
      |           ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
4 排序中的交换次数
语言
C++
递交时间
2023-07-06 15:16:35
评测时间
2023-07-06 15:16:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes