CP-Reference-Codes

所属分类:数据结构
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2023-06-23 15:16:18
上 传 者sh-1993
说明:  用于竞争编程的各种数据结构和算法。
(Various data structures and algorithms for competitive programming.)

文件列表:
reference-codes/ (0, 2023-10-20)
reference-codes/0-basic-template/ (0, 2023-10-20)
reference-codes/0-basic-template/cpp_basic_template.cpp (903, 2023-10-20)
reference-codes/1-data-structure/ (0, 2023-10-20)
reference-codes/1-data-structure/fenwick_tree.cpp (3922, 2023-10-20)
reference-codes/1-data-structure/li_chao_tree.cpp (2149, 2023-10-20)
reference-codes/1-data-structure/merge_sort_tree.cpp (2239, 2023-10-20)
reference-codes/1-data-structure/segment_tree.cpp (6831, 2023-10-20)
reference-codes/1-data-structure/union_find.cpp (222, 2023-10-20)
reference-codes/2-graph/ (0, 2023-10-20)
reference-codes/2-graph/bcc.cpp (2376, 2023-10-20)
reference-codes/2-graph/dijkstra_bellman_ford_floyd_warshall.cpp (1897, 2023-10-20)
reference-codes/2-graph/euler_circuit.cpp (1562, 2023-10-20)
reference-codes/2-graph/minimum_spanning_tree.cpp (1148, 2023-10-20)
reference-codes/2-graph/scc_2_sat.cpp (5603, 2023-10-20)
reference-codes/2-graph/topological_sort.cpp (1979, 2023-10-20)
reference-codes/3-tree/ (0, 2023-10-20)
reference-codes/3-tree/centroid_decomposition.cpp (780, 2023-10-20)
reference-codes/3-tree/euler_tour_technique.cpp (4166, 2023-10-20)
reference-codes/3-tree/heavy_light_decomposition.cpp (2706, 2023-10-20)
reference-codes/3-tree/lca_in_o_logn_sparse_table.cpp (1397, 2023-10-20)
reference-codes/4-network-flow/ (0, 2023-10-20)
reference-codes/4-network-flow/bipartite_matching.cpp (854, 2023-10-20)
reference-codes/4-network-flow/dinics_algorithm.cpp (1364, 2023-10-20)
reference-codes/4-network-flow/hopcroft_karp_algorithm.cpp (1164, 2023-10-20)
reference-codes/4-network-flow/maximum_flow.cpp (3139, 2023-10-20)
reference-codes/4-network-flow/mcmf.cpp (1237, 2023-10-20)
reference-codes/5-string/ (0, 2023-10-20)
reference-codes/5-string/aho_corasick.cpp (1739, 2023-10-20)
reference-codes/5-string/kmp_algorithm.cpp (890, 2023-10-20)
reference-codes/5-string/manachers_algorithm.cpp (1295, 2023-10-20)
reference-codes/5-string/rabin_karp_algorithm.cpp (1196, 2023-10-20)
reference-codes/5-string/suffix_array.cpp (3480, 2023-10-20)
reference-codes/5-string/trie.cpp (2097, 2023-10-20)
reference-codes/5-string/z_algorithm.cpp (1204, 2023-10-20)
reference-codes/6-geometry/ (0, 2023-10-20)
reference-codes/6-geometry/bulldozer_trick.cpp (1510, 2023-10-20)
reference-codes/6-geometry/ccw_algorithm.cpp (724, 2023-10-20)
reference-codes/6-geometry/convex_hull.cpp (2944, 2023-10-20)
... ...

