func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( O3 )   using namespace std;   const long long INF = (long long)1e18 + 100;   long long safe_sum(long long a, long long b) {     long long s = (a + b);     s = min(s, INF);     return s;   }   long long safe_mult(long long a, long long b) {     if (a == 0 || b == 0) return 0;     if (a >= ((INF + b - 1) / b)) return INF;     return (a * b);   }   const int maxN = 1005;   long long c[maxN][maxN];   long long gcd(long long x, long long y) {     while (x > 0 && y > 0) {       if (x < y) swap(x, y);       x %= y;     }     return (x + y);   }   long long cnk(long long x, int a) {     vector<long long> cur;     for (int i = 0; i < a; i++) {       cur.push_back(x - i);     }     for (int j = 1; j <= a; j++) {       int now = j;       for (auto& it : cur) {         if (now == 1) break;         int d = (int)(gcd(it, now));         it /= d;         now /= d;       }     }     long long ans = 1;     for (auto& it : cur) ans = safe_mult(ans, it);     return ans;   }   int n;   long long k;   const int maxT = 2 * (int)1e5 + 100;   const int BUBEN = 10;   long long a[maxT];   long long get_cnk(long long x, long long y) {     if (x - y < y) return get_cnk(x, x - y);     if (x < y) return 0;     if (x < maxN) {       return c[x][y];     }     if (y >= BUBEN)       return INF;     else       return cnk(x, (int)y);   }   bool ok(long long who) {     long long f = 0;     for (int i = 0; i < n; i++) {       f = safe_sum(f, safe_mult(a[i], get_cnk(n - i - 1 + who - 1, who - 1)));       if (f >= k) return true;     }     return (f >= k);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(nullptr);     c[0][0] = 1;     for (int i = 1; i < maxN; i++) {       c[i][0] = 1;       for (int j = 1; j <= i; j++) {         c[i][j] = safe_sum(c[i - 1][j], c[i - 1][j - 1]);       }     }     cin >> n >> k;     for (int i = 0; i < n; i++) {       cin >> a[i];       if (a[i] >= k) {         cout << 0;         return 0;       }     }     long long l = 0;     long long r = (long long)(1e18) + 100;     while (r - l > 1) {       long long mid = (l + r) / 2;       if (ok(mid))         r = mid;       else         l = mid;     }     cout << r;     return 0;   }   