~/algor $ cat problems/massiv-ikki-elementni-almashtirish
Swapping two elements
Easy
1000 ms
128 MB
31%
A positive integer $n$, an array of $n$ integers and two indices $i$ and $j$ are given. Swap the array elements at positions $i$ and $j$ and print the array.
Input
The first line contains a positive integer $n$. The second line contains $n$ integers. The third line contains $i$ and $j$.
Output
One line with $n$ integers separated by spaces.
Note
$1 \le n \le 10^{4}$
$-1000 \le a_{k} \le 1000$
$1 \le i, j \le n$
Examples
Input #1
5 1 2 3 4 5 2 5
Output #1
1 5 3 4 2
Input #2
3 9 8 7 3 1
Output #2
7 8 9