From c76052dacab0101b8e7895862bfddbe23873bc26 Mon Sep 17 00:00:00 2001 From: Cameron Custer Date: Mon, 6 Jul 2026 13:33:33 -0700 Subject: [PATCH] quality audit: fix dsu_weighted sentinel precision; fix comment typo --- library/data_structures_[l,r)/uncommon/deque_op.hpp | 2 +- library/dsu/dsu_weighted.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/data_structures_[l,r)/uncommon/deque_op.hpp b/library/data_structures_[l,r)/uncommon/deque_op.hpp index e6a950cb..0d85719c 100644 --- a/library/data_structures_[l,r)/uncommon/deque_op.hpp +++ b/library/data_structures_[l,r)/uncommon/deque_op.hpp @@ -3,7 +3,7 @@ //! @code //! deq dq(a, ranges::min); //! @endcode -//! @time operations are O(1) ammortized +//! @time operations are O(1) amortized //! @space O(n) template struct deq { using dt = array; diff --git a/library/dsu/dsu_weighted.hpp b/library/dsu/dsu_weighted.hpp index e930239a..1f504992 100644 --- a/library/dsu/dsu_weighted.hpp +++ b/library/dsu/dsu_weighted.hpp @@ -19,7 +19,7 @@ struct dsu_weighted { } int size(int u) { return -p[f(u)]; } ll diff(int u, int v) { - return f(u) == f(v) ? d[v] - d[u] : 1e18; + return f(u) == f(v) ? d[v] - d[u] : ll(1e18); } bool join(int u, int v, ll w) { int x = f(u), y = f(v);