Twin Picker Grid Harvest
Two harvesters start at the top-left and top-right of a yield grid and descend one row per step, each moving diagonally or straight down. They collect the cell they land on (shared cells count once). Maximize the combined yield reaching the bottom row.
Problem
Given a rows×cols grid of non-negative cherries, two robots start at (0,0) and (0,cols−1). Each step both move down one row to column c−1, c, or c+1. Cherries on a cell are collected once even if both robots stand on it. Return the maximum cherries collected.
Input
A rows×cols grid (1 ≤ rows, cols ≤ 70, 0 ≤ grid[i][j] ≤ 100).
Output
An integer: the maximum combined cherries.
Constraints
- Both robots move down exactly one row per step
- Column changes are within ±1
- A shared cell is counted once
Examples
Example 1
Input
grid = [[3,1,1],[2,5,1],[1,5,5],[2,1,1]]
Output
24
The two paths together collect 24 cherries.
Example 2
Input
grid = [[1,0,0,0,0,0,1],[2,0,0,0,0,3,0],[2,0,9,0,0,0,0],[0,3,0,5,4,0,0],[1,0,2,3,0,0,6]]
Output
28
Optimal coordinated descent yields 28.