Blog
- Read WarshallFloyd
WarshallFloyd
Find all-pairs shortest paths with Warshall-Floyd.
2024/07/303 min read
romophic - Read 繰り返し二乗法
繰り返し二乗法
Compute powers modulo m in O(log n) with binary exponentiation.
2024/07/291 min read
romophic - Read 二分探索
二分探索
Find boundaries in sorted arrays with binary search.
2024/07/292 min read
romophic - Read chmax/chmin
chmax/chmin
Update values in place with the chmax and chmin helpers.
2024/07/291 min read
romophic - Read インデックス変換(2D,3D)
インデックス変換(2D,3D)
Convert two- and three-dimensional coordinates to flat indices.
2024/07/291 min read
romophic - Read 累積和(1D,2D,3D)
累積和(1D,2D,3D)
Build 1D, 2D, and 3D prefix sums for constant-time range queries.
2024/07/294 min read
romophic - Read 約数列挙
約数列挙
Enumerate all divisors of an integer in O(sqrt n).
2024/07/291 min read
romophic - Read Euler's totient function
Euler's totient function
Compute Euler's totient function and coprimality counts.
2024/07/292 min read
romophic - Read 入出力高速化
入出力高速化
Speed up competitive-programming input and output.
2024/07/291 min read
romophic - Read LazySegmentTree
LazySegmentTree
Apply range updates and range queries with a lazy segment tree.
2024/07/296 min read
romophic - Read 素因数分解
素因数分解
Factor integers into primes with a sieve or trial division.
2024/07/291 min read
romophic - Read SegmentTree
SegmentTree
Answer range queries and point updates with a segment tree.
2024/07/294 min read
romophic - Read UnionFind
UnionFind
Manage disjoint sets with union-find.
2024/07/293 min read
romophic - Read WeightedUnionFind
WeightedUnionFind
Track component weights with weighted union-find.
2024/07/293 min read
romophic - Read STLデータ構造をistream,ostream-compatibleにする
STLデータ構造をistream,ostream-compatibleにする
Guide to making STL data structures istream/ostream-compatible
2024/06/0910 min read
romophic