SMPSEQ8  Fun with Sequences (Act 6)
You are given a sequence of n integers S = s_{1}, s_{2} ... s_{n} and a sequence of m integers Q = q_{1}, q_{2} ... q_{m}. If q_{1} + q_{2} + ... + q_{m} < s_{1} + s_{2} + ... + s_{n} please print the sequence S and otherwise please print the sequence 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.
In the third line you are given one integer 2 <= m <= 100,
and in the following line m integers:
100 <= q_{i} <= 100.
Output data specification
The sequence of requested integers separated by spaces.
Example 1
Input: 5 2 1 0 1 4 6 3 2 1 1 2 3 Output: 2 1 0 1 4
Example 2
Input: 5 2 1 0 1 2 6 3 2 1 1 2 3 Output: 3 2 1 1 2 3
hide comments
samiya_ahmed5:
20200303 10:17:27
only obey the given condition,you can easily solve it.....


maju91:
20190313 19:59:36
There is mistake in condition, shold be <= not <. 

shahzan:
20170909 22:58:12
why wrong answer everytime?


kass_97:
20170113 12:09:03
The easiest 

aryanagal:
20160603 17:11:23
can the author check id 17043307 
Added by:  kuszi 
Date:  20140113 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 