diff --git a/packages/hydrojudge/src/judge/objective.ts b/packages/hydrojudge/src/judge/objective.ts index 0f8712369..0ac588490 100644 --- a/packages/hydrojudge/src/judge/objective.ts +++ b/packages/hydrojudge/src/judge/objective.ts @@ -15,7 +15,7 @@ export async function judge({ : ''; let answers: { [x: string]: string | string[] } = {}; try { - answers = yaml.load(answer) as { [x: string]: string | string[] }; + answers = yaml.load(answer) as any; assert(typeof answers === 'object'); } catch (e) { return end({ @@ -39,7 +39,7 @@ export async function judge({ memory: 0, }; if (typeof ansInfo[0] === 'string') { - if (ansInfo[0].trim() === (answers[key] as string).trim()) { + if (ansInfo[0].trim() === (answers[key] as any).trim()) { totalScore += score; totalStatus = Math.max(totalStatus, STATUS.STATUS_ACCEPTED); next({ diff --git a/packages/ui-default/pages/problem_detail.page.jsx b/packages/ui-default/pages/problem_detail.page.jsx index 1c945fe9e..afb555b62 100644 --- a/packages/ui-default/pages/problem_detail.page.jsx +++ b/packages/ui-default/pages/problem_detail.page.jsx @@ -8,6 +8,7 @@ import loadReactRedux from 'vj/utils/loadReactRedux'; import delay from 'vj/utils/delay'; import pjax from 'vj/utils/pjax'; import request from 'vj/utils/request'; +import tpl from 'vj/utils/tpl'; class ProblemPageExtender { constructor() { @@ -187,7 +188,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor cnt++; const id = info.replace(/{{ (input|select|multiselect)\((\d+(-\d+)?)\) }}/, '$2'); if (type === 'input') { - $(e).html($(e).html().replace(info, ` + $(e).html($(e).html().replace(info, tpl`