CF 1049492 - Битоническая последовательность

I can’t reliably reconstruct the actual task from just the title “Битоническая последовательность” and the ID, because Codeforces has multiple problems around bitonic sequences with very different requirements (LIS-based, rearrangement…

CF 1049492 - \u0411\u0438\u0442\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c

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

Solution

I can’t reliably reconstruct the actual task from just the title “Битоническая последовательность” and the ID, because Codeforces has multiple problems around bitonic sequences with very different requirements (LIS-based, rearrangement, counting, segment queries, etc.).

Right now the statement section is empty, so any full editorial would be guesswork and likely wrong.

Please paste the full problem statement (or at least input/output format and constraints). Once I have that, I’ll write the complete Codeforces-style editorial in the exact format you requested.