I am not getting correct answer though i think my logic is correct. Here I am counting the first consecutive ones, and then counting the maximum consecutive 1’s in the remaining string .Can somebody please help me. https://www.codechef.com/viewsolution/87045775
Your code will fail for the following test case:
4
1111
Thankyou.