Array
1872. Stone Game VIII
The move worth keeping in Stone Game VIII is that a whole turn is described by one number: where you choose to stop. You always take some prefix of the row, merge it into a single stone, and hand your opponent a row that begins with that merged pile — structurally the same game on the remaining suffix. So a move that ends at index i is worth exactly prefix[i], and afterward the opponent faces the identical problem shifted one step right.
Loading…