Every season at the peat bogs of Mossgrieve, someone must decode the foreman's shorthand notes. This year the task falls to Bhavi, armed only with the weights register. Task: Print the lower median: the element at position floor((n-1)/2) after sorting (so for even n it is the smaller of the two middles). Input format: First line: n. Second line: n integers. Output format: Print the lower median. Constraints: 1 <= n <= 351; -1000000 <= a[i],x <= 1000000000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 351; -1000000 <= a[i],x <= 1000000000.
