-
Notifications
You must be signed in to change notification settings - Fork 14
Contest and task packages
This page describes the format of the contest and task packages, which allow to upload tasks and contests to the system by just uploading a zip file with all the info and the system parses the files and creates the tasks.
The task package consists of tests, descriptions, checkers and a meta file called problem_attrs.json with the attributes of the task. The tests, descriptions and checkers should be in the same format as described in Format of the tasks. The problem_attrs.json should be a text file in json format with the attributes of the task. Here is an example:
{
"name" : "A+B Problem",
"time_limit" : 0.1,
"memory_limit" : 16777216
}
All the files of the task package should be in the root folder of the archive
The contest package consists of several folders with task packages and a single meta file with the info of the contest. The meta file is called contest_attrs.json and should be a text file in json format. Here is an example of the file:
{
"name" : "Example contest",
"start_time" : "2011-03-06 00:00 +02:00",
"end_time" : "2011-03-08 23:59 +02:00",
"duration" : 300,
"practicable" : true,
"results_visible" : false,
"auto_test" : true,
"visible" : true
}
The convention is that in the meta file the keys of the hash are the same as the column names in the DB table for the given object.
Here is an example file structure of a contest package:
root
\
- contest_attrs.json
- ab_problem
\
- problem_attrs.json
- ab01.in
- ab01.sol
- ab02.in
- ab02.sol
- description.pdf
- checker.cpp
- shortest_path
\
- problem_attrs.json
- shortest_path01.in
- shortest_path01.sol
- shortest_path02.in
- shortest_path02.sol
- description.pdf
- checker.cpp