Skip to content

Commit 9d2cb86

Browse files
author
Cameron Custer
committed
fix doc nits
1 parent 3251c26 commit 9d2cb86

6 files changed

Lines changed: 12 additions & 11 deletions

File tree

library/contest/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ freopen("output.txt", "w", stdout);
99
If you changed something for debugging, add a `cout << "don't submit" << endl;`
1010
or `assert(0);` at the end of the code
1111

12-
for policy base DS:
12+
for policy-based DS:
1313
```
1414
#include <bits/extc++.h>
1515
```
@@ -25,7 +25,7 @@ don't use cin for doubles/floats, it's slow, read into string, then convert to d
2525
cin.exceptions(cin.failbit);
2626
```
2727

28-
- use pramgas for C++ speed boost
28+
- use pragmas for C++ speed boost
2929
```
3030
#pragma GCC optimize("O3,unroll-loops")
3131
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

library/data_structures_[l,r)/bit.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! int r = bit.walk2(sum);
88
//! // Returns min r s.t. sum of [0,r] >= sum
99
//! // Returns n if sum of [0,n-1] < sum
10+
//! // Returns -1 if sum <= 0
1011
//! @endcode
1112
//! @time O(n + q log n)
1213
//! @space O(n)

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#pragma once
22
//! https://codeforces.com/blog/entry/111117
33
//! @code
4-
//! dsu_restorable dsu_r(n);
5-
//! pq_updates<dsu_restorable, int, int> pq(dsu_r);
6-
//! rep (i, 0, n) pq.ds.add(i, initial_nums[i]);
7-
//! //or
8-
//! pq.ds.subtree = initial_nums;
9-
//! pq.push_update(u, v, curr_pri);
10-
//! cout << pq.ds.sum(v) << '\n';
4+
//! // DS = any struct with member functions join, undo
5+
//! DS ds;
6+
//! // int = argument type of DS::join
7+
//! pq_updates<DS, int> pq(ds);
8+
//! pq.push_update(val, priority);
9+
//! pq.pop_update();
1110
//! @endcode
1211
//! @time n interweaved calls to pop_update, push_update
1312
//! take O(T(n)*nlogn) where O(T(n)) = time complexity of

library/data_structures_[l,r]/bit.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! int r = bit.walk2(sum);
88
//! // Returns min r s.t. sum of [0,r] >= sum
99
//! // Returns n if sum of [0,n-1] < sum
10+
//! // Returns -1 if sum <= 0
1011
//! @endcode
1112
//! @time O(n + q log n)
1213
//! @space O(n)

library/graphs/uncommon/block_vertex_tree.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! [0, n) are original nodes
1616
//! [n, n + num_bccs) are BCC nodes
1717
//! @time O(n + m)
18-
//! @time O(n)
18+
//! @space O(n)
1919
auto block_vertex_tree(const auto& g, int num_bccs,
2020
const vi& bcc_id) {
2121
int n = sz(g);

library/math/tetration_mod.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//!
88
//! returns b ^ (b ^ (... ^ b))) % mod, where
99
//! the height of the tower is e.
10-
//
10+
//!
1111
//! @time O(sqrt(mod) * log(mod))
1212
//! @space O(log(mod))
1313
ll bin_exp(ll b, ll e, int mod) {

0 commit comments

Comments
 (0)