原来试运行走另一台 Judge0:C 是 GCC 9、编译参数也不一样,Python 的语法错误回来的是运行错误, 没有题目的时间内存限制和代码模板,例子上的结果常和提交对不上。现在走本站判题机 (POST /trial-runs),同一套编译命令、这道题的限制和模板,对不对也由判题机比。 - 不落库、不算提交、不进判题队列:api 进程里自己排队,全站同时 TRIAL_CONCURRENCY 批 (服务器 2、机房 4),每人最多两批,排满或等超过 30 秒就请学生过一会儿再点 - 死循环不停打印时判题机回包会很大,超过 16MB 就掐断,告诉学生输出太多、停不下来 - Python 语法错误用和提交一样的说明:第几行、中文标点标红、一键换成英文 - 运行时错误和提交用同一个解析,说清楚第几行、为什么(下标越界、int() 转换失败、段错误……); 比赛里照旧只给按结果码的那一句 - 语法没过、服务没跑成时,标题不再说「N 个例子没对上」 - 后台「生成测试点」一并迁过来,编译警告不会再写进 .out;Judge0 的地址和调用全部删掉 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8834536135
commit
eb32676de4
27 files changed
+691
-169
No files matched your search
@@ -46,18 +46,24 @@ export const useSubmissionStore = defineStore("submission", () => {
|
||||
resultSeq.value++
|
||||
}
|
||||
|
||||
/** 用题目里的例子试跑(Judge0),不算提交 */
|
||||
/** 用题目里的例子试跑(本站判题机),不算提交 */
|
||||
function runSamples() {
|
||||
const problem = problemStore.problem
|
||||
if (!problem?.samples.length) return
|
||||
revealResult("samples")
|
||||
trial.runSamples({ ...codeStore.code }, problem.samples)
|
||||
trial.runSamples(
|
||||
{ ...codeStore.code },
|
||||
{ problemId: problem.id, contestId: problem.contestId },
|
||||
problem.samples,
|
||||
)
|
||||
}
|
||||
|
||||
/** 用「自己输入」框里的数据跑一次 */
|
||||
function runCustom() {
|
||||
const problem = problemStore.problem
|
||||
if (!problem) return
|
||||
revealResult("custom")
|
||||
trial.runCustom({ ...codeStore.code })
|
||||
trial.runCustom({ ...codeStore.code }, { problemId: problem.id, contestId: problem.contestId })
|
||||
}
|
||||
const isFormatting = ref(false)
|
||||
const isSubmittingRequest = ref(false)
|
||||
|
||||
Reference in new issue
Block a user