bubblesort2.cpp: In member function 'void BIT::add(int, int)':
bubblesort2.cpp:14:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(++k;k<bit.size();k+=k&-k){
~^~~~~~~~~~~
bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:27:27: error: expected ',' or ';' before ':' token
int n=A.size(),q=X.size():
^
bubblesort2.cpp:34:8: error: 'Y' was not declared in this scope
v.eb(Y[i]);
^
bubblesort2.cpp:44:3: error: 'Y' was not declared in this scope
Y[i]=lower_bound(all(v),Y[i])-v.begin();
^
bubblesort2.cpp:47:22: error: 'bit' was not declared in this scope
res[i]=max(res[i],bit.get(m+1)-bit.get(A[j]));
^~~