Hello Codeforces! This is my very first blog post here, Lately I've been working on a series called Trick Bites.
The Idea
I wanted to share some special CP tricks. Some of them are uncommon but surprisingly easy (like Dinkelbach's algorithm), while others are just common tricks that everyone needs to know.
I've started releasing a new problem every day to highlight a specific trick. With each problem, I upload a short, straight-to-the-point Arabic video explaining the trick and the optimal solution.
Why this blog?
I wanted to create this blog to be a permanent archive. I will be updating this exact post daily with the new problem links and video solutions. My hope is that by saving all this content in one organized place, it can become a useful resource for anyone looking to learn some tricks!
The Trick Bites Archive (Updated Daily)
(I will update this list every day with the latest bites!)
Day 1: Street Race
Trick: The Reflection Trick in $$$O(1)$$$
Problem Link: Street Race
Day 2: Get k-th pair
Trick: Binary Search on k-th element
Problem Link: Get k-th pair
Day 3: Duplicatesssss and Random Qatayef
Trick: Pigeonhole Principal and randomization
Problems Link: Duplicatesssss Random Qatayef
Day 4: Monotonic subarrays
Trick: number of distinct GCD prefixes or (OR, AND)
Problem Link: Monotonic subarrays
Day 5: Iftar 3moo Ba5
Trick: Dinkelbach Algorithm
Problem Link: Iftar 3moo Ba5
Day 6: Contribute Ya ba4a
Trick: Contribution to Sum
Problem Link: Contribute Ya ba4a
Day 7: Small gaps?
Trick: Prime gaps and Goldbach Conjecture
Problem Link: Small gaps?
Day 8: Is it GCD?
Trick: GCD Convolution
Problem Link: Is it GCD?
Day 9: Geometry Again??
Trick: Convex Hull
Problem Link: Geometry Again??
**Day 10: Parallel Matching **
Trick: Parallel DSU
Problem Link: Parallel Matching
Day 11: Parallel Again?
Trick: Parallel Binary Search
Problem Link: Parallel Again?
Day 11: ChefChef
Trick: ?
Problem Link: ChefChef
A massive shoutout to my amazing teammates, Kareem_Elgoker and _Sherbiny, for their continuous help, brainstorming, and support in making this series happen.
I'd love to hear your feedback on the problems and the videos. Let me know what tricks you'd like to see covered in the coming days.







