mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +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
@@ -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