Domain: Business Operations & Analytics

You are given `OTS_DS_0558_codeforces_history.csv` in the working directory.

The file contains noisy Codeforces contest history records. Columns include:

- `name`
- `type`
- `durationSeconds`
- `startTimeSeconds`
- other columns that are not needed for the final calculation

Some fields contain noise such as `##ERROR##`, empty cells, and an `Unnamed: 0` index column. Do not use pandas.

## Derived fields

For each record, derive the following values exactly as defined below:

1. `durationSeconds`:
   - Extract the first contiguous digit sequence from the original `durationSeconds` cell.
   - Convert it to a numeric value.
2. `contestants_count`:
   - Extract the first contiguous digit sequence from `startTimeSeconds`.
   - Interpret that extracted value as a Unix timestamp in seconds.
   - Convert it to the calendar year in UTC.
3. `ratingUpdateTimeSeconds`:
   - Extract the first contiguous digit sequence from `startTimeSeconds`.
   - Convert it to a numeric value.
4. `problem_count`:
   - Split `name` using the comma delimiter `,`.
   - Set `problem_count` equal to the number of resulting elements.

## Valid-record rule

A record is valid only if all four derived values satisfy:

- `durationSeconds > 0`
- `contestants_count > 0`
- `ratingUpdateTimeSeconds > 0`
- `problem_count > 0`

## Aggregation rule

Using only valid records:

1. Identify the dominant `type`, defined as the type with the greatest number of valid records.
2. Keep only valid records whose `type` equals that dominant type.

Using that dominant-type subset, compute:

- `A`: total number of records, rounded to 5 decimal places
- `B`: mean of `durationSeconds`, rounded to 5 decimal places
- `C`: median of `contestants_count`, rounded to 5 decimal places
- `D`: sample standard deviation of `problem_count` using `ddof = 1`, rounded to 5 decimal places
- `E`: 75th percentile of `ratingUpdateTimeSeconds` using linear interpolation, rounded to 5 decimal places
- `F`: sum of `contestants_count`, rounded to 5 decimal places
- `G`: `B / C` using the already rounded values of `B` and `C`, then rounded to 5 decimal places
- `H`: `F / A` using the already rounded values of `F` and `A`, then rounded to 2 decimal places
- `I`: `E / B` using the already rounded values of `E` and `B`, then rounded to 2 decimal places

## Output format

Print and return exactly 9 space-separated numeric values in this exact order:

`A B C D E F G H I`

Formatting rules:

- `A` through `G` must each be formatted to exactly 5 decimal places.
- `H` and `I` must each be formatted to exactly 2 decimal places.

No extra text.

Grading rubric:
criterion: The final answer is exactly 9 space-separated numeric values in the order A B C D E F G H I, with A through G formatted to 5 decimal places and H and I formatted to 2 decimal places.
weight: 10
criterion: The solution reads `OTS_DS_0558_codeforces_history.csv` and derives values exactly as specified: durationSeconds from the first digit sequence in `durationSeconds`, contestants_count as the UTC calendar year from the first digit sequence in `startTimeSeconds`, ratingUpdateTimeSeconds from the first digit sequence in `startTimeSeconds`, and problem_count as the comma-split length of `name`.
weight: 15
criterion: The valid-record filtering and dominant-type selection are correct, and the dominant type is exactly `CF` with exactly 69 valid records.
weight: 15
criterion: A, B, and C are exactly `69.00000 9028.36232 2025.00000`.
weight: 15
criterion: D, E, and F are exactly `0.47351 1759502100.00000 139563.00000`.
weight: 15
criterion: G, H, and I are exactly `4.45845 2022.65 194886.08`.
weight: 15
criterion: The final output string is exactly `69.00000 9028.36232 2025.00000 0.47351 1759502100.00000 139563.00000 4.45845 2022.65 194886.08`.
weight: 15