# CP Reference Codes My implementations of various data structures and algorithms for competitive programming. ## Contents 0. [Basic Template](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/0-basic-template)
0.1. [C++ Basic Template](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/0-basic-template/cpp_basic_template.cpp)
1. [Data Structure](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/1-data-structure)
1.1. [Union Find](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/1-data-structure/union_find.cpp)
1.2. [Segment Tree](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/1-data-structure/segment_tree.cpp)
1.3. [Merge Sort Tree](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/1-data-structure/merge_sort_tree.cpp)
1.4. [Fenwick Tree](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/1-data-structure/fenwick_tree.cpp)
1.5. [Li Chao Tree](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/1-data-structure/li_chao_tree.cpp)
2. [Graph](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/2-graph)
2.1. [Dijkstra's, Bellman-Ford, Floyd-Warshall](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/2-graph/dijkstra_bellman_ford_floyd_warshall.cpp)
2.2. [Minimum Spanning Tree](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/2-graph/minimum_spanning_tree.cpp)
2.3. [Topological Sort](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/2-graph/topological_sort.cpp)
2.4. [SCC, 2-SAT](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/2-graph/scc_2_sat.cpp)
2.5. [BCC](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/2-graph/bcc.cpp)
2.6. [Euler Circuit](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/2-graph/euler_circuit.cpp)
3. [Tree](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/3-tree)
3.1. [LCA in O(logN) (Sparse Table)](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/3-tree/lca_in_o_logn_sparse_table.cpp)
3.2. [Euler Tour Technique](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/3-tree/euler_tour_technique.cpp)
3.3. [Heavy-Light Decomposition](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/3-tree/heavy_light_decomposition.cpp)
3.4. [Centroid Decomposition](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/3-tree/centroid_decomposition.cpp)
4. [Network Flow](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/4-network-flow)
4.1. [Maximum Flow](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/4-network-flow/maximum_flow.cpp)
4.2. [Dinic's Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/4-network-flow/dinics_algorithm.cpp)
4.3. [Bipartite Matching](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/4-network-flow/bipartite_matching.cpp)
4.4. [Hopcroft-Karp Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/4-network-flow/hopcroft_karp_algorithm.cpp)
4.5. [MCMF](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/4-network-flow/mcmf.cpp)
5. [String](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/5-string)
5.1. [Rabin-Karp Algorithm](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/5-string/rabin_karp_algorithm.cpp)
5.2. [KMP Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/5-string/kmp_algorithm.cpp)
5.3. [Trie](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/5-string/trie.cpp)
5.4. [Aho-Corasick](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/5-string/aho_corasick.cpp)
5.5. [Suffix Array](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/5-string/suffix_array.cpp)
5.6. [Manacher's Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/5-string/manachers_algorithm.cpp)
5.7. [Z Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/5-string/z_algorithm.cpp)
6. [Geometry](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/6-geometry)
6.1. [CCW Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/6-geometry/ccw_algorithm.cpp)
6.2. [Convex Hull](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/6-geometry/convex_hull.cpp)
6.3. [Rotating Callipers](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/6-geometry/rotating_callipers.cpp)
6.4. [Ray Casting](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/6-geometry/ray_casting.cpp)
6.5. [Sort by Angular](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/6-geometry/sort_by_angular.cpp)
6.6. [Bulldozer Trick](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/6-geometry/bulldozer_trick.cpp)
6.7. [Minimum Enclosing Circle](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/6-geometry/minimum_enclosing_circle.cpp)
7. [Math](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/7-math)
7.1. [Basic Sqrt-Time Algorithms](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/7-math/basic_sqrt_time_algorithms.cpp)
7.2. [Sieve](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/sieve.cpp)
7.3. [Euclidean Algorithms](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/euclidean_algorithms.cpp)
7.4. [Fermat's Little Theorem](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/fermats_little_theorem.cpp)
7.5. [Euler's Phi Function](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/eulers_phi_function.cpp)
7.6. [Chinese Remainder Theorem](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/chinese_remainder_theorem.cpp)
7.7. [Binomial Coefficient](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/binomial_coefficient.cpp)
7.8. [Matrix](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/matrix.cpp)
7.9. [Catalan Number, Derangement Number](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/catalan_number_derangement_number.cpp)
7.10. [FFT](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/fft.cpp)
7.11. [Gauss-Jordan Elimination](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/7-math/gauss_jordan_elimination.cpp)
8. [Misc](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/8-misc)
8.1. [Coordinate Compression](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/coordinate_compression.cpp)
8.2. [2D Prefix Sum](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/2d_prefix_sum.cpp)
8.3. [DP Opt](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/dp_opt.cpp)
8.4. [Sqrt Decomposition, Mo's Algorithm](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/sqrt_decomposition_mos_algorithm.cpp)
8.5. [Fraction Data Type](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/fraction_data_type.cpp)
8.6. [Rotation Matrix, Manhattan Distance, Chebyshev Distance](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/rotation_matrix_manhattan_distance_chebyshev_distance.txt)
8.7. [Random](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/random.cpp)
8.8. [Ternary Search](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/ternary_search.cpp)
8.9. [LIS in O(NlogN)](https://github.com/manoflearning/cp-reference-codes/tree/master/reference-codes/8-misc/lis_in_o_nlogn.cpp)
8.10. [System of Difference Constraints](https://github.com/manoflearning/cp-reference-codes/blob/master/reference-codes/8-misc/system_of_difference_constraints.cpp)
## Guidelines 1. .
2. input, output, time complexity .
3. . , [ 2042: ](https://www.acmicpc.net/problem/2042) .
4. .
5. , . ( : unionFind (O), union_find (X))
5.1. , . ( : UnionFind (O))
6. . . .

近期下载者

相关文件


收藏者