<% // Sanitize judge results for backward compatibility and clarity if (!judge.result.subtasks) { judge.result.subtasks = [ { case_num: judge.result.case_num, status: judge.result.status, score: judge.result.score } ]; for (let i = 0; i < judge.result.case_num; ++i) { judge.result.subtasks[0][i] = judge.result[i]; } } let runningFound = false; for (let s of judge.result.subtasks) { s.pending = (s.status === 'Waiting' || s.status.startsWith('Running')); for (let i = 0; i < s.case_num; ++i) if (!s[i]) { s[i] = { pending: true, status: runningFound ? 'Waiting' : 'Running' }; if (!runningFound) s.isActiveSubtask = true; runningFound = true; } } %> <% let problemUrl; if (typeof contest !== 'undefined') problemUrl = syzoj.utils.makeUrl(['contest', contest.id, judge.problem_id]); else problemUrl = syzoj.utils.makeUrl(['problem', judge.problem_id]); %>
<% if ((typeof contest === 'undefined' || !contest) || !((!user || !user.is_admin) && !contest.ended && contest.type === 'acm')) { %> <% } %> <% if (judge.allowedSeeResult) { %> <% if ((typeof contest === 'undefined' || !contest) || !((!user || !user.is_admin) && !contest.ended && contest.type === 'acm')) { %> <% } %> <% if (judge.allowedSeeCode) { %> <% } else { %> <% } %> <% } else { %> <% } %> <% if (judge.allowedSeeCode) { %>
<% if (judge.allowedRejudge) { %> 重新评测 <% } %>
<%- judge.code %>
<% } %> <% if (judge.result.compiler_output && judge.result.status === 'Compile Error' && judge.allowedSeeCode) { %>

编译信息

<%- syzoj.utils.ansiToHTML(judge.result.compiler_output) %>
<% } else if (judge.result.spj_compiler_output) { %>

Special Judge 编译信息

<%- syzoj.utils.ansiToHTML(judge.result.spj_compiler_output) %>
<% } else if (judge.allowedSeeResult && judge.allowedSeeCase && judge.result.subtasks && (judge.result.subtasks.length !== 1 || judge.result.subtasks[0].case_num)) { %>
<% let subtask_count = 0; %> <% for (let subtask_cases of (judge.result.subtasks || [])) { %> <% if (judge.result.subtasks.length !== 1) { %>
子任务 #<%= ++subtask_count %>
<%= subtask_cases.status %>
<% if (!subtask_cases.pending) { %>
得分:<%= parseFloat(subtask_cases.score.toFixed(2)).toString() %>
<% } %>
<% } %> <% for (let i = 0; i < subtask_cases.case_num; i++) { %> <% let testcase = subtask_cases[i]; %>
style="cursor: auto; "<% } %>>
测试点 #<%= i + 1 %>
<%= testcase.status %>
<% if (!testcase.pending) { %> <% if (!testcase.score) testcase.score = testcase.status === 'Accepted' ? 100 : 0; %>
得分:<%= parseFloat(testcase.score.toFixed(2)).toString() %>
用时:<%= testcase.time_used %> ms
内存:<%= testcase.memory_used %> KiB
<% } %>
<% if (!testcase.pending && judge.allowedSeeData) { %>

输入文件

<%= testcase.input %>
输出文件
<%= testcase.answer %>
程序输出
<%= testcase.user_out %>
<% if (testcase.spj_message) { %> Special Judge 信息
<%= testcase.spj_message %>
<% } %> <% if (testcase.user_err) { %> 标准错误
<%= testcase.user_err %>
<% } %>

<% } %>
<% } %> <% if (judge.result.subtasks.length !== 1) { %>
<% } %> <% } %>
<% } %>
<% if (!isPending(judge.status)) { %>
<% } %>