{% extends "base.html" %} {% block title %}题目列表 — Benchmark Platform{% endblock %} {% block content %}
共 {{ total_challenges }} 题 · {{ total_flags }} flags
{% set ns = namespace(tag_counts={}) %} {% for lg in level_groups %} {% for card in lg.challenges %} {% for tag in card.tags %} {% if tag in ns.tag_counts %} {% set _ = ns.tag_counts.update({tag: ns.tag_counts[tag] + 1}) %} {% else %} {% set _ = ns.tag_counts.update({tag: 1}) %} {% endif %} {% endfor %} {% endfor %} {% endfor %} {% set all_tags = ns.tag_counts.items() | sort(attribute='1', reverse=true) %} {% if all_tags %}
{% for tag, count in all_tags %} {% endfor %} {% if all_tags | length > 10 %} {% endif %}
{% endif %} {% set ns2 = namespace(cat_stats={}) %} {% for lg in level_groups %} {% for card in lg.challenges %} {% if card.category %} {% if card.category not in ns2.cat_stats %} {% set _ = ns2.cat_stats.update({card.category: {'total': 0, 'enabled': 0}}) %} {% endif %} {% set _ = ns2.cat_stats[card.category].update({'total': ns2.cat_stats[card.category].total + 1}) %} {% if card.enabled %} {% set _ = ns2.cat_stats[card.category].update({'enabled': ns2.cat_stats[card.category].enabled + 1}) %} {% endif %} {% endif %} {% endfor %} {% endfor %} {% if ns2.cat_stats %}
分类: {% for cat, stats in ns2.cat_stats.items() | sort %}
{{ cat }} {{ stats.enabled }}/{{ stats.total }} |
{% endfor %}
{% endif %}
{% for lg in level_groups %}
{% if lg.all_solved %} {{ lg.level }} {% elif lg.unlocked %} {{ lg.level }} {% else %} {{ lg.level }} {% endif %}

Level {{ lg.level }}

{{ lg.solved }}/{{ lg.total }} {% if lg.all_solved %} 已通过 {% endif %} {% if not lg.unlocked %} 需通过 Level {{ lg.level - 1 }} 解锁 {% endif %}
{% if lg.unlocked %}
{% endif %}
{% for card in lg.challenges %}
{% include "components/challenge_card.html" %}
{% endfor %}
{% endfor %} {% if not level_groups %}
暂无赛题数据,请检查服务器启动参数
{% endif %}
{% include "components/modal_submit.html" %} {% include "components/modal_confirm.html" %} {% endblock %}