Skip to content

Commit 1ff1642

Browse files
committed
avoid copy
1 parent 3302dbc commit 1ff1642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/trees/hld.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
template<bool VALS_EDGES> struct HLD {
1414
int n;
1515
vi p, siz, rt, tin;
16-
HLD(auto adj):
16+
HLD(auto& adj):
1717
n(sz(adj)), p(n), siz(n, 1), rt(n), tin(n) {
1818
auto dfs1 = [&](auto&& self, int v) -> void {
1919
for (int& u : adj[v]) {

0 commit comments

Comments
 (0)