1. You are given two integers N and M, and an array(arr) of numbers with length M. 2. N represents the total number of tasks assigned to a group of 5 students. 3. Out of these five students, three students completed M number of tasks of their choices and left the group. 4. Tasks completed by these students are represented by the given array. 5. Now, the remaining two students(s1 and s2) have to complete all the remaining tasks. 6. They decided to complete the remaining tasks in an alternate way - First of the remaining tasks will be completed by s1 Second of the remaining tasks will be completed by s2 Third of the remaining tasks will be completed by s1.. and so on. 7. You have to find the tasks that s1 and s2 have to complete.
1 <= M,N <= 10^3 1 <= arr[i] <= 10^3
Two Number N and M arr1 arr2.. M numbers
2 lines containing space-separated numbers. Numbers in first line represents the tasks that s1 have to complete. Numbers in second line represents the tasks that s2 have to complete.
15 6 2 5 6 7 9 4
1 8 11 13 15 3 10 12 14