[Community Puzzle] Hooch Clash

https://www.codingame.com/training/easy/hooch-clash

Send your feedback or ask for help here!

Created by @JBM,validated by @bbb000bbbyyy,@Niako and @Zorg1.
If you have any issues, feel free to ping them.

If this is really for Clashes then too much English text in it.
I am Russian I can read programming books without translation but I stuck with any nonTechnical books, I should use dictionary 20-50 times per page. and I think that my English is 3/5.
CG used by users that is not 100% English natives. We can understand programmaticaly tasks but not fairytales.
So, nonEnglish user in Clash has 15mins to solve the problem and probably half of this time to read and understand description.
Such tasks are not fair to all users of CG.
Really when this clash comes to me I just will leave it.

11 Likes

This is an easy puzzle. You can tell by the URI section “training/easy”.
You won’t get it by playing “Clash of Code”.

(CoCs don’t get a notification in the forum when they’re published)

1 Like

Still, the remark about puzzle text complexity is valid. While it is nice to have a fairy background-story, it was for me also a challenge to understand: what is really the task?

14 Likes

It’s not a CoC, it’s an easy puzzle.

I see.
They shouldn’t to use word “clash” for non clashes :slight_smile:

That’s preposterous. There’s no chance of confusion that matters. I’m not going to pass on a perfectly sweet assonance. The word “clash” is not a CG invention, it remains a perfectly valid English noun, free for all to use!

1 Like

This ridiculous situation arose because of me. Due to the fact that I thought something that does not correspond to reality. And if this task does not fall into the Clashes, as I was convinced, then there are no problems. Excuse me

4 Likes

ok, I don’t get how orbs are more interesting than others. test cases 7 & 8 fail for me. On test case 7, how are orbs 2719 and 2790 more interesting than 2511 and 2962? Same thing on test case 8, how are orbs 1290 and 2881 more interesting than 417 and 2962? I’ve compared the differences and sums in surface areas etc. and can’t delineate

1 Like

They aren’t. But that’s not really a choice you get in test number 7. The king of the hill already picked orbs 2511 and 2962: you can’t pick the same lest your clash not even be fun.

I’m aware it can be a bit confusing that the two types of comparisons (between orb sets for fun; among a single orb set for interestingness) had to appear in the same puzzle; rewording suggestions that don’t spell out the entire solution would be appreciated.

1 Like

I do not understand the wording of this puzzle.
Specifically in the examples: “A clash opposing {1,2} to {2,2} is possible: at least three size-2 orbs are available”

  • What is ‘possible’ ? Does that mean ‘valid’ ?
  • It can’t be valid because spheres of diameter {1,2} obviously don’t have the same volume as {2,2}, right ?
2 Likes

It certainly does not mean valid: there is quite obviously more sparkling than glowing, so not the exact same volume.

It’s just there as a reminder you’re allowed to use the same diameter multiple times, both as your pick or by copying the opponent’s.

It’s only an example; ignore that line if it confuses you, you seemed to have understood it just right anyway!

The game works as follows:
• the first elf picks two glowing orbs
• the second elf picks two sparkling orbs

The volume of the orbs can be calculated as: volume = (4PI(diameter/2)^3)/3
If the glowing and sparkling orbs has the same total volume, the clash is valid.
This tavern only has orbs of integral diameter from A to B.
Multiples orbs of the same diameter can be used.
If there is more than one valid set, choose that diferent of glowing, with max diference between two sparkling orbs.

Input
Line 1: A and B, orb diameter bounds
Line 2: C and D, the glowing orb diameters
Output
If the only valid set is equal to glowing set, print VALID
Else print the orderd diameters of the sparkling set.

29 Likes

Thanks for the explanation. It helped me a lot. I just don’t understand what jbm wrote there.

2 Likes

12 lines of code … after a LONG time to understand the topic !
The text is horrible and the explanation are awful.
For instance :

  • the misleading with “possible” and “valid”.
  • It is not clear -> {9,10} is a SET of 2 values in math not a RANGE. The range is written [9,10].
  • “liquid ARE provided in the exact same volume” it is not clear that it “should” be brought with the same volume the answer will depend on this property…

And so one…
To be revised.

7 Likes

Of all my puzzles, this is the one that generates the most complaints by a long shot, but they can usually be classified as “It took me a long time to realize I had to read the text instead of guessing what’s needed, so now I resent you for that and I feel the urge to vent publicly.” It goes as far as people actually associating me very strongly with “my puzzles”, with only this specific one in mind. And yet hardly any constructive suggestion about the actual text ever come along. :smiley:

As this is a puzzle-not-a-clash: you are provided with a puzzle, not with a specification of what loops and variables you should mix. The reading is necessary. (no more puzzle spoilers, but for an illustration, I’m not going to state “you are asked for all pythagorean triples with an odd median and a total area under A”)

As it’s an easy puzzle, it’s doable in 12 lines of code, so of course the statement-to-code ratio is higher than for a harder puzzle!

This by no means it’s perfect or anything. Historically, it was meant to be the easiest of three is a series of gradually ascending difficulty. This is taking more time than expected because the data sizes that are needed to make the bruteish algorithms we can use here are very tricky to get into a CG-type puzzle. Even in solo mode. Even moreso if we want to maintain a semblance of language equity.

Your complaint is the first one in a long time that actually brings specific addressable points to the table. Congratulations! And thank you. We’re not at a constructive suggestion level yet, but at least it’s something I can work with.

Just not right now. But thanks again!

2 Likes

Something which can frustrated people a little bit is the elven wording. For instance, I discovered this word ‘elven’. Not everybody is aware of this magic world :wink:. I got this kind of drawback with one of my puzzle when dealing with assumptions behind probability. Which is not the topic of the puzzle (clustering) but I thought it could be interesting to deal with. It could be interesting to let the description of your puzzle with the magic features and warn the player that the first step is to really understand what is the mathematical problem to solve.
I hope I was not to much rude in my post. All apologies, I wrote it just after solve the puzzle.

That’s kind of how that “Reading Comprehension” tag sparked. :smiley:

That’s what 90% of this thread is about. Which is a good thing, in a convoluted way.

It was one of the very few (the only?) puzzles here on CG, where I needed a dictionary to understand the task. How dare you teaching me new vocabulary? :smiley:

4 Likes

I’m so sorry.

1 Like