Difference between revisions of "Problem.yaml"

From PC2wiki
Jump to: navigation, search
m (Sample problem.yaml: added samples)
m (Contents of problem.yaml: removed link)
Line 26: Line 26:
 
|-
 
|-
 
| validator  
 
| validator  
| optional, set of [[Validator#CLICS_Output_Validator| validator options]],  
+
| optional, see details below| validator options]],  
 
| case_sensitive space_change_sensitive  
 
| case_sensitive space_change_sensitive  
 
|}
 
|}

Revision as of 11:03, 8 November 2019

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

See the article Problem Format for a complete list of files that describe a problem.

Contents of problem.yaml

problem.yaml keys
Key Comments Example
source optional ICPC World Finals 2011
author optional, defaults to "Unknown"
license optional, defaults to "cc by-sa"
rights_owner mandatory ICPC
keywords optional
difficulty optional
limits problem limitations
validator validator options]], case_sensitive space_change_sensitive


PC^2 problem.yaml keys
Key Comments Example
name Problem Title Sumit Sample Problem

The problem name will typically be fetched from the Problem.tex file rather than using the name key.


Problem Time Out Limits

#Run-time Limit for the problem, in whole seconds
limits:
    timeout: 2

PC^2 Validator

validator: 
    validatorProg: 'edu.csus.ecs.pc2.validator.clicsValidator.ClicsValidator'
    validatorCmd: '{:validator} {:infile} {:ansfile} {:feedbackdir} '
    usingInternal: false
    validatorOption: 1
    use-internal-validator: false

CLICS Validator

#Validator configuration for the problem
#(defaults if corresponding flag is omitted: NOT case-sensitive, NOT space-sensitive, NO float tolerances)

validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 0.001 float_relative_tolerance 1.

# case_sensitive - if not present then false.
# space_change_sensitive  - if not present then false
# float_absolute_tolerance 0.001  - if not present TODO
# float_relative_tolerance 1. - if not present TODO

Judging Types

#How the system handles judging for the problem
judging-type:
    #Whether or not there will be an "Auto-Judge" used for this problem
    computer-judged: true

    #Whether or not there will be manual review of submissions following auto-judging
    manual-review: true

    #Whether or not teams should be sent a "Preliminary Notification" of the initial (computer) judgement
    send-prelim-judgement: true

Input data source

#How the system manages input sent to team submissions 
input:

   #Whether the team submission is to read its input from stdin: yes if "true", no (meaning "open and read from a file") if false or missing
   readFromSTDIN: true

Read input from stdin

input:
    readFromSTDIN: true

Read input from a file

input:
    readFromSTDIN: false

Stop of first failure

#Whether (true) or not (false) to stop execution upon the first occurrence of a failed test case
stop-on-first-failed-test-case: true

Default is false, the system will test all data sets

Sample problem.yaml files

Minimal sample with problem name

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

# pc2-specific key 
name: Sumit Sample Problem

The source, author, and rights_owner are optional.

Sample 2

name: 'Sumit file comp + manual file pc2val'
source: 
author: 
license: 
rights_owner: 

validator_flags: 

limits:
    timeout: 30

judging-type:
    computer-judged: false
    manual-review: true
    send-prelim-judgement: false

input:
    readFromSTDIN: false

Sample 3

# Problem configuration, version 1.0 
# PC^2 Version: Version 9.3 20130117 (Thursday, January 17th 2013 06:10 UTC) Java ver 1.6.0_22 build 2591 Windows 7 6.1 (x86) 
# Created: 2013-03-15 14:42:06 PDT
--- 

name: Practice
source: 
author: 
license: 
rights_owner: 

limits:
   #Run-time Limit for the problem, in whole seconds
   timeout: 10

# CLICS Validator configuration for the problem
#(defaults if corresponding flag is omitted: NOT case-sensitive, NOT space-sensitive, NO float tolerances)
validator_flags: case_sensitive space_change_sensitive float_absolute_tolerance 0.001 float_relative_tolerance 1.0
   
#Whether (true) or not (false) to stop execution upon the first occurrence of a failed test case
stop-on-first-failed-test-case: true

#How the system handles judging for the problem
judging-type:
    #Whether or not there will be an "Auto-Judge" used for this problem
    computer-judged: true
    #Whether or not there will be manual review of submissions following auto-judging
    manual-review: true
    #Whether or not teams should be sent a "Preliminary Notification" of the initial (computer) judgement
    send-prelim-judgement: true
   
#How the system manages input sent to team submissions 
input:
   #Whether the team submission is to read its input from stdin: yes if "true", no (meaning "open and read from a file") if false or missing
   readFromSTDIN: true

See Also