mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
1 parent
77a48bf3fb
commit
304e6f24f4
1 file changed
+5
-8
@@ -387,12 +387,9 @@ const strictioi = buildContestRule({
|
|||||||
let score = 0;
|
let score = 0;
|
||||||
const subtasks: Record<number, SubtaskResult> = {};
|
const subtasks: Record<number, SubtaskResult> = {};
|
||||||
for (const j of journal.filter((i) => tdoc.pids.includes(i.pid))) {
|
for (const j of journal.filter((i) => tdoc.pids.includes(i.pid))) {
|
||||||
Object.keys(j.subtasks).forEach((i) => {
|
for (const i in j.subtasks) {
|
||||||
if (!subtasks[i] || subtasks[i].score < j.subtasks[i].score) {
|
if (!subtasks[i] || subtasks[i].score < j.subtasks[i].score) subtasks[i] = j.subtasks[i];
|
||||||
subtasks[i] = j.subtasks[i];
|
}
|
||||||
subtasks[i].rid = j.rid;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
j.score = sumBy(Object.values(subtasks), 'score');
|
j.score = sumBy(Object.values(subtasks), 'score');
|
||||||
j.status = Math.max(...Object.values(subtasks).map((i) => i.status));
|
j.status = Math.max(...Object.values(subtasks).map((i) => i.status));
|
||||||
j.subtasks = subtasks;
|
j.subtasks = subtasks;
|
||||||
@@ -422,8 +419,8 @@ const strictioi = buildContestRule({
|
|||||||
for (const pid of tdoc.pids) {
|
for (const pid of tdoc.pids) {
|
||||||
row.push({
|
row.push({
|
||||||
type: 'record',
|
type: 'record',
|
||||||
value: tsddict[pid]?.penaltyScore || '',
|
value: tsddict[pid]?.score || '',
|
||||||
hover: Object.values(tsddict[pid]?.subtasks).map((i: SubtaskResult) => `${STATUS_SHORT_TEXTS[i.status]} ${i.score}`).join(','),
|
hover: Object.values(tsddict[pid]?.subtasks || {}).map((i: SubtaskResult) => `${STATUS_SHORT_TEXTS[i.status]} ${i.score}`).join(','),
|
||||||
raw: tsddict[pid]?.rid,
|
raw: tsddict[pid]?.rid,
|
||||||
style: tsddict[pid]?.status === STATUS.STATUS_ACCEPTED && tsddict[pid]?.rid.getTimestamp().getTime() === meta?.first?.[pid]
|
style: tsddict[pid]?.status === STATUS.STATUS_ACCEPTED && tsddict[pid]?.rid.getTimestamp().getTime() === meta?.first?.[pid]
|
||||||
? 'background-color: rgb(217, 240, 199);'
|
? 'background-color: rgb(217, 240, 199);'
|
||||||
|
|||||||
Reference in new issue
Block a user