permutation.cpp: In function 'void solve(int)':
permutation.cpp:37:19: error: cannot convert 'std::vector<int>' to 'int*' for argument '1' to 'int query(int*)'
d[N] = query(q);
^
permutation.cpp:41:23: error: cannot convert 'std::vector<int>' to 'int*' for argument '1' to 'int query(int*)'
d[j] = query(q);
^
permutation.cpp:61:23: error: cannot convert 'std::vector<int>' to 'int*' for argument '1' to 'void answer(int*)'
answer(ANS);
^
stub.cpp: In function 'int query(int*)':
stub.cpp:15:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
fscanf(stdin, "%d", &x);
~~~~~~^~~~~~~~~~~~~~~~~
stub.cpp: In function 'int main(int, char**)':
stub.cpp:48:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
fscanf(stdin, "%d", &N);
~~~~~~^~~~~~~~~~~~~~~~~