|
|
@ -25,59 +25,61 @@ |
|
|
|
<input type="number" name="memory_limit" value="<%= problem.memory_limit %>"> |
|
|
|
<input type="number" name="memory_limit" value="<%= problem.memory_limit %>"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% if (!problem.file_io) { %> |
|
|
|
<div id="io-type"<% if (problem.type === 'interaction') { %> style="display: none; "<% } %>> |
|
|
|
<div class="inline fields"> |
|
|
|
<% if (!problem.file_io) { %> |
|
|
|
<label>IO 方式</label> |
|
|
|
<div class="inline fields"> |
|
|
|
<div class="field"> |
|
|
|
<label>IO 方式</label> |
|
|
|
<div class="ui radio checkbox"> |
|
|
|
<div class="field"> |
|
|
|
<input name="io_method" value="std-io" id="std-io" type="radio" onclick="goDisable()" checked> |
|
|
|
<div class="ui radio checkbox"> |
|
|
|
<label for="std-io">标准 IO</label> |
|
|
|
<input name="io_method" value="std-io" id="std-io" type="radio" onclick="goDisable()" checked> |
|
|
|
|
|
|
|
<label for="std-io">标准 IO</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="ui radio checkbox"> |
|
|
|
<div class="ui radio checkbox"> |
|
|
|
<input name="io_method" value="file-io" id="file-io" type="radio" onclick="goEnable()"> |
|
|
|
<input name="io_method" value="file-io" id="file-io" type="radio" onclick="goEnable()"> |
|
|
|
<label for="file-io">文件 IO</label> |
|
|
|
<label for="file-io">文件 IO</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="two fields"> |
|
|
|
<div class="two fields"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="file_io_input_name">输入文件名</label> |
|
|
|
<label for="file_io_input_name">输入文件名</label> |
|
|
|
<input type="text" id="file-io-input-name" name="file_io_input_name" value="<%= problem.file_io_input_name %>" disabled> |
|
|
|
<input type="text" id="file-io-input-name" name="file_io_input_name" value="<%= problem.file_io_input_name %>" disabled> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<label for="file_io_output_name">输出文件名</label> |
|
|
|
|
|
|
|
<input type="text" id="file-io-output-name" name="file_io_output_name" value="<%= problem.file_io_output_name %>" disabled> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% } else { %> |
|
|
|
|
|
|
|
<div class="inline fields"> |
|
|
|
|
|
|
|
<label>IO 方式</label> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<div class="ui radio checkbox" id="std-io-div"> |
|
|
|
|
|
|
|
<input name="io_method" value="std-io" id="std-io" type="radio" onclick="goDisable()"> |
|
|
|
|
|
|
|
<label for="std-io">标准 IO</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="file_io_output_name">输出文件名</label> |
|
|
|
<div class="ui radio checkbox"> |
|
|
|
<input type="text" id="file-io-output-name" name="file_io_output_name" value="<%= problem.file_io_output_name %>" disabled> |
|
|
|
<input name="io_method" value="file-io" id="file-io" type="radio" onclick="goEnable()" checked> |
|
|
|
|
|
|
|
<label for="file-io">文件 IO</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% } else { %> |
|
|
|
<div class="two fields"> |
|
|
|
<div class="inline fields"> |
|
|
|
<div class="field"> |
|
|
|
<label>IO 方式</label> |
|
|
|
<label for="file_io_input_name">输入文件名</label> |
|
|
|
<div class="field"> |
|
|
|
<input type="text" id="file-io-input-name" name="file_io_input_name" value="<%= problem.file_io_input_name %>"> |
|
|
|
<div class="ui radio checkbox" id="std-io-div"> |
|
|
|
|
|
|
|
<input name="io_method" value="std-io" id="std-io" type="radio" onclick="goDisable()"> |
|
|
|
|
|
|
|
<label for="std-io">标准 IO</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<div class="ui radio checkbox"> |
|
|
|
|
|
|
|
<input name="io_method" value="file-io" id="file-io" type="radio" onclick="goEnable()" checked> |
|
|
|
|
|
|
|
<label for="file-io">文件 IO</label> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="two fields"> |
|
|
|
<label for="file_io_output_name">输出文件名</label> |
|
|
|
<div class="field"> |
|
|
|
<input type="text" id="file-io-output-name" name="file_io_output_name" value="<%= problem.file_io_output_name %>"> |
|
|
|
<label for="file_io_input_name">输入文件名</label> |
|
|
|
|
|
|
|
<input type="text" id="file-io-input-name" name="file_io_input_name" value="<%= problem.file_io_input_name %>"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<label for="file_io_output_name">输出文件名</label> |
|
|
|
|
|
|
|
<input type="text" id="file-io-output-name" name="file_io_output_name" value="<%= problem.file_io_output_name %>"> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<% } %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% } %> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui <%= problem.type === 'submit-answer' ? 'active ' : '' %>tab" data-tab="submit-answer" style="margin-bottom: 10px; "> |
|
|
|
<div class="ui <%= problem.type === 'submit-answer' ? 'active ' : '' %>tab" data-tab="submit-answer" style="margin-bottom: 10px; "> |
|
|
|
<b>为了避免系统出错,已有提交的题目不允许在提交答案和非提交答案之间更改。</b><br> |
|
|
|
<b>为了避免系统出错,已有提交的题目不允许在提交答案和非提交答案之间更改。</b><br> |
|
|
@ -126,15 +128,14 @@ $(function () { |
|
|
|
$('input[name=type]').val('traditional'); |
|
|
|
$('input[name=type]').val('traditional'); |
|
|
|
if ($('div[data-tab="interaction"]').attr('data-tab', 'traditional').length) $('a[data-tab="traditional"]').click(); |
|
|
|
if ($('div[data-tab="interaction"]').attr('data-tab', 'traditional').length) $('a[data-tab="traditional"]').click(); |
|
|
|
|
|
|
|
|
|
|
|
$('#std-io')[0].disabled = false; |
|
|
|
$('#io-type').show(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('a[data-tab="interaction"]').click(function () { |
|
|
|
$('a[data-tab="interaction"]').click(function () { |
|
|
|
$('input[name=type]').val('interaction'); |
|
|
|
$('input[name=type]').val('interaction'); |
|
|
|
if ($('div[data-tab="traditional"]').attr('data-tab', 'interaction').length) $('a[data-tab="interaction"]').click(); |
|
|
|
if ($('div[data-tab="traditional"]').attr('data-tab', 'interaction').length) $('a[data-tab="interaction"]').click(); |
|
|
|
|
|
|
|
|
|
|
|
$('#std-io')[0].disabled = true; |
|
|
|
$('#io-type').hide(); |
|
|
|
$('#file-io').click(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('a[data-tab="submit-answer"]').click(function () { |
|
|
|
$('a[data-tab="submit-answer"]').click(function () { |
|
|
|