sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:16:7: error: conflicting declaration 'auto ok'
16 | auto ok = [&](int pos) {
| ^~
sorting.cpp:9:6: note: previous declaration as 'int ok'
9 | int ok = 1;
| ^~
sorting.cpp:32:7: warning: declaration of 'int m' shadows a parameter [-Wshadow]
32 | int m = (left + right) / 2;
| ^
sorting.cpp:5:39: note: shadowed declaration is here
5 | int findSwapPairs(int n, int s[], int m, int x[], int y[], int s1[], int s2[]) {
| ~~~~^
sorting.cpp:33:11: error: 'ok' cannot be used as a function
33 | if (ok(m))
| ^
sorting.cpp:48:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
48 | for (int i = 0; i < (int)sol.size() - 1; ++i)
| ^
sorting.cpp:43:11: note: shadowed declaration is here
43 | for (int i = 0; i < n; ++i)
| ^
sorting.cpp:5:39: warning: unused parameter 'm' [-Wunused-parameter]
5 | int findSwapPairs(int n, int s[], int m, int x[], int y[], int s1[], int s2[]) {
| ~~~~^