Introduction to Array Block Division

Array Block Division Part 1 Problem Link Range Addition, Point Query This is a fundamental template problem for array block division. For each complete block, we maintain an addition mark representing the value added to the entire block. When processing an operation range, we split it into several complete blocks and at most two incomplete bloc ...

Posted on Sat, 19 Sep 2026 16:40:53 +0000 by boardy

NOIP Simulation Contest Solutions: flandre, meirin, sakuya, scarlet

flandre The optimal selected sequence must be a contiguous suffix in the sorted array of fireworks by their "real effect" values. This is because any gap in the selection can be filled to increase the total "perceived effect". After sorting the fireworks by real effect, we compute for each position i the contribution b[i] as ...

Posted on Fri, 05 Jun 2026 18:27:24 +0000 by osnewbie2004