catdog.cpp:5:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> adj[100000];
^~~~~~
wctob
catdog.cpp:7:1: error: 'pair' does not name a type; did you mean 'wait'?
pair<int,int> tree[2*SZ], itree[2*SZ];
^~~~
wait
catdog.cpp: In function 'void set_tree(int, int)':
catdog.cpp:11:6: error: 'itree' was not declared in this scope
for(itree[n+=SZ].first=v;n>>=1;) itree[n]=max(itree[2*n],itree[2*n+1]);
^~~~~
catdog.cpp:11:6: note: suggested alternative: 'cfree'
for(itree[n+=SZ].first=v;n>>=1;) itree[n]=max(itree[2*n],itree[2*n+1]);
^~~~~
cfree
catdog.cpp:11:44: error: 'max' was not declared in this scope
for(itree[n+=SZ].first=v;n>>=1;) itree[n]=max(itree[2*n],itree[2*n+1]);
^~~
catdog.cpp:11:44: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from catdog.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
catdog.cpp: At global scope:
catdog.cpp:14:1: error: 'pair' does not name a type; did you mean 'wait'?
pair<int,int> get_max(int s, int e)
^~~~
wait
catdog.cpp: In function 'void add_tree(int, int, int, int)':
catdog.cpp:28:4: error: 'tree' was not declared in this scope
tree[s].first+=v1;
^~~~
catdog.cpp:28:4: note: suggested alternative: 'free'
tree[s].first+=v1;
^~~~
free
catdog.cpp:32:4: error: 'tree' was not declared in this scope
tree[e].first+=v1;
^~~~
catdog.cpp:32:4: note: suggested alternative: 'free'
tree[e].first+=v1;
^~~~
free
catdog.cpp: At global scope:
catdog.cpp:38:1: error: 'pair' does not name a type; did you mean 'wait'?
pair<int,int> get_value(int n)
^~~~
wait
catdog.cpp: In function 'int dfs(int)':
catdog.cpp:51:14: error: 'adj' was not declared in this scope
for(auto n: adj[c]) if(W[n]==0) {
^~~
catdog.cpp: In function 'void dfs2(int)':
catdog.cpp:63:14: error: 'adj' was not declared in this scope
for(auto n: adj[c]) if(parent[n]==c && 2*W[n]>=W[c]) {
^~~
catdog.cpp:67:14: error: 'adj' was not declared in this scope
for(auto n: adj[c]) if(parent[n]==c && 2*W[n]<W[c]) {
^~~
catdog.cpp: At global scope:
catdog.cpp:73:24: error: 'vector' has not been declared
void initialize(int N, vector<int> A, vector<int> B)
^~~~~~
catdog.cpp:73:30: error: expected ',' or '...' before '<' token
void initialize(int N, vector<int> A, vector<int> B)
^
catdog.cpp: In function 'void initialize(int, int)':
catdog.cpp:75:2: error: 'itree' was not declared in this scope
itree[N-1].second=N-1; parent[0]=-1;
^~~~~
catdog.cpp:75:2: note: suggested alternative: 'cfree'
itree[N-1].second=N-1; parent[0]=-1;
^~~~~
cfree
catdog.cpp:77:3: error: 'adj' was not declared in this scope
adj[--A[i]].push_back(--B[i]);
^~~
catdog.cpp:77:9: error: 'A' was not declared in this scope
adj[--A[i]].push_back(--B[i]);
^
catdog.cpp:77:27: error: 'B' was not declared in this scope
adj[--A[i]].push_back(--B[i]);
^
catdog.cpp:82:33: error: 'max' was not declared in this scope
for(int i=SZ-1;i;i--) itree[i]=max(itree[2*i],itree[2*i+1]);
^~~
catdog.cpp:82:33: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from catdog.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
catdog.cpp: In function 'int query(int)':
catdog.cpp:88:13: error: 'get_max' was not declared in this scope
auto temp=get_max(num[hld[a]],num[a]);
^~~~~~~
catdog.cpp:88:13: note: suggested alternative: 'getchar'
auto temp=get_max(num[hld[a]],num[a]);
^~~~~~~
getchar
catdog.cpp: In function 'int cat(int)':
catdog.cpp:117:14: error: 'get_value' was not declared in this scope
auto[v1,v2]=get_value(idx);
^~~~~~~~~
catdog.cpp:117:14: note: suggested alternative: 'si_value'
auto[v1,v2]=get_value(idx);
^~~~~~~~~
si_value
catdog.cpp:123:12: error: 'min' was not declared in this scope
else ans+=min(pv1+1-v1,pv2-v2)-min(pv1,pv2);
^~~
catdog.cpp:123:12: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from catdog.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
catdog.cpp: In function 'int dog(int)':
catdog.cpp:133:14: error: 'get_value' was not declared in this scope
auto[v1,v2]=get_value(idx);
^~~~~~~~~
catdog.cpp:133:14: note: suggested alternative: 'si_value'
auto[v1,v2]=get_value(idx);
^~~~~~~~~
si_value
catdog.cpp:139:12: error: 'min' was not declared in this scope
else ans+=min(pv1-v1,pv2+1-v2)-min(pv1,pv2);
^~~
catdog.cpp:139:12: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from catdog.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
catdog.cpp: In function 'int neighbor(int)':
catdog.cpp:149:14: error: 'get_value' was not declared in this scope
auto[v1,v2]=get_value(idx);
^~~~~~~~~
catdog.cpp:149:14: note: suggested alternative: 'si_value'
auto[v1,v2]=get_value(idx);
^~~~~~~~~
si_value
catdog.cpp:155:12: error: 'min' was not declared in this scope
else ans+=min(pv1+v1-(V[idx]==1),pv2+v2-(V[idx]==2))-min(pv1,pv2);
^~~
catdog.cpp:155:12: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from catdog.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~