So in Todays September Cook-Off 2020 Division 2
I was solving Question Bulbs and Wires
When I ran it on my pc it gave correct ans For the Test Case Given. Ran it again on online Codechef IDE, it gives Different ans (no changes were made).
When Submitted - Runtime Error SIGSEVV
Solution Link- https://www.codechef.com/viewsolution/38080234
My basic concern is why it show diff ans for same test case in Online and offline.
Rough Code Logic -
2 cut a set of bulb from middle we req 2 steps out of K. So we cut Longest 0 sequence.
If k is odd we will cut the max sequence of 0s from start or end if present.
Start and and End req 1 step