Difference between revisions of "Problem Format"

From PC2wiki
Jump to: navigation, search
m (Examples: removed file that was not in sample)
m (See also: rename cat)
 
(6 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
The source, author, and rights_owner are optional.
 
The source, author, and rights_owner are optional.
  
name: is followed by the title of the problem.
+
name: is followed by the title of the problem.  The name
 +
of the problem can also be found in the [[problem.tex]] file.
  
 
==Data File Locations==
 
==Data File Locations==
Line 47: Line 48:
 
==Solution source locations==
 
==Solution source locations==
  
These are optional source code files solutions to the problem.
+
These are examples of optional source code solutions to a problem.
  
 
  sumit/submissions/accepted/Sumit.java
 
  sumit/submissions/accepted/Sumit.java
Line 62: Line 63:
 
==Examples==
 
==Examples==
  
In the 9.3 distribution there are examples of contest.yaml
+
In the 9.3 distribution there are examples of problem.yaml(s)
and problem definitions under the samps/contests directory.
+
and problem files under the samps/contests directory.
  
 
Here is the example of the files under samps/contests/sumithello/.
 
Here is the example of the files under samps/contests/sumithello/.
[[contest.yaml]]
 
 
  hello/data/secret/hello.ans
 
  hello/data/secret/hello.ans
 
  hello/data/secret/hello.in
 
  hello/data/secret/hello.in
  hello/problem_statement/problem.tex
+
  hello/problem_statement/[[problem.tex]]
  hello/problem.yaml
+
  hello/[[problem.yaml]]
 
  sumit/data/secret/sumit.ans
 
  sumit/data/secret/sumit.ans
 
  sumit/data/secret/sumit.in
 
  sumit/data/secret/sumit.in
  sumit/problem_statement/problem.tex
+
  sumit/problem_statement/[[problem.tex]]
  sumit/problem.yaml
+
  sumit/[[problem.yaml]]
  
 
Here is an example with multiple data sets
 
Here is an example with multiple data sets
Line 87: Line 87:
 
  squares/data/secret/squares-test5.ans
 
  squares/data/secret/squares-test5.ans
 
  squares/data/secret/squares-test5.in
 
  squares/data/secret/squares-test5.in
  squares/problem.yaml
+
  squares/[[problem.yaml]]
  
 
==See Also==
 
==See Also==
Line 93: Line 93:
 
* [[contest.yaml]]
 
* [[contest.yaml]]
 
* [[problem.yaml]]
 
* [[problem.yaml]]
 
+
* [https://clics.ecs.baylor.edu/index.php/Problem_format CCS Problem Format]
[[Category:CCS|CCS]]
+
[[Category:CLICS]]
  
 
[[Category:Version 9.3]]
 
[[Category:Version 9.3]]
 
[[Category:Import and Export]]
 
[[Category:Import and Export]]

Latest revision as of 09:24, 3 December 2016

This article describes the deliverables (files) needed to define a contest problem.

Problem Author deliverables

Each problem author needs to create the following:

  1. a directory "problem short name" to hold the problem.yaml and other data files.
  2. a problem.yaml
  3. judge input and answer files in the appropriate directories (see Data File Locations section for details)

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. The name of the problem can also be found in the problem.tex file.

Data File Locations

Each problem author needs to create a problem.yaml file and the judge's data and answer files.

Below is an example of where pc2 expects data files to be located. This example uses the problem short name 'sumit'.

The input data files and expected output files (answer files) are created in the data/secret directory.

Example file locations are:

 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
  • For every .in file there must be an .ans file with the same name.
  • data files must be in the data/secret directory

Solution source locations

These are examples of optional source code solutions to a 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 problem.yaml(s) and problem files under the samps/contests directory.

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

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

Here is an example with multiple data sets

squares/data/secret/squares-test1.ans
squares/data/secret/squares-test1.in
squares/data/secret/squares-test2.ans
squares/data/secret/squares-test2.in
squares/data/secret/squares-test3.ans
squares/data/secret/squares-test3.in
squares/data/secret/squares-test4.ans
squares/data/secret/squares-test4.in
squares/data/secret/squares-test5.ans
squares/data/secret/squares-test5.in
squares/problem.yaml

See Also