|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||1024 MB||0||0||0||0.000%|
Hosting a programming contest is fun, but it’s also a lot of work. For instance, at the end of the day the jury will have to create a ranking of the teams based on their results during the contest. This can be tedious to do by hand, so we would like you to write a program for this task.
For the BAPC, the rules for the ranking are as follows:
During the contest, teams submit solutions for problems, which are processed by the jury as runs. Each run has four properties:
At the end of the contest, we have a list of runs available (ordered by non-decreasing submission times) and we want you to determine the final ranking of the teams.
Teams that are tied will share a position; those teams should be ordered alphabetically in the results.
On the first line an integer t (1 ≤ t ≤ 100): the number of test cases. Then for each test case:
For each test case:
1 8 28 twente utrecht groningen amsterdam eindhoven leiden delft nijmegen 5 utrecht B rejected 8 eindhoven F accepted 10 utrecht F accepted 17 utrecht B rejected 18 leiden C rejected 23 twente F rejected 25 utrecht B accepted 26 amsterdam D rejected 27 amsterdam D accepted 27 leiden C accepted 27 groningen F accepted 28 twente F rejected 30 nijmegen C rejected 30 nijmegen C accepted 30 delft B accepted 30 delft B rejected 33 twente F accepted 47 groningen D rejected 51 leiden D accepted 51 amsterdam C accepted 51 groningen D accepted 60 utrecht D accepted 65 utrecht J accepted 67 twente F rejected 70 twente F accepted 90 eindhoven D accepted 100 utrecht A rejected 101 utrecht C rejected
1 utrecht 4 200 2 groningen 2 98 3 amsterdam 2 98 3 leiden 2 98 5 eindhoven 2 98 6 delft 1 30 7 nijmegen 1 50 8 twente 1 73