[Community Puzzle] Hooch Clash

Thanks @JBM for this puzzle! ^^
I was looking for a puzzle that will force me to read and understand correctly a statement before starting to code a solution, and I was not deceived. I guess I’ll explore other puzzles with the reading comprehension tag.


Two thumbs up! I can’t get enough of puzzles with a backstory. :grinning:

“orbs of integral diameter” in the problem statement should be changed to “orbs of integer diameter”, maybe with a note that it is integer in the mathematical sense, not type.

I’m not quite sure that changes anything :confused:

Well, it’s not wrong as is, but that is a very esoteric sense of “integral”. You virtually never see it used that way outside discussions of pure mathematics.


Agree completely here, as a native English speaker. I think integral means “essential” to most of us, nothing to do with integers. But JBM is right too, it probably wouldn’t make a difference changing it :smile:

1 Like

As others, I was quite confused by the reading at first (and I didn’t see one of the constraints :sweat:).
The choice of the “interesting” property comparison example is… well, interesting. I think the author was :smiling_imp: when he chose it ^^

1 Like

I remember this puzzle, it made me realize that powers in Python sometimes give unexpected results.

For example 8**(1/3) is 2.0 so you would expect (-8)**(1/3) to be -2.0 but Python choses one of the complex roots: 1.0000000000000002+1.7320508075688772j

1 Like

" Assuming you could use them for a fun clash, challenging using {31,37} would be more interesting than using {25,32}."

You asked for suggestions @JBM? Just add a CLEAR “because” after this and I will regret and apologize for:

  1. giving 1 star to the puzzle
  2. thinking I lost 3 days of my life and
  3. hating and cursing someone I don’t know who is probably a smart person.

I am getting back to CG (and coding at large) after a 2-year break and I got this one. And people say women are hard to understand? Stop kidding and give this one a try…


Well, you can see that a bunch of people gave it a try and solved it.
What’s the problem exactly ?

1 Like

The puzzle is interesting and I indeed solved it too, but I personally felt the description was too vague and I managed to find the solution by trial and error after a few hours of attempts (and it is an Easy one) and by going against my interpretation of the English language. I would not have posted a comment, because I deemed that I still have a lot to learn and was blaming my own lack of skills. But seeing the comments of others made me feel I was not the only one having trouble. This explains my suggestion as the only thing that really confused me was the example of fun and interesting. I did not mean to offend anyone.

Hi there, In case 7 2719 and 2790 are preffered above 2511 & 2962 because they form a “fun” match (since 2511 & 2962 are the same values as received from the input, picking those same values would constitute a mere valid clash, and the rules say we need to prioritize fun over valid). Same argument for case 8, 417 & 2962 are your problem’s inputs, so merely picking them would form a valid clash. A fun clash would have all 4 values being different, picking your suggestions in both example would yield to clashes containing only 2 different values, so those clashes are neither “fun” nor “intersting” … hope it helps.

Hi there, my B&B case fails when submitting. There is one thing which I don’t understand; the validator expects a “VALID” response, but I don’t get how can this be the case.

It is hard to debug when I have no visibility of the test values when submitting, but I know that the input glowingOrbSize1 != glowingOrbSize2, and I do also know that there are 7 total “volume matches” (ie: possible sparkling orbs duples, that’d yield a valid match against the initial glowing orbs).

Now my question is: As I said before when submitting B&B expects a “VALID” response, so somehow the different sizes (diameters) of all final orbs must be less than 4, but if to start with we already have 2 different sizes (since glowingOrSize1 != glowingOrbSize2), and there are also 7 valid different clashes, how come none of those 7 would yield a fun clash, considering it is game rule that fun clashes must be prioritized over valid clashes?

Thxs in advance.

You probably meant: max difference between the surfaces of the two sparkling orbs.

As their example showed:

Assuming you could use them for a fun clash, challenging using {31,37} would be more interesting than using {25,32}.

just saying.

I think best solution for “graphomaniac” :smiley: problem is make it optional. First block - backstory in cursive with all characters, worlds whatever you want and then next block - clean explanation of the problem in most boring way you can imagine without anything fancy. The question is how to standartize puzzle description.

I had the same issue. The problem was, that the real solution was “between” my solution.

wrongSolutionOrb1 <= goodSolutionOrb1 <= goodSolutionOrb2 <= wrongSolutionOrb2

could you explain with simple words and good examples the rules of your puzzle?

I could, but that would be unfair to all of those who solved it without perusing the forum.

why unfair? I dont know what you mean :slight_smile:
do you mean that in the discussion there is an answer… if so I didnt see it and I dont going to see it. I just ask you if you can explain the rules. Not the give me a solution just rules.
I dont understood what is happening with orbs and what we should calculate

It is a reading comprehension exercise more than a programming test. Anyone who wants to start coding without reading too much, please just skip this puzzle.

To break the language code, remove all the magic and fairy tale elements.
What remains are very obvious in Maths:

diameter, surface area, volume, same, difference, min, max…
Use these parameters to determine a grading of “valid | invalid | fun | interesting”

Target is “Can you … make a valid clash? Can you make it fun and interesting too?”
Cannot tell more without ruining the fun.

1 Like

For start reading need to have clearly written description.
but your description is really unclear
Line 1: orbSizeMin and orbSizeMax, orb diameter bounds
1 1000 whats mean ? so we have some ball with diameter from 1 to 1000 ? cool! But in your description mentioned and second ball. where the diameter for second ball ?
Line 2: glowingSize1 and glowingSize2, the king of the hill’s glowing orb diameters
9 10
whats mean? our ball ? which 1 or second? has diameter as 9 or 10. cool.
what I should to do with this information :slight_smile: and why mentioned that it is shining?

where the description how to make/calculate fun/clash and what is means, and so on

PS: please note on this site not only native american.