From a911142fe3f58e454aec9052dc3f366863601974 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Fri, 23 Sep 2022 14:26:44 +0800 Subject: [PATCH] fix: contest rejudge --- web/app/libs/uoj-contest-lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/libs/uoj-contest-lib.php b/web/app/libs/uoj-contest-lib.php index 2c3d627..d861645 100644 --- a/web/app/libs/uoj-contest-lib.php +++ b/web/app/libs/uoj-contest-lib.php @@ -137,7 +137,7 @@ function calcStandings($contest, $contest_data, &$score, &$standings, $update_co $cur[0] += $cur_row[0]; $cur[1] += $cur_row[1]; if ($update_contests_submissions) { - DB::insert("insert into contests_submissions (contest_id, submitter, problem_id, submission_id, score, penalty) values ({$contest['id']}, '{$person[0]}', {$contest_data['problems'][$i]}, {$cur_row[2]}, {$cur_row[0]}, {$cur_row[1]})"); + DB::insert("replace into contests_submissions (contest_id, submitter, problem_id, submission_id, score, penalty) values ({$contest['id']}, '{$person[0]}', {$contest_data['problems'][$i]}, {$cur_row[2]}, {$cur_row[0]}, {$cur_row[1]})"); } } }