SOLVE
LATER
Given an array A of integers, choose 2 non-empty disjoint subsets X and Y such that ratio of sum of elements of X and Y is as close to 1 as possible.
Given,
Α : {a_{1}, a_{2}, .... a_{N}}
Find,
X : {x_{1}, x_{2}....x_{K}}
Y : {y_{1}, y_{2}.....y_{M}}
where, X ⊂ A, Y ⊂ A, K > 0 and M > 0 and there does not exist an i, such that a_{i} ∈ X and a_{i} ∈ Y, and Q = abs (1.0 - Σx_{i} / Σy_{i}) is minimum possible. Note that there can exist i and j such that a_{i} ∈ X and a_{j} ∈ Y, i ≠ j but a_{i} = a_{j}.
Output this minimum possible value of Q with precision up to exactly 6 decimal places.
CONSTRAINTS
2 ≤ N ≤ 16
1 ≤ a_{i} ≤ 10^{6}, ∀ i ∈ [1, N]
INPUT
The first line of test file contains a single integer N. Next line contains N space separated integers representing the array A.
OUTPUT
Print in a single line, the value of Q with exactly 6 decimal places.
Challenge Name
{Hack a Heart}()=>love for<code/>;</code>for love;
{Hack a Heart}()=>love for<code/>;</code>for love;