Welcome to my Competitive Programming repository! This collection includes implementations of various algorithms relevant to Competitive Programming (CP) and my submissions to online judges. Whether you're a beginner looking to learn new algorithms or an experienced coder seeking efficient implementations, this repository aims to be a valuable resource for your CP journey.
The code
directory is organized into various subdirectories, each focusing on a specific category of algorithms. Here's a breakdown of the available algorithms:
- Bitree
- Bitree2D
- Block Set
- Disjoint Sparse Table
- Dsu
- Dsu Max
- Fdeque
- Fqueue
- Fstack
- K Majority
- Merge Sort Tree
- Merge Sort Tree Bit
- Mex
- Multi Vector
- Ordered Set
- Persistent Segtree
- Prefix Sum2D
- Segtree
- Segtree Lazy
- Sparse Segtree
- Sparse Table
- Sparse Table2D
- Treap
- Trie
- Wavelet Tree
- Xor Trie
- 2D
- Circle
- Closest Pair Of Points
- Convex Hull
- Convex Hull Trick
- Halfplane Intersection
- Lattice Points
- Lichao Tree
- Line
- Orientation
- Point
- Polygon
- Segment
- 2 Sat
- Bellman Ford
- Bfs
- Binary Lifting
- Bipartite Matching
- Block Cut Tree
- Bridge Components
- Bridge Finder
- Centroid
- Centroid Decomposition
- Check Bipartite
- Check Isomorphic
- Cycles
- Dfs Tree
- Dijkstra
- Dijkstra Ways
- Dominator Tree
- Dynamic Connectivity
- Edge Cover Min Cost
- Euler Path
- Find Articulations
- Find Bridges
- Floyd Warshall
- Functional Graph
- Girth
- Graph
- Graph Traverse
- Gridgraph
- Heavy Light Decomposition
- Kruskal
- Lca Sparse Table
- Maxflow
- Min Cost Flow
- Reconstruct Path
- Small To Large
- Strongly Connected Componenets
- Successor Graph
- Topological Order
- Tree Diameter
- Tree Flatten
- Virtual Tree
- Combination Dp
- Combination Fact
- Count Divisors
- Crt
- Divisors
- Extended Gcd
- Factor
- Fft
- Find Any Solution
- Fpow
- Gaussian Elimination
- Guess Kth Term
- Inv Gcd
- Is Prime
- Kth Fibonacci
- Max Prime Dp
- Mobius
- Ntt
- Phi
- Phi Dp
- Popcount
- Sieve
- Area Of Union Of Rectangles
- Inversion Count
- Min Inversion Permutation
- Mo S Algorithm
- Number Of Elements Greater Than K
- Permute Permutation
- Anagram Index
- Hash String
- Kmp
- Longest Palindrome
- Min Cyclic String
- Rabin Karp
- Str
- Suffix Array
- Suffix Automaton
- Z Function
The submissions
directory holds my accepted submissions to different online judges. Each problem is labeled with its respective judge and problem ID.
Reviewing these submissions can provide insights into different problem-solving techniques, optimization strategies, and coding styles. It's a great way to learn from both successful and unsuccessful attempts.
- AtCoder
- Beecrowd
- CSES
- CodeChef
- CodeForces
- Gym
- HDU
- ICPC
- 2010-2011 ACM-ICPC Brazil Subregional Programming Contest
- 2013-2014 ACM-ICPC Brazil Subregional Programming Contest
- 2014-2015 ACM-ICPC Brazil Subregional Programming Contest
- 2017-2018 ACM-ICPC Brazil Subregional Programming Contest
- 2017-2018 ACM-ICPC Latin American Regional Programming Contest
- 2018-2019 ACM-ICPC Brazil Subregional Programming Contest
- 2019-2020 ACM-ICPC Brazil Regional Programming Contest
- 2019-2020 ACM-ICPC Brazil Subregional Programming Contest
- 2020-2021 ACM-ICPC Brazil Regional Programming Contest
- 2020-2021 ACM-ICPC Brazil Subregional Programming Contest
- 2021-2022 ACM-ICPC Brazil Regional Programming Contest
- 2021-2022 ACM-ICPC Brazil Subregional Programming Contest
- 2022-2023 ACM-ICPC Brazil Regional Programming Contest
- 2022-2023 ACM-ICPC Brazil Subregional Programming Contest
- 2023-2024 ACM-ICPC Brazil Regional Programming Contest
- 2023-2024 ACM-ICPC Brazil Subregional Programming Contest
- IEEEXtreme
- QOJ
- SPOJ
- UVA
- Yosupo
If you find a bug or want to add a new algorithm, feel free to open an issue or submit a pull request. I'm always looking to improve my code!
- Obs 1: If you want to add a new algorithm, please make sure to include a link to the problems you used to test it.
- Obs 2: You don't need to add a new algorithm to the README. The script
generate_readme.py
will do it for you.
Enhance your Competitive Programming skills with the following valuable resources:
- TEP
- Algorithms for Competitive Programming
- USACO Guide
- Competitive Programing Book
- Competitive Programmer's Handbook
Explore additional repositories with extensive algorithm implementations: