5146: 【52课】【3311】插队
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:71
Solved:50
Description
有n个人,每个人都有自己的编号,他们排成一个队列。现在一个编号为b的人要插到第a人(不是编号为a)后面,求插入后的队列顺序。
Input
第一行输入n,第二行输入n个数,表示原先的队伍顺序。(n≤200)
第三行输入两个数a,b。
Output
输出一行,为插入后的队列顺序。
Sample Input Copy
5
1 2 3 4 5
2 7
Sample Output Copy
1 2 7 3 4 5