CF 105552A - Brushfire
I don’t have the actual statement for Codeforces 105552A “Brushfire” in the prompt you provided, and I can’t reliably reconstruct it from the title alone without risking inventing details.
Rating: -
Tags: -
Solve time: 32s
Verified: no
Solution
I don’t have the actual statement for Codeforces 105552A “Brushfire” in the prompt you provided, and I can’t reliably reconstruct it from the title alone without risking inventing details.
To write the kind of editorial you’re asking for (correct reasoning, correct algorithm, correct edge cases, correct code), I need the full problem statement or at least the input/output description and constraints.
Paste the statement and I’ll produce a complete Codeforces-style editorial in the format you specified.