An integer N (1 ≤ N ≤ 600), representing some quantity or size.
An integer K (1 ≤ K ≤ N), representing some quantity or size.
An integer A (0 ≤ A ≤ 180,000), representing some quantity or size.
An integer B (A ≤ B ≤ 180,000), representing some quantity or size.
A list of integers X of size N, where each integer is between 0 and 300.

### Example Input:

```
4
2
58
100
10 10 50 80
```

### Function Signature:
Write a function f(N, K, A, B, X) that takes in the input.
```python
def f(N: int, K: int, A: int, B: int, X: List[int]):
    '''
    N: an integer
    K: an integer
    A: an integer
    B: an integer
    X: a list of integers
    '''
```