Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

Really confused about the official editorial of 2128D

Revision en1, by esc_qwq, 2025-08-01 11:45:08

I have two question. Can anyone help me? Thanks very much!

  1. In the problem description, the permutation's name is $$$p$$$, but in the editorial the array's name is $$$a$$$. So what's that?

  2. If we consider $$$a$$$ as $$$p$$$. The first paragraph of the editorial shows that if we choose a subset of $$$a_i \gt a_{i+1}$$$, then the subsequence is valid. But the last paragraph of the editorial says we should count the situation that $$$a_i \lt a_{i+1}$$$. Why's that?

Sorry for my bad English. :)

bestial-42-centroids can you explain this?

I'm really need help!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English esc_qwq 2025-08-01 11:45:08 622 Initial revision (published)