<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Competitive Programming on Priyanshu Debnath</title><link>https://priyanshudebnath.me/tags/competitive-programming/</link><description>Recent content in Competitive Programming on Priyanshu Debnath</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 26 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://priyanshudebnath.me/tags/competitive-programming/feed.xml" rel="self" type="application/rss+xml"/><item><title>Scan From Both Ends: How One Line Took My Divide and Conquer From TLE to AC</title><link>https://priyanshudebnath.me/posts/scan-from-both-ends/</link><pubDate>Sat, 26 Sep 2026 00:00:00 +0000</pubDate><guid>https://priyanshudebnath.me/posts/scan-from-both-ends/</guid><description>My solution to Vlad, Misha and Two Arrays was correct and still got TLE on test 14. The fix was to check the split candidates in the order l, r, l+1, r-1, ... instead of left to right. Here is why that one change turns O(n²) into O(n log n).</description></item><item><title>Bin Packing — Why It's Hard, How to Approximate It, and When It Isn't Hard At All</title><link>https://priyanshudebnath.me/posts/bin-packing-np-hardness-approximation-algorithms/</link><pubDate>Tue, 07 Jul 2026 00:00:00 +0000</pubDate><guid>https://priyanshudebnath.me/posts/bin-packing-np-hardness-approximation-algorithms/</guid><description>A full pass through bin packing — the formal problem, why the decision version is NP-complete (and why the optimization version is strongly so), every classical approximation algorithm with its proven bound, the special cases that collapse back to polynomial time, and the backtracking/bitmask-DP techniques you&amp;#39;d actually use to solve small instances in a contest.</description></item><item><title>Why My PBDS ordered_multiset Solution TLE'd (and the Fenwick Fix)</title><link>https://priyanshudebnath.me/posts/pbds-vs-fenwick-cache-tle/</link><pubDate>Sun, 05 Jul 2026 00:00:00 +0000</pubDate><guid>https://priyanshudebnath.me/posts/pbds-vs-fenwick-cache-tle/</guid><description>My approach to Zhily and Barknights was correct from the start, but the PBDS ordered_multiset implementation TLE&amp;#39;d twice. This post covers how Red-Black trees and order statistics work, and why a Fenwick tree passed instead.</description></item></channel></rss>