popa.cpp: In function 'int solve(int, int*, int*)':
popa.cpp:19:24: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
memset(d,~0,sizeof d);
^
popa.cpp:20:24: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
memset(f,~0,sizeof f);
^
popa.cpp:26:17: error: 'query' was not declared in this scope
if(!query(q.top(),i,i,i)){
^~~~~
popa.cpp:28:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(f[q.top()]!=-1)
^~
popa.cpp:30:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
f[q.top()]=i;
^