public interface IProblem
This documentation describes the current draft of the PC2 API, which is subject to change.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Check whether this problem is the same as some other contest problem.
|
byte[] |
getJudgesAnswerFileContents()
Get the data contained in the Judge's answer file for this problem.
|
String |
getJudgesAnswerFileName()
Get the name of the answer file for this problem.
|
byte[] |
getJudgesDataFileContents()
Get the data contained in the Judge's data file for this problem.
|
String |
getJudgesDataFileName()
Get the name of the data file which the Judges have provided for this problem.
|
String |
getName()
Get the name for this problem as configured by the Contest Administrator.
|
String |
getShortName()
Get the short name for this problem as configured by the Contest Administrator.
|
String |
getValidatorCommandLine()
Get the command line which has been specified by the Contest Administrator as
being the command required to execute the validator program associated with this problem.
|
byte[] |
getValidatorFileContents()
Get the contents of the file containing the validator associated with this problem.
|
String |
getValidatorFileName()
Get the name of the Validator program file for this problem.
|
boolean |
hasAnswerFile()
Returns true if the Contest Administrator has defined a Judge's Answer File for this problem;
false otherwise.
|
boolean |
hasDataFile()
Returns true if the Contest Administrator has defined a data file for this problem;
false otherwise.
|
boolean |
hasExternalValidator()
Returns true if this problem has had an External Validator assigned to it by the Contest Administrator;
false otherwise.
|
int |
hashCode()
Get the hashcode associated with this contest problem.
|
boolean |
isDeleted()
Returns true if the Contest Administrator has hidden this problem false otherwise.
|
boolean |
readsInputFromFile()
Returns true if the Contest Administrator has specified that solutions to this problem are supposed
to read their input from a data file; false otherwise.
|
boolean |
readsInputFromStdIn()
Returns true if the Contest Administrator has specified that solutions to this problem are supposed
to read their input from a data file; false otherwise.
|
String getName()
String getShortName()
String getJudgesDataFileName()
hasDataFile()
byte[] getJudgesDataFileContents()
hasDataFile()
String getJudgesAnswerFileName()
hasAnswerFile()
byte[] getJudgesAnswerFileContents()
hasAnswerFile()
String getValidatorFileName()
hasExternalValidator()
String getValidatorCommandLine()
Note that when a Contest Administrator enters a "validator command line" into PC2, the entry may contain "substitution parameters" to be filled in at run time. The validator command line obtained by calling this method will have already had any such command line parameter substitutions performed prior to returning the command line.
hasExternalValidator()
byte[] getValidatorFileContents()
Note that PC2 supports three possible "validator configuration modes" for a problem:
hasExternalValidator()
boolean hasExternalValidator()
boolean readsInputFromFile()
readsInputFromStdIn()
.readsInputFromStdIn()
boolean readsInputFromStdIn()
readsInputFromFile()
.readsInputFromFile()
boolean hasDataFile()
boolean hasAnswerFile()
boolean equals(Object obj)
Determination of whether two problems are equal is based on whether they refer to the
same contest problem as originally entered into PC2 by the Contest Administrator.
Note in particular that subsequent changes to a problem made by the Contest Administrator (for example,
changes to the problem name, the Judge's data file, etc.) do not affect the result of the
equals()
method; if this problem refers to the same contest problem as the one indicated by the
specified parameter, this method will return true regardless of whether the internal contents of the two
problem objects is identical or not.
int hashCode()
boolean isDeleted()