mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: contest: oi: fix effective check
This commit is contained in:
1 parent
913658d144
commit
1acd2ff0bb
2 files changed
+3
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.4.7",
|
||||
"version": "3.4.8",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -193,7 +193,7 @@ const oi = buildContestRule({
|
||||
const detail = {};
|
||||
let score = 0;
|
||||
for (const j of journal.filter((i) => tdoc.pids.includes(i.pid))) {
|
||||
if (detail[j.pid]?.status === STATUS.STATUS_ACCEPTED && !this.submitAfterAccept) detail[j.pid] = j;
|
||||
if (detail[j.pid]?.status !== STATUS.STATUS_ACCEPTED || !this.submitAfterAccept) detail[j.pid] = j;
|
||||
}
|
||||
for (const i in detail) score += detail[i].score;
|
||||
return { score, detail };
|
||||
@@ -311,9 +311,7 @@ const homework = buildContestRule({
|
||||
stat: (tdoc, journal) => {
|
||||
const effective = {};
|
||||
for (const j of journal) {
|
||||
if (tdoc.pids.includes(j.pid)) {
|
||||
effective[j.pid] = j;
|
||||
}
|
||||
if (tdoc.pids.includes(j.pid)) effective[j.pid] = j;
|
||||
}
|
||||
function time(jdoc) {
|
||||
const real = jdoc.rid.generationTime - tdoc.beginAt.getTime() / 1000;
|
||||
|
||||
Reference in new issue
Block a user