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 .
April 23, 2020, 5:38am
Perhaps I’m misunderstanding the question, but what should the output be for:
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
April 23, 2020, 5:44am
Good, that’s what I thought
The OP’s output is:
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
April 23, 2020, 6:12am
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
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 ?
April 23, 2020, 7:04am
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.