mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: support display after contest record score on ioi-strict (#1004)
This commit is contained in:
1 parent
e479cb94ea
commit
db68d25e30
1 file changed
+29
-11
@@ -502,17 +502,35 @@ const strictioi = buildContestRule({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const pid of tdoc.pids) {
|
for (const pid of tdoc.pids) {
|
||||||
row.push({
|
const index = `${tsdoc.uid}/${tdoc.domainId}/${pid}`;
|
||||||
type: 'record',
|
const n: ScoreboardNode = (!config.isExport && !config.lockAt && isDone(tdoc)
|
||||||
value: ((tsddict[pid]?.score || 0) * ((tdoc.score?.[pid] || 100) / 100)).toString() || '',
|
&& meta?.psdict?.[index]?.rid
|
||||||
hover: Object.values(tsddict[pid]?.subtasks || {}).map((i: SubtaskResult) => `${STATUS_SHORT_TEXTS[i.status]} ${i.score}`).join(','),
|
&& tsddict[pid]?.rid?.toHexString() !== meta?.psdict?.[index]?.rid?.toHexString()
|
||||||
raw: tsddict[pid]?.rid,
|
&& meta?.psdict?.[index]?.rid?.getTimestamp() > tdoc.endAt)
|
||||||
score: tsddict[pid]?.score,
|
? {
|
||||||
style: tsddict[pid]?.status === STATUS.STATUS_ACCEPTED
|
type: 'records',
|
||||||
&& tsddict[pid].rid.getTimestamp().getTime() - (tsdoc.startAt || tdoc.beginAt).getTime() === meta?.first?.[pid]
|
value: '',
|
||||||
? 'background-color: rgb(217, 240, 199);'
|
raw: [{
|
||||||
: undefined,
|
value: ((tsddict[pid]?.score || 0) * ((tdoc.score?.[pid] || 100) / 100)).toString() || '',
|
||||||
});
|
raw: tsddict[pid]?.rid || null,
|
||||||
|
score: tsddict[pid]?.score,
|
||||||
|
}, {
|
||||||
|
value: ((meta?.psdict?.[index]?.score || 0) * ((tdoc.score?.[pid] || 100) / 100)).toString() || '',
|
||||||
|
raw: meta?.psdict?.[index]?.rid ?? null,
|
||||||
|
score: meta?.psdict?.[index]?.score,
|
||||||
|
}],
|
||||||
|
} : {
|
||||||
|
type: 'record',
|
||||||
|
value: ((tsddict[pid]?.score || 0) * ((tdoc.score?.[pid] || 100) / 100)).toString() || '',
|
||||||
|
raw: tsddict[pid]?.rid,
|
||||||
|
score: tsddict[pid]?.score,
|
||||||
|
};
|
||||||
|
n.hover = Object.values(tsddict[pid]?.subtasks || {}).map((i: SubtaskResult) => `${STATUS_SHORT_TEXTS[i.status]} ${i.score}`).join(',');
|
||||||
|
if (tsddict[pid]?.status === STATUS.STATUS_ACCEPTED
|
||||||
|
&& tsddict[pid].rid.getTimestamp().getTime() - (tsdoc.startAt || tdoc.beginAt).getTime() === meta?.first?.[pid]) {
|
||||||
|
n.style = 'background-color: rgb(217, 240, 199);';
|
||||||
|
}
|
||||||
|
row.push(n);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user