challenge-coding-004
Suite: coding
Finish: stop
Prompt
只输出 Python 代码,不要解释。实现 solve(capacity: int, ops: list[str]) -> list[int],模拟 LRU cache。ops 包含 "put key value" 和 "get key"。get 返回 value,不存在返回 -1。put 已存在 key 要更新并变成最近使用。容量为 0 时所有 get 都返回 -1。
Standard Answer / Scoring Expectation
Reference tests:
ops = ['put a 1', 'put b 2', 'get a', 'put c 3', 'get b', 'get a', 'get c']
assert solution.solve(2, ops) == [1, -1, 1, 3]
assert solution.solve(0, ['put a 1', 'get a']) == [-1]
assert solution.solve(1, ['put a 1', 'put a 2', 'get a']) == [2]
Mistake Analysis
Failure type: runtime_type_assumption
题目里的 cache key 是字符串,例如 `a`、`b`、`c`,但模型把 key 强行写成 `int(parts[1])`。测试一遇到 `put a 1` 就在解析 `a` 时抛出 ValueError。根因是模型擅自补了“key 是整数”的类型假设。
Scorer Details
{
"returncode": 1,
"stdout": "",
"stderr": "Traceback (most recent call last):\n File \"/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-zbhmi4m3/test_solution.py\", line 4, in <module>\n assert solution.solve(2, ops) == [1, -1, 1, 3]\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/private/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-zbhmi4m3/solution.py\", line 20, in solve\n key = int(parts[1])\n ^^^^^^^^^^^^^\nValueError: invalid literal for int() with base 10: 'a'\n"
}
Output
```python
from collections import OrderedDict
from typing import List
def solve(capacity: int, ops: List[str]) -> List[int]:
results = []
cache = OrderedDict()
for op in ops:
parts = op.split()
if parts[0] == "get":
key = int(parts[1])
if capacity == 0:
results.append(-1)
elif key in cache:
cache.move_to_end(key)
results.append(cache[key])
else:
results.append(-1)
else: # put
key = int(parts[1])
value = int(parts[2])
if capacity == 0:
continue
if key in cache:
cache.move_to_end(key)
cache[key] = value
else:
if len(cache) >= capacity:
cache.popitem(last=False)
cache[key] = value
return results
```
challenge-reasoning-003
Suite: reasoning
Finish: stop
Prompt
只回答最终数字:一个 4 位二进制数从 1011 开始,先左移一位并只保留低 4 位,再与 0110 做异或,最后转成十进制。结果是多少?
Standard Answer / Scoring Expectation
Answer: 0
Mistake Analysis
Failure type: answer_mismatch
模型最终答案 `9` 与标准答案 `0` 不一致。1011 左移一位并只保留低 4 位得到 0110;0110 XOR 0110 = 0000,十进制为 0。模型输出 `9`,说明它漏掉了“只保留低 4 位”或在 XOR 步骤中按位计算错误。
Scorer Details
{
"expected": "0",
"actual": "9"
}
Output
9
challenge-rag-001
Suite: rag_long_context
Finish: stop
Prompt
只根据资料回答。
资料 A:DracoBench v0.2 的目标是提高区分度,优先增加 coding、debugging、RAG 和 instruction_following 题。
资料 B:DracoBench v0.2 不会默认使用 LLM-as-judge;开放中文写作题只做少量规则校验和人工抽检。
资料 C:v0.2 的 HTML 报告必须展示通过率、成本、reasoning tokens、失败样例和逐题明细。
问题:v0.2 为什么没有把 LLM-as-judge 作为默认判分?
Standard Answer / Scoring Expectation
Required phrases: 人工抽检
At least one from each group: 默认使用 / 默认判分 / 默认采用 / 作为默认判分
Forbidden phrases: 因为成本太高、因为不支持中文
Length guidance (diagnostic only): min=n/a, max=160
Mistake Analysis
Failure type: missing_required_info
问题问的是“为什么 v0.2 不把 LLM-as-judge 作为默认判分”。资料 B 给出的关键依据是:开放中文写作题只做少量规则校验和人工抽检。模型回答 `资料未说明原因。` 只是复述“不会默认使用”或说资料未说明,没有说出替代判分方式里的“人工抽检”,因此缺少真正解释原因的证据链。
Scorer Details
{
"missing": [
"人工抽检"
],
"missing_any": [
[
"默认使用",
"默认判分",
"默认采用",
"作为默认判分"
]
],
"present_forbidden": [],
"char_count": 8,
"length_ok": true,
"length_scored": false
}
Output
资料未说明原因。
challenge-rag-004
Suite: rag_long_context
Finish: stop
Prompt
只根据资料回答,不要使用资料外知识。
资料:报告字段包括 pass_rate、avg_latency_ms、total_cost、prompt_tokens、completion_tokens、reasoning_tokens。报告不包含模型训练数据来源,也不包含供应商真实利润率。
问题:根据资料,能否从报告判断供应商利润率?
Standard Answer / Scoring Expectation
Required phrases: 不能、不包含、利润率
Forbidden phrases: 可以判断、训练数据
Length guidance (diagnostic only): min=n/a, max=100
Mistake Analysis
Failure type: missing_required_info
模型结论 `不能。` 方向正确,但回答过短,只给了“不能”而没有说明依据。这类 RAG 题要求同时回答结论和资料中的缺失字段;本题缺少 `不包含、利润率`,所以读者无法复查模型为什么不能判断。
Scorer Details
{
"missing": [
"不包含",
"利润率"
],
"missing_any": [],
"present_forbidden": [],
"char_count": 3,
"length_ok": true,
"length_scored": false
}
Output
不能。
challenge-coding-014
Suite: coding
Finish: stop
Prompt
只输出 Python 代码,不要解释。实现 solve(nums: list[int]) -> int。返回删除恰好一个元素后,剩余数组的最大连续子数组和。nums 长度至少为 2,可以全为负数。
Standard Answer / Scoring Expectation
Reference tests:
assert solution.solve([1,-2,0,3]) == 4
assert solution.solve([1,-2,-2,3]) == 3
assert solution.solve([-1,-1,-1]) == -1
assert solution.solve([2,1,-2,3]) == 6
Mistake Analysis
Failure type: code_assertion_failure
模型采用了左右最大子数组拼接法,但没有正确覆盖“删除后可以只取一侧子数组”的情况。在 `[1,-2,-2,3]` 中,最佳做法是删除一个 `-2` 后取右侧 `[3]`,答案为 3;模型只算出 2,说明动态规划状态没有完整表达“恰好删除一个元素后的最大连续和”。
Scorer Details
{
"returncode": 1,
"stdout": "",
"stderr": "Traceback (most recent call last):\n File \"/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-cmk_uboc/test_solution.py\", line 4, in <module>\n assert solution.solve([1,-2,-2,3]) == 3\nAssertionError\n"
}
Output
```python
def solve(nums: list[int]) -> int:
n = len(nums)
if n == 2:
return max(nums[0], nums[1])
left = [0] * n
left[0] = nums[0]
for i in range(1, n):
left[i] = max(nums[i], left[i-1] + nums[i])
right = [0] * n
right[-1] = nums[-1]
for i in range(n-2, -1, -1):
right[i] = max(nums[i], right[i+1] + nums[i])
ans = max(left[-2], right[1])
for i in range(1, n-1):
ans = max(ans, left[i-1] + right[i+1])
return ans
```
challenge-reasoning-012
Suite: reasoning
Finish: stop
Prompt
只回答最终数字:一个 5 位二进制数 10110 先循环右移 1 位,再与 00111 做异或,最后转成十进制。结果是多少?
Standard Answer / Scoring Expectation
Answer: 12
Mistake Analysis
Failure type: answer_mismatch
模型最终答案 `13` 与标准答案 `12` 不一致。10110 循环右移 1 位得到 01011;01011 XOR 00111 = 01100,十进制为 12。模型输出 `13`,根因是循环移位或 XOR 的二进制位计算错。
Scorer Details
{
"expected": "12",
"actual": "13"
}
Output
13
challenge-reasoning-019
Suite: reasoning
Finish: stop
Prompt
只回答最终数字:用 A、B、C 组成长度为 3 的字符串,要求恰好包含一个 A,并且最后一个字符不能是 C。满足条件的字符串有多少个?
Standard Answer / Scoring Expectation
Answer: 8
Mistake Analysis
Failure type: answer_mismatch
模型最终答案 `4` 与标准答案 `8` 不一致。恰好一个 A:A 在末位时前两位可为 B/C 共 4 种;A 在第 1 或第 2 位时末位只能是 B,各 2 种;总数 8。模型输出 `4`,说明它漏算了某些 A 的位置,或错误处理了“最后一个字符不能是 C”的限制。
Scorer Details
{
"expected": "8",
"actual": "4"
}
Output
4
challenge-reasoning-020
Suite: reasoning
Finish: stop
Prompt
只回答最终数字:栈操作从空栈开始。push n 表示入栈;dup 复制栈顶;add 弹出两个数并压入它们的和;swap 交换栈顶两个数;sub 先弹出 x 再弹出 y,并压入 y-x。依次执行:push 2, push 3, dup, add, push 4, swap, sub。最终栈顶是多少?
Standard Answer / Scoring Expectation
Answer: -2
Mistake Analysis
Failure type: answer_mismatch
模型最终答案 `4` 与标准答案 `-2` 不一致。栈执行到 `push 4, swap` 后为 `[2,4,6]`;`sub` 先弹 x=6,再弹 y=4,压入 y-x=-2。模型输出 `4`,根因是 `sub` 的出栈顺序或 `swap` 后栈顶理解错。
Scorer Details
{
"expected": "-2",
"actual": "4"
}
Output
4
challenge-reasoning-022
Suite: reasoning
Finish: stop
Prompt
只回答最终数字:映射初始为 {a:1, b:2}。依次执行:设置 c=a+b;设置 a=c-b;删除 b;设置 d=a+c。最终所有 value 之和是多少?
Standard Answer / Scoring Expectation
Answer: 8
Mistake Analysis
Failure type: answer_mismatch
模型最终答案 `10` 与标准答案 `8` 不一致。映射更新后 c=3,a=c-b=1,删除 b,再设置 d=a+c=4;最终 value 为 1、3、4,总和 8。模型输出 `10`,说明它漏做了删除 b、错误更新 a,或没有按顺序使用最新映射值。
Scorer Details
{
"expected": "8",
"actual": "10"
}
Output
10