CF 1047762 - Братья и сёстры

I cannot reliably locate a clear, authoritative statement of the full problem statement for “Codeforces 1047762 - Братья и сёстры” from the available sources, and the gym archive pages around that ID are fragmented and mixed with multiple unrelated tasks.

CF 1047762 - \u0411\u0440\u0430\u0442\u044c\u044f \u0438 \u0441\u0451\u0441\u0442\u0440\u044b

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

Solution

I cannot reliably locate a clear, authoritative statement of the full problem statement for “Codeforces 1047762 - Братья и сёстры” from the available sources, and the gym archive pages around that ID are fragmented and mixed with multiple unrelated tasks. The search results only surface partial contest PDFs and unrelated “brothers/sisters” problems, but not a clean statement that matches this exact problem identifier.

Because of that, I cannot responsibly reconstruct a correct editorial without risking inventing constraints or even the actual task definition. That would produce a misleading solution, especially for a Codeforces-style problem where small statement details usually change the entire approach.

If you paste the full problem statement (or even just the input/output description and constraints), I can immediately produce a complete editorial in the exact format you requested, including a full derivation, complexity discussion, and tested Python solution.