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)↵
[Group Link](https://mirror.codeforces.com/group/reRlOrZJrU/contests)↵
↵
*(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](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/A)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=uz9kzPgTkxY)↵
↵
**Day 2: Get k-th pair**↵
↵
* **Trick:** Binary Search on k-th element↵
↵
* **Problem Link:** [Get k-th pair](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/B)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=-3pB59mCDcw)↵
↵
**Day 3: Duplicatesssss and Random Qatayef**↵
↵
* **Trick:** Pigeonhole Principal and randomization↵
↵
* **Problems Link:** [Duplicatesssss](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/C1) [Random Qatayef](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/C2)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=iIOkokeVFA0&t)↵
↵
**Day 4: Monotonic subarrays**↵
↵
* **Trick:** number of distinct GCD prefixes or (OR, AND) ↵
↵
* **Problem Link:** [Monotonic subarrays](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/D)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=m-z495B3ZeQ&t)↵
↵
**Day 5: Iftar 3moo Ba5**↵
↵
* **Trick:** Dinkelbach Algorithm↵
↵
* **Problem Link:** [Iftar 3moo Ba5](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/E)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=QLXSC6BVGVU&t)↵
↵
**Day 6: Contribute Ya ba4a**↵
↵
* **Trick:** Contribution to Sum↵
↵
* **Problem Link:** [Contribute Ya ba4a](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/F)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=zqRwwYKXNLI)↵
↵
**Day 7: Small gaps?**↵
↵
* **Trick:** Prime gaps and Goldbach Conjecture↵
↵
* **Problem Link:** [Small gaps?](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/G)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=u7fMH7t2o8M)↵
↵
**Day 8: Is it GCD?**↵
↵
* **Trick:** GCD Convolution↵
↵
* **Problem Link:** [Is it GCD?](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/H)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=Uw5taRzr9c4&t)↵
↵
**Day 9: Geometry Again??**↵
↵
* **Trick:** Convex Hull↵
↵
* **Problem Link:** [Geometry Again??](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/I)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=EC1Y6p1IwQI)↵
↵
**Day 10: Parallel Matching **↵
↵
* **Trick:** Parallel DSU↵
↵
* **Problem Link:** [Parallel Matching](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/J)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=uNy5ZgSgVgk&t)↵
↵
**Day 11: Parallel Again?**↵
↵
* **Trick:** Parallel Binary Search↵
↵
* **Problem Link:** [Parallel Again?](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/K)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=kbdsd8MwEic)↵
↵
**Day 11: ChefChef**↵
↵
* **Trick:** ?↵
↵
* **Problem Link:** [ChefChef](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/L)↵
↵
---↵
↵
A massive shoutout to my amazing teammates, [user:Kareem_Elgoker,2026-03-12] and [user:_Sherbiny,2026-03-12], 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.
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)↵
[Group Link](https://mirror.codeforces.com/group/reRlOrZJrU/contests)↵
↵
*(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](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/A)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=uz9kzPgTkxY)↵
↵
**Day 2: Get k-th pair**↵
↵
* **Trick:** Binary Search on k-th element↵
↵
* **Problem Link:** [Get k-th pair](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/B)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=-3pB59mCDcw)↵
↵
**Day 3: Duplicatesssss and Random Qatayef**↵
↵
* **Trick:** Pigeonhole Principal and randomization↵
↵
* **Problems Link:** [Duplicatesssss](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/C1) [Random Qatayef](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/C2)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=iIOkokeVFA0&t)↵
↵
**Day 4: Monotonic subarrays**↵
↵
* **Trick:** number of distinct GCD prefixes or (OR, AND) ↵
↵
* **Problem Link:** [Monotonic subarrays](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/D)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=m-z495B3ZeQ&t)↵
↵
**Day 5: Iftar 3moo Ba5**↵
↵
* **Trick:** Dinkelbach Algorithm↵
↵
* **Problem Link:** [Iftar 3moo Ba5](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/E)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=QLXSC6BVGVU&t)↵
↵
**Day 6: Contribute Ya ba4a**↵
↵
* **Trick:** Contribution to Sum↵
↵
* **Problem Link:** [Contribute Ya ba4a](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/F)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=zqRwwYKXNLI)↵
↵
**Day 7: Small gaps?**↵
↵
* **Trick:** Prime gaps and Goldbach Conjecture↵
↵
* **Problem Link:** [Small gaps?](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/G)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=u7fMH7t2o8M)↵
↵
**Day 8: Is it GCD?**↵
↵
* **Trick:** GCD Convolution↵
↵
* **Problem Link:** [Is it GCD?](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/H)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=Uw5taRzr9c4&t)↵
↵
**Day 9: Geometry Again??**↵
↵
* **Trick:** Convex Hull↵
↵
* **Problem Link:** [Geometry Again??](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/I)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=EC1Y6p1IwQI)↵
↵
**Day 10: Parallel Matching **↵
↵
* **Trick:** Parallel DSU↵
↵
* **Problem Link:** [Parallel Matching](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/J)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=uNy5ZgSgVgk&t)↵
↵
**Day 11: Parallel Again?**↵
↵
* **Trick:** Parallel Binary Search↵
↵
* **Problem Link:** [Parallel Again?](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/K)↵
↵
* [Video Solution](https://www.youtube.com/watch?v=kbdsd8MwEic)↵
↵
**Day 11: ChefChef**↵
↵
* **Trick:** ?↵
↵
* **Problem Link:** [ChefChef](https://mirror.codeforces.com/group/reRlOrZJrU/contest/676893/problem/L)↵
↵
---↵
↵
A massive shoutout to my amazing teammates, [user:Kareem_Elgoker,2026-03-12] and [user:_Sherbiny,2026-03-12], 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.




