mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 05:08:41 +00:00
fix: problem order in contest
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
2eb02d776d
commit
4d002d776e
@ -108,7 +108,8 @@ function queryContestProblemRank($contest, $problem) {
|
||||
if (!DB::selectFirst("select * from contests_problems where contest_id = {$contest['id']} and problem_id = {$problem['id']}")) {
|
||||
return null;
|
||||
}
|
||||
return DB::selectCount("select count(*) from contests_problems where contest_id = {$contest['id']} and problem_id <= {$problem['id']}");
|
||||
$contest_problems = DB::selectAll("select problem_id from contests_problems where contest_id = {$contest['id']} order by dfn, problem_id");
|
||||
return array_search(array('problem_id' => $problem['id']), $contest_problems) + 1;
|
||||
}
|
||||
function querySubmission($id) {
|
||||
return DB::selectFirst("select * from submissions where id = $id", MYSQLI_ASSOC);
|
||||
|
Loading…
Reference in New Issue
Block a user