sorting.cpp:8:5: error: expected initializer before '*' token
8 | ll p*, x*, s*, q*, r*;
| ^
sorting.cpp: In function 'std::vector<std::pair<long long int, long long int> > valid(long long int)':
sorting.cpp:15:15: error: 'n' was not declared in this scope
15 | FOR(i, 0, n - 1) st[i] = i, v[i] = false;
| ^
sorting.cpp:6:41: note: in definition of macro 'FOR'
6 | #define FOR(i, a, b) for(ll i = a; i <= b; i++)
| ^
sorting.cpp:16:30: error: 'x' was not declared in this scope
16 | FOR(i, 0, m - 1) swap(st[x[i]], st[y[i]]);
| ^
sorting.cpp:16:40: error: 'y' was not declared in this scope
16 | FOR(i, 0, m - 1) swap(st[x[i]], st[y[i]]);
| ^
sorting.cpp:18:15: error: 'n' was not declared in this scope
18 | FOR(i, 0, n - 1) ed[st[i]] = i;
| ^
sorting.cpp:6:41: note: in definition of macro 'FOR'
6 | #define FOR(i, a, b) for(ll i = a; i <= b; i++)
| ^
sorting.cpp:19:17: error: 'n' was not declared in this scope
19 | FOR(sti, 0, n - 1) if(!v[sti]) {
| ^
sorting.cpp:6:41: note: in definition of macro 'FOR'
6 | #define FOR(i, a, b) for(ll i = a; i <= b; i++)
| ^
sorting.cpp:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
25 | }
| ^
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:28:5: error: 'n' was not declared in this scope
28 | n = N;
| ^
sorting.cpp:29:22: error: 'on' was not declared in this scope; did you mean 'yn'?
29 | FOR(i, 0, n - 1) on[i] = S[i];
| ^~
| yn
sorting.cpp:30:22: error: 'x' was not declared in this scope
30 | FOR(i, 0, M - 1) x[i] = X[i], y[i] = Y[i];
| ^
sorting.cpp:30:35: error: 'y' was not declared in this scope
30 | FOR(i, 0, M - 1) x[i] = X[i], y[i] = Y[i];
| ^