https://www.codingame.com/training/medium/dice-galaxy
Send your feedback or ask for help here!
Created by @field3,validated by @bbb000bbbyyy,@Deltaspace and @Ellain.
If you have any issues, feel free to ping them.
https://www.codingame.com/training/medium/dice-galaxy
Send your feedback or ask for help here!
Created by @field3,validated by @bbb000bbbyyy,@Deltaspace and @Ellain.
If you have any issues, feel free to ping them.
My only issue is: how on earth could this have been approved? Have you even read the statement?!
I solved this as a reverse clash, and I disapprove of this style of writing for puzzles.
It appears I’m the sole codingamer to have solved it at time of writing. Did approvers not even bother to write up s olution of their own?
@bbb000bbbyyy @Deltaspace @Ellain
I’m also curious to know your feelings regarding the statement.
Can you share with me in PM your solutions to the puzzle? (As approvers, you should have a solution of your own)
(I’ll contact the approvers by email too)
I don’t understand all the fuss about this puzzle. The statement is clear to me (not perfect sentences I give you that) and I actually find the problem at hand quite interesting.
By the way, I never approve a contribution until I build a working solution. And I can see that already 8 codingamers solved the puzzle.
I implemented a dedicated class to fold the 2D pattern into a 3D dice using advanced trigonometry.
About the contribution’s comments section: I don’t comment unless I have a question or a remark, for example when I spot an error with a test / validator.
Just a small remark: As far as I know, this puzzle was supposed to be the second in a series (the third is still currently pending). The first one (“Dice universe” or something like that) has not been accepted (most likely moved back to drafts by the author). The statement is much easier to understand with the first puzzle in mind.
Maybe the statement can be more clear, but it will be less interesting.
First, we already know that it’s about the dice “…6 must be arranged according to the dice law.” and what we supposed to do. That is we know that it’s about the dice cube(6 sides of the cube) and we should arrange “6”. But we still have a question what “dice law” means and with that line “When the net is made into a cube, “6” is placed on the opposite side of “1”.” it became clear. In addition to it, we have an example that makes it clearer. Other lines just clarify implementation.
My solution: (UPD: 4 days have passed, so I erased it, cause it shouldn’t be there).
(Gues my English not the best, sorry for it).
If we put aside that this puzzle’s description is the worst I saw on CG, the actual puzzle itself is quite nice and interesting…
To see it positively: besides a coding puzzle, we got another one for the price of one:
“Reverse engineer what is the task from the IDE test cases!”
Good puzzle but the description is atrocious, I hesitated to correct the text in the contribution tab, but actually I don’t know if that works for published puzzles. And also it’s probably better to ask about changing it first, so what do you think ?
Editing description after publishing should work. The only disadvantage I experienced earlier (not sure if it is still the case) that people, who already started to solve, will see their code disappear from ide, they have to get it back from the history tab (if they submitted at all already.)
Despite this, making a bad description better would benefit all, however it should be the primary responsibility and decision of the original author - especially if we are talking about a rewrite and not just correcting some small typos.
You’re right, thanks for your answer. I sent a message to the author, we’ll see.
nice puzzle… i get it with around 300 lines of code by cutting all problems one by one, doing a real cubes patron analysis and feel like crying three or four times each time i found a new complexity. Is it fair to put it in a medium area ?
5 stars by the way and a to forget all this mess…
Did you hardcode all possible options ? Mine is about 30 lines.
The author never replied to my message btw.
@Djoums
yes, detecting each patron, using rotation, symetry horizontal, vertical and assign each patron to diagonals, knight move, or special cases to apply the dice law…
i hope my solution should pass the next level puzzle.
this page helps me and may help: http://therese.eveilleau.pagesperso-orange.fr/pages/truc_mat/textes/cube_patrons.htm
I ve seen your solution, smart and brilliant as usual…
@Djoums not for trolling, but i test your solution.
In fact it applies a dice law without a cube, mine is really identifying the cube patrons. let’s imagine universe with cubes and garbage like this example:
5
3
…
1###.
…##.
your solution:
…
1#6#.
…##.
But it is not a cube ^^. Mine will do nothing with this shit
Sure, but handling bad input is not part of the problem If that was the case I’d probably add a filter function to analyze it before running the rest of the code.
That being said your solution works so it’s good, and more importantly it’s yours.
Puzzle description is hilarious, I was tempted to edit “net” into “template” but I think it kills the fun.
I wouldn’t be surprised if there was a japanese word that could mean both net or template, it would explain a lot.
Anyway the puzzle itself is pretty cool !