CAKEDOOM - Editorial

ah yes! My solution gave NO where answer is 1010. Thanks a lot :wink:

This is exactly how TESTER’S SOLUTION proceeds. But it is clear that once we find good fit for first question mark we don’t need to consider any further possibilities for it.

2 Likes

Your solution fails for the following case, number of colors = 2, arrangement = “1”. The answer should be “1”, where as your solution outputs “0”.

1 Like

This test is incorrect. A real failing test is

1
0

But this is easy bug. Another much more important bug you can catch on the following test

2
??1?
1 Like

1
0
gives 0
and
2
??1?
gives 1010
Is this wrong??
@kaush_adm: k=1 s=1 does not follow the input constraints.

At first sight your solution should fail on these tests. So if not you can take any AC solution and compare its output with yours for random tests.

@rgaberina sorry abt that… my mistake. The test anton has provided is the one.

read here - Will CodeChef provide test cases - help - CodeChef Discuss :wink:

http://www.codechef.com/viewsolution/1120092
@admin can you please tell on which test case my solution failed

http://www.codechef.com/viewsolution/1120092
@admin. please provide me with test case on which my solution failed
thanks in advance :slight_smile:

Hey, your test fails on this :
1
2
??1

This should give “NO” but yours gives 021 which is incorrect. You are missing out on using the k in the question properly.

3 Likes

I think this was giving me a few wrong answers initially :slight_smile:

Which test case is failing?

https://www.codechef.com/viewsolution/25047422

why my solution is wrong

https://www.codechef.com/viewsolution/27233088

https://www.codechef.com/viewsolution/28823773
can you pls see and point out on which of the test cases its failing

It fails for e.g.

1
1
???0?0??0??0?0?

Your output has question marks in it! :slight_smile:

1 Like

https://www.codechef.com/viewsolution/28824985
see i have resolved it but it still showing WA.

1 Like

Consider the testcase:

1
5
1

https://www.codechef.com/viewsolution/28826490
still WA :sweat_smile:

1 Like

XD

1
1
0?