mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: provide score & subtaskId
This commit is contained in:
1 parent
60aa0e1611
commit
a585c13a72
19 files changed
+118
-186
No files matched your search
@@ -173,7 +173,7 @@ interface MatchRule {
|
||||
|
||||
const SubtaskMatcher: MatchRule[] = [
|
||||
{
|
||||
regex: /^([^\d]*)(\d+).(in|txt)$/,
|
||||
regex: /^([^\d]*(?:\d+[a-zA-Z]+)*)(\d+).(in|txt)$/,
|
||||
output: [
|
||||
(a) => `${a[1] + a[2]}.out`,
|
||||
(a) => `${a[1] + a[2]}.ans`,
|
||||
@@ -260,9 +260,14 @@ export function readSubtasksFromFiles(files: string[], config) {
|
||||
return Object.values(subtask);
|
||||
}
|
||||
|
||||
type NormalizedCase = Required<ParsedCase>;
|
||||
interface NormalizedSubtask extends Required<ParsedSubtask> {
|
||||
export interface NormalizedCase extends Required<ParsedCase> {
|
||||
time: number;
|
||||
memory: number;
|
||||
}
|
||||
export interface NormalizedSubtask extends Required<ParsedSubtask> {
|
||||
cases: NormalizedCase[];
|
||||
time: number;
|
||||
memory: number;
|
||||
}
|
||||
|
||||
export function normalizeSubtasks(
|
||||
|
||||
Reference in new issue
Block a user