foo.cpp:4:33: error: size of array 't' is too large
int x[N], y[N], ans[N], t[N][N*3];
^
foo.cpp: In function 'int query(int, int, int, int)':
foo.cpp:7:30: error: 't' was not declared in this scope
if(l>=1 && r<=y[i]) return t[c][o];
^
foo.cpp: In function 'void set(int, int, int, int, int)':
foo.cpp:18:9: error: 't' was not declared in this scope
++t[c][o];
^
foo.cpp:23:51: error: 't' was not declared in this scope
if(k <= (x+y) >> 1) set(c, o*2, x, mid, k), ++t[c][o];
^
foo.cpp:24:40: error: 't' was not declared in this scope
else set(c, o*2+1, mid+1, y, k), ++t[c][o];
^