##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
| # | Title | Points | Solved | Admin | |
|---|---|---|---|---|---|
You are given a permutation of length .
You may perform the following operation any number of times:
Determine whether it is possible to sort the permutation in increasing order.
For each test case, output Yes if the permutation can be sorted, and No otherwise.
The output is case-insensitive. For example, YES, Yes, and yes are all accepted.
Swap the two elements. This swap is allowed because the elements are and , and the permutation becomes .
Move to the first position and then move to the last position:
.
Every displayed swap contains either or .
The value appears before . Neither of them is or , so they can never pass each other. Therefore, the permutation cannot be sorted.
Move left until it reaches the first position, then move right until it reaches the last position.
The value appears before , and neither value is a VIP. Their relative order cannot be changed.