mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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) {
|
||||
row.push({
|
||||
type: 'record',
|
||||
value: ((tsddict[pid]?.score || 0) * ((tdoc.score?.[pid] || 100) / 100)).toString() || '',
|
||||
hover: Object.values(tsddict[pid]?.subtasks || {}).map((i: SubtaskResult) => `${STATUS_SHORT_TEXTS[i.status]} ${i.score}`).join(','),
|
||||
raw: tsddict[pid]?.rid,
|
||||
score: tsddict[pid]?.score,
|
||||
style: tsddict[pid]?.status === STATUS.STATUS_ACCEPTED
|
||||
&& tsddict[pid].rid.getTimestamp().getTime() - (tsdoc.startAt || tdoc.beginAt).getTime() === meta?.first?.[pid]
|
||||
? 'background-color: rgb(217, 240, 199);'
|
||||
: undefined,
|
||||
});
|
||||
const index = `${tsdoc.uid}/${tdoc.domainId}/${pid}`;
|
||||
const n: ScoreboardNode = (!config.isExport && !config.lockAt && isDone(tdoc)
|
||||
&& meta?.psdict?.[index]?.rid
|
||||
&& tsddict[pid]?.rid?.toHexString() !== meta?.psdict?.[index]?.rid?.toHexString()
|
||||
&& meta?.psdict?.[index]?.rid?.getTimestamp() > tdoc.endAt)
|
||||
? {
|
||||
type: 'records',
|
||||
value: '',
|
||||
raw: [{
|
||||
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;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user