foo.cc: In function 'int getMinSwaps(std::vector<int>&)':
foo.cc:12:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for (int i = 0; i < sortedNums.size(); i++)mp[sortedNums[i]] = i ;//记录下标索引
| ~~^~~~~~~~~~~~~~~~~~~
foo.cc:14:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for (int i = 0; i < nums.size();i++)
| ~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务