factories.cpp: In function 'void dfs(int, int)':
factories.cpp:18:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
18 | for(auto [x, w] : adj[u]) if(x != par && !deleted[x]) {
| ^
factories.cpp: In function 'int find_centroid(int, int)':
factories.cpp:25:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
25 | for(auto [x, w] : adj[u]) if(x != par && !deleted[x] && sz[x] > N / 2) return find_centroid(x, u);
| ^
factories.cpp: In function 'void build_distance(int, int, int, long long int)':
factories.cpp:30:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
30 | for(auto [x, w] : adj[u]) if(x != par && !deleted[x]) build_distance(x, u, c, d + w);
| ^
factories.cpp: In function 'void build_tree(int)':
factories.cpp:43:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
43 | for(auto [x, w] : adj[centroid]) {
| ^
factories.cpp: In function 'void add(int)':
factories.cpp:49:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
49 | for(auto [x, w] : ancestors[u]) dp[x] = w;
| ^
factories.cpp: In function 'void del(int)':
factories.cpp:53:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
53 | for(auto [x, w] : ancestors[u]) dp[x] = inf;
| ^
factories.cpp: In function 'long long int get(int)':
factories.cpp:58:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
58 | for(auto [x, w] : ancestors[u]) {
| ^