eolymp
bolt
Try our new interface for solving problems
Problems

Two arrays

Two arrays

Two arrays of integers are given. Print the elements from the first array (in the same order like they are given in the first array), that are absent in the second array. \InputFile First given number $n$ of elements in the first array, then given $n$ integers --- the elements of array. Then given the number of elements $m$ in the second array. Then given elements of the second array. The number of elements in each array is not greater than $100$. All elements are integers. \OutputFile Print in the first line the number of required elements. In the second line print those elements of the first array, that are absent in the second array in the same order like in the first array.
Time limit 1 second
Memory limit 128 MiB
Input example #1
7
3 1 3 4 2 4 12
6
4 15 43 1 15 1
Output example #1
4
3 3 2 12
Source Китёнок 2011 г. Ковров