#include using namespace std; using ll = long long; const int U = 14; double dp[30][1<<15]; double calc(int& s, int& t, double& x, double& y, double& z) { double res = 1.0; for (int i=0; i>i)&1) { int cnt = 0; if (i && (s>>(i-1)&1)) cnt++; if (i+1>(i+1)&1)) cnt++; if (cnt==0) { if ((t>>i)&1) res *= 1.0-x; else res *= x; } else if (cnt == 1) { if ((t>>i)&1) res *= 1.0-y; else res *= y; } else { if ((t>>i)&1) res *= 1.0-z; else res *= z; } } } return res; } int main() { int n; cin >> n; n = 80 - n; double x, y, z; cin >> x >> y >> z; x /= 100.0; y /= 100.0; z /= 100.0; vector>> p(1<