diff --git a/src/runner/judge.ts b/src/runner/judge.ts index caeb042..388a9b0 100644 --- a/src/runner/judge.ts +++ b/src/runner/judge.ts @@ -171,7 +171,7 @@ export async function judgeStandard(task: StandardRunTask) const [resultPromise] = await runProgram(language, binaryDirectory, workingDir, - task.time, + task.time * 10, task.memory * 1024 * 1024, stdinRedirectionName, stdoutRedirectionName, @@ -184,7 +184,9 @@ export async function judgeStandard(task: StandardRunTask) memory = runResult.result.memory / 1024; let status: TestcaseResultType = null, message = null; - if (runResult.outputLimitExceeded) { + if (time > task.time) { + status = TestcaseResultType.TimeLimitExceeded; + } else if (runResult.outputLimitExceeded) { status = TestcaseResultType.OutputLimitExceeded; } else if (runResult.result.status === SandboxStatus.TimeLimitExceeded) { status = TestcaseResultType.TimeLimitExceeded;