mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
judge: skip subtask if already unaccepted (#34)
This commit is contained in:
1 parent
1817341eee
commit
9f0668d938
6 files changed
+26
-7
No files matched your search
@@ -18,6 +18,21 @@ const Score = {
|
||||
|
||||
function judgeCase(c) {
|
||||
return async (ctx, ctxSubtask) => {
|
||||
if ((ctxSubtask.subtask.type === 'min' && !ctxSubtask.score)
|
||||
|| (ctxSubtask.subtask.type === 'max' && ctxSubtask.score === ctxSubtask.subtask.score)) {
|
||||
ctx.next({
|
||||
status: STATUS.STATUS_JUDGING,
|
||||
case: {
|
||||
status: STATUS.STATUS_CANCELED,
|
||||
score: 0,
|
||||
time_ms: 0,
|
||||
memory_kb: 0,
|
||||
message: '',
|
||||
},
|
||||
progress: Math.floor((c.id * 100) / ctx.config.count),
|
||||
}, c.id);
|
||||
return;
|
||||
}
|
||||
const { filename } = ctx.config;
|
||||
const copyIn = { ...ctx.execute.copyIn };
|
||||
if (filename) copyIn[`${filename}.in`] = { src: c.input };
|
||||
|
||||
Reference in new issue
Block a user