<% if (typeof contest === 'undefined') contest = null; if (contest) { this.title = syzoj.utils.removeTitleTag(problem.title) + ' - ' + contest.title + ' - 比赛'; } else { this.title = problem.title + ' - 题目'; } %> <% include header %>

<% if (contest) { %> <%= syzoj.utils.removeTitleTag(problem.title) %> <% } else { %> <%= problem.title %><% if (problem.allowedEdit && !problem.is_public) { %>未公开<% } %> <% } %>

内存限制: <%= problem.memory_limit %> MiB 时间限制: <%= problem.time_limit %> ms
<% if (problem.file_io) { %> 输入文件: <%= problem.file_io_input_name %> 输出文件: <%= problem.file_io_output_name %> <% } else { %> 标准输入输出 <% } %>
<% if (typeof contest !== 'undefined' && contest) { %> <% if (!contest.ended) { %> 提交 <% } else { %> 转到题库 <% } %> 提交记录 返回比赛 <% } else { %> 提交 提交记录 统计 下载测试数据 <% } %>
<% if (!contest) { %>
<% if (problem.allowedEdit) { %> 编辑 管理测试数据 <% } %> <% if (user && user.is_admin) { %> <% if (problem.is_public) { %> <% } else { %> <% } %> <% } %>
<% } %>
<% if (problem.description) { %>

题目描述

<%- problem.description %>
<% } %> <% if (problem.input_format) { %>

输入格式

<%- problem.input_format %>
<% } %> <% if (problem.output_format) { %>

输出格式

<%- problem.output_format %>
<% } %> <% if (problem.example) { %>

样例

<%- problem.example %>
<% } %> <% if (problem.limit_and_hint) { %>

数据范围与提示

<%- problem.limit_and_hint %>
<% } %> <% if (problem.tags && problem.tags.length) { %>

显示分类标签

<% } %> <% let noSubmit = false; %> <% if (typeof contest !== 'undefined' && contest && contest.ended) { noSubmit = true; } %> <% if (!noSubmit) { %>
<% let formUrl; if (contest) formUrl = syzoj.utils.makeUrl(['problem', problem.id, 'submit'], { contest_id: contest.id }); else formUrl = syzoj.utils.makeUrl(['problem', problem.id, 'submit']); %>
<% if (state) { %><%= state.code %><% } %>
<% } %>
<% include footer %>