2015-08-02 00:50:19 +00:00
|
|
|
{% extends 'oj_base.html' %}
|
|
|
|
|
|
|
|
{% block body %}
|
2015-08-10 12:19:22 +00:00
|
|
|
<div class="container main">
|
|
|
|
<ul class="nav nav-tabs nav-tabs-google">
|
|
|
|
<li role="presentation" class="active">
|
2015-08-17 12:54:10 +00:00
|
|
|
<a href="/problem/{{ problem.id }}/">题目</a></li>
|
2015-08-24 13:03:30 +00:00
|
|
|
<li role="presentation"><a href="/problem/{{ problem.id }}/submissions/">我的提交</a></li>
|
2015-08-10 12:19:22 +00:00
|
|
|
</ul>
|
2015-08-14 02:23:06 +00:00
|
|
|
{% include "oj/problem/_problem_header.html" %}
|
2015-08-02 00:50:19 +00:00
|
|
|
|
2015-08-10 12:19:22 +00:00
|
|
|
<div>
|
|
|
|
<div class="problem-section">
|
|
|
|
<label class="problem-label">描述</label>
|
|
|
|
|
2015-08-10 14:57:11 +00:00
|
|
|
<p class="problem-detail">{{ problem.description|safe }}</p>
|
2015-08-10 12:19:22 +00:00
|
|
|
</div>
|
|
|
|
<div class="problem-section">
|
|
|
|
<label class="problem-label">输入</label>
|
|
|
|
|
2015-08-13 12:29:11 +00:00
|
|
|
<p class="problem-detail">{{ problem.input_description }}</p>
|
2015-08-10 12:19:22 +00:00
|
|
|
</div>
|
|
|
|
<div class="problem-section">
|
|
|
|
<label class="problem-label">输出</label>
|
|
|
|
|
2015-08-13 12:29:11 +00:00
|
|
|
<p class="problem-detail">{{ problem.output_description }}k</p>
|
2015-08-10 12:19:22 +00:00
|
|
|
</div>
|
2015-08-10 14:57:11 +00:00
|
|
|
{% for item in samples %}
|
2015-08-13 10:15:54 +00:00
|
|
|
<div class="problem-section">
|
2015-08-15 11:49:58 +00:00
|
|
|
<label class="problem-label">样例输入{{ forloop.counter }}</label>
|
2015-08-02 00:50:19 +00:00
|
|
|
<pre>
|
2015-08-10 14:57:11 +00:00
|
|
|
{{ item.input }}</pre>
|
2015-08-10 12:19:22 +00:00
|
|
|
|
2015-08-13 10:15:54 +00:00
|
|
|
</div>
|
|
|
|
<div class="problem-section">
|
2015-08-10 12:19:22 +00:00
|
|
|
|
2015-08-15 11:49:58 +00:00
|
|
|
<label class="problem-label">样例输出{{ forloop.counter }}</label>
|
2015-08-10 12:19:22 +00:00
|
|
|
<pre>
|
2015-08-10 14:57:11 +00:00
|
|
|
{{ item.output }}</pre>
|
2015-08-13 10:15:54 +00:00
|
|
|
</div>
|
2015-08-10 14:57:11 +00:00
|
|
|
{% endfor %}
|
2015-08-02 00:50:19 +00:00
|
|
|
<div>
|
2015-08-15 11:49:58 +00:00
|
|
|
<button type="button" id="show-more-btn" class="btn btn-default btn-sm">查看隐藏信息</button>
|
2015-08-02 00:50:19 +00:00
|
|
|
</div>
|
2015-08-13 12:29:11 +00:00
|
|
|
{% if problem.hint %}
|
2015-08-13 10:15:54 +00:00
|
|
|
<div class="problem-section hide">
|
|
|
|
<label class="problem-label">提示</label>
|
2015-08-10 12:19:22 +00:00
|
|
|
|
2015-08-13 10:15:54 +00:00
|
|
|
<p class="problem-detail">{{ problem.hint|safe }}</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2015-08-10 12:19:22 +00:00
|
|
|
<div class="problem-section hide">
|
|
|
|
<label class="problem-label">标签</label>
|
|
|
|
|
|
|
|
<p class="problem-detail">
|
2015-08-10 14:57:11 +00:00
|
|
|
{% for tag in problem.tags.all %}
|
2015-08-13 10:15:54 +00:00
|
|
|
<span class="label label-success">{{ tag.name }}</span>
|
2015-08-10 14:57:11 +00:00
|
|
|
{% endfor %}
|
2015-08-10 12:19:22 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>选择语言</label>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label class="radio-inline">
|
2015-08-13 13:02:17 +00:00
|
|
|
<input type="radio" name="language" value="1" checked> C (gcc 4.8)
|
2015-08-10 12:19:22 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
2015-08-13 13:02:17 +00:00
|
|
|
<input type="radio" name="language" value="2"> C++ (g++ 4.3)
|
2015-08-10 12:19:22 +00:00
|
|
|
</label>
|
|
|
|
<label class="radio-inline">
|
2015-08-13 10:15:54 +00:00
|
|
|
<input type="radio" name="language" value="3"> Java (jre 1.7)
|
2015-08-10 12:19:22 +00:00
|
|
|
</label>
|
2015-08-02 00:50:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-10 12:19:22 +00:00
|
|
|
|
|
|
|
<div id="code-field">
|
|
|
|
<label class="problem-label">提交代码</label>
|
|
|
|
<textarea id="code-editor"></textarea>
|
2015-08-02 00:50:19 +00:00
|
|
|
</div>
|
2015-08-10 12:19:22 +00:00
|
|
|
<hr>
|
|
|
|
<div id="submit-code">
|
|
|
|
<button type="button" class="btn btn-primary" id="submit-code-button">
|
|
|
|
提交代码
|
|
|
|
</button>
|
|
|
|
<img src="/static/img/loading.gif" id="loading-gif">
|
|
|
|
|
2015-08-02 00:50:19 +00:00
|
|
|
</div>
|
2015-08-13 10:15:54 +00:00
|
|
|
|
|
|
|
<div id="result">
|
2015-08-02 00:50:19 +00:00
|
|
|
</div>
|
2015-08-14 02:23:06 +00:00
|
|
|
<hr>
|
2015-08-02 00:50:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-02 06:01:53 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block js_block %}
|
2015-08-10 12:19:22 +00:00
|
|
|
<script src="/static/js/app/oj/problem/problem.js"></script>
|
2015-08-02 00:50:19 +00:00
|
|
|
{% endblock %}
|