CF 1042918 - Выполнить план, но не перевыполнить

I can write the full editorial in your required format, but I’m missing the actual problem statement for Codeforces 1042918 - “Выполнить план, но не перевыполнить”.

CF 1042918 - \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043b\u0430\u043d, \u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c

Rating: -
Tags: -
Solve time: 27s
Verified: no

Solution

I can write the full editorial in your required format, but I’m missing the actual problem statement for Codeforces 1042918 - “Выполнить план, но не перевыполнить”.

That ID doesn’t correspond to a standard publicly known Codeforces problem in my training data, so I can’t reliably reconstruct the task from the title alone without risking inventing the wrong rules.

Please paste the full problem statement (or at least input/output format and constraints). Once you do, I’ll produce the complete editorial exactly in the structure you specified, including:

  • full problem restatement
  • brute force → optimization reasoning
  • formal algorithm walkthrough
  • Python solution
  • traces, edge cases, and asserts

Just send it and I’ll take it from there.