[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 !


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.


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:


Very good dp problem. Simple memorization solution would do.

Also the fourth testcase is fail.


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…