TestCurve
SRM 276 · 2005-12-08 · by erinn
Problem Statement
A teacher has graded a test, and you are given a
Constraints
- scores will contain between 1 and 50 elements, inclusive.
- Each element of scores will be between 0 and 10000, inclusive.
- At least one element of scores will be greater than 0.
{15, 27, 8, 33, 19, 50}
Returns: {30, 54, 16, 66, 38, 100 }
Since the highest score is a 50, which gets scaled to a grade of 100, everyone's grade is exactly twice their raw score.
{0, 0, 0, 3}
Returns: {0, 0, 0, 100 }
All but one person did poorly on this test.
{67, 89, 72, 100, 95, 88}
Returns: {67, 89, 72, 100, 95, 88 }
With a highest score of 100, the grade is exactly the raw score.
{1234, 3483, 234, 5738, 3421, 5832, 4433}
Returns: {21, 59, 4, 98, 58, 100, 76 }
{8765}
Returns: {100 }
Submissions are judged against all 73 archived test cases, of which 5 are shown here. Case numbers match the judge’s.
Language: C++17 · define a public class TestCurve with a public method vector<int> determineGrades(vector<int> scores) · 73 test cases · 2 s / 256 MB per case