mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: remote judge api
This commit is contained in:
1 parent
939584ec5e
commit
680e3ccd32
11 files changed
+54
-13
No files matched your search
@@ -26,15 +26,20 @@ export function buildContent(source: ProblemSource | ContentNode[], type: 'markd
|
||||
node.type !== 'Plain' ? `## ${node.sectionTitle}` : '',
|
||||
...node.type === 'Sample'
|
||||
? [
|
||||
'',
|
||||
`\`\`\`input${++cnt}`,
|
||||
node.payload[0],
|
||||
'```',
|
||||
'',
|
||||
`\`\`\`output${cnt}`,
|
||||
node.payload[1],
|
||||
'```',
|
||||
'',
|
||||
]
|
||||
: [],
|
||||
'',
|
||||
node.text,
|
||||
'',
|
||||
].join('\n')).join('\n');
|
||||
}
|
||||
return type === 'html'
|
||||
|
||||
@@ -16,6 +16,8 @@ export async function parseConfig(config: string | ProblemConfigFile = {}) {
|
||||
timeMax: 0,
|
||||
type: cfg.type || 'default',
|
||||
};
|
||||
if (cfg.subType) result.subType = cfg.subType;
|
||||
if (cfg.target) result.target = cfg.target;
|
||||
if (cfg.subtasks.length) {
|
||||
for (const subtask of cfg.subtasks) {
|
||||
result.memoryMax = Math.max(result.memoryMax, subtask.memory);
|
||||
|
||||
Reference in new issue
Block a user