[Community Puzzle] Mountain Map Convergence

https://www.codingame.com/training/easy/mountain-map-convergence

Send your feedback or ask for help here!

Created by @Crypticsy,validated by @Smelty,@AntiSquid and @Husoski.
If you have any issues, feel free to ping them.

Test cases 5 and 7 have some unnecessary spaces after the last input value

Not a big deal, but in C# it causes FormatException if you parse it like
var heights = Console.ReadLine().Split().Select(int.Parse).ToList();

2 Likes

It should be fine now.

1 Like

This isnā€™t really related to this puzzle, but does anyone know if thereā€™s any way I can find the code I used to validate this puzzle? It didnā€™t get moved over when the puzzle went live, and I wanted to see if there was a nicer way to do the ā€œascii artā€ output.

The problem has already been raised and it seems that itā€™s lost forever.
I hope that they change that behaviour some day cause it can be very irritating, here you just lost a script of a few lines but imagine losing hundreds of lines of an expert puzzleā€¦
So right now, the only way is to save your script on your computer before itā€™s validated.

Okay, thanks. Now I know.
Cheers!

Maybe you can find it if you search for the puzzle on https://eulerschezahl.herokuapp.com/codingame/puzzles/ and find the contribution there?

When a puzzle is accepted, click on the yellow line ā€œSee the contributionā€. On the newly displayed page, click ā€œTest in IDEā€. Your code is here waiting for copy/paste

I had exactly the same question on exactly the same problem. Looks like it wasnā€™t archived on eulerschezahl.herokuapp.com either. Well itā€™s better to have this learning experience on an easy puzzle, I guess. Edit: Nevermind, looks like it was archived after all. Sweet!

is this an easy problem to solve?
to me it seems more like a medium level puzzle

Iā€™m struggling with the ā€˜Familiarā€™ test only inside the challenge validator, so I cannot see what is going on
It is passing in all the other tests, but canā€™t seem to get this one right.
Anyone got an example of where it might fail ?

Also, can we add this test case to the list for future reference?

Try using your code to draw mountain maps for combinations of heights 1 and 2 of length 4 or more (e.g. 1 1 1 1, 1 1 1 2, 1 1 2 1, etc.), and see if you fail any of those :wink:

1 Like

You are tottaly right, the test ā€œ1 1 1 2ā€ does not behave correctly. THANKS!!