Each query adds 1 to a range of indices. Report every index's final count — then find the first query after which no index is left at zero.
Each query adds 1 to a range of indices. Report every index's final count — then find the first query after which no index is left at zero.
Opens with the full question.