race.cpp:7:9: error: 'pair' does not name a type
7 | typedef pair<int, int> pii;
| ^~~~
race.cpp:8:9: error: 'pair' does not name a type
8 | typedef pair<ll, ll> pll;
| ^~~~
race.cpp:14:31: error: 'INT_MAX' was not declared in this scope
14 | int k, cn=0, sub[200005], ans=INT_MAX, pref[200005], depth[200005];
| ^~~~~~~
race.cpp:3:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
2 | #include "race.h"
+++ |+#include <climits>
3 |
race.cpp:15:8: error: 'pii' was not declared in this scope
15 | vector<pii> adj[200005];
| ^~~
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:8: error: 'pii' was not declared in this scope
race.cpp:15:1: error: 'vector' does not name a type
15 | vector<pii> adj[200005];
| ^~~~~~
race.cpp:17:1: error: 'map' does not name a type
17 | map<int, int> mn;
| ^~~
race.cpp: In function 'void dfs(int, int)':
race.cpp:22:22: error: 'adj' was not declared in this scope
22 | for(auto[i, _] : adj[x])
| ^~~
race.cpp: In function 'int centr(int, int)':
race.cpp:29:22: error: 'adj' was not declared in this scope
29 | for(auto[i, _] : adj[x])
| ^~~
race.cpp: In function 'void init(int, int)':
race.cpp:37:22: error: 'adj' was not declared in this scope
37 | for(auto[i, w] : adj[x])
| ^~~
race.cpp:40:9: error: 'pref' was not declared in this scope
40 | pref[i]=pref[x]+w;
| ^~~~
race.cpp:41:9: error: 'depth' was not declared in this scope
41 | depth[i]=depth[x]+1;
| ^~~~~
race.cpp: In function 'void query(int, int)':
race.cpp:47:8: error: 'pref' was not declared in this scope
47 | if(pref[x]==k) ans=min(ans, depth[x]);
| ^~~~
race.cpp:47:33: error: 'depth' was not declared in this scope
47 | if(pref[x]==k) ans=min(ans, depth[x]);
| ^~~~~
race.cpp:47:24: error: 'min' was not declared in this scope
47 | if(pref[x]==k) ans=min(ans, depth[x]);
| ^~~
race.cpp:48:8: error: 'mn' was not declared in this scope; did you mean 'cn'?
48 | if(mn.count(k-pref[x])) ans=min(ans, mn[k-pref[x]]+depth[x]);
| ^~
| cn
race.cpp:48:19: error: 'pref' was not declared in this scope
48 | if(mn.count(k-pref[x])) ans=min(ans, mn[k-pref[x]]+depth[x]);
| ^~~~
race.cpp:48:56: error: 'depth' was not declared in this scope
48 | if(mn.count(k-pref[x])) ans=min(ans, mn[k-pref[x]]+depth[x]);
| ^~~~~
race.cpp:48:33: error: 'min' was not declared in this scope
48 | if(mn.count(k-pref[x])) ans=min(ans, mn[k-pref[x]]+depth[x]);
| ^~~
race.cpp:49:20: error: 'adj' was not declared in this scope
49 | for(auto[i, _]:adj[x])
| ^~~
race.cpp: In function 'void update(int, int)':
race.cpp:56:9: error: 'mn' was not declared in this scope; did you mean 'cn'?
56 | if(!mn.count(pref[x])) mn[pref[x]]=depth[x];
| ^~
| cn
race.cpp:56:18: error: 'pref' was not declared in this scope
56 | if(!mn.count(pref[x])) mn[pref[x]]=depth[x];
| ^~~~
race.cpp:56:40: error: 'depth' was not declared in this scope
56 | if(!mn.count(pref[x])) mn[pref[x]]=depth[x];
| ^~~~~
race.cpp:57:39: error: 'depth' was not declared in this scope
57 | else mn[pref[x]]=min(mn[pref[x]], depth[x]);
| ^~~~~
race.cpp:57:22: error: 'min' was not declared in this scope
57 | else mn[pref[x]]=min(mn[pref[x]], depth[x]);
| ^~~
race.cpp:58:20: error: 'adj' was not declared in this scope
58 | for(auto[i, _]:adj[x])
| ^~~
race.cpp: In function 'void solve(int)':
race.cpp:65:5: error: 'mn' was not declared in this scope; did you mean 'cn'?
65 | mn.clear();
| ^~
| cn
race.cpp:67:5: error: 'pref' was not declared in this scope
67 | pref[x]=0;
| ^~~~
race.cpp:68:5: error: 'depth' was not declared in this scope
68 | depth[x]=0;
| ^~~~~
race.cpp:70:22: error: 'adj' was not declared in this scope
70 | for(auto[i, _] : adj[x])
| ^~~
race.cpp: In function 'void decompose(int)':
race.cpp:84:22: error: 'adj' was not declared in this scope
84 | for(auto[i, _] : adj[cen])
| ^~~
race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:96:9: error: 'adj' was not declared in this scope
96 | adj[x].pb({y, w});
| ^~~
race.cpp:100:18: error: 'INT_MAX' was not declared in this scope
100 | return (ans==INT_MAX?-1:ans);
| ^~~~~~~
race.cpp:100:18: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?