Nice work @sai_rathan
The test cases already found where you were wrong so no point in dare XD.
On a side note- Request nicely and people will help
Your code gives a compilation error because you have used scanf function for taking test case input without including stdio.h .
Correct me if I’m wrong.
There is an error in your logic for case 1.
Now consider a test case
5
.*.*.
*.*.*
Answer according to your logic will be 4 but correct answer is 3
@sai_rathan my program i also giving output as 3. As the 1st and 2nd column have vertical adjacent snakes so this is my case 2.
i hope you guys can understand this
i cant upload image due to lack of karma and on pasting the code it appears like this
but there is no compilation error just tell where the logic went wrong
thanks
Share your submission link
Fixed the format.
Users are requested to provide a submission link instead of pasting the entire code.
Your code doesn’t work for the test case below:
Input:
.**
**.
Your code’s output: 2
Expected Output : 3
I tried running your code in both Codechef ide and codeblocks both raised a compilation error. Ok I will try to find an error test case for your code.
Your Code is not working for this case:
Input:
3
.**
**.
Your code’s Output: 2
Expected Output: 3
Anyone, please?
thanks @vijju123 , I got the failure but late . I was tried more then 50 inputs but was not finding the failure .So i was very exited if someone reply as early as possible.
Failure:
.**
**.