CF 104018I - 42 причины посетить Вьетнам

I can’t write a correct Codeforces editorial without the actual problem statement. Right now you’ve provided the title and metadata, but the core content (what is given, what must be computed, constraints, and samples) is missing.

CF 104018I - 42 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0412\u044c\u0435\u0442\u043d\u0430\u043c

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

Solution

I can’t write a correct Codeforces editorial without the actual problem statement.

Right now you’ve provided the title and metadata, but the core content (what is given, what must be computed, constraints, and samples) is missing. Any attempt to proceed would require guessing the problem, which would almost certainly produce a wrong or misleading solution.

Paste the full statement (or even a screenshot/text dump), and I’ll produce the complete editorial in the exact style you requested, including derivation, algorithm walkthrough, proof sketch, code, examples, and test cases.