CF 104018B - Ограбление века

I can write the full editorial in the exact format you want, but I’m missing the actual problem statement for Codeforces 104018B - “Ограбление века”.

CF 104018B - \u041e\u0433\u0440\u0430\u0431\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0430

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

Solution

I can write the full editorial in the exact format you want, but I’m missing the actual problem statement for Codeforces 104018B - “Ограбление века”.

Right now I only have the title, and that’s not enough to reliably reconstruct the task, constraints, or intended solution. Any attempt to proceed would basically be guessing, which would make the editorial incorrect or misleading.

Paste the full problem statement (or even just the key parts: input format, what needs to be computed, constraints), and I’ll produce a complete Codeforces-style editorial in the structure you specified, including:

  • clean problem restatement
  • brute force → optimized transition
  • full algorithm walkthrough
  • Python solution
  • worked examples and edge cases
  • complexity analysis and test suite

Once you send it, I’ll turn it into a full senior-level editorial.