1896: Find the sum of the maximum value of each row of the matrix

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:13 解决:6

题目描述

There is a two-dimensional integer array of m*n (m and n are not more than 10). Each row has a maximum value. Please program to find these maximum values and their sum.

输入

First enter 2 positive integers m and n, which means that this matrix has m rows and n columns. Then enter m lines, each line has n integers.

输出

Output the maximum value of each row of this matrix, and finally output the sum of these maximum values. See the example for the output format.

样例输入 复制

2 3
1 2 3
4 5 6

样例输出 复制

The max value in line 0 is:3
The max value in line 1 is:6
The sum of max value is:9