[Community Puzzle] Goro Want Chocolate

Feel free to send your feedback or ask some help here!

Iā€™m glad this bot is back, but I think it would be better with an actual link to the puzzle, no?

Specific note to this puzzle: itā€™s the result of a live stream. Forum details here, but be aware there might be spoilers.

1 Like

Hey quick question here: I solved the problem (all validators pass) but some tests do not pass. Would you have an idea of why?

1 Like

Beautiful and Elegant puzzle. I love it !

3 Likes

I also had this problem. I fail test case 4, but all the validators pass. For the life of me I canā€™t understand why the provided answer ā€œ12ā€ is correct.

75 75 74 38 38 36 20 20 16 16 8 8.
Try to place these squares in a 149 * 150, it works fine.

2 Likes

Thanks! Iā€™ll try it.

Yes, that solution is valid. My code now finds it as well. It turns out I had mistakenly thought ā€œGoro only cuts the longest sideā€. Which is not written in the description.
Thanks for your help.

I cant figure out how to fit 10 squares into the 13x51 grid at all. The lowest i can get of is 11. What 10 squares fit?

Try this:

2 Likes

Very good dp problem. Simple memorization solution would do.

Also the fourth testcase is fail.

Hi,

I got all IDE test pass but not validator 3, anyone could clarify if there is any specificity there ?

thanks !

Validator 3:
0 < H, W < 100
One number is prime, the other number is not.

Arg this is quite limited hint :frowning:

Has my code seems failing to give the right answer I have no clue to detect the input which makes it fail and number of combinations is still highā€¦
Would you give me the ratio in private if prefered?

Please do try to go through all the combinations first :wink:

Ok I got it I had to kind of way to solve one for rectangle shapes evoiding recursivity one to solve the next square one which requires far more time by recursion. My threshold was too strict for this validator. (ratio of 1.2 from length to width).
Now as the puzzle doesnā€™t require optimization I simply dropped the ā€˜rectangular solve optionā€™ā€¦

In case it could help anyone who tried this quite specific approachā€¦