#include <stdio.h>
#include<math.h>
int main() {
// bit 0 thành bit 1 để có được đoạn con liên tiếp dài nhất chỉ toàn bit 1
// cho 1 day bit co n phan tu
// doi duoc toi da k phan tu 0 thanh 1
// in ra so phan tu cua day con nhieu 1 nhat
// in ra mk sau khi doi
int n, k;
int a[n+1];
for(int i = 0; i < n; i++) {
}
int ans = 0 ;
int l = 0;
int cnt = 0;
int start= 0 ,end = 0;
if( n == 0 ) return 0 ;
for( int r = 0 ; r < n; r++) {
if(a[r] == 0) ++cnt;
while( cnt > k && l < n ) {
if( a[l] == 0) --cnt;
l++;
}
int dainow = r - l +1;
if( dainow > ans) {
ans = dainow;
start = l ; end = r;
}
}
if( n == 1 && k == 0 && a[0] == 0 ) {
return 0 ;
}
for (int i = 0; i < n; i++) {
if (i >= start && i <= end) {
} else {
}
if (i < n - 1) {
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlPG1hdGguaD4KCgoKCgoKaW50IG1haW4oKSB7CgoKLy8gIGJpdCAwIHRow6BuaCBiaXQgMSDEkeG7gyBjw7MgxJHGsOG7o2MgxJFv4bqhbiBjb24gbGnDqm4gdGnhur9wIGTDoGkgbmjhuqV0IGNo4buJIHRvw6BuIGJpdCAxCi8vIGNobyAxIGRheSBiaXQgY28gbiBwaGFuIHR1IAovLyBkb2kgZHVvYyB0b2kgZGEgayBwaGFuIHR1IDAgdGhhbmggMSAKLy8gaW4gcmEgc28gcGhhbiB0dSBjdWEgZGF5IGNvbiBuaGlldSAxIG5oYXQKLy8gaW4gcmEgbWsgc2F1IGtoaSBkb2kKCgoJaW50IG4sIGs7CglzY2FuZigiJWQlZCIsICZuLCAmayk7CglpbnQgYVtuKzFdOwoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykgewoJCXNjYW5mKCIlZCIsICZhW2ldKTsKCX0KCglpbnQgIGFucyA9IDAgOwoJaW50IGwgPSAwOwogICAgaW50IGNudCAgPSAwOwogICAgaW50IHN0YXJ0PSAwICxlbmQgPSAwOwogICAgCiAgICBpZiggbiA9PSAwICkgcmV0dXJuIDAgOyAKCWZvciggaW50IHIgPSAwIDsgciA8IG47IHIrKykgewoKICAgICAJaWYoYVtyXSA9PSAwKSArK2NudDsJCiAgICAgICAKCQl3aGlsZSggY250ID4gayAmJiAgbCA8IG4gKSB7CgkJCWlmKCBhW2xdID09IDApIC0tY250OwoJCQlsKys7CgkJfQoJCQoKCQlpbnQgZGFpbm93ID0gciAtIGwgKzE7CgkJaWYoIGRhaW5vdyA+IGFucykgewoJCQlhbnMgPSBkYWlub3c7CgkJc3RhcnQgPSBsIDsgZW5kID0gcjsKCQl9CgoJfQogICAgCglwcmludGYoIiVkXG4iLCBhbnMpOwogICAgaWYoIG4gPT0gMSAmJiBrID09IDAgJiYgYVswXSA9PSAwICkgewoJcHJpbnRmKCIwIik7CiAgICByZXR1cm4gMCA7CQoJfQpmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgCiAgICBpZiAoaSA+PSBzdGFydCAmJiBpIDw9IGVuZCkgewogICAgICAgIHByaW50ZigiMSIpOwogICAgfSBlbHNlIHsKICAgICAgICBwcmludGYoIiVkIiwgYVtpXSk7CiAgICB9CiAgICAKICAgIGlmIChpIDwgbiAtIDEpIHsKICAgICAgICBwcmludGYoIiAiKTsKICAgIH0KfQoKCgoKfQ==