Pro.ID10094 TitleACM Rank Table Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10094 AC0 Submit0 Ratio- 时间&空间限制描述ACM contests, like the one you are participating in, are hosted by the special software. That software, among other functions, preforms a job of accepting and evaluating teams' solutions (runs), and displaying results in a rank table. The scoring rules are as follows:
Your task is, given the list of N runs with submission time and result of each run, compute the rank table for C teams. 输入Input contains integer numbers C N, followed by N quartets of integes ci pi ti ri, where ci --- team number, pi --- problem number, ti --- submission time in seconds, ri -- 1, if the run was accepted, 0 otherwise. 1 ≤ C, N ≤ 1000, 1 ≤ ci ≤ C, 1 ≤ pi ≤ 20, 1 ≤ ti ≤ 36000. 输出Description ACM contests, like the one you are participating in, are hosted by the special software. That software, among other functions, preforms a job of accepting and evaluating teams' solutions (runs), and displaying results in a rank table. The scoring rules are as follows:
Your task is, given the list of N runs with submission time and result of each run, compute the rank table for C teams. Input Input contains integer numbers C N, followed by N quartets of integes ci pi ti ri, where ci --- team number, pi --- problem number, ti --- submission time in seconds, ri -- 1, if the run was accepted, 0 otherwise. 1 ≤ C, N ≤ 1000, 1 ≤ ci ≤ C, 1 ≤ pi ≤ 20, 1 ≤ ti ≤ 36000. Output Output must contain C integers --- team numbers sorted by rank. Sample Input 3 3 Sample Output 2 1 3 Source 样例输入3 3 样例输出2 1 3 作者 |