Previous Next
0 / 21
Module DEMO-32-109DEMO-C-32

Find Maximum

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program to find the maximum element in an N x M matrix.

Constraints

1 <= N, M <= 10. Integers within standard range.

Input Format

Input: Dimensions N M followed by the matrix elements.

Output Format

Output: The formatted result as specified.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
5 5
7 -4 20 15 42
33 42 37 0 47
19 -6 48 42 22
32 5 38 26 19
27 49 32 -7 17
49
Maximum value is 49.
Sample #2
Public sample
3 3
50 17 49
-7 -10 24
38 50 9
50
Maximum value is 50.
Sample #3
Public sample
3 5
18 42 50 15 14
4 39 18 -5 31
41 48 -10 16 0
50
Maximum value is 50.
Sample #4
Public sample
5 2
11 -10
9 17
-4 48
30 3
25 -2
48
Maximum value is 48.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings