Notes on competitive programming, machine learning, and quantitative finance by Priyanshu Debnath.
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'd actually use to solve small instances in a contest.
My approach to Zhily and Barknights was correct from the start, but the PBDS ordered_multiset implementation TLE'd twice. This post covers how Red-Black trees and order statistics work, and why a Fenwick tree passed instead.
Hi, it's my first blog. I went looking for proof that the stack and heap actually exist, and found it.
Redirecting to the blog…