|
|
|
@ -6,6 +6,7 @@ import { getConfig } from '../config';
|
|
|
|
|
import { CompileError, FormatError } from '../error';
|
|
|
|
|
import { Logger } from '../log';
|
|
|
|
|
import { del, run } from '../sandbox';
|
|
|
|
|
import { CmdFile } from '../sandbox/interface';
|
|
|
|
|
import signals from '../signals';
|
|
|
|
|
import { parseFilename } from '../utils';
|
|
|
|
|
import {
|
|
|
|
@ -56,11 +57,9 @@ function judgeCase(c: Case, sid: string) {
|
|
|
|
|
);
|
|
|
|
|
const { code, time_usage_ms, memory_usage_kb } = res;
|
|
|
|
|
let { status } = res;
|
|
|
|
|
let stdout = { fileId: res.fileIds['stdout'] };
|
|
|
|
|
let stdout: CmdFile = { fileId: res.fileIds[filename ? 'stdout' : `${filename}.out`] };
|
|
|
|
|
const stderr = { fileId: res.fileIds['stderr'] };
|
|
|
|
|
if (res.fileIds[`${filename}.out`]) {
|
|
|
|
|
stdout = { fileId: res.fileIds[`${filename}.out`] };
|
|
|
|
|
}
|
|
|
|
|
if (!stdout.fileId) stdout = { content: '' };
|
|
|
|
|
let message: any = '';
|
|
|
|
|
let score = 0;
|
|
|
|
|
if (status === STATUS.STATUS_ACCEPTED) {
|
|
|
|
|