diff --git a/utility.js b/utility.js index 7398a67..b7eb742 100644 --- a/utility.js +++ b/utility.js @@ -278,8 +278,8 @@ module.exports = { if (submitAnswer) testcase.answer = answer.replace('#', i); - if (!list.includes(testcase.input)) throw `找不到文件 ${testcase.input}`; - if (!list.includes(testcase.output)) throw `找不到文件 ${testcase.output}`; + if (testcase.input !== '-' && !list.includes(testcase.input)) throw `找不到文件 ${testcase.input}`; + if (testcase.output !== '-' && !list.includes(testcase.output)) throw `找不到文件 ${testcase.output}`; res[s].cases.push(testcase); } } diff --git a/views/problem.ejs b/views/problem.ejs index 7ab6bb4..587e6c3 100644 --- a/views/problem.ejs +++ b/views/problem.ejs @@ -54,7 +54,7 @@ if (contest) { <% } %>