@nishith365
mDZwbq - Online C++0x Compiler & Debugging Tool - Ideone.com answer is 3!
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:
.**
**.
https://discuss.codechef.com/questions/100275/compilation-of-edge-cases-for-sncoup
Check here. if that doesnt help, comment further.
plz edit ur code and format it nicely