An integer n (1 ≤ n ≤ 10^5), representing some quantity.
An integer m (0 ≤ m ≤ min(n×(n−1), 10^5)), representing another quantity.
A list of integers c of size n, where each integer is between 0 and 1000.
A list of m tuples (ai, bi), where 0 ≤ ai, bi ≤ n-1.

### Example Input:

```
2 1
1 2
0 1
```

### Function Signature:
Write a function f(n, m, c, roads) that takes in the input.
def f(n: int, m: int, c: List[int], roads: List[Tuple[int, int]]):
    '''
    n: an integer
    m: an integer
    c: a list of integers
    roads: a list of tuples
    '''