Golden answer:
```python
import csv
import math
import re
from collections import Counter
from datetime import datetime, timezone
from pathlib import Path


DATA_PATH = Path(__file__).resolve().parent / "OTS_DS_0558_codeforces_history.csv"


def extract_first_number(value):
    match = re.search(r"(\d+)", "" if value is None else str(value))
    return float(match.group(1)) if match else None


def quantile_linear(values, q):
    ordered = sorted(values)
    if not ordered:
        return 0.0
    position = (len(ordered) - 1) * q
    lower = int(math.floor(position))
    upper = int(math.ceil(position))
    if lower == upper:
        return ordered[lower]
    fraction = position - lower
    return ordered[lower] * (1.0 - fraction) + ordered[upper] * fraction


def median(values):
    ordered = sorted(values)
    n = len(ordered)
    middle = n // 2
    if n % 2 == 1:
        return ordered[middle]
    return (ordered[middle - 1] + ordered[middle]) / 2.0


def sample_std(values):
    n = len(values)
    mean_value = sum(values) / n
    variance = sum((value - mean_value) ** 2 for value in values) / (n - 1)
    return math.sqrt(variance)


def solve():
    records = []
    with DATA_PATH.open(newline="", encoding="utf-8") as handle:
        reader = csv.DictReader(handle)
        for row in reader:
            duration_seconds = extract_first_number(row.get("durationSeconds"))
            start_time_number = extract_first_number(row.get("startTimeSeconds"))
            contestants_count = None
            if start_time_number is not None:
                contestants_count = datetime.fromtimestamp(start_time_number, tz=timezone.utc).year
            rating_update_time_seconds = start_time_number
            problem_count = len(("" if row.get("name") is None else row.get("name")).split(","))

            records.append(
                {
                    "type": row.get("type", ""),
                    "durationSeconds": duration_seconds,
                    "contestants_count": contestants_count,
                    "ratingUpdateTimeSeconds": rating_update_time_seconds,
                    "problem_count": problem_count,
                }
            )

    valid_records = [
        record
        for record in records
        if record["durationSeconds"] is not None
        and record["durationSeconds"] > 0
        and record["contestants_count"] is not None
        and record["contestants_count"] > 0
        and record["ratingUpdateTimeSeconds"] is not None
        and record["ratingUpdateTimeSeconds"] > 0
        and record["problem_count"] > 0
    ]

    dominant_type = Counter(record["type"] for record in valid_records).most_common(1)[0][0]
    dominant_records = [record for record in valid_records if record["type"] == dominant_type]

    a = round(float(len(dominant_records)), 5)
    b = round(sum(record["durationSeconds"] for record in dominant_records) / len(dominant_records), 5)
    c = round(median([record["contestants_count"] for record in dominant_records]), 5)
    d = round(sample_std([record["problem_count"] for record in dominant_records]), 5)
    e = round(quantile_linear([record["ratingUpdateTimeSeconds"] for record in dominant_records], 0.75), 5)
    f = round(sum(record["contestants_count"] for record in dominant_records), 5)
    g = round(b / c, 5)
    h = round(f / a, 2)
    i = round(e / b, 2)

    result = f"{a:.5f} {b:.5f} {c:.5f} {d:.5f} {e:.5f} {f:.5f} {g:.5f} {h:.2f} {i:.2f}"
    print(result)
    return result


if __name__ == "__main__":
    solve()
```

**Reasoning**

The task’s intended transformations are unusual, so the solution follows them literally. It extracts the first numeric token from `durationSeconds`, derives `contestants_count` from the UTC calendar year of the first numeric token in `startTimeSeconds`, reuses that same extracted `startTimeSeconds` number for `ratingUpdateTimeSeconds`, and defines `problem_count` as the number of comma-separated pieces in `name`. After filtering to valid rows, the dominant valid `type` is `CF` with 69 records. The final nine outputs are then computed from only those `CF` rows, with `A` through `G` formatted to 5 decimal places and `H` and `I` formatted to 2 decimal places to match the written rounding rules.

```text
69.00000 9028.36232 2025.00000 0.47351 1759502100.00000 139563.00000 4.45845 2022.65 194886.08
```