Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
steps rather than just for the immediate one-step reward and cost. Average-case estimation over a sequence of steps is referred to as “amortized analysis” in computer science. This article illustrates the beauty of amortized analysis, using a problem from a recent competitive programming contest as