Array reversal - MarisaOJ: Marisa Online Judge

Array reversal

Time limit: 1000 ms
Memory limit: 256 MB
Given an array $A$ with $n$ integer elements, print the elements at odd indices in reverse order. Array indices start from $1$. ### Input - The first line contains an integer $n$. - The second line contains $n$ integers $A_i$. ### Output - Print the elements at odd indices in reverse order. ### Constraints - $1 \le n \le 1000$. - $1 \le A_i \le 1000$. ### Sample Input: ``` 5 1 2 4 5 3 ``` Output: ``` 3 4 1 ```