func_code_string: #include <bits/stdc++.h>   using namespace std;   long n, m, h, ts, calc[2000];   double p2, p1;   double gc(long n, long m) {     if (m > n) return 0;     double res = 0;     for (int i = n; i > n - m; i--)       res = res + log(i + .0), res = res - log(.0 + n - i + 1);     return exp(res);   }   int main() {     ios_base::sync_with_stdio(0);     cin >> n >> m >> h;     for (int i = 1; i <= m; i++) {       cin >> calc[i];       ts += calc[i];     }     if (ts < n) {       cout << -1 << endl;       return 0;     }     if (n == 1) {       cout << 0 << endl;       return 0;     }     if (calc[h] == 1) {       cout << 0 << endl;       return 0;     }     --n;     --calc[h];     --ts;     double ans = 1.0;     for (int i = 1; i <= n; i++)       ans = ans * (ts - calc[h] - i + 1) / (ts - i + 1);     cout << fixed << 1.0 - ans << endl;     cin.get();     cin.get();     return 0;   }   