For this Question: Given an array of size N consisting of only 0's and 1's, your task is to find the maximum number of consecutive's 1's you can get by flipping at most M 0'sFirst line of input contains two space separated integers denoting values of N and M, next line contains N space separated integer denoting the values of array.

Constraints:-
1 < = M < = N < = 100000
0 < = Arr[i] < = 1Print the maximum number of consecutive 1's.Sample Input:-
5 1
1 0 1 0 0

Sample Output:-
3

Sample Input:-
5 5
1 1 1 1 1

Sample Output:-
5, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
       
int n,m;
cin>>n>>m;
int a[n];
for(int i=0;i<n;i++){
    cin>>a[i];
}
int cnt=0;
int l=0;
int ans=0;
for(int i=0;i<n;i++){
    if(a[i]==0){
        cnt++;
    }
    if(cnt>m){
        while(a[l]!=0){
            l++;
        }
        l++;
        cnt--;

    }
    ans=max(ans,i-l+1);
}
cout<<ans<<endl;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?