```python
from typing import List

def parse_amount(text: str) -> int:
    """
    Parses a decimal amount string into integer cents.

    Args:
        text (str): A string representing a decimal amount, with digits and an optional
            dot followed by exactly two fraction digits. Examples: "12.34" or "7".

    Returns:
        int: The equivalent amount in integer cents.

    Raises:
        ValueError: If the input is not a valid decimal amount string.
    """
    if not isinstance(text, str) or '.' not in text or len(text.split('.')[1]) != 2:
        raise ValueError("Invalid amount format")

    try:
        value = float(text)
    except ValueError:
        raise ValueError("Amount must be a number")

    cents = int(value * 100)
    if cents < 0:
        raise ValueError("Amount cannot be negative")
    
    return cents

def format_amount(cents: int) -> str:
    """
    Formats integer cents back into a decimal amount string with exactly two fraction digits.

    Args:
        cents (int): The amount of money in integer cents.

    Returns:
        str: The formatted amount as a string.
    """
    if cents < 0:
        raise ValueError("Amount cannot be negative")
    
    return f"{cents / 100:.2f}"

def allocate_cents(total_cents: int, weights: List[int]) -> List[int]:
    """
    Allocates total_cents across a list of integer weights proportionally.

    Args:
        total_cents (int): The total number of cents to be allocated.
        weights (List[int]): A list of non-negative integers representing the weights for allocation.

    Returns:
        List[int]: A list of integer shares corresponding to each weight.

    Raises:
        ValueError: If any weight is not a non-negative integer, if the total is negative,
            if the weights do not sum to zero, or if the inputs are invalid.
    """
    if not isinstance(total_cents, int) or total_cents < 0:
        raise ValueError("Total cents must be a non-negative integer")
    
    if not isinstance(weights, list) or any(not isinstance(w, int) or w < 0 for w in weights):
        raise ValueError("Weights must be a list of non-negative integers")
    
    total_weight = sum(weights)
    if total_weight == 0:
        return [total_cents // len(weights)] * len(weights)
    elif total_weight != total_cents:
        raise ValueError("Sum of weights must equal total cents")
    
    shares = [0] * len(weights)
    remainder = total_cents
    
    for i, weight in enumerate(sorted(enumerate(weights), key=lambda x: (x[1], -x[0]))):
        share = weight[1]
        if remainder >= share:
            shares[i] += share
            remainder -= share
        else:
            shares[i] += remainder
            break
    
    return shares

```