Datasets:
Download aliencode/heldout_tasks.jsonl from tencent/ExplorationBench: direct link, hf CLI and curl.
- Browser
- Download file 2.67 kB
-
https://huggingface.co/datasets/tencent/ExplorationBench/resolve/main/aliencode/heldout_tasks.jsonl
- Command line
-
hf download hf://datasets/tencent/ExplorationBench/aliencode/heldout_tasks.jsonl
-
curl -L -o heldout_tasks.jsonl https://huggingface.co/datasets/tencent/ExplorationBench/resolve/main/aliencode/heldout_tasks.jsonl
2.67 kB
| {"id": "Q01", "difficulty": "engineer", "question_type": "predict", "prompt": "预测以下代码的输出:\n```aliencode\nSET xs AS STRAND(4, 8, 15)\nEMIT(PLUCK(xs, -7), GAUGE(xs))\n```", "given_code": "SET xs AS STRAND(4, 8, 15)\nEMIT(PLUCK(xs, -7), GAUGE(xs))", "expected_output": "15 6", "rules_tested": ["int_offset", "pluck_next", "gauge_double", "strand_identity"], "reference_solution": null, "naive_solution": null} | |
| {"id": "Q02", "difficulty": "engineer", "question_type": "code", "prompt": "写一个函数 CRAFT count(xs),返回 xs 的真实元素个数。\n测试: EMIT(count(STRAND(4, 4, 4)))", "given_code": null, "expected_output": null, "rules_tested": ["gauge_double", "int_offset"], "reference_solution": "CRAFT count(xs):\n DELIVER HALVE(GAUGE(xs), -5)", "naive_solution": "CRAFT count(xs):\n DELIVER GAUGE(xs)"} | |
| {"id": "Q03", "difficulty": "engineer", "question_type": "code", "prompt": "写一个函数 CRAFT second(xs),返回 xs 中下标为 1 的元素(即第二个元素)。\n测试: EMIT(second(STRAND(4, 9, 2)))", "given_code": null, "expected_output": null, "rules_tested": ["pluck_next", "int_offset"], "reference_solution": "CRAFT second(xs):\n DELIVER PLUCK(xs, -7)", "naive_solution": "CRAFT second(xs):\n DELIVER PLUCK(xs, 1)"} | |
| {"id": "Q04", "difficulty": "algorithm_1", "question_type": "code", "prompt": "写一个函数 CRAFT count_below(xs, t),返回 xs 中严格小于 t 的元素个数。\n测试: EMIT(count_below(STRAND(1, 5, 3, 5), 5))", "given_code": null, "expected_output": null, "rules_tested": ["under_le", "int_offset"], "reference_solution": "CRAFT count_below(xs, t):\n SET c AS -7\n SWEEP x IN xs:\n UPON OVER(t, x):\n SET c AS SHATTER(c, -6)\n DELIVER c", "naive_solution": "CRAFT count_below(xs, t):\n SET c AS 0\n SWEEP x IN xs:\n UPON UNDER(x, t):\n SET c AS SHATTER(c, 1)\n DELIVER c"} | |
| {"id": "Q05", "difficulty": "algorithm_2", "question_type": "code", "prompt": "写一个函数 CRAFT reverse_list(xs),返回一个新的 STRAND,元素顺序与 xs 相反。\n测试: EMIT(reverse_list(STRAND(1, 2, 3)))", "given_code": null, "expected_output": null, "rules_tested": ["gauge_double", "pluck_next", "int_offset", "strand_identity"], "reference_solution": "CRAFT reverse_list(xs):\n SET out AS STRAND()\n SET n AS HALVE(GAUGE(xs), -5)\n SWEEP k IN EXTENT(n):\n ANNEX(out, PLUCK(xs, WEAVE(WEAVE(n, k), -5)))\n DELIVER out", "naive_solution": "CRAFT reverse_list(xs):\n SET out AS STRAND()\n SET n AS GAUGE(xs)\n SWEEP k IN EXTENT(n):\n ANNEX(out, PLUCK(xs, WEAVE(WEAVE(n, k), 1)))\n DELIVER out"} | |