|
|
@ -171,7 +171,7 @@ export async function judgeStandard(task: StandardRunTask) |
|
|
|
const [resultPromise] = await runProgram(language, |
|
|
|
const [resultPromise] = await runProgram(language, |
|
|
|
binaryDirectory, |
|
|
|
binaryDirectory, |
|
|
|
workingDir, |
|
|
|
workingDir, |
|
|
|
task.time, |
|
|
|
task.time * 10, |
|
|
|
task.memory * 1024 * 1024, |
|
|
|
task.memory * 1024 * 1024, |
|
|
|
stdinRedirectionName, |
|
|
|
stdinRedirectionName, |
|
|
|
stdoutRedirectionName, |
|
|
|
stdoutRedirectionName, |
|
|
@ -184,7 +184,9 @@ export async function judgeStandard(task: StandardRunTask) |
|
|
|
memory = runResult.result.memory / 1024; |
|
|
|
memory = runResult.result.memory / 1024; |
|
|
|
|
|
|
|
|
|
|
|
let status: TestcaseResultType = null, message = null; |
|
|
|
let status: TestcaseResultType = null, message = null; |
|
|
|
if (runResult.outputLimitExceeded) { |
|
|
|
if (time > task.time) { |
|
|
|
|
|
|
|
status = TestcaseResultType.TimeLimitExceeded; |
|
|
|
|
|
|
|
} else if (runResult.outputLimitExceeded) { |
|
|
|
status = TestcaseResultType.OutputLimitExceeded; |
|
|
|
status = TestcaseResultType.OutputLimitExceeded; |
|
|
|
} else if (runResult.result.status === SandboxStatus.TimeLimitExceeded) { |
|
|
|
} else if (runResult.result.status === SandboxStatus.TimeLimitExceeded) { |
|
|
|
status = TestcaseResultType.TimeLimitExceeded; |
|
|
|
status = TestcaseResultType.TimeLimitExceeded; |
|
|
|