diff --git a/web/app/views/contest-standings.php b/web/app/views/contest-standings.php index 2af3ff8..b780867 100644 --- a/web/app/views/contest-standings.php +++ b/web/app/views/contest-standings.php @@ -7,8 +7,20 @@ var score = = json_encode($score) ?>; var problems = = json_encode($contest_data['problems']) ?>; var standings_config = = json_encode(isset($standings_config) ? $standings_config : ['_config' => true]) ?>; + var first_accepted = {}; $(document).ready(function() { + for (var i = 0; i < problems.length; i++) { + Object.keys(score).forEach(function(key) { + var person = score[key]; + + if (person[i] === undefined) return; + if (person[i][0] === 100 && (first_accepted[i] === undefined || first_accepted[i][0] === person[i][1] && first_accepted[i][1] > person[i][2])) { + first_accepted[i] = [person[i][1], person[i][2]]; + } + }); + } + $("#standings").long_table( standings, 1, @@ -21,14 +33,14 @@ }).join('') + '', function(row) { - var col_tr = row[0] === problems.length * 100 ? '