-
Notifications
You must be signed in to change notification settings - Fork 4
添加任务/比赛
查看 示例任务 通过添加一个示例任务学习添加任务和测试添加的任务。
你可以通过点击“任务”页面的“添加”按钮来添加一个新任务。你将会看到这个页面
在“添加任务”页面里有几个选项:
任务列表里该任务将会以这个名称显示。
用户将不能在“开始时间”之前进行提交代码。
使用这个格式来表示开始时间:月/天/年 小时:分钟:秒
例如 08/31/2013 12:00:00
用户将不能够在 结束时间 + 额外时间
之后提交代码。
迟到的提交 (在额外时间之外的提交) 将被乘以一个系数,你应该写一个 PHP 脚本在“系数规则”字段中计算这个系数。
使用这个格式来表示结束时间: 月/天/年 小时:分钟:秒
例如 08/31/2013 23:59:59
额外的时间以分钟为单位,你可以使用 *
. 例如 120
(2 小时) 或者 48*60
(2 天)
在这里输入参与者的用户名 (用 ',' 分隔开),只有这些用户可以提交,你可以使用关键词 ALL
让所有用户都能提交。
例如:
admin, instructor1 , instructor2 ,student1 , student2,student3 , student4
你可以使用zip格式的文件上传测试样例,按照 这种格式.
你可以对学生们开启或关闭这个任务通过使用这个选项,如果你没有勾选这个选项,学生权限的用户将不能够进行提交,直到允许进行提交。
你可以通过使用这个选项来开启或关闭这个任务的积分板。
你可以开启或关闭向同学们展示java示例。开启或关闭这个选项将不会影响当前的代码评判。
只有 tester/java_exceptions_list
文件里包含这个示例的名字时,该示例名称才会可见。
If you enable this feature, something like this will be displayed to students when an exception is thrown:
Test 1
ACCEPT
Test 2
Runtime Error (java.lang.ArrayIndexOutOfBoundsException)
Test 3
Runtime Error (java.lang.ArrayIndexOutOfBoundsException)
Test 4
ACCEPT
Test 5
ACCEPT
Test 6
ACCEPT
Test 7
ACCEPT
Test 8
Runtime Error (java.lang.ArrayIndexOutOfBoundsException)
Test 9
Runtime Error (java.lang.StackOverflowError)
Test 10
Runtime Error (java.lang.ArrayIndexOutOfBoundsException)
You can write a PHP script here that calculates the coefficient multiplied by scores.
Your script must put coefficient (from 100) in variable $coefficient
. You can use variables $extra_time
and $delay
. $extra_time
is the total extra time given to users in seconds (the extra time that you entered in Extra Time field) and $delay
is number of seconds passed from finish time (can be negative).
This PHP script should not contain <?php
, <?
, ?>
tags.
In this example, $extra_time is 172800 (2 days):
if ($delay<=0)
// no delay
$coefficient = 100;
elseif ($delay<=3600)
// delay less than 1 hour
$coefficient = ceil(100-((30*$delay)/3600));
elseif ($delay<=86400)
// delay more than 1 hour and less than 1 day
$coefficient = 70;
elseif (($delay-86400)<=3600)
// delay less than 1 hour in second day
$coefficient = ceil(70-((20*($delay-86400))/3600));
elseif (($delay-86400)<=86400)
// delay more than 1 hour in second day
$coefficient = 50;
elseif ($delay > $extra_time)
// too late
$coefficient = 0;
Problems
Enter information about problems in this field. There are several items in this field.
The name of problem.
The score of problem.
You can set a time limit in milliseconds for running codes. Python and Java are usually slower than C/C++. So they need more time.
Set memory limit in kilobytes. This memory limit is not very accurate.
Set allowed languages for each problems in this field (comma separated).
Available languages are: C
, C++
, Java
, Python 2
, Python 3
, Zip
, PDF
Note: You can use Zip
or PDF
only if you have enabled Upload Only
option.
e.g. C, C++ , Zip
or Python 2,Python 3
or Java ,C
The command used to compare output with correct output. By default Sharif Judge uses diff
. But you can change this command here.
This field should not contain any space.
You can set arguments of Diff command here. See man diff
for a complete list of available diff
arguments.
I have added two new options: ignore
and identical
.
-
ignore
: Sharif Judge ignores all newlines and whitespaces. -
identical
: Sharif Judge doesn't ignore anything. Output of submitted file must be identical to the test case's output to be accepted.
This field should not contain any space. You may consider using -b
, -bB
, -iw
or ignore
.
If you set a problem as Upload-Only, Sharif Judge will not judge submissions of that problem. You can use Zip
and PDF
in allowed languages if you have enabled this option.