Error
|
|
---|---|
@Ibrahim Nash | 6379 |
@blackshadows | 6329 |
@mb1973 | 5376 |
@Quandray | 5231 |
@akhayrutdinov | 5111 |
@saiujwal13083 | 4510 |
@sanjay05 | 3762 |
@marius_valentin_dragoi | 3522 |
@sushant_a | 3459 |
@verma_ji | 3357 |
@KshamaGupta | 3318 |
Complete Leaderboard | |
|
|
@184025 | 108 |
@terabaap123 | 97 |
@anamikaprasad124 | 92 |
@arshjit_singh7 | 92 |
@kumsachin10 | 90 |
@vaibhavinayak | 75 |
@TanmayJ | 74 |
@NullPointerException | 74 |
@ronaldo77 | 72 |
@bhupindersingh25122001 | 68 |
@ritiksethi21 | 68 |
Complete Leaderboard |
Given two arrays A and B of positive integers. Your task is to find numbers which are present in the first array, but not present in the second array.
Input:
The first line of input contains an integer T denoting the number of test cases. Each test case contains space separated integers N and M which denotes the number of elements in the array A and B. Next two line contains space separated array elements.
Output:
Print space separated numbers present in the first array but not in the second.
Constraints:
1 <= T <= 100
1 <= N, M <= 107
1 <= Ai,Bi <= 1018
Example:
Input:
2
6 5
1 2 3 4 5 10
2 3 1 0 5
5 5
4 3 5 9 11
4 9 3 11 10
Output:
4 10
5
Explanation:
Testcase 1: 4 and 10 are present in first array while not in second array.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes