Skip to content

Commit 6f04b06

Browse files
committed
Add CUT begin
1 parent 16a3aa8 commit 6f04b06

File tree

9 files changed

+12
-3
lines changed

9 files changed

+12
-3
lines changed

graph/manhattan_mst.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <tuple>
66
#include <vector>
77

8+
// CUT begin
89
// Manhattan MST: 二次元平面上の頂点たちのマンハッタン距離による minimum spanning tree の O(N) 本の候補辺を列挙
910
// Complexity: O(N log N)
1011
// output: [(weight_uv, u, v), ...]

graph/paths_of_length_two_decomposition.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <utility>
77
#include <vector>
88

9+
// CUT begin
910
// 無向グラフを長さ2の道(**閉路を含む**)へ分解
1011
// 各連結成分について,辺の本数が偶数なら完全な分解が可能
1112
// Complexity: O(V + E)

graph/shortest_cycle_weighted.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
#include <utility>
66
#include <vector>
77

8+
// CUT begin
89
// Shortest cycle detection of UNDIRECTED SIMPLE graphs
9-
// Verified: <https://yukicoder.me/submissions/594507>
10+
// Verified: https://yukicoder.me/submissions/594507
1011
template <typename T, T INF = std::numeric_limits<T>::max() / 2> struct ShortestCycleOfUndirectedWeighted {
1112
int V, E;
1213
std::vector<std::vector<std::pair<int, T>>> to; // (nxt, weight)

number/big_combination_logarithm.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <cmath>
33
#include <vector>
44

5+
// CUT begin
56
constexpr double minusloginf = -300;
67
std::vector<double> logfac;
78
void facInit(int nmax) {

number/zeta_moebius_transform.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <utility>
66
#include <vector>
77

8+
// CUT begin
89
// f[n]に対して、全てのnの倍数n*iに対するf[n*i]の和が出てくる 計算量O(NloglogN)
910
// 素数p毎に処理する高速ゼータ変換
1011
// 使用例 https://yukicoder.me/submissions/385043

other_algorithms/mos_algorithm.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <utility>
55
#include <vector>
66

7+
// CUT begin
78
// Mo's algorithm
89
// - add_range(l, r) : Add [l, r) as query.
910
// - run(Add, Remove, Query) : run Mo's algorithm.

string/longest_common_prefix.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#pragma once
2-
#include "suffix_array.hpp"
32
#include "../sparse_table/rmq_sparse_table.hpp"
3+
#include "suffix_array.hpp"
44
#include <algorithm>
5+
#include <string>
56
#include <utility>
67
#include <vector>
7-
#include <string>
88

9+
// CUT begin
910
struct LCPsparsetable {
1011
const int N;
1112
std::vector<int> sainv; // len = N

tree/lca_rmq.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <utility>
66
#include <vector>
77

8+
// CUT begin
89
struct TreeLCA {
910
const int N;
1011
std::vector<std::vector<int>> to;

utilities/int_kth_root.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
// CUT begin
34
// floor(a^(1/k)) (the largest x s.t. x^k doesn't exceed a)
45
// Constraints: a >= 0, k > 0
56
unsigned long long int_kth_root(unsigned long long a, int k) {

0 commit comments

Comments
 (0)