mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
utils: update testcase parser
This commit is contained in:
8 files changed
+23
-31
No files matched your search
@@ -240,10 +240,12 @@ interface MatchRule {
|
||||
|
||||
const SubtaskMatcher: MatchRule[] = [
|
||||
{
|
||||
regex: /^(([A-Za-z0-9._-]*?)(?:(\d*)[-_])?(\d+))\.(in|txt)$/,
|
||||
regex: /^(([A-Za-z0-9._-]*?)(?:(\d*)[-_])?(\d+))\.(in|txt|in\.txt)$/,
|
||||
output: [
|
||||
(a) => `${a[1]}.out`,
|
||||
(a) => `${a[1]}.out.txt`,
|
||||
(a) => `${a[1]}.ans`,
|
||||
(a) => `${a[1]}.ans.txt`,
|
||||
(a) => `${a[1]}.out`.replace(/input/g, 'output'),
|
||||
(a) => (a[1].includes('input') ? `${a[1]}.txt`.replace(/input/g, 'output') : null),
|
||||
],
|
||||
@@ -256,6 +258,8 @@ const SubtaskMatcher: MatchRule[] = [
|
||||
output: [
|
||||
(a) => `${a[1]}.ou${a[2]}`,
|
||||
(a) => `${a[1]}.ou${a[2]}`.replace(/input/g, 'output'),
|
||||
(a) => `${a[1]}.out${a[2]}`,
|
||||
(a) => `${a[1]}.out${a[2]}`.replace(/input/g, 'output'),
|
||||
],
|
||||
id: (a) => +a[2],
|
||||
subtask: () => 1,
|
||||
|
||||
Reference in new issue
Block a user