#CCBCHBAHAI0000107. Reverse-copy x sang y
Reverse-copy x sang y
Reverse-copy x into y
Source: Phuoc Hung OJ
Version: Phuoc Hung OJ Extended
Problem
Given a source array , construct a separate destination array without modifying , such that
This is reverse-copy: is the reverse of while remains unchanged.
Input
The first line contains . The second line contains .
Output
Print unchanged on the first line and reverse-copy on the second line.
Subtask
Subtask 1 (20 points): .
Subtask 2 (30 points): .
Subtask 3 (50 points): .
Example
Input
5
3 1 4 1 5
Output
3 1 4 1 5
5 1 4 1 3
Explanation
Each destination index reads the symmetric source index.