#P1774. 最接近神的人
最接近神的人
Output Format
Output a single integer , the minimum number of operations.
4
2 8 0 3
3
Hint
Constraints
- For of the testdata, .
- For of the testdata, , .
Sample Explanation
The initial sequence is , and the target sequence is . One way to reach the target in three operations:
- Swap , the sequence becomes .
- Swap , the sequence becomes .
- Swap , the sequence becomes .
Translated by ChatGPT 5
京公网安备 11011102002149号