| Result | TIME Limit | MEMORY Limit | Run Times | AC Times | JUDGE |
|---|---|---|---|---|---|
| 3s | 8192K | 2289 | 1035 | Standard |
Mary is a mathematics teacher of Jilin University. This term she teaches mathematics for students of classes of grade 2002. Now the final examination is over and every student has his mathematics score. Mary would like to know what the highest score of each class is and what the highest score of all classes is. But there are too many students take the examination and Mary is too lazy indeed. So she asks you, an expert on programming, to help her solve the problem.
Input Specification
The input consists of several blocks one by one. Each block represents a class, consisting of several lines. Each line of a block consists of a positive integer s, where s<=100, designating a certain student's score of the class. A 0 marks the end of the block. A -1 marks the end of the input. For example,
60 <-- a student's score of class 1
99 <-- another student's score of class 1
85 <-- the last student's score of class 1
0 <-- end of class 1
59 <-- a student's score of class 2
94 <-- another student's score of class 2
0 <-- end of class 2
-1 <-- end of input
Output Specification
You should output the maximum score of each class in the order of classes given in the input. And then, you should also output the maximum score of all classes and the class where the maximum score appears for the first time. For the example above, you should make the output like this:
99 <-- maximum score of class 1
94 <-- maximum score of class 2
99 At Class 1 <-- maximum score of class 1 and class 2
Sample Input
60 99 85 0 59 94 0 -1
Sample Output
99 94 99 At Class 1
Problem Source: 1st JOJ Cup Online VContest Warmup Problem
This problem is used for contest: 75
Submit / Problem List / Status / Discuss
162

被折叠的 条评论
为什么被折叠?



