|
|
|
<% this.title = '题库' %>
|
|
|
|
<% include header %>
|
|
|
|
<div class="padding">
|
|
|
|
<div class="ui grid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="column">
|
|
|
|
<a href="<%= syzoj.utils.makeUrl(['problem', 0, 'edit']) %>" class="ui mini right floated button">添加题目</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<table class="ui very basic center aligned table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<% if (user) { %>
|
|
|
|
<th class="one wide">提交状态</th>
|
|
|
|
<% } %>
|
|
|
|
<th class="one wide">编号</th>
|
|
|
|
<th class="left aligned">题目名称</th>
|
|
|
|
<th class="one wide">通过</th>
|
|
|
|
<th class="one wide">提交</th>
|
|
|
|
<th class="one wide">通过率</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% for (let problem of problems) { %>
|
|
|
|
<% if (problem.is_public || problem.allowedEdit) { %>
|
|
|
|
<tr>
|
|
|
|
<% if (user) { %>
|
|
|
|
<td>
|
|
|
|
<% if (problem.judge_state) { %>
|
|
|
|
<%
|
|
|
|
let icon = {
|
|
|
|
'Accepted': 'checkmark',
|
|
|
|
'Wrong Answer': 'remove',
|
|
|
|
'Runtime Error': 'bomb',
|
|
|
|
'Time Limit Exceed': 'clock',
|
|
|
|
'Memory Limit Exceed': 'disk outline',
|
|
|
|
'Output Limit Exceed': 'expand',
|
|
|
|
'Waiting': 'spinner',
|
|
|
|
'Compile Error': 'code',
|
|
|
|
'System Error': 'server'
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
<span class="status <%= problem.judge_state.status.toLowerCase().split(' ').join('_') %>">
|
|
|
|
<i class="<%= icon[problem.judge_state.status] || 'remove' %> icon"></i>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
</td>
|
|
|
|
<% } %>
|
|
|
|
<td><%= problem.id %></td>
|
|
|
|
<td class="left aligned"><a href="<%= syzoj.utils.makeUrl(['problem', problem.id]) %>"><%= problem.title %>
|
|
|
|
<% if (!problem.is_public) { %><span class="ui header"><span class="ui tiny red label">未公开</span></span><% } %>
|
|
|
|
</a></td>
|
|
|
|
<td><%= problem.ac_num %></td>
|
|
|
|
<td><%= problem.submit_num %></td>
|
|
|
|
<td><%= ((problem.ac_num / problem.submit_num * 100) || 0).toFixed(2) %>%</td>
|
|
|
|
</tr>
|
|
|
|
<% } %>
|
|
|
|
<% } %>
|
|
|
|
</tbody>
|
|
|
|
</table><br>
|
|
|
|
<% include page %>
|
|
|
|
</div>
|
|
|
|
<% include footer %>
|