#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;
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;
}
}
for (int i = 0; i < n; i++) {
if (i >= start && i <= end) {
} else {
}
if (i < n - 1) {
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlPG1hdGguaD4KIAogCiAKIAogCiAKaW50IG1haW4oKSB7CiAKIAovLyAgYml0IDAgdGjDoG5oIGJpdCAxIMSR4buDIGPDsyDEkcaw4bujYyDEkW/huqFuIGNvbiBsacOqbiB0aeG6v3AgZMOgaSBuaOG6pXQgY2jhu4kgdG/DoG4gYml0IDEKLy8gY2hvIDEgZGF5IGJpdCBjbyBuIHBoYW4gdHUgCi8vIGRvaSBkdW9jIHRvaSBkYSBrIHBoYW4gdHUgMCB0aGFuaCAxIAovLyBpbiByYSBzbyBwaGFuIHR1IGN1YSBkYXkgY29uIG5oaWV1IDEgbmhhdAovLyBpbiByYSBtayBzYXUga2hpIGRvaQogCiAKCWludCBuLCBrOwoJc2NhbmYoIiVkJWQiLCAmbiwgJmspOwoJaW50IGFbbisxXTsKCWZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKCQlzY2FuZigiJWQiLCAmYVtpXSk7Cgl9CiAKCWludCAgYW5zID0gMCA7CglpbnQgbCA9IDA7CiAgICBpbnQgY250ICA9IDA7CiAgICBpbnQgc3RhcnQ9IDAgLGVuZCA9IDA7CiAKCWZvciggaW50IHIgPSAwIDsg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