HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50499 - Table to Row

Guest
• Review clarifications (1)

Volume problems

• 50445 - Cryptography
• 50516 - Lines
• 50446 - Snake
• 50875 - Take m-out
• 50786 - Top Question
• 50788 - Eight Puzzle
• 50509 - Reading Book
• 50529 - Row to Table
• 50499 - Table to Row
• 50823 - Secret Number
• 50853 - Parking Place
• 50496 - Falling Bricks
• 50802 - Comparing Exams
• 50785 - Swimming Contest
• 50866 - Buy the cheapest
• 50517 - Confusion Matrix
• 50515 - Lines - Revisited

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.
Question by Ibrahim Mesecan.

Table to Row

Civil engineering students frequently work on matrices and sometimes they change a matrix to a row vector.

Question: They are asking from you to write a program that takes a matrix and returns it as a row vector in such a way:

  • first you show the numbers in the first column
  • then you show the numbers in the second column, etc.

Input specification
You will be given two integers in the beginning: the number of rows (m) and the number of columns (n). Then in the following m lines, you will be n integers where m and n are between 1 and 200 and the numbers given are integers between -1e8 and +1e8.

Output specification
Show the matrix as a row vector.

Sample Input I
4 3
8 8 6
-3 5 5
0 -5 1
1 -4 5
Sample Output I
8 -3 0 1 8 5 -5 -4 6 5 1 5


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

www.contester.ru