mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: support generate testdata (#695)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
b83b2e792e
commit
55b4e1aaf0
27 files changed
+454
-68
No files matched your search
@@ -69,6 +69,9 @@
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item">{{ _('ID') }}: {{ pdoc.docId }}</span>
|
||||
{% endif %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-book">{{ _('problem_type.' + pdoc.config.type).format(pdoc.config.subType) }}</span>
|
||||
{% if pdoc.config.type == 'default' and pdoc.config.subType %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-book">{{ _('File IO: {0}').format(pdoc.config.subType) }}</span>
|
||||
{% endif %}
|
||||
{% if pdoc.config.type != 'objective' and pdoc.config.type != 'submit_answer' %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-stopwatch">{{ pdoc.config.timeMax if pdoc.config.timeMax == pdoc.config.timeMin else pdoc.config.timeMin+'~'+pdoc.config.timeMax }}ms</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-comparison">{{ pdoc.config.memoryMax if pdoc.config.memoryMax == pdoc.config.memoryMin else pdoc.config.memoryMin+'~'+pdoc.config.memoryMax }}MiB</span>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% import "components/nothing.html" as nothing with context %}
|
||||
{% extends "layout/basic.html" %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
@@ -27,6 +28,36 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not reference and (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) %}
|
||||
{{ set(UiContext, {
|
||||
pdoc: pdoc
|
||||
}) }}
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Generate Testdata') }}(Beta)</h1>
|
||||
</div>
|
||||
{{ noscript_note.render() }}
|
||||
<div class="section__body generate">
|
||||
{% if pdoc.config.type === 'default' %}
|
||||
{{ form.form_text({
|
||||
columns: 12,
|
||||
label:'Data Generator',
|
||||
name:'gen',
|
||||
help_text:'A data generator is a program that generates testdata. It should output result to stdout.'
|
||||
}) }}
|
||||
{{ form.form_text({
|
||||
columns: 12,
|
||||
label:'Standard Program',
|
||||
name:'std',
|
||||
help_text:'A standard program is a program that solves the problem. It should output answer to stdout.'
|
||||
}) }}
|
||||
<button class="rounded button" name="generate_testdata">{{ _('Generate') }}</button>
|
||||
{% else %}
|
||||
{{ nothing.render('Generate testdata is not supported for this problem type.') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="medium-4 columns">
|
||||
<div class="section">
|
||||
|
||||
Reference in new issue
Block a user