//#define _GLIBCXX_DEBUG #include #define rep(i, n) for(int i=0; i; using vs = vector; using vi = vector; using vvi = vector; template using PQ = priority_queue; template using PQG = priority_queue, greater >; const int INF = 100010001; const ll LINF = (ll)INF*INF*10; template inline bool chmax(T1 &a, T2 b) {return a < b && (a = b, true);} template inline bool chmin(T1 &a, T2 b) {return a > b && (a = b, true);} template istream &operator>>(istream &is, pair &p) { return is >> p.first >> p.second;} template ostream &operator<<(ostream &os, const pair &p) { return os << p.first << ' ' << p.second;} const size_t N = 10; const size_t X = 1024*201*2; //head int n; int a[N]; int sum; ld memo[X]; ld dfs(int info, int now, short kiri) { //cout << bitset<4>(info) << ' ' << now << ' ' << (kiri?"kiri":"null") << endl; if(info == 0) { if(kiri) { if(now >= (sum+1)/2) return 1; else return 0; } else { if(now >= sum/2+1) return 1; else return 0; } } int num = (info*201+now)*2+kiri; if(memo[num] > -0.5) return memo[num]; int sum = 0; rep(i, n) if(~info>>i&1) sum += a[i]; ld aite[10]; rep(i, n) if(info>>i&1) aite[i] = dfs(info^(1<>i&1) { if(a[i] == 1) jj[i] = 1-dfs(info^(1<>j&1) { nn[j] = (x*a[j]+aite[j]*(a[i]-1))/(a[i]+a[j]-1); } jj[i] = *min_element(nn, nn+10); } } return memo[num] = *max_element(jj, jj+10); } int main() { ios::sync_with_stdio(false); cin.tie(0); fill(memo, memo+X, -1.0); cin >> n; rep(i, n) cin >> a[i]; sum = accumulate(a, a+n, 0); cout << fixed << setprecision(10) << dfs((1<