swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:5:20: error: 'N' was not declared in this scope
5 | vector<int> res(N);
| ^
swaps.cpp:12:18: error: 'i' was not declared in this scope
12 | for (i = 0; i < N; i++) {
| ^
swaps.cpp:15:37: error: 'schedule' was not declared in this scope
15 | if (i ^ k == 0) schedule(ip, i);
| ^~~~~~~~
swaps.cpp:16:11: error: 'schedule' was not declared in this scope
16 | else schedule(i, ip);
| ^~~~~~~~
swaps.cpp:20:20: error: 'visit' was not declared in this scope
20 | vector<int> v = visit();
| ^~~~~
swaps.cpp:20:20: note: 'std::visit' is only available from C++17 onwards
swaps.cpp:22:9: error: 'i' was not declared in this scope
22 | for (i = 0; i < N/2; i++) {
| ^
swaps.cpp:34:2: error: 'answer' was not declared in this scope
34 | answer(res);
| ^~~~~~