-->
当前位置:首页 > 题库

PROGRAMMING:Exchange elements

Luz5年前 (2021-05-10)题库370
Exchange elements
###Input format:
The input data first contains an integer T, which represents the number of test cases, and then t groups of test data.
Each group of test data contains two lines of input. The first line is n, P, Q, where P and Q respectively represent the serial numbers of the two elements to be exchanged. The second line represents n integers of input
###Output format:
After exchanging the specified two elements, output the result
###Input example:
Here is a set of inputs. For example:
```in
two
5 1 4
1 2 3 4 5
6 1 2
2 4 6 8 0 2
```
###Output example:
The corresponding output is given here. For example:
```out
4 2 3 1 5
4 2 6 8 0 2
```







answer:If there is no answer, please comment