judge: 优化找不到数据时的错误信息

This commit is contained in:
undefined committed 2020-11-09 13:13:03 +08:00
1 parent dd4ecdb029
commit 8c65f89e55
6 files changed
+9 -12

No files matched your search

+2 -5
View File
@@ -149,12 +149,9 @@ const oi: ContestRule = {
const detail = {};
let score = 0;
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;
}
if (tdoc.pids.includes(j.pid)) detail[j.pid] = j;
}
for (const i in detail) score += detail[i].score;
return { score, detail };
},
showScoreboard: (tdoc, now) => now > tdoc.endAt,