<commit_before>extends common-content
- load staticfiles
- load markdown_trois_tags
- load cache
- load smart_math
- load latex_math
- load filesize
- load camo_proxy
- load i18n
- load reference

block content_media
    include comments/media

block content_js_media
    include comments/js_media
    script.
        $(function () {
            $('a#clone-link').click(function (event) {
                event.preventDefault();
                if (confirm('Are you sure you want to clone?'))
                    $(this).closest("form").submit();
            })
        });

block title_row
    div.problem-title
        h2(style='color:#393630; display: inline-block')= title
        if has_pdf_render
            span.spacer
            a.view-pdf(href='{% url "problem_pdf" problem.code %}')
                span(style='position: relative; display: inline-block; font-size: 1.5em')
                    span.fa.fa-file-pdf-o(style='color: #d40e13')
                    span(style='height: 0.2em; display: block; position: absolute; top: 0.3em; background: #d40e13; width: 0.6em; margin-left: -0.15em')
                |  {% trans "View as PDF" %}

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

    if editorial and editorial.is_public
        hr
        div: a(href='{% url "solution" editorial.url %}') Read editorial

    if perms.judge.change_problem or perms.judge.edit_own_problem and request.user.profile.id in problem.author_ids or perms.judge.edit_public_problem and problem.is_public
        hr
        div: a(href='{% url "admin:judge_problem_change" problem.id %}') {% trans "Edit problem" %}
    if perms.judge.clone_problem
        div: form(action='{% url "problem_clone" problem.code %}', method='post')
            - csrf_token
            a#clone-link(href='#') {% trans "Clone problem" %}
    hr
    br
    .problem-info-entry
        i.fa.fa-check.fa-fw
        span.pi-name {% trans "Points:" %}
        span.pi-value
            if contest_problem
                | #{contest_problem.points}
                if contest_problem.partial
                    - trans "(partial)"
            else
                | #{problem.points|floatformat}
                if problem.partial
                    - trans "(partial)"
    .problem-info-entry
        i.fa.fa-clock-o.fa-fw
        span.pi-name {% trans "Time limit:" %}
        span.pi-value #{problem.time_limit}s
    .problem-lang-limits
        for name, limit in problem.language_time_limit
            .lang-limit
                span.lang-name= name
                span.lang-tl #{limit}s
    .problem-info-entry
        i.fa.fa-server.fa-fw
        span.pi-name {% trans "Memory limit:" %}
        span.pi-value #{problem.memory_limit|kbsimpleformat}
    .problem-lang-limits
        for name, limit in problem.language_memory_limit
            .lang-limit
                span.lang-name= name
                span.lang-ml #{limit|kbsimpleformat}
    - get_current_language as LANGUAGE_CODE
    - cache 86400 problem_authors problem.id LANGUAGE_CODE
        - with authors=problem.authors.all
            if authors
                .problem-info-entry
                    i.fa.fa-pencil-square-o.fa-fw
                    span.pi-name
                        - blocktrans trimmed count counter=authors|length
                            | Problem author:
                            - plural
                            | Problem authors:
                    span.pi-value.authors-value: for author in authors
                        span(class=author.display_rank)
                            a(href='{% url "user_page" author.user.username %}') #{author.user.username}
                        if not forloop.last
                            = ', '
    br
    if not contest_problem or not contest_problem.contest.hide_problem_tags
        div#problem-types
            - with types=problem.types_list
                div.toggle.closed.unselectable<commit_msg>Shorter looks nicer<commit_after>extends common-content
- load staticfiles
- load markdown_trois_tags
- load cache
- load smart_math
- load latex_math
- load filesize
- load camo_proxy
- load i18n
- load reference

block content_media
    include comments/media

block content_js_media
    include comments/js_media
    script.
        $(function () {
            $('a#clone-link').click(function (event) {
                event.preventDefault();
                if (confirm('Are you sure you want to clone?'))
                    $(this).closest("form").submit();
            })
        });

block title_row
    div.problem-title
        h2(style='color:#393630; display: inline-block')= title
        if has_pdf_render
            span.spacer
            a.view-pdf(href='{% url "problem_pdf" problem.code %}')
                span(style='position: relative; display: inline-block; font-size: 1.5em')
                    span.fa.fa-file-pdf-o(style='color: #d40e13')
                    span(style='height: 0.2em; display: block; position: absolute; top: 0.3em; background: #d40e13; width: 0.6em; margin-left: -0.15em')
                |  {% trans "View as PDF" %}

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

    if editorial and editorial.is_public
        hr
        div: a(href='{% url "solution" editorial.url %}') Read editorial

    if perms.judge.change_problem or perms.judge.edit_own_problem and request.user.profile.id in problem.author_ids or perms.judge.edit_public_problem and problem.is_public
        hr
        div: a(href='{% url "admin:judge_problem_change" problem.id %}') {% trans "Edit problem" %}
    if perms.judge.clone_problem
        div: form(action='{% url "problem_clone" problem.code %}', method='post')
            - csrf_token
            a#clone-link(href='#') {% trans "Clone problem" %}
    hr
    br
    .problem-info-entry
        i.fa.fa-check.fa-fw
        span.pi-name {% trans "Points:" %}
        span.pi-value
            if contest_problem
                | #{contest_problem.points}
                if contest_problem.partial
                    - trans "(partial)"
            else
                | #{problem.points|floatformat}
                if problem.partial
                    - trans "(partial)"
    .problem-info-entry
        i.fa.fa-clock-o.fa-fw
        span.pi-name {% trans "Time limit:" %}
        span.pi-value #{problem.time_limit}s
    .problem-lang-limits
        for name, limit in problem.language_time_limit
            .lang-limit
                span.lang-name= name
                span.lang-tl #{limit}s
    .problem-info-entry
        i.fa.fa-server.fa-fw
        span.pi-name {% trans "Memory limit:" %}
        span.pi-value #{problem.memory_limit|kbsimpleformat}
    .problem-lang-limits
        for name, limit in problem.language_memory_limit
            .lang-limit
                span.lang-name= name
                span.lang-ml #{limit|kbsimpleformat}
    - get_current_language as LANGUAGE_CODE
    - cache 86400 problem_authors problem.id LANGUAGE_CODE
        - with authors=problem.authors.all
            if authors
                .problem-info-entry
                    i.fa.fa-pencil-square-o.fa-fw
                    span.pi-name
                        - blocktrans trimmed count counter=authors|length
                            | Author:
                            - plural
                            | Authors:
                    div.pi-value.authors-value: for author in authors
                        span(class=author.display_rank)
                            a(href='{% url "user_page" author.user.username %}') #{author.user.username}
                        if not forloop.last
                            = ', '
    br
    if not contest_problem or not contest_problem.contest.hide_problem_tags
        div#problem-types
            - with types=problem.types_list
                div.toggle.closed.unselectable
{'fraction_non_alphanumeric': 0.11316895807294626, 'fraction_numerical': 0.007499147824110896, 'mean_word_length': 1.853160453808752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7367077', 'n_tokens_mistral': 2720, 'n_tokens_neox': 2460, 'n_words': 549}