mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
judge: fix special judge score
This commit is contained in:
1 parent
d87ce5e069
commit
b272598685
2 files changed
+5
-4
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.6.5",
|
||||
"version": "2.6.6",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -4,10 +4,11 @@ export function parse(output: string, fullscore: number) {
|
||||
let status = STATUS.STATUS_WRONG_ANSWER;
|
||||
let score = 0;
|
||||
let message = '';
|
||||
if (output.startsWith('ok ')) status = STATUS.STATUS_ACCEPTED;
|
||||
else if (output.startsWith('wrong answer ')) {
|
||||
message = output.split('wrong answer ')[1] || '';
|
||||
if (output.startsWith('ok ')) {
|
||||
status = STATUS.STATUS_ACCEPTED;
|
||||
score = fullscore;
|
||||
} else if (output.startsWith('wrong answer ')) {
|
||||
message = output.split('wrong answer ')[1] || '';
|
||||
} else if (output.startsWith('wrong output format ')) {
|
||||
message = `PE ${output.split('wrong output format ')[1] || ''}`;
|
||||
} else if (output.startsWith('unexpected eof ')) {
|
||||
|
||||
Reference in new issue
Block a user