#C1558. Region Load Time Analysis

    ID: 44776 Type: Default 1000ms 256MiB

Region Load Time Analysis

Region Load Time Analysis

In this problem, you are given data for several regions. For each region, the input consists of the region's name followed by one or more integers representing load times. Your task is to compute the average load time for each region using the formula $$\text{average} = \frac{\sum_{i=1}^{n} t_i}{n}$$ and then determine the region with the highest average load time. In case of a tie (i.e. two or more regions have the same maximum average), output the lexicographically smallest region name.

inputFormat

The input is read from standard input (stdin). The first line contains an integer RR which represents the number of regions. Each of the following RR lines contains the data for one region. Each line starts with the region name (a string) and is followed by one or more integers representing the load times.

outputFormat

Output to standard output (stdout) the name of the region with the highest average load time, followed by a space and the average load time formatted to two decimal places.## sample

1
East 45 55 65
East 55.00