#CCBCHBAHAI0000024. Arrays - DS
Arrays - DS
Arrays - DS
Source: HackerRank
Version: Phuoc Hung OJ Extended
Problem
Given an integer array of length ,
construct its reverse. If the reversed array is , then
Print the reversed array.
Input
The first line contains integer . The second line contains space-separated integers .
Output
Print the elements of the reversed array on one line, separated by single spaces.
Subtasks
Subtask 1 (100 points): ; .
Example
Input
4
1 4 3 2
Output
2 3 4 1
Explanation
Using , reversing gives .