id stringclasses 10
values | schema_version stringclasses 1
value | curation_date timestamp[s]date 2026-08-01 00:00:00 2026-08-01 00:00:00 | title stringclasses 10
values | language stringclasses 1
value | instruction stringclasses 10
values | chain_of_thought stringclasses 10
values | code stringclasses 10
values | doc stringclasses 10
values | messages listlengths 3 3 | source dict | annotations dict | tests dict | verification dict | quality dict | token_counts dict | context_bucket stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
taco-train-d593ed0a2bec-000005-v3 | 3.0 | 2026-08-01T00:00:00 | Count 2/3/5-smooth numbers in inclusive ranges | python | Can you write a Python program that counts the integers in a range whose only prime factors are 2, 3, or 5? Count 1 as valid too. I need to process up to 20 ranges: each input line contains m and n, with 1 <= m <= n <= 1,000,000, and a line containing just 0 ends the input. Print one count per range, including both end... | Every valid number has the form 2^a * 3^b * 5^c for nonnegative exponents. Generate these products with integer multiplication, stopping each loop at the maximum input value; unique prime factorization prevents duplicates and includes 1. After sorting the valid values, the count in [m, n] is the position after n minus ... | from bisect import bisect_left, bisect_right
import sys
def smooth_numbers(limit: int) -> list[int]:
values = []
power_of_two = 1
while power_of_two <= limit:
product_23 = power_of_two
while product_23 <= limit:
product_235 = product_23
while product_235 <= limit:
... | Reads inclusive range queries from standard input and prints one answer per line. A line containing 0 is a terminator, not a query; integer arithmetic avoids floating-point boundary errors. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "Can you write a Python program that counts the integers in a range whose only prime factors are 2, 3, or 5? Count 1 as valid too. I need to process up to 20 ranges: each input line contai... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 5,
"selected_solution_index": 0,
"problem_source": "aizu",
"problem_url":... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00005.cases.json.gz",
"artifact_sha256": "6f21d15a1bc7a751a2d8221f09346dcb832dc00a5184cecfc69643269b098dc6",
"execution_mode": "stdin",
"entry_point": null,
"source_tests": 101,
"unique_source_inputs": 101,
"supplemental_tests": 7,
"supplemental_seed": 20260806,
... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 101,
"final_tests_total": 108,
"final_tests_passed": 108,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00005.execution.json.gz",
"test_log_sha256": "df9b54d4eaf7b21c806f859ab8908bbfdda39164559021abc383ea... | {
"decision": "accepted",
"topics": [
"number theory",
"range counting"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, correctness jus... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 524,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000006-v3 | 3.0 | 2026-08-01T00:00:00 | Smallest digit rearrangement without a leading zero | python | I need a Python function smallest_rearrangement(s) that rearranges the digits of a decimal string into the smallest possible number without a leading zero. Keep every digit, including repeats, and return a string rather than an integer; the input can have up to 100,000 digits. If the string consists entirely of zeros, ... | The first digit must be the smallest available nonzero digit; choosing a larger one would make the result larger regardless of the suffix. Once that digit is fixed, arranging all remaining digits in ascending order gives the smallest suffix, with zeros now allowed. A table of ten digit frequencies preserves multiplicit... | def smallest_rearrangement(s: str) -> str:
counts = [0] * 10
for digit in s:
counts[ord(digit) - ord("0")] += 1
for first in range(1, 10):
if counts[first]:
counts[first] -= 1
suffix = "".join(str(digit) * counts[digit] for digit in range(10))
return str(... | Returns the rearranged digits without converting a potentially huge value to an integer. The input string is not modified, and the all-zero case preserves its original length. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "I need a Python function smallest_rearrangement(s) that rearranges the digits of a decimal string into the smallest possible number without a leading zero. Keep every digit, including rep... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 6,
"selected_solution_index": 0,
"problem_source": "geeksforgeeks",
"prob... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00006.cases.json.gz",
"artifact_sha256": "726e81d63cd514cc554d881ce9dfa8e28de3f4685fbd3540ab20244cd58c2849",
"execution_mode": "call",
"entry_point": "smallest_rearrangement",
"source_tests": 2,
"unique_source_inputs": 2,
"supplemental_tests": 110,
"supplemental_... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 2,
"final_tests_total": 112,
"final_tests_passed": 112,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00006.execution.json.gz",
"test_log_sha256": "a1913b34de0891f7d876031d1c4528da226c664ab46123ac2aed3df2... | {
"decision": "accepted",
"topics": [
"digit manipulation",
"counting"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, correctness just... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 395,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000007-v3 | 3.0 | 2026-08-01T00:00:00 | Minimum finishing time for contiguous painting assignments | python | Please write a Python function minimum_paint_time(boards, painters). The boards are in a fixed order and take one unit of time per unit of length to paint. All painters start together. Each painter may take one contiguous group of whole boards, or do nothing; boards cannot be split or reordered. Return the least possib... | A candidate finishing time is feasible if the boards can be covered by at most the available number of contiguous groups whose sums do not exceed it. Filling each group as far as possible uses the fewest groups for that limit because all lengths are positive. Feasibility is monotone: increasing the limit cannot require... | def minimum_paint_time(boards: list[int], painters: int) -> int:
lower, upper = max(boards), sum(boards)
while lower < upper:
limit = (lower + upper) // 2
used = 1
current = 0
for length in boards:
if current + length > limit:
used += 1
... | Returns an integer time and does not change boards. The result is the total length for one painter and the longest board when there are enough painters for every board. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "Please write a Python function minimum_paint_time(boards, painters). The boards are in a fixed order and take one unit of time per unit of length to paint. All painters start together. Ea... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 7,
"selected_solution_index": 0,
"problem_source": "geeksforgeeks",
"prob... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00007.cases.json.gz",
"artifact_sha256": "edf9c9753d8bac967d92670029caafac3c082af5791cc61f4c9828d2aaa30021",
"execution_mode": "call",
"entry_point": "minimum_paint_time",
"source_tests": 2,
"unique_source_inputs": 2,
"supplemental_tests": 108,
"supplemental_seed... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 2,
"final_tests_total": 110,
"final_tests_passed": 110,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00007.execution.json.gz",
"test_log_sha256": "7e504faf5c7d8e5b4f56aa05b6369f495adf906adf969d8693ac4322... | {
"decision": "accepted",
"topics": [
"partitioning",
"monotone feasibility"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, correctnes... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 444,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000014-v3 | 3.0 | 2026-08-01T00:00:00 | Shortest substring covering every distinct input character | python | Can you make a Python function smallest_covering_window(text) that returns the length of the shortest contiguous substring containing every distinct character that appears anywhere in text? It needs to be case-sensitive, and repeated occurrences of a character do not create extra requirements. The input is a nonempty s... | The requirement is one occurrence of each distinct character, so track the frequencies in a moving window. Extend its right edge until it covers the full character set, then repeatedly advance the left edge while coverage remains complete, recording the shortest valid length. Removing a character's final occurrence mak... | def smallest_covering_window(text: str) -> int:
required = len(set(text))
counts = {}
left = 0
best = len(text)
for right, character in enumerate(text):
counts[character] = counts.get(character, 0) + 1
while len(counts) == required:
best = min(best, right - left + 1)
... | Returns a length, not the matching text. Character counts retain coverage when an extra copy leaves the window; a string containing just one distinct character therefore returns 1. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "Can you make a Python function smallest_covering_window(text) that returns the length of the shortest contiguous substring containing every distinct character that appears anywhere in tex... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 14,
"selected_solution_index": 0,
"problem_source": "geeksforgeeks",
"pro... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00014.cases.json.gz",
"artifact_sha256": "4303c7f3e986d05898f43034369cadf8e1ac5a948149fb4fcddc0104088a87b4",
"execution_mode": "call",
"entry_point": "smallest_covering_window",
"source_tests": 3,
"unique_source_inputs": 3,
"supplemental_tests": 118,
"supplementa... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 3,
"final_tests_total": 121,
"final_tests_passed": 121,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00014.execution.json.gz",
"test_log_sha256": "7040d7ed51ad796159b90800ca0c9121b20e3e7be48055b75a9b1cc5... | {
"decision": "accepted",
"topics": [
"strings",
"sliding windows"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, correctness justific... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 401,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000025-v3 | 3.0 | 2026-08-01T00:00:00 | Maximum hindsight profit with unlimited single-share trades | python | Write a Python function maximum_profit(prices) for a historical list of daily stock prices. I want the best profit that could have been achieved in hindsight with any number of buys and sells, while holding at most one share at a time. Assume no fees, cooldown or short selling; doing no trades is allowed. Return only t... | On any rising stretch, buying at its start and selling at its end earns the sum of its positive adjacent increases. Falling steps should be excluded because selling before the drop and buying afterward cannot reduce profit when fees and cooldowns are absent. Adding every positive day-to-day increase therefore captures ... | def maximum_profit(prices: list[int]) -> int:
return sum(
max(0, prices[day] - prices[day - 1])
for day in range(1, len(prices))
)
| Computes a hindsight optimum for the stated simplified trading rules, not a forecast. Its result would not generally apply unchanged if fees, limited trades or cooldowns were added. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "Write a Python function maximum_profit(prices) for a historical list of daily stock prices. I want the best profit that could have been achieved in hindsight with any number of buys and s... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 25,
"selected_solution_index": 1,
"problem_source": "geeksforgeeks",
"pro... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00025.cases.json.gz",
"artifact_sha256": "e5df1b4e69832e5f188a3040191e93e03d09e7f657c650b59738925240ac35ff",
"execution_mode": "call",
"entry_point": "maximum_profit",
"source_tests": 1,
"unique_source_inputs": 1,
"supplemental_tests": 106,
"supplemental_seed": 2... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 1,
"final_tests_total": 107,
"final_tests_passed": 107,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00025.execution.json.gz",
"test_log_sha256": "ab3a66f63e49100f549d1cadfd45f7ad1a6f56394debc700f401fe63... | {
"decision": "accepted",
"topics": [
"sequence optimization",
"greedy accounting"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, corr... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 332,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000026-v3 | 3.0 | 2026-08-01T00:00:00 | Longest strictly nestable chain from two doll collections | python | I have two collections of nesting dolls and want to find the longest single chain I can make using dolls from either collection. A doll fits inside another only when both its height and radius are strictly smaller; equal heights or equal radii do not fit. Please write a Python stdin program. Each dataset gives n, then ... | Combine the two collections and order dolls by increasing height. For equal heights, put larger radii first so that a strictly increasing sequence of radii cannot mistakenly use two dolls of the same height. Maintain the smallest possible ending radius for each achievable chain length; replacing the first ending radius... | from bisect import bisect_left
import sys
def longest_chain(dolls: list[tuple[int, int]]) -> int:
endings = []
for height, radius in sorted(dolls, key=lambda doll: (doll[0], -doll[1])):
position = bisect_left(endings, radius)
if position == len(endings):
endings.append(radius)
... | Uses both collections together and reports a chain length per input dataset. The strict comparisons in both dimensions are essential; merely sorting height and radius in the same ascending order would mishandle equal heights. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "I have two collections of nesting dolls and want to find the longest single chain I can make using dolls from either collection. A doll fits inside another only when both its height and r... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 26,
"selected_solution_index": 3,
"problem_source": "aizu",
"problem_url"... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00026.cases.json.gz",
"artifact_sha256": "abaca0b2a9f5a391155ca57b0b2d3339e16c30f35ce254d937afdc92acdfb36f",
"execution_mode": "stdin",
"entry_point": null,
"source_tests": 101,
"unique_source_inputs": 101,
"supplemental_tests": 96,
"supplemental_seed": 20260827,... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 101,
"final_tests_total": 197,
"final_tests_passed": 197,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00026.execution.json.gz",
"test_log_sha256": "f501fa4b7a07be28f086d77b4fbfc70dcde1f0f949502011219a36... | {
"decision": "accepted",
"topics": [
"two-dimensional ordering",
"subsequences"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, correc... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 514,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000030-v3 | 3.0 | 2026-08-01T00:00:00 | Total active time of overlapping equal-duration events | python | I need a Python helper total_active_time(times, duration). Each timestamp starts an effect lasting duration time units, but overlapping effects do not add extra active time. Return the total time covered by at least one effect. The timestamps are sorted in nondecreasing order, duplicates are possible, and an empty list... | Treat an event at t as the half-open interval [t, t + duration). The first event contributes its full duration. Since timestamps are sorted and all durations are equal, each later event adds the smaller of duration and the gap from the previous timestamp: a smaller gap overlaps, while a larger gap leaves the new interv... | def total_active_time(times: list[int], duration: int) -> int:
if not times or duration == 0:
return 0
total = duration
for index in range(1, len(times)):
total += min(duration, times[index] - times[index - 1])
return total
| Computes the length of the union, so touching intervals and overlapping intervals are both handled without double-counting. It assumes sorted timestamps; it does not silently sort or alter the input. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "I need a Python helper total_active_time(times, duration). Each timestamp starts an effect lasting duration time units, but overlapping effects do not add extra active time. Return the to... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 30,
"selected_solution_index": 0,
"problem_source": "leetcode",
"problem_... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00030.cases.json.gz",
"artifact_sha256": "b2ab642ece52e3a8af4e2ef5983f6414b601973f887a700ed0ced3be8e7fd50e",
"execution_mode": "call",
"entry_point": "total_active_time",
"source_tests": 1,
"unique_source_inputs": 1,
"supplemental_tests": 108,
"supplemental_seed"... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 1,
"final_tests_total": 109,
"final_tests_passed": 109,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00030.execution.json.gz",
"test_log_sha256": "09553a1697e331436b3b8aaa08a9689a8c88b4586cb2ce309df258b0... | {
"decision": "accepted",
"topics": [
"interval coverage",
"sequence processing"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorithm summary, correc... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 378,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000050-v3 | 3.0 | 2026-08-01T00:00:00 | Sum of greatest common divisors over bounded sequences | python | Please write a Python program for this counting problem: consider all sequences of length N whose entries are integers from 1 through K. Add up the greatest common divisor of each sequence and print the sum modulo 1,000,000,007. Input is one line containing N and K, both at most 100,000, with N at least 2 and K at leas... | For a positive integer d, there are floor(K/d)^N sequences whose entries are all divisible by d. That includes sequences with gcd equal to any larger multiple of d. Process d in descending order and subtract the already-counted sequences for those larger multiples to obtain the count with gcd exactly d. Weight that cou... | MODULUS = 1_000_000_007
def gcd_sequence_sum(length: int, upper_bound: int) -> int:
exact = [0] * (upper_bound + 1)
for divisor in range(upper_bound, 0, -1):
count = pow(upper_bound // divisor, length, MODULUS)
for multiple in range(2 * divisor, upper_bound + 1, divisor):
count -= ... | Computes exact gcd counts modulo 1,000,000,007 rather than enumerating K^N sequences. Python's three-argument pow performs modular exponentiation directly. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "Please write a Python program for this counting problem: consider all sequences of length N whose entries are integers from 1 through K. Add up the greatest common divisor of each sequenc... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 50,
"selected_solution_index": 0,
"problem_source": "atcoder",
"problem_u... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00050.cases.json.gz",
"artifact_sha256": "54c1287f2938bd618f6707ddcfcdb61f1f75fd09394f00bf5ff43cf4ec97f526",
"execution_mode": "stdin",
"entry_point": null,
"source_tests": 127,
"unique_source_inputs": 124,
"supplemental_tests": 26,
"supplemental_seed": 20260851,... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 127,
"final_tests_total": 153,
"final_tests_passed": 153,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00050.execution.json.gz",
"test_log_sha256": "d633d674fee57fadf721f86e4570dc848cca6d0395d139e30d1293... | {
"decision": "accepted",
"topics": [
"number theory",
"divisor counting",
"modular arithmetic"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algori... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 470,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000051-v3 | 3.0 | 2026-08-01T00:00:00 | Can two arrays be paired to meet a minimum sum? | python | Can you write a Python program that checks whether two equal-length arrays can be rearranged so every paired sum is at least a given threshold? The first input line is the number of queries q. Each query has a line n k, then n integers for A and n for B. Print YES if a suitable pairing exists, otherwise NO. There are a... | Pair the smallest element of A with the largest element of B, then continue in opposite sorted orders. If the smallest remaining A cannot meet the threshold with the largest remaining B, no pairing can work. Otherwise this pair is safe: in any valid arrangement, exchanging partners to make it leaves the other A, which ... | import sys
def can_pair(threshold: int, first: list[int], second: list[int]) -> bool:
return all(
left + right >= threshold
for left, right in zip(sorted(first), sorted(second, reverse=True))
)
def main() -> None:
values = iter(map(int, sys.stdin.buffer.read().split()))
queries = nex... | The program prints one YES/NO answer per query and does not enumerate permutations. The pairing check uses sorted copies, so its helper does not mutate either input array. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "Can you write a Python program that checks whether two equal-length arrays can be rearranged so every paired sum is at least a given threshold? The first input line is the number of queri... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 51,
"selected_solution_index": 0,
"problem_source": "hackerrank",
"proble... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00051.cases.json.gz",
"artifact_sha256": "114cd4348fd334b2fd91d58e778ba1bb58834db519dabccaa1035fb34c7b62af",
"execution_mode": "stdin",
"entry_point": null,
"source_tests": 1,
"unique_source_inputs": 1,
"supplemental_tests": 101,
"supplemental_seed": 20260852,
... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 1,
"final_tests_total": 102,
"final_tests_passed": 102,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00051.execution.json.gz",
"test_log_sha256": "cdb9837996a9367ea586ebb412b43b6ae2b6b67e687f9a3032d6f053... | {
"decision": "accepted",
"topics": [
"matching feasibility",
"sorting",
"exchange arguments"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: concise algorith... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 514,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
taco-train-d593ed0a2bec-000059-v3 | 3.0 | 2026-08-01T00:00:00 | Fill array positions by longest empty segment | python | I need a Python program that starts with an array of n zeros and fills it with 1 through n. For each number, choose the longest contiguous segment that is still all zeros; if several have that length, choose the leftmost. Put the number in that segment's middle position, using the left of the two middle positions when ... | Only the chosen empty segment changes after a placement: it splits into a left remainder and a right remainder. Store pending segments by decreasing length and then increasing left endpoint, so the next retrieved segment matches both selection rules. A min-heap keyed by negative length implements this ordering. The flo... | from heapq import heappop, heappush
import sys
def arrange(size: int) -> list[int]:
result = [0] * size
segments = [(-size, 0, size - 1)]
for value in range(1, size + 1):
negative_length, left, right = heappop(segments)
middle = (left + right) // 2
result[middle] = value
if... | Uses zero-based indices internally but prints the assigned values, not indices. Empty child segments are never queued, and the heap's tie-breaker consistently chooses the leftmost segment. | [
{
"role": "system",
"content": "You are a helpful Python coding assistant."
},
{
"role": "user",
"content": "I need a Python program that starts with an array of n zeros and fills it with 1 through n. For each number, choose the longest contiguous segment that is still all zeros; if several have... | {
"dataset": "BAAI/TACO",
"url": "https://huggingface.co/datasets/BAAI/TACO",
"revision": "d593ed0a2becbbc952230bb89be09189bf1056dc",
"split": "train",
"config": "ALL",
"shard": "ALL/train-00000-of-00009.parquet",
"row_index": 59,
"selected_solution_index": 2,
"problem_source": "codeforces",
"proble... | {
"instruction_is_synthetic": true,
"rationale_type": "synthetic_solution_summary",
"source_rationale_present": false,
"rationale_added": true,
"author": "Qwen assistant, this conversation; exact serving-model version and parameter count not supplied",
"human_reviewed": false,
"external_llm_judge_used": f... | {
"artifact_path": "verification/taco_v3/00059.cases.json.gz",
"artifact_sha256": "27aecb16811e103dcb366118cb26520b0e23cc597472edf3bc555e14f4708e3b",
"execution_mode": "stdin",
"entry_point": null,
"source_tests": 89,
"unique_source_inputs": 88,
"supplemental_tests": 2,
"supplemental_seed": 20260860,
... | {
"status": "passed",
"python_version": "3.11.2",
"original_source_tests_passed": 89,
"final_tests_total": 91,
"final_tests_passed": 91,
"final_tests_failed": 0,
"test_log_path": "verification/taco_v3/00059.execution.json.gz",
"test_log_sha256": "237df28154b8ca958079f1fee61f7680c85c53044b178d203be27107f... | {
"decision": "accepted",
"topics": [
"priority queues",
"interval splitting",
"deterministic construction"
],
"instruction_review": "assistant-reviewed: realistic synthetic goal/interface request, constraints retained, no prescribed solution technique",
"rationale_review": "assistant-reviewed: co... | {
"tokenizer_id": "Qwen/Qwen2.5-Coder-7B-Instruct",
"tokenizer_revision": "c03e6d358207e414f1eca0bb1891e29f1db0e242",
"training_total": 523,
"limit": 16384,
"training_field": "messages",
"method": "apply_chat_template(tokenize=True, add_generation_prompt=False)",
"chat_template_sha256": "cd8e9439f0570856f... | 16k_context |
Python-only, execution-checked training examples
New v3 configuration
Use python_verified_v3_16k for the new TACO training-split pilot. Every new row contains a realistic synthetic instruction, a concise solution rationale, Python code, brief documentation, provenance, execution evidence, and an exact full-conversation token count.
from datasets import load_dataset
rows = load_dataset("dsfasdfaserwer/Dataset", "python_verified_v3_16k", split="train")
# Train on row["messages"], not a stringification of the entire JSON record.
- Source is
BAAI/TACO, train only, pinned atd593ed0a2becbbc952230bb89be09189bf1056dc. - Final code is re-run against every supplied source test for the selected task, plus stored independent-oracle and edge/boundary checks. Refactored code receives fresh full verification.
- Passing finite tests is evidence, not a proof of correctness for every possible input. There is no human verification or independent external-model review of the new annotations.
- The compatibility field
chain_of_thoughtmeans synthetic solution summary here; it is not a recovered private reasoning trace. Seeannotations.rationale_type. - The exact training text is the
messagesconversation: system prompt + instruction + assistant rationale, fenced Python and documentation. Audit tests, logs, provenance and duplicate field copies are not training text. - Tokenizer:
Qwen/Qwen2.5-Coder-7B-Instruct, with its revision/template fingerprint in each row. The chat template and special tokens are included.<= 16,384goes indata/16k_context/;> 16,384goes indata/above_16k/. Recount for any other tokenizer/template/system prompt. - No long examples are manufactured or padded merely to fill the long-context folder.
Current upload counts, record IDs, source-test and supplemental-test totals are in the manifest. Uploads are additive, in small versioned parts.
Files and reproducibility
- Schema
- Curation and instruction/rationale policy
- Token-count method and boundary checks
- Screening / pending-work log
verification/taco_v3/*.cases.json.gz: actual source-adapted and supplemental test vectors.verification/taco_v3/*.source.json.gz: selected upstream code, original problem and untouched original test blob.verification/taco_v3/*.execution.json.gz: per-case status, hashes and timings for original/final code.curation/v3/scripts/: replay and verification tools. The restricted Linux harness requires root setup for chroot, drops privileges before candidate execution, denies network/process creation and applies resource limits. It fails closed when these protections are unavailable.
Legacy data: separate, not newly certified
The repository already held 15 legacy rows in batch_001_taco_verified.jsonl and an empty legacy long-context file. Those data files and schema.json remain unchanged. Their old cl100k_base field-sum token counts are not interchangeable with v3's Qwen full-chat counts. They have not been re-audited during this run and are excluded from the new default configuration. The previous card is preserved in docs/legacy_dataset_card.md.
Licenses and limitations
Upstream attribution and license qualifications are preserved in LICENSES/NOTICE.md. TACO's card describes an Apache-2.0 dataset containing source material with additional licenses, including MIT and CC-BY-4.0. Do not assume that a single license tag independently clears every underlying source or overrides existing terms. Modifications are listed per row.
This small pilot is not an exhaustive dataset sweep, and no comprehensive semantic or cross-benchmark decontamination has been completed. Use separate held-out evaluation sets. Some selected sources originally supplied only a few examples; the added independent checks improve evidence but are not a substitute for an unavailable private judge.
- Downloads last month
- 490