|
|
|
@ -15,11 +15,13 @@ const getSubmissionInfo = (s, displayConfig) => ({
|
|
|
|
|
|
|
|
|
|
const getRoughResult = (x, displayConfig, roughOnly) => { |
|
|
|
|
let max = 0; |
|
|
|
|
if (x.result.judge) { |
|
|
|
|
_.forEach(x.result.judge.subtasks, function (item) { |
|
|
|
|
_.forEach(item.cases, function (one) { |
|
|
|
|
max = Math.max(max, one.result.time); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (displayConfig.showResult) { |
|
|
|
|
if (x.pending) { |
|
|
|
|
let res = getCachedJudgeState(x.task_id) || null; |
|
|
|
@ -38,7 +40,7 @@ const getRoughResult = (x, displayConfig, roughOnly) => {
|
|
|
|
|
return { |
|
|
|
|
result: x.status, |
|
|
|
|
time: displayConfig.showUsage ? x.total_time : null, |
|
|
|
|
maxItemTime: displayConfig.showUsage ? max : null, |
|
|
|
|
maxItemTime: displayConfig.showUsage ? max === 0 ? x.total_time : max : null, |
|
|
|
|
memory: displayConfig.showUsage ? x.max_memory : null, |
|
|
|
|
score: displayConfig.showScore ? x.score : null |
|
|
|
|
}; |
|
|
|
|