Company: Texas
Difficulty: medium
Drop Specified Array Positions You are given an array `A` of `n` positive integers and an array `X` of `m` distinct positions. Remove from `A` every element whose 0-based position appears in `X`, and print the remaining elements in their original order. Input Format - The first line contains `n`. - The second line contains `n` integers, the elements of `A`. - The third line contains `m`. - The fourth line contains `m` distinct integers, the positions to remove. Output Format Print the remaining elements separated by one space. If every element is removed, print an empty line. Constraints - `1 <= n <= 10^4` - `1 <= m < n` - Every element of `A` is positive. - Every value in `X` is a distinct integer in `[0, n - 1]`. Examples ### Example 1 Input 4 1 2 3 4 2 2 3 Output 1 2 ### Example 2 Input 6 3 4 5 6 3 2 1 2 Output 3 4 6 3 2 Notes Positions are 0-based: position `0` is the first element. Removing a position does not change the meaning of any other position; all positions ref