/ OPS / 题库 /

TV play I

TV play I

#描述#
Nowadays XMJ is addicted in TV Plays,and she only wants to watch the most famous one. But she doesn’t know which TV Play to choose. So she asks you to help her. Can you work?

#格式#
##输入格式##
The input consists of several cases. The first line of each case gives a number N (N&lt=100), then there are N lines following. Each line consists of the name of the TV Play and the score of it which is given by one viewer (the score is a one-decimal number (&lt=10.0) ).A TV Play’s final score is the average score given by viewers (If the score is lager, it means it is more popular). If two TV Plays have the same scores, choose the one which is less in lexicographic order.

##输出格式##
For each test case, you should output one line containing the number of the case and the name of the most famous TV play and a one-decimal number which indicates its score.

#样例1#
##样例输入1##

10
Ugly Betty 9.0
Ugly Betty 8.9
Ugly Betty 9.4
Friends 9.6
Palace 9.2
Schemes of a Beauty 9.3
Friend 9.0
The desire of back 9.8
Schemes of a Beauty 9.3
Palace 10.0
2
Ugly Betty 8.1
Palace 8.1

##样例输出1##

1 The desire of back 9.8
2 Palace 8.1

#限制#
1000ms
32768KB

#提示#

#来源#
xmj

信息

ID
1822
难度
5
分类
category1 点击显示
标签
递交数
0
已通过
0
通过率
?
上传者