mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: 修复OI赛制下重复提交重复计分的问题
This commit is contained in:
1 parent
ccc8ee23f2
commit
58807c4148
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.13.43",
|
||||
"version": "2.13.44",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -151,6 +151,7 @@ const oi: ContestRule = {
|
||||
for (const j of journal) {
|
||||
if (tdoc.pids.includes(j.pid)) {
|
||||
detail[j.pid] = j;
|
||||
if (detail[j.pid]) score -= detail[j.pid].score;
|
||||
score += j.score;
|
||||
}
|
||||
}
|
||||
@@ -193,7 +194,7 @@ const oi: ContestRule = {
|
||||
for (const pid of tdoc.pids) {
|
||||
row.push({
|
||||
type: 'record',
|
||||
value: tsddict[pid]?.score || '-',
|
||||
value: tsddict[pid]?.score ?? '-',
|
||||
raw: tsddict[pid]?.rid || null,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user