{% extends "common-content.html" %} {% set has_hidden_subtasks = request.in_contest_mode and request.participation.contest.format.has_hidden_subtasks %} {% block content_media %} {% include "comments/media-css.html" %} {% endblock %} {% block content_js_media %} {% include "comments/media-js.html" %} {% include "actionbar/media-js.html" %} {% if request.in_contest_mode %} {% endif %} {% endblock %} {% block title_row %}
{% if request.user.is_authenticated and not has_hidden_subtasks %} {% if problem.id in completed_problem_ids %} {% if problem.is_public or request.in_contest_mode %} {% else %} {% endif %} {% elif problem.id in attempted_problems %} {% if problem.is_public or request.in_contest_mode %} {% else %} {% endif %} {% endif %} {% endif %}

{{ title }}

{% if problem.is_organization_private %} {% for org in problem.organizations.all() %} {% include "organization/tag.html" %} {% endfor %} {% endif %} {% if has_render %} {% elif problem.pdf_description %} {% else %} {% endif %} {{ _('View as PDF') }}
{% endblock %} {% block info_float %} {% if request.user.is_authenticated and request.in_contest_mode and submission_limit %} {% if submissions_left > 0 %}
{% trans trimmed counter=submissions_left %} {{ counter }} submission left {% pluralize %} {{ counter }} submissions left {% endtrans %}
{% else %}
{{ _('0 submissions left') }}
{% endif %} {% else %} {% endif %}
{% if request.user.is_authenticated and has_submissions %} {% endif %} {% if editorial and editorial.is_public and not (request.user.is_authenticated and request.in_contest_mode) %}
{% endif %} {% if can_edit_problem %}
{% if not problem.is_manually_managed %} {% endif %} {% elif request.user.is_authenticated and has_tickets %}
{% endif %} {% if problem.is_subs_manageable_by(request.user) %} {% endif %} {% if perms.judge.clone_problem %} {% endif %} {% if problem.language_time_limit or problem.language_memory_limit %}
{% endif %} {% if problem.language_time_limit %}
{{ _('Time limit:') }}
{% for name, limit in problem.language_time_limit %}
{{ name }} {{ limit }}s
{% endfor %}
{% endif %} {% if problem.language_memory_limit %}
{{ _('Memory limit:') }}
{% for name, limit in problem.language_memory_limit %}
{{ name }} {{ limit|kbsimpleformat }}
{% endfor %}
{% endif%}
{% with authors=problem.get_authors() %} {% if authors %}
{% trans trimmed count=authors|length %} Author: {% pluralize count %} Authors: {% endtrans %}
{{ link_users(authors) }}
{% endif %} {% endwith %} {% if not contest_problem or not contest_problem.contest.hide_problem_tags %}
{% with types=problem.types_list %}
{% trans trimmed count=problem.types_list|length %} Problem type {% pluralize count %} Problem types {% endtrans %}
{% endwith %}
{% endif %} {% if show_languages %}
{{ _('Allowed languages') }}
{% with usable=problem.usable_common_names, langs=problem.languages_list() %} {% for lang in langs %} {%- if lang in usable -%} {{ lang }} {%- else -%} {{ lang }} {%- endif -%} {% if not loop.last %}, {% endif -%} {% endfor %} {% endwith %}
{% endif %} {% if problem.is_editable_by(request.user) %}
{% trans trimmed count=available_judges|length %} Judge {% pluralize count %} Judges {% endtrans %}
{% endif %} {% endblock %} {% block description %} {% if contest_problem and contest_problem.contest.use_clarifications and has_clarifications %}
{% trans trimmed length=clarifications|length %} This problem has {{length}} clarification(s) {% endtrans %}
{% endif %}
{{ _('Points:') }} {% if contest_problem %} {{ contest_problem.points }} {% if contest_problem.partial %}(p){% endif %} {% else %} {{ problem.points|floatformat }} {% if problem.partial %}(p){% endif %} {% endif %} {{ _('Time limit:') }} {{ problem.time_limit }}s {{ _('Memory limit:') }} {{ problem.memory_limit|kbsimpleformat }} {{ _('Input:') }} {{ fileio_input or _('stdin') }} {{ _('Output:') }} {{ fileio_output or _('stdout') }}
{% cache 86400 'problem_html' problem.id LANGUAGE_CODE %} {{ description|markdown(lazy_load=True)|reference|str|safe }} {% endcache %} {% if problem.pdf_description %} {% endif %} {% with license=problem.license %} {% if license %} {{ license.display or license.name }}
{% endif %} {% endwith %} {% endblock %} {% block post_description_end %} {% if request.user.is_authenticated and not request.profile.mute %} {%- if contest_problem and contest_problem.contest.use_clarifications and request.profile.current_contest.live -%} {{ _('Request clarification') }}
{%- else -%} {% set actionbar_report_url = url('new_problem_ticket', problem.code) %} {% include "actionbar/list.html" %}
{%- endif -%} {% endif %} {% endblock %} {% block comments %} {% if contest_problem and contest_problem.contest.use_clarifications %}

{{ _('Clarifications') }}

{% if has_clarifications %} {% for clarification in clarifications %}
{{ relative_time(clarification.date) }}
{{ clarification.description|markdown|reference }}
{% endfor %} {% else %}

{{ _('No clarifications have been made at this time.') }}

{% endif %}
{% else %}
{% include "comments/list.html" %}
{% endif %} {% include "problem/related_problems.html" %} {% endblock %} {% block bodyend %} {{ super() }} {% include "comments/math.html" %} {% endblock %}