You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

55 lines
2.1 KiB

<% this.title = '评测详细信息' %>
<% include header %>
<div class="padding">
<table class="ui very basic center aligned table">
<thead>
<tr>
<th>编号</th>
<th>题目名称</th>
<th>状态</th>
<th>分数</th>
<th>总时间</th>
<th>提交者</th>
<th>提交时间</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= judge.id %></td>
<td><a href="<%= syzoj.utils.makeUrl(['problem', judge.problem_id]) %>">#<%= judge.problem_id %>. <%= judge.problem.title %></a></td>
<td class="status <%= judge.result.status.toLowerCase().split(' ').join('_') %>"><%= judge.result.status %></td>
<td class="score score_<%= parseInt(judge.result.score / 10) || 0 %>"><%= judge.result.score %></td>
<td><%= judge.result.total_time %></td>
<td><%= judge.user.username %></td>
<td><%= syzoj.utils.formatDate(judge.submit_time) %></td>
</tr>
</tbody>
</table>
<div class="ui existing segment"><pre style="margin-top: 0; margin-bottom: 0; "><code><%- judge.code %></code></pre></div>
<div class="ui styled fluid accordion">
<% for (let i = 0; i < judge.result.case_num; i++) { %>
<% let testcase = judge.result[i]; %>
<div class="title">
<i class="dropdown icon"></i>
测试点:<%= i %> 状态:<%= testcase.status %>
运行时间:<%= testcase.time_used %> ms 使用内存:<%= testcase.memory_used %> KiB
</div>
<div class="content">
<p>
<strong>输入文件</strong>
<div class="ui existing segment"><pre style="margin-top: 0; margin-bottom: 0; "><code><%= testcase.input %></code></pre></div>
<strong>期望输出</strong>
<div class="ui existing segment"><pre style="margin-top: 0; margin-bottom: 0; "><code><%= testcase.answer %></code></pre></div>
<strong>你的输出</strong>
<div class="ui existing segment"><pre style="margin-top: 0; margin-bottom: 0; "><code><%= testcase.user_out %></code></pre></div>
</p>
</div>
<% } %>
</div>
<script>
$(function() {
$('.ui.accordion').accordion();
});
</script>
<% include footer %>