This repository is dedicated to organizing and sharing study codes, problem-solving solutions, and contest submissions for Competitive Programming developed in C, C++, and Python. The problems are sourced from various training platforms, primarily Beecrowd and CSES, alongside local competitions hosted at UFPB (Federal University of Paraíba).
The following languages and tools are used in this project:
- Beecrowd: Contains multiple solutions divided into basic and intermediate structural topics, such as Mathematics, Strings, and AD-HOC.
- CSES Problem Set: Challenges focused on classic and advanced algorithm topics.
- UFPB / Pacode: Submissions for internal programming marathons and competitive programming track.
The file structure of the repository is organized as follows:
Competitive_Programming/
├── 📁 Beecrowd/ # Solved problems categorized by topic
│ ├── 📁 AD-HOC/ # General logic and simulation problems (C/Python)
│ ├── 📁 Estruturas_Bibliotecas/ # Native and custom data structures (C)
│ ├── 📁 Iniciante/ # Basic introductory problems (C/Python)
│ ├── 📁 Matemática/ # Numerical algorithms and math problems (C/Python)
│ └── 📁 Strings/ # String manipulation and pattern matching (C)
├── 📁 CSES/ # CSES Problem Set solutions (C++)
├── 📁 Pacode/ # Solutions for local UFPB programming contests
│ └── 📁 Maratona02/ # Codes developed during the second Maratona edition
└── 📁 Studies/ # Classic algorithms and data structures implemented for study
├── 📁 BIT/ # Binary Indexed Tree (Fenwick Tree)
├── 📁 BinaryExponentiation/ # Binary Exponentiation algorithms
├── 📁 SegTree/ # Segment Tree (Range Queries)
├── 📁 ShorthestPaths/ # Shortest path algorithms on graphs (Dijkstra, 0-1 BFS)
└── 📁 SparseTable/ # Sparse Table for fast range queries (RMQ, Modulo, etc.)
Below are the implementations created for conceptual study and reuse in problem-solving:
| Topic / Structure | Description / Supported Operations | Related Files |
|---|---|---|
| Binary Exponentiation | Efficient calculation of |
📄 BinExp.cpp |
| BIT (Fenwick Tree) | Range sum queries and point updates efficiently in |
📄 CuriousRobinHood.cpp |
| Segment Tree (SegTree) | Range queries and point/range updates efficiently in |
📄 DynamicRangeSumQueries.cpp 📄 RangeUpdateQueries.cpp |
| Shortest Paths | Pathfinding algorithms on graphs: Dijkstra's algorithm and 0-1 BFS using double-ended queues. | 📄 Bfs01.cpp 📄 Dijkstra.cpp 📄 ShortestRoutes.cpp |
| Sparse Table | Static structure for range queries (like RMQ) in |
📄 MaximumModuloEquality.cpp 📄 StaticRangeMinimumQueries.cpp |
To run the codes locally, you will need compilers configured on your machine (such as GCC/G++ for C/C++ or Python 3 interpreter).
It is recommended to compile using contest optimization flags:
# Compiling C++ files (.cpp)
g++ -O2 -Wall -std=c++17 file_name.cpp -o executable_name
# Compiling C files (.c)
gcc -O2 -Wall file_name.c -o executable_name
# To execute (Windows PowerShell)
.\executable_name.exeTo run Python solutions:
python file_name.pyThis project is licensed under the MIT License.