#CCBCHBAHAI0000134. Lấy trị tuyệt đối từng phần tử (Absolute Value of Every Element)
Lấy trị tuyệt đối từng phần tử (Absolute Value of Every Element)
Absolute Value of Every Element
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer array , replace each element by its absolute value.
For every ,
A negative value changes sign; a non-negative value remains unchanged.
Input
- The first line contains .
- The second line contains integers .
Output
Print one line containing , separated by single spaces.
Subtasks
Subtask 1 (100 points): and .
Examples
Input
6
-8 0 5 -1 12 -20
Output
8 0 5 1 12 20
Explanation
Taking absolute values transforms -8 0 5 -1 12 -20 into 8 0 5 1 12 20.