Types: A: int, B: int, M: int, a: List[int], b: List[int], x: List[int], y: List[int], c: List[int]  
Ranges: 1 ≤ A ≤ 10^5, 1 ≤ B ≤ 10^5, 1 ≤ M ≤ 10^5, 1 ≤ a[i], b[i], c[i] ≤ 10^5, 1 ≤ x[i] ≤ A, 1 ≤ y[i] ≤ B, c[i] ≤ a[x[i]] + b[y[i]]  
Addtl Info: None