Wrong solution but not covered in the test cases


#1

All the solutions in discussion forum having this as a return statement is wrong:

    if(A.size()%((2*B)-1)!=0)
        return (A.size()/((2*B)-1))+1;
    else 
        return A.size()/((2*B)-1);

Consider an input:
5 1 0 0 0 1
3
The answer should be 2 but the output from the above code is 1.