sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:88:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
88 | if(x[ans] == 0 || y[ans] == 0 and x[ans]!=y[ans]){
sorting.cpp: In function 'int main()':
sorting.cpp:118:6: warning: declaration of 's' shadows a global declaration [-Wshadow]
118 | int s [] = {0};
| ^
sorting.cpp:9:14: note: shadowed declaration is here
9 | vector <int> s,x,y,p,q;
| ^
sorting.cpp:119:6: warning: declaration of 'x' shadows a global declaration [-Wshadow]
119 | int x [] = {0,0,1,0,0,0};
| ^
sorting.cpp:9:16: note: shadowed declaration is here
9 | vector <int> s,x,y,p,q;
| ^
sorting.cpp:120:6: warning: declaration of 'y' shadows a global declaration [-Wshadow]
120 | int y [] = {1,0,0,0,1,0};
| ^
sorting.cpp:9:18: note: shadowed declaration is here
9 | vector <int> s,x,y,p,q;
| ^
sorting.cpp:121:6: warning: declaration of 'p' shadows a global declaration [-Wshadow]
121 | int p [] = {0,0,0,0,0,0};
| ^
sorting.cpp:9:20: note: shadowed declaration is here
9 | vector <int> s,x,y,p,q;
| ^
sorting.cpp:122:6: warning: declaration of 'q' shadows a global declaration [-Wshadow]
122 | int q [] = {0,0,0,0,0,0};
| ^
sorting.cpp:9:22: note: shadowed declaration is here
9 | vector <int> s,x,y,p,q;
| ^
sorting.cpp:122:6: warning: unused variable 'q' [-Wunused-variable]
122 | int q [] = {0,0,0,0,0,0};
| ^
/usr/bin/ld: /tmp/ccHr68Lp.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccJSToFr.o:sorting.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status