<commit_before>extends common-content
- load staticfiles
- load mathtag
- load markdown_trois_tags
- load cache
- load smart_math

block content_media
    script(type='text/javascript', src='{% static "common.js" %}')
    style
        a.view-pdf {
            float: right;
            padding-top: 1em;
        }

block header
    a.view-pdf(href='{% url "problem_pdf" problem.code %}')
        img(style='position:relative;top:2px', src='http://www.adobe.com/images/pdficon_small.png')
        = ' View as PDF'
        sup= ' (beta)'

block info_float
    a.unselectable.button.full(href='{% url "judge.views.problem_submit" problem.code %}') Submit solution
    hr
    if request.user.is_authenticated and has_submissions
        a(href='{% url "user_submissions" problem.code request.user.username %}') My submissions
        br
    a(href='{% url "chronological_submissions" problem.code %}') All submissions
    br
    a(href='{% url "ranked_submissions" problem.code %}') Best submissions

    if perms.judge.change_problem
        hr
        a(href='{% url "admin:judge_problem_change" problem.id %}') Edit problem
        br
    elif perms.judge.edit_own_problem and request.user.profile.id in problem.author_ids
        hr
        a(href='{% url "problem_edit" problem.code %}') Edit problem
        br
    hr
    br
    if contest_problem
        b Points:
        | &nbsp;#{contest_problem.points}
        if contest_problem.partial
            | (partial)
    else
        b Points:
        | &nbsp;#{problem.points|floatformat}
        if problem.partial
            | (partial)
    br
    b Time limit:
    | &nbsp;#{problem.time_limit}s
    br
    b Memory limit:
    -with memory=problem.memory_limit
        if memory < 1000
            | #{memory|floatformat:"-2"}K
        else
            -math memory "$1 / 1024" as megabytes
            | #{megabytes|floatformat:"-2"}M
    br
    br
    div#problem-types
        div.toggle.closed.unselectable
            span.icon
            | Problem type(s)
        div.toggled(style="display:none") #{problem.types_list|join:", "}
    br
    if show_languages
        div#allowed-langs
            div.toggle.open.unselectable
                span.icon
                | Allowed languages
            div.toggled(style="margin-bottom:-1em") #{problem.languages_list|join:", "}
        br

block description
    - cache 86400 problem_html problem.id
        | #{problem.description|markdown:"problem"|smart_math}
<commit_msg>Display problem authors<commit_after>extends common-content
- load staticfiles
- load mathtag
- load markdown_trois_tags
- load cache
- load smart_math

block content_media
    script(type='text/javascript', src='{% static "common.js" %}')
    style
        a.view-pdf {
            float: right;
            padding-top: 1em;
        }

block header
    a.view-pdf(href='{% url "problem_pdf" problem.code %}')
        img(style='position:relative;top:2px', src='http://www.adobe.com/images/pdficon_small.png')
        = ' View as PDF'
        sup= ' (beta)'

block info_float
    a.unselectable.button.full(href='{% url "judge.views.problem_submit" problem.code %}') Submit solution
    hr
    if request.user.is_authenticated and has_submissions
        a(href='{% url "user_submissions" problem.code request.user.username %}') My submissions
        br
    a(href='{% url "chronological_submissions" problem.code %}') All submissions
    br
    a(href='{% url "ranked_submissions" problem.code %}') Best submissions

    if perms.judge.change_problem
        hr
        a(href='{% url "admin:judge_problem_change" problem.id %}') Edit problem
        br
    elif perms.judge.edit_own_problem and request.user.profile.id in problem.author_ids
        hr
        a(href='{% url "problem_edit" problem.code %}') Edit problem
        br
    hr
    br
    if contest_problem
        b Points:
        | &nbsp;#{contest_problem.points}
        if contest_problem.partial
            | (partial)
    else
        b Points:
        | &nbsp;#{problem.points|floatformat}
        if problem.partial
            | (partial)
    br
    b Time limit:
    | &nbsp;#{problem.time_limit}s
    br
    b Memory limit:
    -with memory=problem.memory_limit
        if memory < 1000
            | #{memory|floatformat:"-2"}K
        else
            -math memory "$1 / 1024" as megabytes
            | #{megabytes|floatformat:"-2"}M
    br
    b Author(s):
    for author in problem.authors
        a(href='{% url "judge.views.user" author.user.username ') #{author.user.username}
        if not forloop.last
            |,&nbsp;
    br
    br
    div#problem-types
        div.toggle.closed.unselectable
            span.icon
            | Problem type(s)
        div.toggled(style="display:none") #{problem.types_list|join:", "}
    br
    if show_languages
        div#allowed-langs
            div.toggle.open.unselectable
                span.icon
                | Allowed languages
            div.toggled(style="margin-bottom:-1em") #{problem.languages_list|join:", "}
        br

block description
    - cache 86400 problem_html problem.id
        | #{problem.description|markdown:"problem"|smart_math}

{'fraction_non_alphanumeric': 0.1171136407486012, 'fraction_numerical': 0.007331661200077175, 'mean_word_length': 2.2893401015228427, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6250655', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1566, 'n_words': 342}