JOISC2017 Ticket Reservation Problem Solution
Problem Statement:
Given positive integers $n$, $m$, and $m$ triplets $(l_i, r_i, c_i)$, we have an array $a_{1..n}$ initialized with zeros.
For each operation $i = 1, ..., m$, perform the following steps:
Choose any integer $k \in [0, c_i]$.
Add $k$ to all elements $a_j$ where $j \in [l_i, r_i]$.
Add $c_i - k$ to all elements $a_j$ where $j \ ...
Posted on Tue, 09 Jun 2026 17:52:16 +0000 by adunphy