We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3302dbc commit 1ff1642Copy full SHA for 1ff1642
library/trees/hld.hpp
@@ -13,7 +13,7 @@
13
template<bool VALS_EDGES> struct HLD {
14
int n;
15
vi p, siz, rt, tin;
16
- HLD(auto adj):
+ HLD(auto& adj):
17
n(sz(adj)), p(n), siz(n, 1), rt(n), tin(n) {
18
auto dfs1 = [&](auto&& self, int v) -> void {
19
for (int& u : adj[v]) {
0 commit comments