Mines Football

시간 제한1초메모리 제한2048 MB

요약
월별 Mines 미식축구 점수가 주어질 때, 한 경기 최고점과 최저점, 그리고 월 합계 최고점과 최저점을 구한다.
난이도

쉬움10점 중 1점

유형
배열, 구현
정답자
아직 제출이 없습니다

문제

The Mines football team had an incredible 20222022 season! The team made it all the way to the NCAA Division II Championship game for the first time in school history.

Unfortunately, they lost to the defending champions Ferris State, but the Orediggers still had an amazing season going thirteen straight games without a loss, including four straight playoff games.

Orediggers Head Coach Brandon Moore has tasked you with finding some statistics about Mines Football's history so that he knows where to focus his efforts in the offseason. Given the scores from the previous MM months, Coach Moore wants to know the highest and lowest scores across all games as well as the most and least total points scored in a month across all games.

입력

The first line of input will contain an integer 1≤M≤10001 \leq M \leq 1000 representing the number of months of scores to follow.

The next MM lines will contain an integer 1≤S≤81 \leq S \leq 8 representing the number of scores to follow, followed by SS space-separated integers in the range \[14,1 000]\[14, 1\ 000] representing Mines's score in each game that month. Note that the opposing team's score is not given. Each score is guaranteed to be at least 1414 points because Mines always scores lots of touchdowns.

출력

The output should be four lines, each with a single integer.

The first line of output should be the highest number of points that Mines scored in any game.

The second line of output should the lowest number of points that Mines scored in any game.

The third line of output should be the sum of the points scored in the month where Mines scored the highest total number of points.

The fourth line of output should be the sum of the points scored in the month where Mines scored the lowest total number of points.

예제1

  1. 예제 1

    입력
    4
    4 22 27 84 45
    5 45 48 48 38 30
    4 54 80 45 48
    2 42 44
    
    예상 출력
    84
    22
    227
    86