diff --git a/library/data_structures_[l,r]/linear_rmq.hpp b/library/data_structures_[l,r]/linear_rmq.hpp index e1228a4b..0a66251e 100644 --- a/library/data_structures_[l,r]/linear_rmq.hpp +++ b/library/data_structures_[l,r]/linear_rmq.hpp @@ -36,9 +36,9 @@ template struct linear_rmq { int idx(int l, int r) { if (unsigned j = in[l] ^ in[r]) { j = asc[l] & asc[r] & -bit_floor(j); - if (auto k = bit_floor(asc[l] ^ j)) + if (int k = bit_floor(asc[l] ^ j)) l = head[(in[l] & -k) | k]; - if (auto k = bit_floor(asc[r] ^ j)) + if (int k = bit_floor(asc[r] ^ j)) r = head[(in[r] & -k) | k]; } return cmp(a[l], a[r]) ? l : r; diff --git a/library/trees/linear_lca.hpp b/library/trees/linear_lca.hpp index 779439ad..a1b393e7 100644 --- a/library/trees/linear_lca.hpp +++ b/library/trees/linear_lca.hpp @@ -29,9 +29,9 @@ struct linear_lca { int lca(int u, int v) { if (unsigned j = in[u] ^ in[v]) { j = asc[u] & asc[v] & -bit_floor(j); - if (auto k = bit_floor(asc[u] ^ j)) + if (int k = bit_floor(asc[u] ^ j)) u = head[(in[u] & -k) | k]; - if (auto k = bit_floor(asc[v] ^ j)) + if (int k = bit_floor(asc[v] ^ j)) v = head[(in[v] & -k) | k]; } return d[u] < d[v] ? u : v;