**Permutation Clear solution codechef** – Alice has an array $A$ of length $N$ which is initially a *permutation*. She dislikes $K$ numbers which are $B_{1},B_{2},…,B_{K}$ all of which are **distinct**. Therefore, she removes all the occurrences of these numbers from $A$. The order of the remaining elements of the $A$ does **not** change.

## [Solution] Permutation Clear solution codechef

Can you find out the resulting array $A$?

Note: A *permutation* of length $N$ is an array where every integer from $1$ to $N$ occurs exactly once.

### Input Format

- The first line contains a single integer $T$ — the number of test cases. Then the test cases follow.
- The first line of each test case contains an integer $N$ — the size of the array $A$.
- The second line of each test case contains $N$ integers $A_{1},A_{2},…,A_{N}$ denoting the array $A$.
- The third line of each test case contains an integer $K$ — the size of the array $B$.
- The fourth line of each test case contains $K$ integers $B_{1},B_{2},…,B_{K}$ denoting the numbers which Alice dislikes.

### Output Format

For each test case, output the resulting array $A$ after the removal of all occurrences of $B_{1},B_{2},…B_{K}$.

It is guaranteed that there will be at least one element in the resulting array.

## Permutation Clear solution codechef

- $1≤T≤1000$
- $1≤K<N≤1_{5}$
- $1≤A_{i},B_{i}≤N$
- $A$ is initially a
*permutation*. - $B_{i}B_{j}$ when $(ij)$
- Sum of $N$ over all test cases does not exceed $2⋅1_{5}$.

### Sample 1:

3 4 4 1 3 2 2 3 1 9 5 2 9 1 8 6 4 3 7 3 5 8 9 5 3 4 5 1 2 2 2 3

4 2 2 1 6 4 3 7 4 5 1

## Permutation Clear solution codechef Explanation:

**Test Case 1:** Here $A=[4,1,3,2]$ and $B=[3,1]$. The resulting array $A$ after removing all the numbers which Alice dislikes is $[4,2]$.

Note that here $[2,4]$ is an incorrect answer since the order of elements should be the same as in the original array.

**Test Case 2:** Here $A=[5,2,9,1,8,6,4,3,7]$ and $B=[5,8,9]$. The resulting array $A$ after removing all the numbers which Alice dislikes is $[2,1,6,4,3,7]$.

**Test Case 3:** Here $A=[3,4,5,1,2]$ and $B=[2,3]$. The resulting array $A$ after removing all the numbers which Alice dislikes is $[4,5,1]$.