[Community Puzzle] Retaining Water

Great puzzle! I had fun solving it. Not sure if it;s so easy :slight_smile:

1 Like

When you wanted to solve an easy puzzle and got pain in the ass instead. I like this one.

1 Like

I wonder how to find a spot for flowing water without using a floodfill ? It would be like finding the exit of a maze without pathfinding… Weird ! No idea about this simple solution ! I’ll try the floodfill one :smiley:

1 Like

I know this is a long shot due to how old this conversation is, but would like to get some ideas on the approach for this puzzle. @puma17 if you are still out there, pls let me know. Thx.

#bfs #trapping_rainwater_problem
So, one has to add the edges of the pool of bourgeoisie to the queue. Then for each of the directions up,down,right,left perform the search for the positive delta between the height of the parent cell and the child cells.
Usually I choose simple puzzles to solve them on my own with the languages I am currently learning. However in this case I was unable to do so, since the puzzle is hard.
P.S. It’s important to use priority queue, so FIFO always gives minimum at position 0.

A nice and creative puzzle. I enjoyed it.

1 Like

I’m updating this to Medium based on numerous comments in that vein.

There is no way this is medium.

Look at the success rate.

You can study the success rates here. Seems pretty arbitrary to pick this one out to move. Especially since there was a big argument at inception whether it should be a clash or easy puzzle.

https://chadok.info/codingame/puzzles_list.html

Thank you for the link! I have reviewed comments on the 3 easy puzzles with a lower success rate and found there could be issues with design or implementation. I am raising this separately.

It’s an interesting puzzle, but I would really mark this as medium. Compared to other puzzles tagged as easy this is quite a bit more difficult. And why are there no tags?

Thanks. I don’t like tags. 5D can probably arrange to add some if necessary.

1 Like

If we take the three puzzles with the lowest success rates, we see that one of them (Lisa’s) requires no knowledge of anything other than how arrays work in your language or how to output text line by line. Even the essence of the task is easy to understand. The second puzzle is even easier, again requiring only the ability to work with arrays, and the task itself is as accessible as possible:

My initial comment on TicTacToe puzzle

BerserkVl
Feb 2025

5021 have started, 2312 have finished
I am wondering why the success rate is so low for such an easy puzzle.

But if we take this problem, you’ll need to know a little about algorithms and have some programming experience. I don’t know, I just sat down, cooled down, thought, and it seems like the solution itself wasn’t difficult, but to come to it, I had to think.

Interesting puzzle,

I would say it is indeed an easy mark, BUT ONLY if you already know which type of algorithm to use to avoid a flooding algorithm (yet close to it)—which is not easy.

My concerns are more about the statement and the description:

  1. Overall, try splitting the paragraphs into bullet points or disentangling them so each carries less information.
  2. Some critical information is thrown into a paragraph in the output section. It should be in the main description instead, as it explains how to solve the puzzle rather than describing the outputs.
  3. You wrote, ā€œtake a look at the cover picture for illustration,ā€ but why not put the image inside the IDE window instead of telling users to go back to the previous page?
  4. The background image is only a crop of the 3D representation; why not display it fully? It looks beautiful!

Hoping to find more of your proposed puzzles!