0_0_19089160_28031.cpp:20:14: error: 'll' was not declared in this scope
typedef pair<ll,point>tp;
^
0_0_19089160_28031.cpp:20:22: error: template argument 1 is invalid
typedef pair<ll,point>tp;
^
0_0_19089160_28031.cpp:20:25: error: invalid type in declaration before ';' token
typedef pair<ll,point>tp;
^
0_0_19089160_28031.cpp: In member function 'void kdTree::query(point, int, int, int)':
0_0_19089160_28031.cpp:43:23: error: expression list treated as compound expression in initializer [-fpermissive]
tp nd(0,pt[rt]);
^
0_0_19089160_28031.cpp:43:23: error: cannot convert 'point' to 'tp {aka int}' in initialization
0_0_19089160_28031.cpp:44:33: error: request for member 'first' in 'nd', which is of non-class type 'tp {aka int}'
for(int i=0;i<k;i++) nd.first+=sqr(nd.second.x[i]-p.x[i]);
^
0_0_19089160_28031.cpp:44:47: error: request for member 'second' in 'nd', which is of non-class type 'tp {aka int}'
for(int i=0;i<k;i++) nd.first+=sqr(nd.second.x[i]-p.x[i]);
^
0_0_19089160_28031.cpp:9:17: note: in definition of macro 'sqr'
#define sqr(x) (x)*(x)
^
0_0_19089160_28031.cpp:44:47: error: request for member 'second' in 'nd', which is of non-class type 'tp {aka int}'
for(int i=0;i<k;i++) nd.first+=sqr(nd.second.x[i]-p.x[i]);
^
0_0_19089160_28031.cpp:9:21: note: in definition of macro 'sqr'
#define sqr(x) (x)*(x)
^
0_0_19089160_28031.cpp:48:25: error: request for member 'first' in 'nq.std::priority_queue<_Tp, _Sequence, _Compare>::top<int, std::vector<int, std::allocator<int> >, std::less<int> >()', which is of non-class type 'const value_type {aka const int}'
if(nq.top().first>nd.first)
^
0_0_19089160_28031.cpp:48:34: error: request for member 'first' in 'nd', which is of non-class type 'tp {aka int}'
if(nq.top().first>nd.first)
^
0_0_19089160_28031.cpp:58:62: error: request for member 'first' in 'nq.std::priority_queue<_Tp, _Sequence, _Compare>::top<int, std::vector<int, std::allocator<int> >, std::less<int> >()', which is of non-class type 'const value_type {aka const int}'
if(nq.size()<m||sqr(p.x[dim]-pt[rt].x[dim])<nq.top().first) query(p,m,y,dep+1);
^
0_0_19089160_28031.cpp: In function 'int main()':
0_0_19089160_28031.cpp:79:57: error: request for member 'second' in 'nq.std::priority_queue<_Tp, _Sequence, _Compare>::top<int, std::vector<int, std::allocator<int> >, std::less<int> >()', which is of non-class type 'const value_type {aka const int}'
for(int j=0;!nq.empty();j++) pt[j]=nq.top().second,nq.pop();
^
|