Can I please know for, which test-case was my solution failing ?
My solution: CodeChef: Practical coding for everyone
Thanks
Without any complex case examination you can do this: -If the first char is ‘?’, try every digit less than k here. Then just greedily on every next ‘?’ put the lowest valid digit. From these 10 at most strings return the lexicographically lowest.
@lazzrov A solution will need to replace any ‘?’ by either 0, 1 or 2… so no need to check for all values <k, but just these three values!
@admins… could you please give a hint as to why my submission fails : CodeChef: Practical coding for everyone
Thanks so much!
Hi, can anyone pls help me in finding the test case for which my solution is failing?
CodeChef: Practical coding for everyone is my solution. Thanks in advance.
admin plz provide ur test cases
There’s a trivial mistake in the editorial:
“K=2 can give a valid answer only when the length of the arrangement is even, else the first and last cherries will be of the same color if we choose alternative colors. So, print “NO” if the length of the arrangement is odd.”
N=1 is valid, even though it is odd.
can sme1 tell why my code is giving wrong ans i m still unable to find test case for which it fails:(
http://www.codechef.com/viewsolution/1117745
I used recursive backtrack to get to the final solution if the initial lexicographically smallest solution is proved invalid. Doesn’t need to consider any cases. My Solution
Hi, can anyone pls help me in finding the test case for which my solution is failing? CodeChef: Practical coding for everyone is my solution. Thanks in advance.
Finally I managed to solve it! Thanks to the editorial team
My test case was failing only for: n=1
Here’s my solution if anyone’s interested:
@probsetter-can u tell me which cases of test file my code fails?..:?
thnx in adv…
Please Someone Help me and find a testcase for which my code will not work.
I am getting wrong answer. can anyone please tell me, which test case does my code fail?
I have tried all aforementioned test cases.
Just a query : for the test case where K=1 and S=“5” , the output must be “NO”, right?
But I just observed that few solutions that got AC , have the output as “0” for the above test case.
Please explain?
P.S : Correct me if I am wrong
I am a little late to the party, but can someone please help me with what is wrong with my solution. I have read the editorial and fail to see what am I doing differently, which is causing WA for my solution. Please help
https://www.codechef.com/viewsolution/23607275
You deal with the case K=2 in a wrong way. Try this test: 2 ??1?.
ah yes! My solution gave NO where answer is 1010. Thanks a lot