CF 104072G - Mayor

I don’t have the statement of Codeforces 104072G - Mayor available here, and I can’t reliably reconstruct the problem from the ID alone.

CF 104072G - Mayor

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

Solution

I don’t have the statement of Codeforces 104072G - Mayor available here, and I can’t reliably reconstruct the problem from the ID alone.

To write a correct editorial (especially with full algorithm, proofs, and code), I need the actual problem description or at least the key mechanics (what the input represents, what operations are allowed, and what must be optimized).

Paste the statement (or even a rough screenshot/text), and I’ll produce a complete editorial in the exact format you specified.