SNCOUP - Editorial

Nice work @sai_rathan :slight_smile:

1 Like

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 :slight_smile:

2 Likes

@sauravsinha137
W9JMuW - Online C++0x Compiler & Debugging Tool - Ideone.com answer is 3!

@nishith365
mDZwbq - Online C++0x Compiler & Debugging Tool - Ideone.com answer is 3!

@karthikeya123

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.

@manish7294

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

@floating_point

Your code fails for this case

Input:

3

.**

**.

Your Output: 2

Expected Output :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.

@sai_rathan
It did work without any compilation error.

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.

1 Like

@kunal12libra

Your code doesn’t work for the test case below:

Input:

.**

**.

Your code’s output: 2

Expected Output : 3

1 Like

@karthikeya123

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.

@karthikeya123

Your Code is not working for this case:

Input:
3

.**

**.

Your code’s Output: 2

Expected Output: 3

@s_17

Your Code is not working for

Input:

.**

**.

Your code’s Output: 2

Expected Output :3

@piyush_iit

Faild Case:

Input:

3

…*

…*

Expected Output:1

Your code’s Output :0

Anyone, please?

thanks @vijju123 , I got the failure :frowning: 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:
.**

**.