Since Max loves setting lazy problems, he starts fiddling with an array of numbers, , and finds a problem:
Given an array, minimize , where is the minimizing value and denotes the absolute difference between and .
Can you solve this lazy problem?
Subtask 1 [40%]
Subtask 2 [60%]
The first line will contain , the number of elements in the array.
The second line will contain space-separated integers, the elements of the array, .
Output the that minimizes the equation .
Note: If there are multiple solutions, any will be accepted.
6 -5 4 9 -3 2 20
Note that and would also be valid solutions.