Skip to content

GabrielCFormiga/Competitive-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

127 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Competitive Programming

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.

Judges

This repository contains solutions from the following online judges:

Contests

Problem Set


Binary Search

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

Bitmask

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

Brute Force

Problem Category Difficulty
Coprime Number Theory 🟒 Easy
250 Thousand Tons of TNT Number Theory 🟒 Easy
Perfect Number Greedy 🟒 Easy

Data Structures

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

Disjoint Sets Union

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

Dynamic Programming

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

Graphs

Problem Category Difficulty
Coronavirus Spread BFS 🟒 Easy

Math

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

Number Theory

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

Prefix Sums

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

Two Pointers Method

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

Strings

Problem Category Difficulty
String Task Implementation 🟒 Easy
ABCBA Implementation 🟒 Easy
Chat room Greedy 🟒 Easy
Lucky Substring Brute Force 🟒 Easy

About

Competitive Programming - Problem solutions from online judges mapped by topics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages