core: support display after contest record score on ioi-strict (#1004)

This commit is contained in:
panda authored and GitHub committed 2025-06-30 10:09:07 +01:00
1 parent e479cb94ea
commit db68d25e30
1 file changed
+29 -11
+29 -11
View File
@@ -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;
}, },