练52.3 插队
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
There are people, each with their own ID, standing in a queue. Now, a person with ID wants to insert themselves after the -th person (not the person with ID ). Find the order of the queue after the insertion.
Input Format
The first line contains , the second line contains numbers representing the original queue order ().
The third line contains two numbers and .
Output Format
Output one line containing the order of the queue after the insertion.
Sample
5
1 2 3 4 5
2 71 2 7 3 4 5
20230913C班作业(1)
- Status
- Done
- Problem
- 6
- Open Since
- 2025-9-13 0:00
- Deadline
- 2025-9-21 23:59
- Extension
- 24 hour(s)