Frame-workout 1
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Replace the array elements according to the assignment.
Input
In the input file is written first, the number N (1 ≤ N ≤ 100), and then N numbers from 1 to 100 - the array elements A[i]. Further, recorded two numbers q and w (from 1 to N, not necessarily distinct).
Requires all the elements that are equal to A[q], made equal to A[w]. Try first to read the data, then do what you want, and then display the result (instead of doing the conversion on the output stage). Try not to use dopolnitelnymi arrays.
Output
The output file output N numbers - the array elements A[i] after the conversion.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 51%