jd4 icon indicating copy to clipboard operation
jd4 copied to clipboard

[Enhancement] suggest adding arguments when running custom judge

Open panda2134 opened this issue 7 years ago • 2 comments
trafficstars

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.

panda2134 avatar May 24 '18 13:05 panda2134

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.

iceboy233 avatar May 24 '18 21:05 iceboy233

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

undefined-moe avatar Apr 12 '19 12:04 undefined-moe