Skip to content

Commit 7334120

Browse files
cameroncusterCameron Custer
andauthored
quality audit: fix dsu_weighted sentinel precision; fix comment typo (#227)
Co-authored-by: Cameron Custer <cam@augmentcode.com>
1 parent f1f4f01 commit 7334120

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

library/data_structures_[l,r)/uncommon/deque_op.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! @code
44
//! deq dq(a, ranges::min);
55
//! @endcode
6-
//! @time operations are O(1) ammortized
6+
//! @time operations are O(1) amortized
77
//! @space O(n)
88
template<class T, class F> struct deq {
99
using dt = array<T, 2>;

library/dsu/dsu_weighted.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct dsu_weighted {
1919
}
2020
int size(int u) { return -p[f(u)]; }
2121
ll diff(int u, int v) {
22-
return f(u) == f(v) ? d[v] - d[u] : 1e18;
22+
return f(u) == f(v) ? d[v] - d[u] : ll(1e18);
2323
}
2424
bool join(int u, int v, ll w) {
2525
int x = f(u), y = f(v);

0 commit comments

Comments
 (0)