[Community Puzzle] Island Escape - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @DavidAugustoVilla,validated by @field3,@DeanTheMachine and @TBali.
If you have any issues, feel free to ping them.

Hello,
I dont understand why the validator 7 is failing with my code (in C++)
(it was validated in my tests at 100%)
Could you please help me ?

[Mod edit: Please avoid posting full codes on the forum.]

Try this custom case:

Input

5
0 0 0 0 0
0 3 2 3 0
0 2 1 2 0
0 3 3 1 0
0 0 0 0 0

Output

yes
1 Like

Many thanks !
I did not see the issue with my final check on i or j == n (instead of n-1)

Oh, sorry I missed this! Updated test 7 and renamed as Cradled Valley.

1 Like

Hi,
with my code the validator 2 is failing (in C++)
there is an example of validator 2?

Validator 2 is an even smaller vanishing island.

How about a test cases that has an “inland lake” (i.e. level 0). Reaching the lake should NOT count as getting off the island. The answer would be “no” if no actual path to the ocean exists, even though you can reach the lake.

Another test case could be similar: An inlet or bay that does actually connect to the ocean; analogous to launching the boat in the bay, then leaving to the ocean.

Another fun one might be river, just basically an narrow bay.

Perhaps with the added complexity, it could be Island Escape-2, a medium puzzle…?

Yeah, that’s a good idea, but it would definitely have to be a different puzzle. I can’t break code that has already been submitted.

Very good puzzle, but should it really be in easy section?

1 Like

this shouldn’t be labeled easy – the puzzle is too troublesome.

I hope you were able to solve it anyways.

Hello

All Test cases are good with my solution in IDE, but when submitting I got this message for a failed Validator 6 :
“The following validators differ from the puzzle test cases to prevent hard coded solutions. This is why you can have some fails here even if all of the tests provided in the IDE have been successfully passed.”

Any tips to see what’s going wrong ? (no error logs)

Thanks for a response!

I could only recreate test 6 and validator 6 failing by altering the move upwards to be incorrect, might be worth checking.

You could also try a custom test case such as:

Test Case
5
0 0 0 0 0
0 3 2 1 0
0 4 9 8 0
0 5 6 7 0
0 0 0 0 0

Expecting the output to be “yes”.

If you pass that test case, try different variations and see if your code fails anywhere :slight_smile: Failing that, you could dm me your code so I can have a look and try find what the issue is and provide whatever help you need.

Let me know how it goes!

1 Like

Thanks for the custom Test Case, it helped me to see why my code didn’t resolve the test 6 on submitting !

(it was an old code from my first attempt, which works well for the first test but finally cause test 6 to failed)

1 Like