Wrong Answer

foo.cc: In function 'int getMinSwaps(std::vector<int>&)':
foo.cc:16:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     for (int i = 0; i < sortedNums.size(); i++)mp[sortedNums[i]] = i ;//记录下标索引
      |                     ~~^~~~~~~~~~~~~~~~~~~
foo.cc:19:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     for (int i = 0; i < nums.size();i++)
      |                     ~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 5, expect 7. 3ms 256.0 KiB
#2 Wrong Answer Read 12, expect 17. 1ms 256.0 KiB
#3 Wrong Answer Read 65, expect 96. 1ms 256.0 KiB
#4 Wrong Answer Read 125, expect 194. 3ms 256.0 KiB
#5 Wrong Answer Read 625, expect 984. 2ms 384.0 KiB
#6 Wrong Answer Read 1249, expect 1966. 2ms 384.0 KiB
#7 Wrong Answer Read 1851, expect 2938. 2ms 512.0 KiB
#8 Wrong Answer Read 2495, expect 3913. 9ms 512.0 KiB
#9 Wrong Answer Read 3072, expect 4874. 7ms 640.0 KiB
#10 Wrong Answer Read 4854, expect 7672. 4ms 768.0 KiB

信息

递交者
类型
递交
题目
P1220 4 排序中的交换次数
语言
C++
递交时间
2022-08-21 21:03:35
评测时间
2022-08-21 21:03:35
评测机
分数
0
总耗时
38ms
峰值内存
768.0 KiB