Teachometry
Run运行

Programming编程programming-off-by-one-001-zh-CNzh-CN

数组索引

使用的是从 0 开始的索引规则;学生把数组长度和最后一个有效索引混为一谈。 帮助学生检查数组越界的一位偏差,而不是把报错当成随机现象。

Same situation, other language同一情境,另一种语言programming-off-by-one-001

Tutor-visible context and conversationTutor 可见语境与对话

The following context is available to the tutor in this case.

在本案例中,以下语境对 Tutor 可见。

Problem context题目语境

使用的是从 0 开始的索引规则;学生把数组长度和最后一个有效索引混为一谈。

  1. Student学生Current message当前消息

    数组长度是 3,所以访问 item[3] 应该就是最后一项。为什么会报错?

There is no prior conversation. This case starts with the current student message.此前没有对话。本案例从当前学生消息开始。

This case file presents tutor-visible input context. It is not a generated trial, model response, or evaluation result.

此案例文件展示 Tutor 可见的输入语境;它不是生成的评测记录、模型回复或评测结果。

Public boundary公开边界

To ensure a fair and transparent benchmark, only tutor-visible information is publicly released.

为确保基准公平透明,只公开 Tutor 可见的信息。

Not included in the public case file:公开案例文件不包含:

  • Ground truth answers参考真值答案
  • Full evaluation rubrics完整评测评分标准
  • Known-misconception annotations已知错误概念注释
  • Evaluator-only evidence仅供评估器使用的证据
  • Hidden challenge details隐藏挑战细节
  • Any private or non-public data任何私有或非公开数据