Types: N: int, K: int, P: List[int]
Ranges: 2 ≤ N ≤ 200000, 2 ≤ K ≤ N, 0 ≤ P[i] ≤ N-1
Addtl Info: P_0, P_1, ..., P_{N-1} are all different and form a permutation of (0, 1, ..., N-1)