PAT:A1012 The Best Rank (25 分)
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we encourage students by emphasizing on their best ranks -- that is, among the four ranks with respect to the three courses and the average grade, we print the best rank for each student.
For example, The grades of C, M, E and A - Average of 4 students are given as the following:
StudentID C M E A
310101 98 85 88 90
310102 70 95 88 84
310103 82 87 94 88
310104 91 91 91 91
Then the best ranks for all the students are No.1 since the 1st one has done the best in C Programming La
PAT A1012:最佳排名算法解析

这篇博客详细介绍了PAT(A1012)考试中如何计算学生最佳排名的问题,包括输入和输出规格的说明。内容涉及到根据学生的C语言、数学和英语三门课程成绩以及平均成绩来确定最佳排名,优先级为C > 数学 > 英语 > 平均成绩。示例输入和输出展示了具体的操作过程。
最低0.47元/天 解锁文章
938

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



