prog.cpp:1:1: error: ‘vector’ does not name a type
vector<int> fenwick(4 * N), fenwickCount(4 * N);
^~~~~~
prog.cpp: In lambda function:
prog.cpp:5:11: error: ‘mp’ was not declared in this scope
for(x = mp[x]; x < (N << 2) ; x += x & -x) fenwick[x] += v;
^~
prog.cpp:5:23: error: ‘N’ was not declared in this scope
for(x = mp[x]; x < (N << 2) ; x += x & -x) fenwick[x] += v;
^
prog.cpp:5:46: error: ‘fenwick’ was not declared in this scope
for(x = mp[x]; x < (N << 2) ; x += x & -x) fenwick[x] += v;
^~~~~~~
prog.cpp:6:11: error: ‘mp’ was not declared in this scope
for(x = mp[v] ; x < (N << 2) ; x += x & -x) fenwickCount[x] ++;
^~
prog.cpp:6:24: error: ‘N’ was not declared in this scope
for(x = mp[v] ; x < (N << 2) ; x += x & -x) fenwickCount[x] ++;
^
prog.cpp:6:47: error: ‘fenwickCount’ was not declared in this scope
for(x = mp[v] ; x < (N << 2) ; x += x & -x) fenwickCount[x] ++;
^~~~~~~~~~~~
prog.cpp: In lambda function:
prog.cpp:12:19: error: ‘N’ was not declared in this scope
if(res + lg < (N << 2) and tot + fenwickCount[res ^ lg] <= topK) {
^
prog.cpp:12:37: error: ‘fenwickCount’ was not declared in this scope
if(res + lg < (N << 2) and tot + fenwickCount[res ^ lg] <= topK) {
^~~~~~~~~~~~
prog.cpp:15:12: error: ‘fenwick’ was not declared in this scope
sum += fenwick[res];
^~~~~~~