1 / 3
Apr 3

Are there any masochists who fancy trying to figure out what is really required to get AC for a poorly specified problem?

BEANGAME4.

I believe my solution prioritises the left lanes as per Oleg’s comment, and mohit rathi’s comment that the game is over if the energy reaches zero - not just goes negative as the problem description says.

I’ve also tried allowing the energy to be zero or below at the final level, but still WA. I can’t think what else to try. Any thoughts?

These are some test cases and my answers. Can anybody confirm or correct them?

1 6 5
3 2 9 16 3
4 0 7 26 1
1 7 3 30 9
8 19 8 3
10 3 6 4
1 0 5
3 2 9 16 3
4 0 7 26 1
1 7 3 30 9
8 19 8 3
10 3 6 4
3 3 1
2
2
2
3 3 2
2 2
2 2
2 2
1
1
3 3 2
2 2
2 2
2 2
2
2
3 3 2
2 2
2 2
2 2
3
3
1 3 2
2 2
2 2
2 2
1
1
1 3 2
2 2
2 2
2 2
2
2
1 3 2
2 2
2 2
2 2
3
3
1 4 2
2 2
2 2
2 2
1
1
2 4 2
2 2
2 2
2 2
1
1
3 4 2
2 2
2 2
2 2
1
1
1 0 2
1 1
1 1
0 1
5
6
1 2 2
1 1
1 1
1 1
0
0

DONE IT!
RR-LL-RR-LL-R
GAME OVER!
DONE IT!
LL
GAME OVER!
DONE IT!
LL-R
DONE IT!
LL-R
GAME OVER!
DONE IT!
U-R
DONE IT!
U-R
DONE IT!
U-R
DONE IT!
L-R
DONE IT!
LL-R
GAME OVER!
GAME OVER!

DONE IT!
RR-LL-RR-LL-R
GAME OVER!
DONE IT!
LL
GAME OVER!
DONE IT!
L-L
DONE IT!
L-L
GAME OVER!
DONE IT!
R-L
DONE IT!
R-L
DONE IT!
R-L
DONE IT!
U-L
DONE IT!
L-L
GAME OVER!
GAME OVER!

It appears that the expected output is the one that prioritizes left most tracks with higher levels having higher priority.

Thank you!

It’s interesting that your answers differ from Oleg’s for a couple of these. I guess this must mean there are no test cases like this.

I’ve tried prioritising lower left-most tracks (as suggested by Oleg), higher left-most tracks (as you suggested), and even shorter paths. Still WA. It’s hard to know whether I’m doing something wrong, or there’s yet another unspoken requirement.

It’s so frustrating that what should be a simple problem is spoilt by such a poor specification.