Given a list of integer scores, return a list of strings of the same length where position i describes the rank of scores[i]:
- The rank of a score is
1 + (number of scores strictly greater than it), so equal scores share a rank and the next rank is skipped (standard competition ranking:1, 1, 3). - Rank 1 is
"Gold Medal", rank 2 is"Silver Medal", rank 3 is"Bronze Medal", and any other rank is its number as a string, e.g."4".
Examples
Input: scores = [62, 75, 48, 75, 90, 55]
Output: ["4", "Silver Medal", "6", "Silver Medal", "Gold Medal", "5"]
Explanation: Both 75s are rank 2, so no one is rank 3: 62 is rank 4, 55 is rank 5 and 48 is rank 6.
Constraints
0 <= len(scores) <= 10**5-10**9 <= scores[i] <= 10**9- Target complexity: O(n log n).
Goals
- Derive ranks from a sorted copy without losing the original positions
- Apply standard competition ranking (1, 1, 3) for ties
- Map ranks to labels with a lookup