```ts
export type Cut = { takings: number, pieces: number[] };

function cutRoll(length: number, board: [number, number][]): Cut {
  if (typeof length !== 'number' || !Number.isInteger(length) || length < 0) {
    throw new Error('Length must be a non-negative integer');
  }

  const memo = Array(length + 1).fill(-1);

  function dp(index: number): [Cut, number] {
    if (index === 0) return [{ takings: 0, pieces: [] }, 0];

    let bestTaking = -Infinity;
    let bestPieceLength = 0;

    for (const [boardLength, price] of board) {
      if (index >= boardLength) {
        const [pieceCut, remaining] = dp(index - boardLength);
        const totalTaking = pieceCut.takings + price;
        if (totalTaking > bestTaking || (totalTaking === bestTaking && boardLength > bestPieceLength)) {
          bestTaking = totalTaking;
          bestPieceLength = boardLength;
        }
      }
    }

    memo[index] = [bestTaking, bestPieceLength];
    return [memo[index], index - bestPieceLength + 1];
  }

  const [result, _] = dp(length);
  const pieces = Array(result.pieces).fill(bestPieceLength);

  return result;
}
```