diff --git a/views/contest_ranklist.ejs b/views/contest_ranklist.ejs index f7e5e03..28071be 100644 --- a/views/contest_ranklist.ejs +++ b/views/contest_ranklist.ejs @@ -31,6 +31,21 @@
<% + for (let problem of problems) { + let i = 0, min, minPos = -1; + for (let item of ranklist) { + i++; + let condition; + if (contest.type === 'acm') condition = item.player.score_details[problem.id] && (minPos === -1 || item.player.score_details[problem.id].acceptedTime < min.player.score_details[problem.id].acceptedTime); + else condition = item.player.score_details[problem.id] && item.player.score_details[problem.id].score === 100 && (minPos === -1 || item.player.score_details[problem.id].time < min.player.score_details[problem.id].time); + if (condition) { + min = item; + minPos = i; + } + } + problem.min = minPos; + } + let i = 0; for (let item of ranklist) { i++ @@ -70,10 +85,14 @@ <% } %> <% for (let problem of problems) { %> + <% if (problem.min === i) { %> +