HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50729 - Max number in 2D array

Guest
• Discussion of problem (1)

Volume problems

• 50745 - Bitonic Sequence
• 51083 - Grades Histogram
• 50789 - Number of Cities
• 50983 - Course Selection
• 51024 - Total Stock Price
• 50987 - Very Looong Queue
• 50913 - Manhattan Distance
• 51008 - Sum of Regional Maxes
• 50729 - Max number in 2D array
• 50981 - Top popular m-students
• 51014 - Nine Men's Morris game
• 50743 - Total Scholarships Discount
• 50740 - Service Time - 1
• 50988 - Laplacian Filter
• 50747 - Safe boxes against thieves
• 50742 - King Arthur II
• 50928 - War Of Battleships

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.

Max number in 2D array

Question: You will be given 2D array of numbers. Find and show the max of it.

Input specification
You will be first given 2 integers (m, n) where m and n are between 1 and 100. Then, in the following m lines you will be given n possibly positive or nagative integers.

Output specification
Show one integer: the max of the array.

Sample Input  
3 4
-3 7 9 2
5 3 4 6
3 2 7 1
Sample Output  
9

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

www.contester.ru