An integer \( n \) (1 ≤ \( n \) ≤ 10^9), representing some quantity or size.
An integer \( m \) (1 ≤ \( m \) ≤ 2 × 10^5), representing another quantity or size.
An integer \( x \) (1 ≤ \( x \) ≤ 10^5), representing a bonus value.
An integer \( y \) (1 ≤ \( y \) ≤ 10^5), representing a penalty value.
A list of \( m \) tuples, each tuple containing:
    - An integer \( c_i \) (1 ≤ \( c_i \) ≤ 3), representing a color.
    - An integer \( l_i \) (1 ≤ \( l_i \) ≤ \( r_i \)), representing a start position.
    - An integer \( r_i \) (\( l_i \) ≤ \( r_i \) ≤ \( n \)), representing an end position.

### Example Input:

```
8 5 10 5
1 1 7
3 1 2
1 5 6
3 1 4
3 6 8
```

### Function Signature:

Write a function `f(n, m, x, y, robots)` that takes in the input.
```python
def f(n: int, m: int, x: int, y: int, robots: List[Tuple[int, int, int]]):
    '''
    n: an integer
    m: an integer
    x: an integer
    y: an integer
    robots: a list of tuples, each containing three integers
    '''
```