Hii…
I am solving this question from codeforces…
https://codeforces.com/contest/1443/problem/B
The approch i have followed is…
first i have calculated the index of first and last “1”…
Now if they are not equal then…
for every number of zeros between the “1”… i checked if we should replace it with 1 or… should i just activate the next mine…
This is my solution…
https://codeforces.com/contest/1443/submission/99919257
Please look this…
where i am wrong…
Getting wrong answer
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.