Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 20140128 09:35:04.
Submit  All submissions  Best solutions  Back to list 
SMPSEQ9  Fun with Sequences (Act 7) 
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})/m < (s_{1} + s_{2} + ... + s_{n})/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 in the same order as in the input.
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 1 2 3 6 2 1 0 1 2 3 Output: 2 1 0 1 2 3
Added by:  kuszi 
Date:  20140113 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Public source code since:  20140128 09:35:04 
hide comments
20151210 13:06:41
code ?? 

20140828 06:25:00 sarkarshuvojit
i'm getting an NZEC. what might be the flaw o.O ? Help anybody ?? _/\_ 

20140728 12:27:44 kuszi
@Rounaq Jhunjhunu Wala  you are given integers, the answer will not come out to be a fraction. Please treat the comparison given in the statement as a comparison of real values (do not use an integer division). 

20140721 05:58:27 Rounaq Jhunjhunu Wala
If the answer comes out to be a fraction, do we need to compare the decimal values or we print the second array, as we do for cases for equality of sum? 