#C5081. Score Differences

    ID: 48691 Type: Default 1000ms 256MiB

Score Differences

Score Differences

Given the number of students \(m\) and the number of subjects \(n\), along with the scores for each student, compute the difference between the highest and lowest score for each student.

The input starts with two integers \(m\) and \(n\). Then, \(m\) lines follow, each containing \(n\) integers representing the scores in different subjects for that student. The output is a single line with \(m\) integers separated by spaces, where each integer is the difference between the maximum and minimum score for the corresponding student.

inputFormat

The first line contains two space-separated integers \(m\) (the number of students) and \(n\) (the number of subjects). Following this, there are \(m\) lines; each line contains \(n\) space-separated integers representing the scores for a student.

outputFormat

Output a single line containing \(m\) space-separated integers. Each integer represents the difference between the highest and the lowest score of the corresponding student.

## sample
3 4
90 85 78 92
88 77 76 84
95 88 89 91
14 12 7

</p>