func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, q, PREV, pos;   ;   int arr[200005];   long long ps[200005], x, sebelum;   long long k[200005];   bool good;   void binser() {     int ki = PREV, ka = n;     pos = 1;     x += sebelum;     while (ki <= ka) {       int mid = (ki + ka) / 2;       if (ps[mid] <= x) {         ki = mid + 1;       } else {         good = 1;         pos = mid;         ka = mid - 1;       }     }     sebelum = x;     if (!good) sebelum = 0;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cin >> n >> q;     for (int i = 1; i <= n; i++) {       cin >> arr[i];       ps[i] = ps[i - 1] + arr[i];     }     PREV = 1;     for (int i = 1; i <= q; i++) {       cin >> x;       good = false;       binser();       cout << n - pos + 1 << endl;       PREV = pos;     }   }   