Compilation of Edge Cases for SNCOUP

……*
*…**.

This one was essential in debugging my solution

EDIT (From @vijju123)- The expected Output for above case is 3. Full test case-

1
7
*..*..*
*...**.
1 Like

1

10

*...*....*

.**...*...

ANSWER:3

1 Like

Can someone please tell me which test case my code is failing for?
https://www.codechef.com/viewsolution/13990507
Thankyou in advance.
P.S. It is passing all the above test cases given.

Can someone please tell me which test case my code is failing for, all the above test cases are working? CodeChef: Practical coding for everyone Thank you.

@vijju123

3

.**

**.

Expected output: 3

This was the test case which went wrong for many codes.

1 Like

The thread is still growing and needs help of fellow members. Any edge cases you people discover, please make sure to put here as an answer. It will surely help some other fellow coder here! :slight_smile:

1 Like

Hey thanks for those cases, that answers many questions by people asking for cases. :slight_smile:

Thanks for the appreciation dear :slight_smile:

if no one answers in an hour, i will have a look at it :slight_smile:

thanks for the test cases

1 Like

Found the test case.
Thank you for replying.

Your query is resolved?

Can you share it here? :slight_smile:

@hruday968, thank you so much, that was the test case I was failing for.

Input
        1
        5
        .*..*
        ...*.
        Your Output
        0
        Expected Output
        2

It is giving me 2 when I am running it locally on my laptop

Run it on codechef IDE once. Its giving me a 0, checked thrice.

Its coming from this line-

if(a0==0 && a1==0)
	c=0;

it is giving 2 in my compiler too

Oh God! Lmao. @devangm, your code is on UNDEFINED behaviour.

Please use EITHER scanner/printf OR cin/cout after typing

ios_base::sync_with_stdio(0);
	cin.tie(0);

If you use both scanner/printf and cin/cout after typing above 2 statements, your program will show undefined behaviour, giving different output on different compiler.

Damn! That is how you lose out on an online elimination spot. :confused: