Winamax Sponsored Contest (Golf) - Puzzle Discussion

There is a problem with the judgment rules of this question, because the standard answer is not unique. I first used bfs to find the shortest feasible solution, and found that it was not a standard answer, and then used dfs to find the solution, and found that it was not a standard answer either. I can’t find the law of the standard answer, I hope the question can give more information

Hey, Just tried to solve the winamax challenge and it seems that at least some tests are wrong

Test 2:
input:
[2.X]
[…H]
[.H1]
expected output:
[v…]
[v…]
[>.^]

the ball ‘2’ is taking 3 shots, which is not allowed. it seems like this test case input should have been like in the example
[2.X]
[X.H]
[.H1]
this would have been a valid input to the expected output as X (water hazard) is present at (0, 1) so you dont count this shot

also at test 3:
input:
[4…XX]
[.H.H.]
[…H.]
[.2…2]
[…]
expected output:
[v…]
[v…<]
[v^…^]
[v^.^^]
[>>>^.]

here it seems that ball ‘4’ is doing 8 shots and the rightmost ball ‘2’ is doing 3 shots

Would love someone to let me know if I’m wrong in my assumption the test cases are wrong

Cheers

The puzzle statement says:

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.

In Test 2, for example, the “2” ball is moved with 2 shots (not 3):

  • First shot: The ball moves downwards across 2 cells.
  • Second shot: The ball moves to the right across 1 cell.

Hey, thank you for your reply!

Now I understand, should have read the puzzle better! thanks

I am trying to understand the rules. If I understand it correctly, a ball can only move as many steps as its shot count, and after that each movement one less. If I look to case 4,
IN:

6 6
3..H.2
.2..H.
..H..H
.X.2.X
......
3..H..

and OUT:

>>>..v
.>>>.v
>>....
^..v..
^..v..
^.....

It seems to me that the ball on coordinate 1,1 (shot count 2) moves three steps (>>> at row 1). What mistake do I make?

Edit – those three steps are of course a shot of 2 and then a shot of 1. :man_facepalming:.

Ok, another question then; at case 5, input

.XXX.5X.
X.4.X..X
X4..X3.X
X...X.X.
.X.X.H.X
X.HX...X
X..X.H.X
.XH.XXX.

my code is finding the following three solutions:

solution 0
v<<<<<..
v.v.....
vvv..v..
vvv..v..
vvv.....
vv......
v>>>>...
>>......
solution 1
v<<<<<..
v.>>>>v.
vvv<<<v.
vvv..vv.
vvv...<.
vv......
v>>>>...
>>......
solution 2
v<<<<<..
v.>>>>v.
vvv<<<v.
vvv..vv.
vvv.>.v.
vv..^.v.
v>>>^.<.
>>......

I have been manually checking them, and I cannot find what is wrong with solution 1 and solution 2. Can someone tell me where I make a mistake? :grimacing:

Edit Lol, I spend a lot of time looking for a solution, and then just after posting the question I find the answer. Second time already; apologies for using the CG forum for what end up to be conversations with myself. Leaving the post + answer here for any upcoming players. My mistake: apparently you can only end in a hole with the exact shotcount at that moment. (While a shot of 4 is up, that shot will not end up in a hole at distance < 4. It will instead overshoot)

Is there any possibility of getting other programming languages enabled? From my understanding the chance to win an interview or whatever that was ended long ago anyways.