vijos/jd4

[Enhancement] suggest adding arguments when running custom judge

panda2134 opened this issue · 2 comments

maybe like this:

./check <Input_File> <Output_File> <Answer_File> [<Result_File> [-appes]],

By doing so, it will be easier to use famous special judge libs, e.g. testlib.h.

The current interface is through file descriptors instead of filenames, where:

stdin (0): input from user program output, aka. "Output_File"
stdout (1): judge output, aka. "Result_File"
stderr (2): judge side output (for debug/error messages)
extra (3): input from user program input, aka. "Input_File"

Using file descriptors has the benefit that files don't need to have names, thus increases the variety of implementation. In case of judging files, one could open the input, output and result file, and dup to file descriptor 0, 3 and 1.

As of Answer_File, it was designed for judge itself to handle it. The judge could either compute in parallel, integrate answer in source file, or read a data file. We could supplement argument and file support for that.

I want to give stdout files for judge.
Calculating ans every time will take lots of extra CPU time.