<% 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') && !hideScore) { %> <% } %> <% if (judge.problem.type !== 'submit-answer') { %> <% if (!hideScore) { %> <% } %> <% } else { %> <% } %> <% if (judge.allowedRejudge) { %> <% } %> <% if ((typeof contest === 'undefined' || !contest) || !((!user || !user.is_admin) && !contest.ended && contest.type === 'acm') && !hideScore) { %> <% } %> <% if (judge.problem.type !== 'submit-answer') { %> <% if (!hideScore) { %> <% } %> <% if (judge.allowedSeeCode) { %> <% } else { %> <% } %> <% } else { %> <% } %> <% if (judge.allowedRejudge) { %> <% } %> <% if (judge.problem.type !== 'submit-answer' && judge.allowedSeeCode) { %>
<%- 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.message) { %>

系统调试信息

<%= judge.result.message %>
<% } else if (judge.result.spj_compiler_output) { %>

<%= judge.problem.type === 'interaction' ? '交互程序' : '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; %> <% if (judge.problem.type === 'submit-answer') { %> <% if (testcase.length != null) { %>
文件大小:<%= syzoj.utils.formatSize(testcase.length) %>
<% } %> <% } else { %>
得分:<%= parseFloat(testcase.score.toFixed(2)).toString() %>
用时:<%= testcase.time_used %> ms
内存:<%= testcase.memory_used %> KiB
<% } %> <% } %>
<% if (!testcase.pending && judge.allowedSeeData && testcase.status !== 'Skipped') { %>

输入文件<% if (testcase.input_file_name) { %>(<%= testcase.input_file_name %>)<% } %>

<%= testcase.input %>
<% if (judge.problem.type !== 'interaction') { %> 输出文件<% if (testcase.output_file_name) { %>(<%= testcase.output_file_name %>)<% } %>
<%= testcase.answer %>
选手输出
<%= testcase.user_out %>
<% } %> <% if (testcase.spj_message) { %> <%= judge.problem.type === 'interaction' ? '交互程序' : 'Special Judge ' %>信息
<%= testcase.spj_message %>
<% } %> <% if (testcase.user_err) { %> 标准错误
<%= testcase.user_err %>
<% } %> <% if (testcase.runner_message && judge.allowedManage) { %> 调试信息
<%= testcase.runner_message %>
<% } %>

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