├── .gitignore ├── README.md ├── data ├── bstnode.cpp ├── disjointsparsetable.cpp ├── dsu.cpp ├── fenwick.cpp ├── fenwick2d.cpp ├── fenwicknode.cpp ├── hashmap.cpp ├── linkcut.cpp ├── pbds.cpp ├── queue.cpp ├── segtree.cpp ├── sparsetable.cpp ├── splay.cpp └── treap.cpp ├── flows ├── blossom.cpp ├── dinic-edge-ids.cpp ├── dinic-old.cpp ├── dinic.cpp ├── fastflow-other.cpp ├── fastflow.cpp ├── flow_decomposition.cpp ├── flow_graph.cpp ├── gomory_hu-old.cpp ├── gomory_hu.cpp ├── hungarian-arrays.cpp ├── hungarian.cpp ├── matching.cpp ├── mcmf-slow.cpp ├── mcmf.cpp └── mincut.cpp ├── generate_snippets.py ├── geometry └── point.cpp ├── graph ├── bicone.cpp ├── biconv.cpp ├── bridges.cpp ├── centroid.cpp ├── cutpoints.cpp ├── cycles.cpp ├── dfs_digraph_useless.cpp ├── dfs_forest.cpp ├── dfs_undigraph.cpp ├── digraph.cpp ├── dijkstra-set.cpp ├── dijkstra.cpp ├── dominators.cpp ├── eulerian.cpp ├── forest.cpp ├── graph.cpp ├── hld_forest.cpp ├── hld_forest_old.cpp ├── lca_forest.cpp ├── mst.cpp ├── scc.cpp ├── topsort.cpp ├── tree_dp.cpp ├── twosat.cpp └── undigraph.cpp ├── keybindings.json ├── misc ├── debug.cpp ├── fastinput.cpp ├── fastoutput.cpp ├── lis.cpp ├── pragma.cpp ├── radix.cpp └── rng.cpp ├── numeric ├── bm.cpp ├── extgcd.cpp ├── factorizer.cpp ├── fft.cpp ├── fwht.cpp ├── gauss.cpp ├── matrix.cpp ├── mint.cpp ├── ntt.cpp ├── poly.cpp ├── primitive.cpp ├── simplex.cpp └── sparsematrix.cpp ├── segtree ├── dynamic_fenwick.cpp ├── dynamic_lazy.cpp ├── dynamic_simple.cpp ├── info.cpp ├── layout.cpp ├── lazy.cpp ├── simple.cpp └── tag.cpp ├── settings.json ├── string ├── duval.cpp ├── duval_prefixes.cpp ├── hash61.cpp ├── kmp.cpp ├── manacher.cpp ├── suffix_array.cpp └── z.cpp └── template ├── hc.cpp ├── multithreaded.cpp ├── multithreaded2.cpp ├── q1.cpp └── qt.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | cpp.json 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # algo -------------------------------------------------------------------------------- /data/bstnode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/bstnode.cpp -------------------------------------------------------------------------------- /data/disjointsparsetable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/disjointsparsetable.cpp -------------------------------------------------------------------------------- /data/dsu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/dsu.cpp -------------------------------------------------------------------------------- /data/fenwick.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/fenwick.cpp -------------------------------------------------------------------------------- /data/fenwick2d.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/fenwick2d.cpp -------------------------------------------------------------------------------- /data/fenwicknode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/fenwicknode.cpp -------------------------------------------------------------------------------- /data/hashmap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/hashmap.cpp -------------------------------------------------------------------------------- /data/linkcut.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/linkcut.cpp -------------------------------------------------------------------------------- /data/pbds.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/pbds.cpp -------------------------------------------------------------------------------- /data/queue.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/queue.cpp -------------------------------------------------------------------------------- /data/segtree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/segtree.cpp -------------------------------------------------------------------------------- /data/sparsetable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/sparsetable.cpp -------------------------------------------------------------------------------- /data/splay.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/splay.cpp -------------------------------------------------------------------------------- /data/treap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/data/treap.cpp -------------------------------------------------------------------------------- /flows/blossom.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/blossom.cpp -------------------------------------------------------------------------------- /flows/dinic-edge-ids.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/dinic-edge-ids.cpp -------------------------------------------------------------------------------- /flows/dinic-old.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/dinic-old.cpp -------------------------------------------------------------------------------- /flows/dinic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/dinic.cpp -------------------------------------------------------------------------------- /flows/fastflow-other.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/fastflow-other.cpp -------------------------------------------------------------------------------- /flows/fastflow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/fastflow.cpp -------------------------------------------------------------------------------- /flows/flow_decomposition.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/flow_decomposition.cpp -------------------------------------------------------------------------------- /flows/flow_graph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/flow_graph.cpp -------------------------------------------------------------------------------- /flows/gomory_hu-old.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/gomory_hu-old.cpp -------------------------------------------------------------------------------- /flows/gomory_hu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/gomory_hu.cpp -------------------------------------------------------------------------------- /flows/hungarian-arrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/hungarian-arrays.cpp -------------------------------------------------------------------------------- /flows/hungarian.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/hungarian.cpp -------------------------------------------------------------------------------- /flows/matching.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/matching.cpp -------------------------------------------------------------------------------- /flows/mcmf-slow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/mcmf-slow.cpp -------------------------------------------------------------------------------- /flows/mcmf.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/mcmf.cpp -------------------------------------------------------------------------------- /flows/mincut.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/flows/mincut.cpp -------------------------------------------------------------------------------- /generate_snippets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/generate_snippets.py -------------------------------------------------------------------------------- /geometry/point.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/geometry/point.cpp -------------------------------------------------------------------------------- /graph/bicone.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/bicone.cpp -------------------------------------------------------------------------------- /graph/biconv.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/biconv.cpp -------------------------------------------------------------------------------- /graph/bridges.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/bridges.cpp -------------------------------------------------------------------------------- /graph/centroid.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/centroid.cpp -------------------------------------------------------------------------------- /graph/cutpoints.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/cutpoints.cpp -------------------------------------------------------------------------------- /graph/cycles.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/cycles.cpp -------------------------------------------------------------------------------- /graph/dfs_digraph_useless.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/dfs_digraph_useless.cpp -------------------------------------------------------------------------------- /graph/dfs_forest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/dfs_forest.cpp -------------------------------------------------------------------------------- /graph/dfs_undigraph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/dfs_undigraph.cpp -------------------------------------------------------------------------------- /graph/digraph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/digraph.cpp -------------------------------------------------------------------------------- /graph/dijkstra-set.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/dijkstra-set.cpp -------------------------------------------------------------------------------- /graph/dijkstra.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/dijkstra.cpp -------------------------------------------------------------------------------- /graph/dominators.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/dominators.cpp -------------------------------------------------------------------------------- /graph/eulerian.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/eulerian.cpp -------------------------------------------------------------------------------- /graph/forest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/forest.cpp -------------------------------------------------------------------------------- /graph/graph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/graph.cpp -------------------------------------------------------------------------------- /graph/hld_forest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/hld_forest.cpp -------------------------------------------------------------------------------- /graph/hld_forest_old.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/hld_forest_old.cpp -------------------------------------------------------------------------------- /graph/lca_forest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/lca_forest.cpp -------------------------------------------------------------------------------- /graph/mst.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/mst.cpp -------------------------------------------------------------------------------- /graph/scc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/scc.cpp -------------------------------------------------------------------------------- /graph/topsort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/topsort.cpp -------------------------------------------------------------------------------- /graph/tree_dp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/tree_dp.cpp -------------------------------------------------------------------------------- /graph/twosat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/twosat.cpp -------------------------------------------------------------------------------- /graph/undigraph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/graph/undigraph.cpp -------------------------------------------------------------------------------- /keybindings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/keybindings.json -------------------------------------------------------------------------------- /misc/debug.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/debug.cpp -------------------------------------------------------------------------------- /misc/fastinput.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/fastinput.cpp -------------------------------------------------------------------------------- /misc/fastoutput.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/fastoutput.cpp -------------------------------------------------------------------------------- /misc/lis.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/lis.cpp -------------------------------------------------------------------------------- /misc/pragma.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/pragma.cpp -------------------------------------------------------------------------------- /misc/radix.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/radix.cpp -------------------------------------------------------------------------------- /misc/rng.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/misc/rng.cpp -------------------------------------------------------------------------------- /numeric/bm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/bm.cpp -------------------------------------------------------------------------------- /numeric/extgcd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/extgcd.cpp -------------------------------------------------------------------------------- /numeric/factorizer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/factorizer.cpp -------------------------------------------------------------------------------- /numeric/fft.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/fft.cpp -------------------------------------------------------------------------------- /numeric/fwht.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/fwht.cpp -------------------------------------------------------------------------------- /numeric/gauss.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/gauss.cpp -------------------------------------------------------------------------------- /numeric/matrix.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/matrix.cpp -------------------------------------------------------------------------------- /numeric/mint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/mint.cpp -------------------------------------------------------------------------------- /numeric/ntt.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/ntt.cpp -------------------------------------------------------------------------------- /numeric/poly.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/poly.cpp -------------------------------------------------------------------------------- /numeric/primitive.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/primitive.cpp -------------------------------------------------------------------------------- /numeric/simplex.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/simplex.cpp -------------------------------------------------------------------------------- /numeric/sparsematrix.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/numeric/sparsematrix.cpp -------------------------------------------------------------------------------- /segtree/dynamic_fenwick.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/dynamic_fenwick.cpp -------------------------------------------------------------------------------- /segtree/dynamic_lazy.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/dynamic_lazy.cpp -------------------------------------------------------------------------------- /segtree/dynamic_simple.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/dynamic_simple.cpp -------------------------------------------------------------------------------- /segtree/info.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/info.cpp -------------------------------------------------------------------------------- /segtree/layout.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/layout.cpp -------------------------------------------------------------------------------- /segtree/lazy.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/lazy.cpp -------------------------------------------------------------------------------- /segtree/simple.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/simple.cpp -------------------------------------------------------------------------------- /segtree/tag.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/segtree/tag.cpp -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/settings.json -------------------------------------------------------------------------------- /string/duval.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/duval.cpp -------------------------------------------------------------------------------- /string/duval_prefixes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/duval_prefixes.cpp -------------------------------------------------------------------------------- /string/hash61.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/hash61.cpp -------------------------------------------------------------------------------- /string/kmp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/kmp.cpp -------------------------------------------------------------------------------- /string/manacher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/manacher.cpp -------------------------------------------------------------------------------- /string/suffix_array.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/suffix_array.cpp -------------------------------------------------------------------------------- /string/z.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/string/z.cpp -------------------------------------------------------------------------------- /template/hc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/template/hc.cpp -------------------------------------------------------------------------------- /template/multithreaded.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/template/multithreaded.cpp -------------------------------------------------------------------------------- /template/multithreaded2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/template/multithreaded2.cpp -------------------------------------------------------------------------------- /template/q1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/template/q1.cpp -------------------------------------------------------------------------------- /template/qt.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-tourist/algo/HEAD/template/qt.cpp --------------------------------------------------------------------------------