This repository contains my solutions to competitive programming problems solved on various online judges.
The structure of the repository is simple: each folder is named according to the corresponding online judge, and the solution files are organized by the problem name, with links to the original sources.
Additionally, most problems are mapped by topic and can be easily accessed in the Problem Set.
I have categorized the problems as easy, medium, or hard based on my own perspective. While these classifications are subjective, they aim to reflect the effort and thought required to solve each problem. Sometimes, a problem that could be tagged as easy is actually medium or hard, as it involves recognizing properties that may not be immediately obvious.
This repository contains solutions from the following online judges:
Aizu
AtCoder
CSAcademy
CSES
CodeChef
Codeforces
HackerEarth
HackerRank
Kattis
LeetCode
LightOJ
SPOJ
Timus
USACO
UVa
- I SBC SΓ£o Paulo Programming Marathon
- SBC Brazilian Phase Zero 2025
- 2022 ICPC Gran Premio de Mexico 1ra Fecha
- 2023 Argentinian Programming Tournament (TAP)
- 2024 Argentinian Programming Tournament (TAP)
- 2025 Argentinian Programming Tournament (TAP)
- 2025-2026 ICPC NERC, Kyrgyzstan Qualification Contest
- 2025-2026 ICPC, NERC, Northern Eurasia Finals
- Binary Search
- Bitmask
- Brute Force
- Data Structures
- Disjoint Sets Union
- Dynamic Programming
- Graphs
- Math
- Number Theory
- Prefix Sums
- Two Pointers Method
- Strings
| Problem | Category | Difficulty |
|---|---|---|
| Binary Search | Array Search | π’ Easy |
| Closest to the left | Array Search | π’ Easy |
| Closest to the right | Array Search | π’ Easy |
| Fast Search | Array Search | π΅ Medium |
| Truck Driver | Lower/Upper Bound | π΅ Medium |
| Interesting drink | Search for Valid Answers | π’ Easy |
| Packing Rectangles | Search for Valid Answers | π’ Easy |
| Very Easy Task | Search for Valid Answers | π’ Easy |
| Students Councils | Search for Valid Answers | π΅ Medium |
| Magic Powder - 1 | Search for Valid Answers | π΅ Medium |
| Children Holiday | Search for Valid Answers | π΄ Hard |
| String Game | Search for Valid Answers | π΄ Hard |
| Hamburguer | Search for Valid Answers | π΄ Hard |
| Ropes | Search with Real Numbers | π’ Easy |
| Equation | Search with Real Numbers | π΅ Medium |
| Solve it! | Search with Real Numbers | π΄ Hard |
| Get together | Minmax | π’ Easy |
| Splitting an Array | Minmax | π’ Easy |
| March Rain | Minmax | π΅ Medium |
| Cows in Stalls | Minmax | π΅ Medium |
| Minimum maximum on the Path | Minmax | π΄ Hard |
| Maximum Average Segment | Maximum Average | π’ Easy |
| Pair Selection | Maximum Average | π’ Easy |
| Minimum Average Path | Minimum Average | π΄ Hard |
| K-th Number in the Union of Segments | Finding the K-th Element | π’ Easy |
| Multiplication Table | Finding the K-th Element | π΅ Medium |
| K-th Sum | Finding the K-th Element | π΅ Medium |
| Problem | Category | Difficulty |
|---|---|---|
| Bit Operation I | Bit Manipulation | π’ Easy |
| Bit Operation II | Bit Manipulation | π’ Easy |
| Bit Flag | Bit Manipulation | π’ Easy |
| Bit Mask | Bit Manipulation | π’ Easy |
| XOR World | Bit Manipulation | π’ Easy |
| Serval and The Formula | Bit Manipulation | π’ Easy |
| Bits | Bit Manipulation | π΅ Medium |
| XOR Guessing | Bit Manipulation | π΅ Medium |
| Enumeration of Subsets I | Submask Enumeration | π’ Easy |
| Enumeration of Subsets II | Submask Enumeration | π’ Easy |
| Enumeration of Subsets III | Submask Enumeration | π’ Easy |
| Enumeration of Combinations | Submask Enumeration | π’ Easy |
| Little Girl and Maximum XOR | Greedy | π΅ Medium |
| And Or | Greedy | π΅ Medium |
| XOR Emergence | Dynamic programming | π’ Easy |
| Hackers' Crackdown | Dynamic programming | π΅ Medium |
| Problem | Category | Difficulty |
|---|---|---|
| Coprime | Number Theory | π’ Easy |
| 250 Thousand Tons of TNT | Number Theory | π’ Easy |
| Perfect Number | Greedy | π’ Easy |
| Problem | Category | Difficulty |
|---|---|---|
| Bad Sequence | Greedy | π’ Easy |
| Uniqueness | Greedy | π’ Easy |
| Cumulative Sum Query | Prefix Sums/BIT/Segtree | π’ Easy |
| Potentiometers | BIT/Segtree | π’ Easy |
| Inversion Count | BIT/Segtree | π’ Easy |
| Curious Robin Hood | BIT/Segtree | π’ Easy |
| Points in Rectangle | BIT2D/Segtree2D | π’ Easy |
| Card Trick | BIT + K-th | π΅ Medium |
| Sliding Window Minimum | Minimum Queue | π’ Easy |
| Queries with Fixed Length | Minimum Queue | π’ Easy |
| Nearest Smaller Values | Monotonic Stack | π’ Easy |
| Advertisement | Monotonic Stack | π΅ Medium |
| Minimum Sum | Monotonic Stack | π΅ Medium |
| Sum of Subarray Minimums | Monotonic Stack | π΄ Hard |
| Imbalanced Array | Monotonic Stack | π΅ Medium |
| Static Range Minimum Queries | Sparse Table | π’ Easy |
| Maximum modulo equality | Sparse Table | π’ Easy |
| Iva & Pav | Sparse Table | π’ Easy |
| Problem | Category | Difficulty |
|---|---|---|
| Disjoint Sets Union | Disjoint Sets Union | π’ Easy |
| Disjoint Sets Union 2 | Disjoint Sets Union | π’ Easy |
| Experience | Disjoint Sets Union | π΅ Medium |
| War | Disjoint Sets Union | π΄ Hard |
| Cutting a graph | Offline Deletion | π΅ Medium |
| Anansi's Cobweb | Offline Deletion | π΅ Medium |
| People are leaving | Merge Segments | π’ Easy |
| Parking | Merge Segments | π’ Easy |
| Restructuring Company | Merge Segments | π΅ Medium |
| Problem | Category | Difficulty |
|---|---|---|
| Robot Customize | Knapsack Variation | π’ Easy |
| Book Shop | Knapsack | π’ Easy |
| Minimizing Coins | Min DP | π’ Easy |
| Removing Digits | Min DP | π’ Easy |
| Dice Combinations | Arrangement Count | π’ Easy |
| Coin Combinations I | Arrangement Count | π’ Easy |
| Coin Combinations II | Combination Count | π’ Easy |
| Grid Paths I | Upper/Left DP on Grid | π’ Easy |
| Array Description | Propagation DP | π’ Easy |
| Counting Towers | Propagation DP | π’ Easy |
| Edit Distance | Top Down DP | π’ Easy |
| Longest Common Subsequence | Top Down DP | π’ Easy |
| Problem | Category | Difficulty |
|---|---|---|
| Coronavirus Spread | BFS | π’ Easy |
| Problem | Category | Difficulty |
|---|---|---|
| Buy a Shovel | Implementation | π’ Easy |
| Is your horseshoe on the other hoof? | Implementation | π’ Easy |
| Young Physicist | Implementation | π’ Easy |
| Shell Game | Implementation | π’ Easy |
| Expression | Brute Force | π’ Easy |
| Removal of a Sequence (Hard Version) | Implementation + Number Theory | π΄ Hard |
| Problem | Category | Difficulty |
|---|---|---|
| Lucky Division | Brute Force | π’ Easy |
| 2^a b^2 | Implementation | π’ Easy |
| Medium Factorization | Prime Factorization | π’ Easy |
| Simple Repetition | Prime Factorization | π’ Easy |
| Ringo's Favorite Numbers 3 | Prime Factorization | π’ Easy |
| Soldier and Number Game | Prime Factorization | π΅ Medium |
| Simple Sum | Prime Factorization | π΄ Hard |
| Problem | Category | Difficulty |
|---|---|---|
| Find Pivot Index | Target Sum | π’ Easy |
| Subarray Sums II | Target Sum | π’ Easy |
| Subarray Divisibility | Target Divisibility | π’ Easy |
| Forest Queries | 2D Prefix Sums | π’ Easy |
| Problem | Category | Difficulty |
|---|---|---|
| Merging Arrays | Two Pointers Method | π’ Easy |
| Number of Smaller | Two Pointers Method | π’ Easy |
| Number of Equal | Two Pointers Method | π’ Easy |
| Counting Kangaroos is Fun | Two Pointers Method | π’ Easy |
| Subarray Sums I | Segment with good sum | π’ Easy |
| Books | Segment with good sum | π’ Easy |
| Segment with Big Sum | Segment with good sum | π’ Easy |
| Number of Segments with Small Sum | Segment with good sum | π’ Easy |
| Number of Segments with Big Sum | Segment with good sum | π’ Easy |
| Problem | Category | Difficulty |
|---|---|---|
| String Task | Implementation | π’ Easy |
| ABCBA | Implementation | π’ Easy |
| Chat room | Greedy | π’ Easy |
| Lucky Substring | Brute Force | π’ Easy |