the problem (CODEY305 CodeChef: Practical coding for everyone )
is showing wrong answer in each submission of mine .
My code is (CodeChef: Practical coding for everyone ). Please guide me.
Also i am surprised that all the submission to this problems in c and C++ 14 are failed in past . successful submissions are only in java .
ssjgz
April 23, 2020, 5:38am
2
Perhaps I’m misunderstanding the question, but what should the output be for:
1
ab ba ab ba
?
I believe it should be
ab ba ab ba
You are only required to remove “instances of words that are repeated more than once continuously ”
2 Likes
ssjgz
April 23, 2020, 5:44am
4
Good, that’s what I thought The OP’s output is:
ab
1 Like
https://www.codechef.com/viewsolution/32155649
Why does this solution show WA? It seems to work for all the testcases I provided it
Also, I think there’s an empty line in the testcases, because this solution shows SIGSEGV
ssjgz
April 23, 2020, 6:12am
6
I can’t see anything immediately wrong with it, but it will fail if there is more than one space at the end of the first line (i.e. after the number N
).
2 Likes
Ohhh, I see, thanks a lot!
sir but according to given constraint in the problem. we dont expect a double space after a line.
so, should i assume that my code( CodeChef: Practical coding for everyone ) is giving WA simply because of wrong test case in problem ?
ssjgz
April 23, 2020, 7:04am
9
Yours is giving the wrong answer for the testcase I posted above.
It wouldn’t surprise me if there was a bunch of extra whitespace in the testcases, either - external contests are often sloppy like that.
1 Like