#include <bits/stdc++.h>
#define fi first
#define se second
#define ssize(x) int(x.size())
#define pn printf("\n")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int inf = 2e09; ll infll = 2e18;
void create_curcuit(int m, vector<int> t){
t.emplace_back(0); int n = ssize(t);
vector<int> c(m+1);
int base = 1, log = 0;
while(base < n) base <<= 1, ++log;
while(ssize(t) != base) t.emplace_back(-1);
vector<int> tmp0, tmp1;
for(int len = base; len > 2; len >>= 1){
for(int p = 0; p < base; p += len){
tmp0 = vector<int>(), tmp1 = vector<int>();
for(int i = p; i < p+len; ++i) if(i&1) tmp1.emplace_back(t[i]);
else tmp0.emplace_back(t[i]);
for(int i = 0; i < len/2; ++i) t[i+p] = tmp0[i];
for(int i = len/2; i < len; ++i) t[i+p] = tmp1[i-len/2];
}
}
for(int i = 0; i < base; ++i) if(t[i] == 0){ swap(t[i], t[base-1]); break; }
vector<int> X, Y;
for(int i = 1; i < base/2; ++i) X.emplace_back(-(i<<1)), Y.emplace_back(-(i<<1|1));
for(int i = base/2; i < base; ++i) X.emplace_back(t[(i<<1)-base]), Y.emplace_back(t[(i<<1|1)-base]);
for(int i = 0; i <= m; ++i) c[i] = -1;
#ifdef LOCAL
for(int i = 0; i < ssize(X); ++i) printf("%d %d\n", X[i], Y[i]);
#else
answer(c, X, Y);
#endif
}
#ifdef LOCAL
int main(){
int T = 1;
for(++T; --T; ){
int m, n; scanf("%d%d", &m, &n);
vector<int> A(n);
for(int i = 0; i < n; ++i) scanf("%d", &A[i]);
create_curcuit(m, A);
}
return 0;
}
#endif
Compilation message
doll.cpp: In function 'void create_curcuit(int, std::vector<int>)':
doll.cpp:37:3: error: 'answer' was not declared in this scope
37 | answer(c, X, Y);
| ^~~~~~