0_0_38413345_570.cpp:5:1: error: 'vector' does not name a type
vector<pair<int, int>> mp[N];
^
0_0_38413345_570.cpp: In function 'void dfs(long long int, long long int, long long int)':
0_0_38413345_570.cpp:12:30: error: 'max' was not declared in this scope
maxdep = max(maxdep, dep[id]);
^
0_0_38413345_570.cpp:13:16: error: 'mp' was not declared in this scope
for (auto a : mp[id]) {
^
0_0_38413345_570.cpp:16:14: error: 'y' was not declared in this scope
dfs(x, id, y);
^
0_0_38413345_570.cpp: In function 'long long int lca(long long int, long long int)':
0_0_38413345_570.cpp:20:32: error: 'swap' was not declared in this scope
if (dep[x] > dep[y]) swap(x, y);
^
0_0_38413345_570.cpp: In function 'void solve()':
0_0_38413345_570.cpp:31:16: error: 'cin' was not declared in this scope
int a, b, c; cin >> a >> b >> c;
^
0_0_38413345_570.cpp:32:3: error: 'mp' was not declared in this scope
mp[a].push_back({ b,c });
^
0_0_38413345_570.cpp:36:19: error: 'log' was not declared in this scope
lgd = (log(maxdep) / log(2)) + 1;
^
0_0_38413345_570.cpp:41:13: error: 'cin' was not declared in this scope
int a, b; cin >> a >> b;
^
0_0_38413345_570.cpp:42:3: error: 'cout' was not declared in this scope
cout << d[a] + d[b] - d[lca(a, b)] << endl;
^
0_0_38413345_570.cpp:42:41: error: 'endl' was not declared in this scope
cout << d[a] + d[b] - d[lca(a, b)] << endl;
^
0_0_38413345_570.cpp: In function 'void init()':
0_0_38413345_570.cpp:47:3: error: 'mp' was not declared in this scope
mp[i].clear();
^
0_0_38413345_570.cpp: In function 'int main()':
0_0_38413345_570.cpp:52:2: error: 'cin' was not declared in this scope
cin >> T;
^
|