func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:66777216 )   using namespace std;   const int N = 100000 + 5;   int n, k;   char s[N];   int su[N];   int a[N];   bool check(int md) {     for (int i = 1; i <= (int)(n); ++i) {       int s = max(i - md, 1);       int f = min(i + md, n);       if (a[i] == 1 && su[f] - su[s - 1] >= k + 1) return true;     }     return false;   }   void solve() {     scanf( %d%d , &n, &k);     scanf( %s , s);     for (int i = 1; i <= (int)(n); ++i) {       a[i] = s[i - 1] -  0 ;       a[i] ^= 1;     }     for (int i = 1; i <= (int)(n); ++i) su[i] = su[i - 1] + a[i];     int st = 0, fi = n, re = n;     while (st <= fi) {       int md = (st + fi) / 2;       if (check(md)) {         re = md;         fi = md - 1;       } else         st = md + 1;     }     printf( %d n , re);   }   void testgen() {     FILE* f = fopen( input.txt ,  w );     fclose(f);   }   int main() {     cout << fixed;     cout.precision(10);     cerr << fixed;     cerr.precision(3);     solve();     return 0;   }   