prog.cpp:3:5: error: ‘vector’ does not name a type
vector<int>tree;
^~~~~~
prog.cpp:11:21: error: ‘vector’ has not been declared
static bool cmp(vector<int> &a,vector<int> &b) {
^~~~~~
prog.cpp:11:27: error: expected ‘,’ or ‘...’ before ‘<’ token
static bool cmp(vector<int> &a,vector<int> &b) {
^
prog.cpp:39:5: error: ‘vector’ does not name a type
vector<vector<int>> reconstructQueue(vector<vector<int>>& people) {
^~~~~~
prog.cpp: In member function ‘int Solution::buildTree(int, int, int)’:
prog.cpp:6:33: error: ‘tree’ was not declared in this scope
if(start == end) return tree[p] = 1;
^~~~
prog.cpp:8:16: error: ‘tree’ was not declared in this scope
return tree[p] = buildTree(start,mid,2*p + 1) + buildTree(mid+1,end,2*p + 2);
^~~~
prog.cpp: In static member function ‘static bool Solution::cmp(int)’:
prog.cpp:12:12: error: ‘a’ was not declared in this scope
if(a[0] == b[0]) return a[1] > b[1];
^
prog.cpp:12:20: error: ‘b’ was not declared in this scope
if(a[0] == b[0]) return a[1] > b[1];
^
prog.cpp:13:16: error: ‘a’ was not declared in this scope
return a[0] < b[0];
^
prog.cpp:13:23: error: ‘b’ was not declared in this scope
return a[0] < b[0];
^
prog.cpp: In member function ‘void Solution::getIndex(int, int, int, int, int&)’:
prog.cpp:21:13: error: ‘tree’ was not declared in this scope
tree[p]--;
^~~~
prog.cpp:27:12: error: ‘tree’ was not declared in this scope
if(tree[2*p+1] - value > 0){
^~~~