The PC² Validator reads the run output and the judge's answer file and produces an XML file that conforms to the International Collegiate Programming Contest Validator Interface Standard
Adding/Configuring a Validator to a Problem
Here is a quick list of steps to add a PC² Validator to a problem.
- Add or Edit a Problem
- Add or update the input and/or answer files
- Select the Validator Tab
- Select the Use PC^2 Validator radio button
- Select the Validator Option
- Optionally check the Ignore Case in Output checkbox
- Add or Update the problem.
PC² Validator Judgements
The PC² Validator is very limited and returns only the following judgements:
- accepted means judged Yes
- No - Wrong Answer means No failed to match Judge's answer file
- No - Indeterminant means could not determine a judgement
The PC² provides support for an External Validator which should be used to provide specific judgements for problems.
Usage: java Validator [options] <inputfile name> <outputfile name> <answerfile name> <resultfile name> <-pc2> [pc2_option] icflag Where: pc2 options are: 1 - diff 2 - ignore whitespace at start of file 3 - ignore leading whitespace on lines 4 - ignore all whitespace on lines 5 - ignore empty lines icflag - ignore case flag during diff/compare (true or false) options: --help this messge --verbose more info like EOF: line counts --debug a large amount of debugging output If a input, output or answer file is not needed/used use - (dash) for the name, for example: java Validator - sumit.dat sumit.ans result.xml -pc2 1 true Version 9.1.5 20091202 (Wednesday, December 2nd 2009 04:09 UTC) Java ver 1.6.0_22 build 1969 Windows 7 6.1 (x86)
Note: the icflag is case in-sensitive. To make the validator compare case sensitive use false.