ojcmp
online judge comparer
Status
Maintaining 0.2.0
Install
Build
Install by cargo
Install manually
Usage
ojcmp 0.2.0
USAGE:
ojcmp [FLAGS] [OPTIONS] --std <path>
FLAGS:
-a, --all Reads all bytes of user file even if it's already WA
-b, --backtrace Prints stack backtrace when fatal error occurs
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mode <mode> CompareMode ("normal"|"strict") [default: normal]
-s, --std <path> Std file path
-u, --user <path> User file path. Reads from stdin if it's not given
Return Value
| type | value |
|---|---|
| code | errno |
| stdout | "AC" |
| stderr | error message and optional stack backtrace |
Current Implementation
Mode: Normal
trim_end(file)
judge!;
for each line, trim_end(line)
judge!;
for each line, check spaces between non-space chars
judge!;
Mode: Strict
User file must have the same bytes with std file.
There is no "PE" in this mode.
Change Log
- v0.2.0 Add strict mode. No break changes.
- v0.1.3 No functional changes
- v0.1.2 Fix algorithm bug
- v0.1.1 Use unsafe static buffer