Given a numeric grid, start at (0,p) and reach any cell in the final row. A normal move goes to one of three adjacent columns in the next row; up to k times, you may jump two rows while staying in the same colu…
Question
Given a numeric grid, start at `(0,p)` and reach any cell in the final row. A normal move goes to one of three adjacent columns in the next row; up to `k` times, you may jump two rows while staying in the same column.
```python
def max_score(board: list, p: int, k: int) -> int: ...
def max_score_path(board: list, p: int, k: int) -> tuple[int, list]: ...
def count_max_score_paths(board: list, p: int, k: int) -> tuple[int, int]: ...
```
## Requirements
- Count every visited cell, including start and destination.
- Normal moves are `(i+1,j-1)`, `(i+1,j)`, `(i+1,j+1)` when in bounds.
- Special move `(i+2,j)` consumes one jump.
- Return one deterministic maximizing path and the number of maximizing paths modulo `10**9+7`.
- Handle negative values, one-row boards, unreachable states, and ties.
## Follow-ups
1. Add bonus `X` for consecutive equal values and `Y` for strictly increasing triples.
2. Reduce memory while retaining path reconstruction.
3. Support blocked cells or per-cell jump costs.
4. Answer for every starting column.
The public brief is identical for people and crawlers. Account access changes tools, not the indexed description.