func_code_string: #include <bits/stdc++.h>   using namespace std;   int row[] = {0, 1, 0, -1, -1, -1, 1, 1};   int col[] = {1, 0, -1, 0, 1, -1, -1, 1};   const long long N = 2e5 + 10;   const long long M = 1e18 + 7;   const long long H = 1e9 + 7;   const long long base = 131;   long long logx(long long a, long long bs) { return log(a) / log(bs); }   long long Max(long long a, long long b) {     if (a > b) return a;     return b;   }   long long Min(long long a, long long b) {     if (a > b) return b;     return a;   }   long long big_mul(long long a, long long b, long long m) {     long long x = 0, y = a % m;     while (b > 0) {       if (b & 1) x = (x + y) % m;       y = (2 * y) % m;       b >>= 1;     }     return x % m;   }   long long big_mod(long long a, long long b, long long m) {     long long x = 1, y = a % m;     while (b > 0) {       if (b & 1) x = (x * y) % m;       y = (y * y) % m;       b >>= 1;     }     return x % m;   }   long long Big_mod(long long a, long long b, long long m) {     long long x = 1, y = a % m;     while (b > 0) {       if (b & 1) x = big_mul(x, y, m);       y = big_mul(y, y, m);       b >>= 1;     }     return x % m;   }   long long mod_inverse(long long a, long long m) { return big_mod(a, m - 2, m); }   long long GCD(long long a, long long b) {     if (!a) return b;     return GCD(b % a, a);   }   double l, r;   vector<double> vec1;   vector<double> vec2;   double fnct(double total, double value) { return total / value; }   bool possible(double x, double m) {     double total = m + x;     double need = fnct(total, vec1[0]);     if (need > x) return false;     x -= need;     total = m + x;     for (int i = 1; i < vec1.size(); i++) {       need = fnct(total, vec2[i]);       if (need > x) return false;       x -= need;       total = m + x;       need = fnct(total, vec1[i]);       if (need > x) return false;       x -= need;       total = m + x;     }     need = fnct(total, vec2[0]);     if (need > x) return false;     return true;   }   void bs(double m) {     l = 0;     r = (double)H;     int cnt = 0;     while (cnt++ <= 100) {       double mid = (l + r) / 2.0;       if (possible(mid, m) == true)         r = mid;       else         l = mid;     }     if (l == H || r == H)       cout <<  -1  << endl;     else       printf( %0.10lf n , l);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     ;     int n;     cin >> n;     double m;     cin >> m;     for (int i = 0; i < n; i++) {       double a;       cin >> a;       vec1.push_back(a);     }     for (int i = 0; i < n; i++) {       double a;       cin >> a;       vec2.push_back(a);     }     bs(m);     return 0;   }   