{# problem \App\Entity\ContestProblem #} {% set contest_problemset_add_cid = contest_problemset_add_cid | default(false) %}

{{ contest.name | default('Contest') }} problems {% if contest and show_contest_problemset and contest.contestProblemsetType is not empty %} {% if contest_problemset_add_cid %} {% set contest_problemset_url = path(contest_problemset_path, {'cid': contest.cid}) %} {% else %} {% set contest_problemset_url = path(contest_problemset_path) %} {% endif %} problemset {% endif %}

{% if problems is empty %}
No problem texts available at this point.
{% else %}
{% if show_jury_warning is defined and show_jury_warning %}
This is a preview of how the page will look like for teams and the public after the contest has started.
{% endif %}
{% for problem in problems %}
{% set numsamples = samples[problem.probid] %} {% if problem.problem.combinedRunCompare %} {% set numsamples = 0 %} {% endif %}

{{ problem | problemBadge }}

{{ problem.problem.name }}

{% if showLimits %}

Limits: {{ problem.problem.timelimit }} second {%- if problem.problem.timelimit > 1 %}s{% endif %} {%- if timeFactorDiffers -%} * {% endif %} / {{ ((problem.problem.memlimit | default(defaultMemoryLimit)) * 1024) | printSize }}

{% endif %} {% if stats is defined %}
{% for correct in [true, false] %}
{% for bucket in 0..stats.numBuckets - 1 %} {% if correct %} {% set index = 'correct' %} {% set maxBucketSize = stats.maxBucketSizeCorrect %} {% else %} {% set index = 'incorrect' %} {% set maxBucketSize = stats.maxBucketSizeIncorrect %} {% endif %} {% set stat = stats.problems[problem.problem.probid][index][bucket] %} {% set count = stat.count %} {% if maxBucketSize == 0 %} {% set bucket = 0 %} {% else %} {% set bucket = (count / maxBucketSize * 9) | round(0, 'ceil') %} {% endif %} {% if count == 1 %} {% set submissionText = 'submission' %} {% else %} {% set submissionText = 'submissions' %} {% endif %} {% if not contest.freezeData.showFinal and contest.freezetime and stat.end.timestamp >= contest.freezetime %} {% set maxBucketSize = max(1, stats.maxBucketSizeCorrect, stats.maxBucketSizeIncorrect) %} {% set bucket = (count / maxBucketSize * 9) | round(0, 'ceil') %} {% set itemClass = 'frozen' ~ '-' ~ bucket %} {% set label = count ~ ' ' ~ submissionText ~ ' in freeze' %} {% else %} {% set itemClass = index ~ '-' ~ bucket %} {% set label = count ~ ' ' ~ index ~ ' ' ~ submissionText %} {% endif %}
{% endfor %}
{% endfor %}

{% endif %}
{% if problem.problem.problemstatementType is not empty %} statement {% endif %} {% if numsamples > 0 %} samples {% endif %} {% if show_submit_button | default(false) %} {% if is_granted('ROLE_JURY') or (current_team_contest is not null and current_team_contest.freezeData.started) %} Submit {% else %} Submit {% endif %} {% endif %}
{% if problem.problem.attachments | length > 0 %}
    {% for attachment in problem.problem.attachments %}
  1. {{ attachment.name }}
  2. {% endfor %}
{% endif %}
{% endfor %}
{% if showLimits and timeFactorDiffers %}
{% endif %}
{% endif %}