### Input Description:

An integer \(N\) (2 ≤ \(N\) ≤ 10^5), representing some quantity or size.
A list of tuples of size \(N\), where each tuple consists of two integers \((A_i, B_i)\) with \(0 ≤ A_i, B_i ≤ N-1\).

### Example Input:

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

### Function Signature:

Write a function `f(N, inputs)` that takes in the input:
```python
def f(N: int, inputs: List[Tuple[int, int]]):
    '''
    N: an integer
    inputs: a list of tuples, where each tuple contains two integers
    '''
```