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)提供评测服务