func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_BUF_SIZE = 16384;   char BUFOR[MAX_BUF_SIZE];   int BUF_SIZE, BUF_POS;   char ZZZ;   const int MXN = 1000010;   const int C = 262144;   const int INF = 1000000001;   int n, m, h;   int s[MXN];   int sum;   int sh;   void test() {     scanf( %d %d %d , &n, &m, &h);     for (int i = 1; i <= m; i++) {       int tmp;       scanf( %d , &tmp);       if (i == h) sh = tmp;       sum += tmp;     }     if (sum < n) {       printf( -1 n );       return;     }     long double res = 1;     for (int i = sum - sh - n + 2; i <= sum - sh; i++) res = res * i;     for (int i = sum - n + 1; i <= sum - 1; i++) res = res / i;     double rr = res;     printf( %.9lf n , 1 - rr);   }   int main() {     int te = 1;     while (te--) test();     return 0;   }   