<% include util %> <% // Sanitize judge results for backward compatibility and clarity if (!judge.result.subtasks) { judge.result.subtasks = [ { case_num: judge.result.case_num, status: judge.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' || contest.type === 'noi'))) { %> <% } %> <% if (judge.problem.type !== 'submit-answer') { %> <% } else { %> <% } %> <% if ((typeof contest === 'undefined' || !contest) || !((!user || !user.is_admin) && !contest.ended && (contest.type === 'acm' || contest.type === 'noi'))) { %> <% } %> <% if (judge.problem.type !== 'submit-answer') { %> <% if (judge.allowedSeeCode) { %> <% } else { %> <% } %> <% } else { %> <% } %> <% if (judge.problem.type !== 'submit-answer' && judge.allowedSeeCode) { %>
<% if (judge.allowedRejudge) { %> 重新评测 <% } %>
<%- judge.code %>
<% } %> <% if (judge.problem.type !== 'submit-answer' && judge.result.compiler_output && judge.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.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 && testcase.status !== 'Skipped') { %> <% 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.status !== 'Skipped') { %>

输入文件

<%= 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)) { %>
<% } %>