NOI Online 2022 Contest Solutions: Monotone Stacks, Set Systems, and Multidimensional Partial Orders

Problem 1: Stack Elimination with Color Constraints Given a sequence where each element possesses a color and value, process multiple queries. For each query $[L, R]$, simulate a monotonic stack traversal from left to right: pop the top while it is less than or equal to the current value or shares the same color. Determine how many positions wi ...

Posted on Tue, 22 Sep 2026 16:39:41 +0000 by ldb358