```ts
export function splitCents(total: number, weights: number[]): number[] {
  if (!Number.isInteger(total) || total < 0) {
    throw new Error('Total must be a non-negative integer');
  }
  if (!Array.isArray(weights) || weights.length === 0) {
    throw new Error('Weights must be a non-empty array of numbers');
  }
  for (const weight of weights) {
    if (!Number.isInteger(weight) || weight <= 0) {
      throw new Error('Weights must be positive integers');
    }
  }

  const sumOfWeights = weights.reduce((acc, weight) => acc + weight, 0);
  const basePart = Math.floor(total * (1 / sumOfWeights));
  const parts = weights.map(weight => basePart);
  let remainingCents = total - parts.reduce((acc, part) => acc + part, 0);

  while (remainingCents > 0) {
    const maxIndex = weights.findIndex(weight => weight === Math.max(...weights));
    parts[maxIndex]++;
    remainingCents--;
  }

  return parts;
}
```