fix(答案错误): 说明写「在例子 1 上就错了」,旁边测试点 1 是绿的,看着像写反了——改成「题目里的例子 1 就错了」

例子是题面样例,测试点是隐藏数据,两边都从 1 编号,只写「例子 1」分不开。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-09-30 12:18:06 +08:00
1 parent 923f3efeca
commit c22521fb61
3 files changed
+7 -4

No files matched your search

@@ -165,7 +165,7 @@ const failedOnSample = computed(() =>
/**
* 结果标题(设计文档第 6 节、设计稿「答案错误 / 答案正确 / 错在隐藏测试点」):
* 大字是判题结果,灰色小字说清楚错在哪 —— 例子上就错了的说「在例子 N 上就错了」、不挂进度;
* 大字是判题结果,灰色小字说清楚错在哪 —— 例子上就错了的说「题目里的例子 N 就错了」、不挂进度;
* 其余照旧报「通过 x/y 个测试点」(一个都没过就不报);做对了说全对了。
* 提交详情页还用通用的 submissionResultTitle
*/
@@ -192,7 +192,8 @@ const header = computed(() => {
return {
kind: status.type,
title: status.title,
sub: `在例子 ${(failedOnSample.value.index ?? 0) + 1} 上就错了`,
// 和提交列表右栏同一句,「题目里的」是为了和测试点的编号分开
sub: `题目里的例子 ${(failedOnSample.value.index ?? 0) + 1} 就错了`,
progress: null,
}
}
@@ -164,9 +164,11 @@ const explain = computed(() => {
case SubmissionStatus.wrong_answer: {
const check = info?.sample_check
if (!check) return null
// 「题目里的」不能省:上面那排格子是测试点,也从 1 编号,只写「例子 1」时老师看到
// 格子 1 是绿的,以为说明写反了(例子 1 是题面样例,和测试点 1 不是一组数据)
const text = check.passed
? "题目里的例子都对,错在没公开的测试点上。"
: `在例子 ${(check.index ?? 0) + 1} 上就错了。`
: `题目里的例子 ${(check.index ?? 0) + 1} 就错了。`
return { line: null, text, raw: "" }
}
case SubmissionStatus.ast_check_failed: {