You are an expert Python programmer.
Write a Python code that defines a function named `solve` which takes one argument:
- a list of integers.
The code must:
- return a list of prefix sums of the input list,
- return an empty list if the input list is empty,
- raise a TypeError if any element is not an integer,
- not import external libraries unless strictly required.
Important formatting rules:
- Output only valid Python function code, nothing else.
- Enclose the code between <python_code> and </python_code> tags.
- Do not add explanations, comments, or test case.

