XMC Format
The XMC format represents the totality of XMC's own formats to represent data on the filesystem.
Graders
A grader, in the XMC format, is a source code file with the filename of the form gradername.ext, where gradername is the unique name of the grader, and ext is the programming language-specific file extension.
Example
The following file is a grader named simplegrader written in C:
simplegrader.c:
#include <stdio.h>
int main() {
printf("This grader is pretty dumb\n");
return 0;
}Datasets
A dataset is represented as a directory whose filename is the unique name of the dataset, in which there is a dataset.yaml file that contains dataset metadata, and a directory named testcases which contains the test files of the dataset.
The testcases directory holds for each test case two files: an input file, for example test1.in, and an output file, test1.out. The format of the filename is test#.in/test#.ok, where # is the number of the test case. The case numbering must start from 1 and they all must be consecutive.
The dataset.yaml file has the following structure:
The dataset.yaml file must be a valid YAML file. The memory limit is expressed in bytes as an integer and the time limit is a string that follows Go's library function time.ParseDuration. In short, it is a sequence of integers each with an optional fraction and a unit suffix. Unit suffixes are "ns", "us", "ms", "s", "m", "h".
Example
The following dataset is named permutations_easy.
dataset.yaml:
Tasks
A task is a directory with its filename being the unique name of the task. The directory contains only a task.yaml file that contains the details of the task.
The task.yaml has the following structure:
The file must be a valid YAML file. The input file and output file can be set to stdin and stdout respectively.
Example
The following task is named addition.
task.yaml:
Last updated