sorting.cpp:32:40: error: macro "pb" passed 2 arguments, but takes just 1
32 | ans.pb({pos[sx[i]], pos[sy[i]]});
| ^
sorting.cpp:5: note: macro "pb" defined here
5 | #define pb(a) push_back(a)
|
sorting.cpp:40:21: error: macro "pb" passed 2 arguments, but takes just 1
40 | ans.pb({0,0});
| ^
sorting.cpp:5: note: macro "pb" defined here
5 | #define pb(a) push_back(a)
|
sorting.cpp: In function 'bool check(int)':
sorting.cpp:27:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
27 | if(sx.size()>m) return false;
| ~~~~~~~~~^~
sorting.cpp:31:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | for(int i=0;i<sx.size();i++){
| ~^~~~~~~~~~
sorting.cpp:32:13: error: 'class std::vector<std::pair<int, int> >' has no member named 'pb'
32 | ans.pb({pos[sx[i]], pos[sy[i]]});
| ^~
sorting.cpp:36:22: error: 'x1' was not declared in this scope; did you mean 'j1'?
36 | swap ( pos[a[x1]], pos[a[y1]] );
| ^~
| j1
sorting.cpp:36:36: error: invalid types 'int [200005][double(double) throw () {aka double(double)}]' for array subscript
36 | swap ( pos[a[x1]], pos[a[y1]] );
| ^
sorting.cpp:39:22: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | for(int i=sx.size(); i<m; i++)
| ~~~~~~~^~
sorting.cpp:40:13: error: 'class std::vector<std::pair<int, int> >' has no member named 'pb'
40 | ans.pb({0,0});
| ^~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:44:76: warning: declaration of 'N' shadows a global declaration [-Wshadow]
44 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ^
sorting.cpp:6:11: note: shadowed declaration is here
6 | const int N=2*1e5+5;
| ^
sorting.cpp:54:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for(int i=0;i<ans.size();i++){
| ~^~~~~~~~~~~