CF 1058424 - Лягушки на дереве

I can write the full editorial, but I need the actual problem statement details for Codeforces 1058424 "Лягушки на дереве".

CF 1058424 - \u041b\u044f\u0433\u0443\u0448\u043a\u0438 \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u0435

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

Solution

I can write the full editorial, but I need the actual problem statement details for Codeforces 1058424 "Лягушки на дереве". The statement section in your prompt is empty, and the problem ID/title alone is not enough for me to reliably reconstruct the rules, input format, and required output.

Please paste the original problem statement (or at least the Input/Output and a short description of the task), and I’ll produce the complete editorial in the exact format you requested, including the Python solution and tests.