async def run_submission(
    client: PistonClient, problem: dict, test_input: str, submission: str, test_output: str | None = None
) -> tuple[str, str]:
    """
    Executes a submission against a test case using the Piston execution environment.

    Args:
        client: PistonClient instance for executing code
        problem: Dictionary containing problem configuration
        test_input: Input data for the test case
        submission: Source code of the submission
        test_output: Optional expected output for the test case

    Returns:
        tuple[str, str]: A tuple containing (score, feedback)
    """
    data = {
        "files": [
            # the actual submission
            {"name": f"graders/{problem['id'].lower()}.cpp", "content": submission},
            # pass the input
            {"name": "input.txt", "content": test_input},
            # pass the expected output
            *([{"name": "correct_output.txt", "content": test_output}] if test_output else []),
            # grader files
            *({"name": name, "content": content} for name, content in problem["grader_files"] if content),
        ],
        "run_timeout": round(
            (problem["time_limit"] + 3) * 1000
        ),  # +3 seconds hard limit. time limits are handled by the ioi script
        "run_memory_limit": problem["memory_limit"],
    }
    return await execute_ioi(client, data)

    Executes a submission against a test case using the Piston execution environment.

    Args:
        client: PistonClient instance for executing code
        problem: Dictionary containing problem configuration
        test_input: Input data for the test case
        submission: Source code of the submission
        test_output: Optional expected output for the test case

    Returns:
        tuple[str, str]: A tuple containing (score, feedback)
    
src/open_r1/utils/competitive_programming/ioi_scoring.py