sorting.cpp:1: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
1 | #pragma GCC optimization "O2"
|
sorting.cpp:2: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
2 | #pragma GCC optimization "unroll-loop"
|
sorting.cpp: In function 'bool chk(int)':
sorting.cpp:20:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
20 | for (ll i = 0;i < n;i++) a[i] = b[i] = v[i]; ans.clear();
| ^~~
sorting.cpp:20:50: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
20 | for (ll i = 0;i < n;i++) a[i] = b[i] = v[i]; ans.clear();
| ^~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:57:22: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
57 | while(ans.size() < l) ans.push_back({0,0});
| ~~~~~~~~~~~^~~
sorting.cpp:58:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for (ll i = 0;i < ans.size();i++) P[i] = ans[i].fs,Q[i] = ans[i].sc;
| ~~^~~~~~~~~~~~