Difference between revisions of "Problem.yaml"

From PC2wiki
Jump to: navigation, search
m (Solution source locations: simplified description)
m (added example)
Line 1: Line 1:
A problem.yaml defines a single problem.
+
The problem.yaml is one part of the set of files that
 +
compose a problem description and data files.
  
PC² creates problem.yaml and data files per problem when
+
Each problem.yaml defines a single problem.
a [[contest.yaml]] file is created.   
+
 
 +
PC² 9.3 will create a problem.yaml and data files per problem when
 +
a [[contest.yaml]] file is exported/created.   
  
 
Each problem is defined in its own directory (folder), in that
 
Each problem is defined in its own directory (folder), in that
 
folder is the problem.yaml file and the other problem specific
 
folder is the problem.yaml file and the other problem specific
files.
+
files.   The folder name is referenced in the contest.yaml file.
 
 
==problem.yaml specification==
 
 
 
See the [[CCS]] [https://clics.ecs.baylor.edu/index.php/Problem_format| problem format]
 
for the description of the problem.yaml file and the locations of all the problem files.
 
  
 
==Sample problem.yaml==
 
==Sample problem.yaml==
Line 57: Line 55:
  
 
  sumit/data/sample/sample.in
 
  sumit/data/sample/sample.in
 +
 +
==Examples==
 +
 +
In the 9.3 distribution there are examples of contest.yaml
 +
and problem definitions under the samps/contests directory.
 +
 +
Here is the example of the files under samps/contests/sumithello/.
 +
contest.yaml
 +
hello/data/secret/hello.ans
 +
hello/data/secret/hello.in
 +
hello/problem_statement/problem.tex
 +
hello/problem.yaml
 +
sumit/data/secret/sumit.ans
 +
sumit/data/secret/sumit.in
 +
sumit/problem_statement/problem.tex
 +
sumit/problem.yaml
  
 
==See Also==
 
==See Also==
Line 65: Line 79:
  
 
[[Category:Version 9.3]]
 
[[Category:Version 9.3]]
 
 
 
[[Category:Import and Export]]
 
[[Category:Import and Export]]

Revision as of 15:46, 9 April 2014

The problem.yaml is one part of the set of files that compose a problem description and data files.

Each problem.yaml defines a single problem.

PC² 9.3 will create a problem.yaml and data files per problem when a contest.yaml file is exported/created.

Each problem is defined in its own directory (folder), in that folder is the problem.yaml file and the other problem specific files. The folder name is referenced in the contest.yaml file.

Sample problem.yaml

# Problem configuration
source: ICPC Mid-Atlantic Regional Contest
author: John von Judge 
rights_owner: ICPC

name: Sumit Sample Problem

The source, author, and rights_owner are optional.

name: is followed by the title of the problem.

Data File Locations

Judge's data and answer files will be under the data/secret directory, for the problem sumit these files would be stored as follows

 contest.yaml
 sumit/problem.yaml
 sumit/data/secret/sumit.ans
 sumit/data/secret/sumit.in

Requirements:

  • Problem input data files end with the extension .in
  • Judge's answer files end with the extension .ans
  • Every input data file must have a corresponding answer file
  • data files must be in the data/secret directory

Solution source locations

These are optional source code files solutions to the problem.

sumit/submissions/accepted/Sumit.java
sumit/submissions/accepted/sumit.c
sumit/submissions/accepted/sumit.cpp

Sample data file location

This sample data is for the teams, usually it is the same data that is printed/listed in the problem description.

sumit/data/sample/sample.in

Examples

In the 9.3 distribution there are examples of contest.yaml and problem definitions under the samps/contests directory.

Here is the example of the files under samps/contests/sumithello/.

contest.yaml
hello/data/secret/hello.ans
hello/data/secret/hello.in
hello/problem_statement/problem.tex
hello/problem.yaml
sumit/data/secret/sumit.ans
sumit/data/secret/sumit.in
sumit/problem_statement/problem.tex
sumit/problem.yaml

See Also