|
|
@ -25,14 +25,14 @@ function judgeCase(c: NormalizedCase) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
execute: ctx.executeUser.execute,
|
|
|
|
execute: ctx.executeUser.execute,
|
|
|
|
copyIn: ctx.executeUser.copyIn,
|
|
|
|
copyIn: ctx.executeUser.copyIn,
|
|
|
|
time: ctxSubtask.subtask.time * ctx.executeUser.time,
|
|
|
|
time: c.time * ctx.executeUser.time,
|
|
|
|
memory: ctxSubtask.subtask.memory,
|
|
|
|
memory: c.memory,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
execute: `${ctx.executeInteractor.execute} /w/in /w/tout /w/out`,
|
|
|
|
execute: `${ctx.executeInteractor.execute} /w/in /w/tout /w/out`,
|
|
|
|
copyIn: ctx.executeInteractor.copyIn,
|
|
|
|
copyIn: ctx.executeInteractor.copyIn,
|
|
|
|
time: ctxSubtask.subtask.time * 2 * ctx.executeInteractor.time,
|
|
|
|
time: c.time * 2 * ctx.executeInteractor.time,
|
|
|
|
memory: ctxSubtask.subtask.memory * 2,
|
|
|
|
memory: c.memory * 2,
|
|
|
|
copyOut: ['/w/tout?'],
|
|
|
|
copyOut: ['/w/tout?'],
|
|
|
|
env: { ...ctx.env, HYDRO_TESTCASE: c.id.toString() },
|
|
|
|
env: { ...ctx.env, HYDRO_TESTCASE: c.id.toString() },
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -41,9 +41,9 @@ function judgeCase(c: NormalizedCase) {
|
|
|
|
let status: number;
|
|
|
|
let status: number;
|
|
|
|
let score = 0;
|
|
|
|
let score = 0;
|
|
|
|
let message: any = '';
|
|
|
|
let message: any = '';
|
|
|
|
if (time_usage_ms > ctxSubtask.subtask.time * ctx.executeUser.time) {
|
|
|
|
if (time_usage_ms > c.time * ctx.executeUser.time) {
|
|
|
|
status = STATUS.STATUS_TIME_LIMIT_EXCEEDED;
|
|
|
|
status = STATUS.STATUS_TIME_LIMIT_EXCEEDED;
|
|
|
|
} else if (memory_usage_kb > ctxSubtask.subtask.memory * 1024) {
|
|
|
|
} else if (memory_usage_kb > c.memory * 1024) {
|
|
|
|
status = STATUS.STATUS_MEMORY_LIMIT_EXCEEDED;
|
|
|
|
status = STATUS.STATUS_MEMORY_LIMIT_EXCEEDED;
|
|
|
|
} else if ((code && code !== 13/* Broken Pipe */) || (code === 13 && !resInteractor.code)) {
|
|
|
|
} else if ((code && code !== 13/* Broken Pipe */) || (code === 13 && !resInteractor.code)) {
|
|
|
|
status = STATUS.STATUS_RUNTIME_ERROR;
|
|
|
|
status = STATUS.STATUS_RUNTIME_ERROR;
|
|
|
|