sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:2:5: error: 'vector' was not declared in this scope
2 | vector<int>pos(N);
| ^~~~~~
sorting.cpp:2:12: error: expected primary-expression before 'int'
2 | vector<int>pos(N);
| ^~~
sorting.cpp:4:9: error: 'swap' was not declared in this scope
4 | swap(S[X[i]], S[Y[i]]);
| ^~~~
sorting.cpp:5:14: error: 'pos' was not declared in this scope
5 | iota(pos.begin(), pos.end(), 0);
| ^~~
sorting.cpp:5:9: error: 'iota' was not declared in this scope
5 | iota(pos.begin(), pos.end(), 0);
| ^~~~
sorting.cpp:10:25: error: 'find' was not declared in this scope
10 | int k = find(S, S+N, j)-S;
| ^~~~