欧拉公式求圆周率的matlab代码-CP-Template:竞争性编程的C++模板

  • V7_954630
    了解作者
  • 59.2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 02:44
    上传日期
欧拉公式求长期率的matlab代码CP模板 竞争性编程的C ++模板 主文件是Data Structures.cpp 也可以看看: 事物清单(按顺序): 段/分域树 段树(所有范围都是封闭的,即包括l,r) 点更新 范围更新(延迟传播) 简短的迭代版本。 [] 2D分割树 持久段树 段树拍(例如,范围最小/最大更新)[] Fenwick树:点和范围更新 字符串算法 前缀功能(KMP) Z算法 特里 后缀数组 图论 算法/ DS DSU(不交集联合) 克鲁斯卡尔 迪克斯特拉 弗洛伊德·沃歇尔(Floyd-Warshall) SPFA(最短路径更快算法)/ Bellman-Ford Dinic流O(V ^ 2E) Edmonds-Karp:最低费用,最高流量 Hopcroft-Karp匹配(最大基数双向匹配/ MCBM) 强连接组件(SCC):Tarjan算法 常用技术 欧拉巡回压缩 重光分解(HLD) 最低共同祖先(LCA) 欧拉巡回方法:O(log n)查询 深度方法:O(log n)查询 稀疏表:O(1)查询但很长 质心分解:求解穿过电流质心的所有路径 数据结构 稀疏表 凸包技巧(C
CP-Template-master.zip
  • CP-Template-master
  • README.md
    2.1KB
  • random_tree.cpp
    1.6KB
  • Data Structures.cpp
    55.3KB
  • Connectivity_Trash.cpp
    1.9KB
  • zs DS Template.cpp
    134.8KB
内容介绍
# CP-Template C++ Templates for Competitive Programming Main file is Data Structures.cpp See also: [zscoder's template](https://github.com/zscoder/CompetitiveProgramming/blob/master/Data%20Structures%20Class%20Template.cpp) List of things (in order): 1. Segment/Fenwick tree - Segment tree (all ranges are closed i.e. l,r inclusive) - Point update - Range update (Lazy propagation) - Short iterative ver. [[source](https://codeforces.com/blog/entry/18051)] - 2D segment tree - Persistent segment tree - Segment tree beats (e.g. range min/max update) [[source](https://tjkendev.github.io/procon-library/cpp/range_query/segment_tree_beats_2.html)] - Fenwick tree: point and range update 2. String algorithms - Prefix function (KMP) - Z-algorithm - Trie - Suffix Array 3. Graph theory - Algorithms/DS - DSU (Disjoint-set union) - Kruskal - Dijkstra - Floyd-Warshall - SPFA (Shortest path faster algorithm)/Bellman-Ford - Dinic Flow O(V^2E) - Edmonds-Karp: Min Cost Max Flow - Hopcroft-Karp matching (max-cardinality bipartite matching/MCBM) - Strongly connected component (SCC): Tarjan's algorithm - Common Techniques - Euler tour compression - Heavy-light decomposition (HLD) - Lowest Common Ancestor (LCA) - Euler tour method: O(log n) query - Depth method: O(log n) query - Sparse table: O(1) query but long - Centroid decomposition: solving for all paths crossing current centroid 4. Data structures - Sparse table - Convex hull trick (CHT) - Dynamic version: O(log n) query - Offline version: O(1) query 5. Maths - Combinatorics - Modular operations: Add, mult, inverse, binary exponentiation, binomial coefficients, factorials - getpf(): O(sqrt(n)) prime factorization - Matrix exponentiation - Number theory 6. Square root decomposition/Mo's algorithm 7. Fast Fourier Transform (FFT) 8. Miscellaneous - Randomizer (Mersenne prime twister, mt19937) - unordered_map/hash map custom hash (http://xorshift.di.unimi.it/splitmix64.c) - Binary converter: print numbers in binary - Grid movement: 4/8 directions - Nearest pair of points
评论
    相关推荐