I’m trying to solve the Winamax Golf puzzle. The problem statement tells me there is a unique solution to every test case:
Your program must output the unique solution for each course.
Now my program can find multiple solution which I don’t see how contradict winning conditions.
Victory Conditions
You output a solution grid:
All balls land in a hole with at least one hit each.
Arrows do not cross each other.
Arrows do not cross ball or hole locations.
Arrows do not point to a water hazard.
Arrows do not point outside the grid.
Here’s the example of three solutions to test case 7:
One is obvious; but it took me quite some time to read the problem in full and discover the second one. The one that moved the problem from crazyhard to ohthatwaseasy space.
I also spent a lot of time understanding this rule…
A ball moves across as many cells as its shot count the first time it moves, vertically or horizontally. The next move becomes one shorter, it decreases the number of cells to pass by 1.
This sentence should be reworded to something like:
A ball with a shotcount N will jump by N cells in one direction, vertically or horizontally. The shotcount is then decreased by 1 and the ball can jump again.
Hi,
I think you are missing this part:
“A ball moves across as many cells as its shot count the first time it moves, vertically or horizontally. The next move becomes one shorter, it decreases the number of cells to pass by 1.”
If it is 3 as you suggest, there will be no space to move.
Water may or may not be present, the only condition is that you do not land in water.
So the test case is correct. There is no need for the X under the 2.
Actually there are some issues with a later test case, where you got legit alternative solutions but they want you to find their solution … which i find silly.
I’ve got the same issue, solving with python. I think there is an error in this test-case. First line passed to prgoramm is “8 40”, but then only 7 lines are passed. Script waits for one more line.