#include #include #include using namespace std; using ll = long long; using ld = long double; #include int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n; cin>>n; vector a(n),r(n); for(int i = 0;i>a[i]; for(int i = 0;i>r[i]; ld ans = 0; for(int i = 0;i dp(n+1,0); dp[0] = 1; for(int j = 0;j ndp(n+1,0); for(int k = 0;k ndp(n+1,0); ndp[0] += dp[0]; for(int k = 1;k<=n;k++){ ndp[k] += dp[k] / 2.; if(k==1){ if(j