#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 1000000001 int N; vector A; vector> P; int t= 0; double dp[1024][102][102][2]; double get(int state,int s,int t,int now){ if(s>=101)return 1.0; if(t>=100)return 0.0; if(state==(1<t)return 1.0; else return 0.0; } //static vector dp(1<(2,-100.0)))); if(dp[state][s][t][now]>-1.0)return dp[state][s][t][now]; double ret; if(now==0)ret = 0.0; else ret = 1.0; int ind = 0; for(int i=0;i>i)&1)continue; double m; if(now==0)m=1.0; else m = 0.0; for(int j=0;j>j)&1)continue; double p = P[i][j]; if(now==0){ m = min(m,get(state|(1<>N; A.resize(N); for(int i=0;i>A[i]; P.resize(N,vector(N,0.0)); for(int i=0;i