Types: N: int, a: List[int]
Ranges: 1 ≤ N ≤ 10^5, 1 ≤ a[i] ≤ 10^9
Addtl Info: a has size 3N