|
|
|
<% include util %>
|
|
|
|
<%
|
|
|
|
let problemUrl;
|
|
|
|
if (typeof contest !== 'undefined' && contest) problemUrl = syzoj.utils.makeUrl(['contest', contest.id, judge.problem_id]);
|
|
|
|
else problemUrl = syzoj.utils.makeUrl(['problem', judge.problem_id]);
|
|
|
|
%>
|
|
|
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>">#<%= judge.id %></a></td>
|
|
|
|
<td><a style="width: 220px; height: 22px; display: block; margin: 0 auto; line-height: 22px; " id="text-fit-<%= judge.id %>" href="<%= problemUrl %>"><%= (typeof contest !== 'undefined' && contest) ? this.alpha(judge.problem_id) : ('#' + judge.problem_id) %>. <%= judge.problem.title %></a></td>
|
|
|
|
<script>
|
|
|
|
var e = document.getElementById('text-fit-<%= judge.id %>');
|
|
|
|
textFit(e, { maxFontSize: 14 });
|
|
|
|
</script>
|
|
|
|
<% if (!judge.hidden) { %>
|
|
|
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>">
|
|
|
|
<span class="status <%= getStatusMeta(judge.status).toLowerCase().split(' ').join('_') %>">
|
|
|
|
<i class="<%= icon[getStatusMeta(judge.status)] || 'remove' %> icon"></i>
|
|
|
|
<%= judge.status %>
|
|
|
|
</span>
|
|
|
|
</a></td>
|
|
|
|
<% if ((typeof contest === 'undefined' || !contest) || !((!user || !user.is_admin) && !contest.ended && contest.type === 'acm')) { %>
|
|
|
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"><span class="score score_<%= parseInt(judge.result.score / 10) || 0 %>"><%= judge.result.score %></span></a></td>
|
|
|
|
<% } %>
|
|
|
|
<td><%= judge.result.total_time %> ms</td>
|
|
|
|
<td><%= parseInt(judge.result.max_memory) || 0 %> K</td>
|
|
|
|
<% if (judge.allowedSeeCode) { %>
|
|
|
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"><%= syzoj.config.languages[judge.language].show %></a> / <%= syzoj.utils.formatSize(judge.code.length) %></td>
|
|
|
|
<% } else { %>
|
|
|
|
<td><a href="<%= syzoj.utils.makeUrl(['submission', judge.id]) %>"><%= syzoj.config.languages[judge.language].show %></a> / 隐藏</td>
|
|
|
|
<% } %>
|
|
|
|
<% } else { %>
|
|
|
|
<td>隐藏</td>
|
|
|
|
<% if ((typeof contest === 'undefined' || !contest) || !((!user || !user.is_admin) && !contest.ended && contest.type === 'acm')) { %>
|
|
|
|
<td>隐藏</td>
|
|
|
|
<% } %>
|
|
|
|
<td>隐藏</td>
|
|
|
|
<td>隐藏</td>
|
|
|
|
<td>隐藏</td>
|
|
|
|
<% } %>
|
|
|
|
<td><a href="<%= syzoj.utils.makeUrl(['user', judge.user_id]) %>"><%= judge.user.username %></a><% if (judge.user.nameplate) { %><%- judge.user.nameplate %><% } %></td>
|
|
|
|
<td><%= syzoj.utils.formatDate(judge.submit_time) %>
|
|
|
|
<% if (isPending(judge.status)) { %>
|
|
|
|
<script>
|
|
|
|
function update_judge_<%= judge.id %>() {
|
|
|
|
setTimeout(function () {
|
|
|
|
<%
|
|
|
|
let url = syzoj.utils.makeUrl(['submissions', judge.id, 'ajax']);
|
|
|
|
%>
|
|
|
|
$.get('<%= url %>', function (data) {
|
|
|
|
var e = $('#submissions_<%= judge.id %>');
|
|
|
|
if (e.html() != data) e.html(data);
|
|
|
|
else update_judge_<%= judge.id %>();
|
|
|
|
});
|
|
|
|
}, 500);
|
|
|
|
}
|
|
|
|
update_judge_<%= judge.id %>();
|
|
|
|
</script>
|
|
|
|
<% } %>
|
|
|
|
</td>
|