Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. bfs.
Even and Odd
Question: Given a 2D matrix, the task is to print even numbers then odd numbers
Input specification: In the first line you will be given the dimensions of the matrix (1<=m,n<=500) then in the following lines you have to read the matrix size of m by n. Where each element of matrixes is: 1<=element<=100.
Output specification: Show even numbers in the first line then odd numbers in the second line.
Sample Input I
10 5 42 98 87 63 11 15 73 94 60 51 97 89 12 98 82 93 15 29 58 88 71 87 16 85 77 17 79 31 79 14 32 32 5 12 88 47 94 63 3 23 73 69 17 2 92 82 38 61 16 77
|
Sample Output I
42 98 94 60 12 98 82 58 88 16 14 32 32 12 88 94 2 92 82 38 16 87 63 11 15 73 51 97 89 93 15 29 71 87 85 77 17 79 31 79 5 47 63 3 23 73 69 17 61 77
|
Для отправки решений необходимо выполнить вход.
|