{% extends base.html %} {% block core %}

{{ task.title }} ({{ task.name }})

{{ _("Task information") }}

{{ _("Download task statement") }}
{{ _("Time limit: %(seconds)s second(s).") % {"seconds": task.time_limit} }}
{{ _("Memory limit: %(mb)s MB.") % {"mb": task.memory_limit} }}

{{ _("Submit a solution") }}

{% if len(task.submission_format) > 1 %} {% end %}
{% for filename in [x.filename for x in task.submission_format] %}

{{ filename.replace(".%l", "") }}:

{% end %} {% comment _("Submit") %}

submission.zip

{% comment _("Submit") %}

{{ _("Previous submissions") }}

{% set tokens_info = contest.tokens_available(current_user.username, task.name, timestamp) %} {% set can_play_token = (tokens_info[0] > 0 and tokens_info[2] is None) %} {% if tokens_info[0] > 0 and tokens_info[2] is None %}

{{ _("Right now, you have %(tokens)s token(s) available on this task.") % { "tokens": tokens_info[0]} }} {% if tokens_info[1] is not None %} {{ _("You will receive a new token at %(gen_time)s.") % {"gen_time": Utils.format_time_or_date(tokens_info[1])} }} {% else %} {{ _("In the current situation, no more tokens will be generated.") }} {% end %}

{% elif tokens_info[0] > 0 %}

{{ _("Right now, you have %(tokens)s token(s) available on this task.") % { "tokens": tokens_info[0]} }} {{ _("But you have to wait until %(expiration_time)s to use them.") % {"expiration_time": Utils.format_time_or_date(tokens_info[2])} }} {% if tokens_info[1] is not None %} {{ _("You will receive a new token at %(gen_time)s.") % {"gen_time": Utils.format_time_or_date(tokens_info[1])} }} {% else %} {{ _("In the current situation, no more tokens will be generated.") }} {% end %}

{% else %}

{{ _("Right now, you do not have tokens available for this task.") }} {% if tokens_info[1] is not None %} {{ _("You will receive a new token at %(gen_time)s.") % {"gen_time": Utils.format_time_or_date(tokens_info[1])} }} {% if tokens_info[2] is not None and tokens_info[2] > tokens_info[1] %} {{ _("But you will have to wait until %(expiration_time)s to use it.") % {"expiration_time": Utils.format_time_or_date(tokens_info[2])} }} {% end %} {% else %} {{ _("In the current situation, no more tokens will be generated.") }} {% end %}

{% end %}
{% if submissions == [] %}

{{ _("No submissions found.") }}

{% else %} {% for s in sorted(submissions, key=lambda s: s.timestamp, reverse=True) %} {% end %}
{{ _("Date") }} {{ _("Evaluation") }} {{ _("Files") }} {{ _("Token used?") }}
{{ Utils.format_time_or_date(s.timestamp) }} {% if s.compilation_outcome is None %} {{ _("Compiling...") }} {% else %}
{% if s.compilation_outcome == "fail" %} {{ _("Compilation failed") }} {% elif s.evaluations == [] %} {{ _("Evaluating...") }} {% else %} {{ _("Evaluated") }} {% end %}
{% end %}
{% for filename in [x.filename for x in task.submission_format] %} {% if filename in s.files %} {% set real_filename = filename if s.language is None else filename.replace("%l", s.language) %} {{ real_filename }}
{% end %} {% end %}
{% if s.token is None %} {{ _("No") }} {% if can_play_token %}
{% comment _("Use!") %}
{% end %} {% else %} {{ _("Yes") }} {% end %}
{% end %}
{% end %}