시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 128 MB | 39 | 9 | 9 | 50.000% |
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.
Output file must contain C integers -- team numbers sorted by rank.
3 3 1 2 3000 0 1 2 3100 1 2 1 4200 1
2 1 3
3 3 1 2 3000 0 1 2 3100 1 2 1 4200 1
2 1 3