SMPSEQ3  Fun with Sequences
You are given a sorted sequence of n integers S = s_{1}, s_{2} ... s_{n} and a sorted sequence of m integers Q = q_{1}, q_{2} ... q_{m}.
Please print in ascending order all such s_{i} that does not belong to Q.
Input data specification
In the first line you are given one integer 2 <= n <= 100,
and in the following line n integers:
100 <= s_{i} <= 100, s_{i} <= s_{i+1}.
In the third line you are given one integer 2 <= m <= 100,
and in the following line m integers:
100 <= q_{i} <= 100, q_{i} <= q_{i+1}.
Output data specification
The sequence of requested integers separated by spaces.
Example
Input: 5 2 1 0 1 4 6 3 2 1 1 2 3 Output: 0 4
hide comments
ru0gg444:
20221016 17:59:58
n and m be should generated randomly or entered by the user?


wrathcyber:
20220520 18:22:11
use a set lol 

pranab19:
20200823 06:44:40
Stl binary search & vector.... 

rahatkhan99:
20191128 06:47:29
just run a nested loop and check if first array is present in the second array.. if not, then print.. solved 

swaraj007:
20190215 22:41:08
simple set difference operation


akshayawate007:
20181127 12:20:07
how to print unique elements>


jonmanu:
20180810 15:29:49
my code is working pretty fine in devc++ but i am getting WA in spoj .dont know why? any suggestions?


taidev198:
20180421 06:33:31
anjali1998:please check size of arr1 and arr2 

abhi_code_deep:
20171215 11:24:54
Sorry. Last edit: 20171215 11:25:26 

vishwanath_26:
20170719 04:18:27
AC in one go! 
Added by:  kuszi 
Date:  20131114 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 