#P11154. 【MX-X6-T0】Arcaea Scoring System
【MX-X6-T0】Arcaea Scoring System
Background
Original link: https://oier.team/problems/X6A。
Problem Description
Arcaea is a music game popular worldwide, well known for its innovative 3D playing interface. In Arcaea, players tap/slide the screen to play the chart along with the rhythm. The scoring rules for one chart play are as follows.
- A chart contains several notes. Each note has one of four judgment results: Perfect Pure, Normal Pure, Far, Lost.
- For a chart with notes, the base score is points, and the bonus score is points, so the maximum score is points. Each note is worth points of base score and point of bonus score.
- If a note gets a Perfect Pure, the player gets all base score and bonus score of that note.
- If a note gets a Normal Pure, the player gets all base score of that note, but does not get the bonus score.
- If a note gets a Far, the player gets only half of the base score of that note.
- If a note gets a Lost, the player gets no points.
- The play score is the floor of the sum of the points obtained from all notes.
Based on the score, the player also gets a rating.
- If the play score , the rating is EX+.
- If the play score and , the rating is EX.
- If the play score and , the rating is AA.
- If the play score and , the rating is A.
- If the play score and , the rating is B.
- If the play score and , the rating is C.
- If the play score , the rating is D.
Now you are given the counts of the four judgment results for a chart play. Please compute the rating for this play.
Input Format
One line with four integers separated by spaces, representing the counts of Perfect Pure, Normal Pure, Far, Lost, respectively. The total number of notes is .
Output Format
Output a string representing the rating. The seven ratings should be printed as EX+, EX, AA, A, B, C, D, respectively.
44 0 0 0
EX+
33 10 0 1
AA
0 0 0 1
D
Hint
Sample Explanation #1
All notes are judged as Perfect Pure, so the player gets the full base score and all bonus score. Since there are notes in total, the player additionally gets points, so the play score is . The total score is at least , so the rating is EX+.
Sample Explanation #2
The number of notes is . Among them, notes are judged as Perfect Pure, as Normal Pure, and as Lost. Therefore, the player gets base score and bonus points. The total is , and the play score is floored to . The total score is at least and less than , so the rating is AA.
Constraints
For all data, , and .
There are test cases in total. For the first test cases, is guaranteed.
Translated by ChatGPT 5