IntermediateRating 1100
Squares in Order
The array is sorted (may contain negatives). Print the squares in sorted order using two pointers.
Input
n, then n sorted integers.
Output
One line.
Sample 1
Input
5 -4 -1 0 3 10
Output
0 1 9 16 100
Sample 2
Input
1 -5
Output
25
Output appears here