HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Linear Data Structures: Arrays > problem:


51197 - Even and odd Numbers

Section problems

• 51121 - Complexity power of a nu...
• 51119 - Evaluating Prefix expressions
• 50563 - Long Modulus
• 50594 - Transformations
• 51182 - Count and Sum 2
• 51193 - The max element of k-th co...
• 51194 - The difference between max...
• 51196 - The sum of two arrays
• 51197 - Even and odd Numbers
• 50468 - Draw Matrix - 2
• 50423 - Numbers square
• 50344 - Profit or Loss
• 50445 - Cryptography
• 50410 - Zero Padding
• 50380 - Sum of the Numbers in the ...
• 50300 - Matrix
• 50611 - Maximum of the minima

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
bfs.

Even and odd Numbers

You will be first given one number (n) which is followed by a series of integers (n space-separated values). Show even and odd numbers in two differnet lines.

Input specification
You will be given one integers (n) in the first line,   and 1 ≤ n ≤ 10.000. The second line contains a series of integer numbers a[n] where   0 < a[n] ≤ 1000.

Output specification
You will give two series, in the first line show all even numbers and in the secon line show all odd numbers seperated by space.

Sample Input I 
5
5 8 4 9 3

Sample Input II
7
4 10 8 5 8 9 7

Sample Output I
8 4
5 9 3

Sample Output II
4 10 8 8
5 9 7

 

Для отправки решений необходимо выполнить вход.

www.contester.ru