data_source
stringclasses
3 values
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
sub_source
stringclasses
12 values
extra_info
dict
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In this problem we are concerned with words construc...
code
{ "ground_truth": "{\"inputs\": [[\"11\", \"abacd\", \"bcdada\", \"dd\", \"abcd\", \"bcdd\", \"adcd\", \"addd\", \"aa\", \"ccd\", \"add\", \"ad\"]], \"outputs\": [[\"7\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-19249", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given an array of n integers: a_1, a_2, …, a...
code
{ "ground_truth": "{\"inputs\": [\"7\\n0 0 1 -1 0 0 2\\n\", \"5\\n10 0 -7 2 6\", \"100\\n-261 613 -14 965 -114 -594 516 -631 -477 -352 -481 0 -224 -524 -841 397 -138 -986 -442 -568 -417 -850 -654 -193 -344 -648 -525 -394 -730 -712 -600 0 188 248 -657 -509 -647 -878 175 -894 -557 0 -367 -458 -35 -560 0 -952 -579 -784 ...
rating_<=1200
{ "id": "1130_A. Be Positive", "rating": 800, "split": "confidence_train", "sub_source": "rating_<=1200" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given a binary tree and two node values your task is ...
code
{ "ground_truth": "{\"inputs\": [\"1\\r\\n / \\\\\\r\\n 2 3\\r\\na = 2, b = 3\"], \"outputs\": [\"2\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-22477", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You’ve heard of acid rain but have you heard of anti...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n1 8\\n2 3\\n2 8\\n5 8\\n5 9\\n3 6 6\\n1 7 4\\n1 3 1\\n\", \"6 3\\n1 2\\n4 8\\n5 10\\n6 10\\n7 10\\n8 10\\n1 1 1\\n3 4 3\\n5 7 9\\n\"], \"outputs\": [\"4\\n1\\n4\\n6\\n0\\n\", \"1\\n3\\n9\\n9\\n9\\n0\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-3559", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Spiders are Om Nom's old enemies. They love eating c...
code
{ "ground_truth": "{\"inputs\": [\"6 3\\n1 2 2\\n2 3 2\\n3 4 2\\n4 6 1\\n3 5 10\\n3 1\\n2 5\\n1 1\\n\", \"9 10\\n2 1 523\\n9 5 165\\n9 6 677\\n2 4 456\\n2 3 864\\n1 7 989\\n7 9 452\\n9 8 104\\n9 1\\n2 9\\n4 1\\n2 9\\n6 6\\n6 6\\n5 6\\n8 6\\n6 6\\n8 9\\n\", \"15 1\\n1 10 6\\n3 5 10\\n15 6 11\\n1 4 11\\n6 1 15\\n10 13 ...
rating_>1900
{ "id": "526_G. Spiders Evil Plan", "rating": 3300, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "G: Almost Infinite Glico\n\nproblem\n\nThere is a fi...
code
{ "ground_truth": "{\"inputs\": [\"10 3 2\\n3\\n6\\n6\", \"10 3 2\\n3\\n10\\n6\", \"10 3 2\\n3\\n10\\n9\", \"11 3 2\\n3\\n10\\n9\", \"11 3 2\\n3\\n17\\n9\", \"11 3 2\\n3\\n17\\n16\", \"11 2 2\\n3\\n17\\n16\", \"11 1 2\\n3\\n17\\n16\", \"7 3 2\\n3\\n6\\n6\", \"10 3 2\\n3\\n16\\n6\", \"2 3 2\\n3\\n10\\n9\", \"11 3 2\\n...
none
{ "id": "p01944 Almost Infinite Glico", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are N boxes arranged in a row. Initially, the ...
code
{ "ground_truth": "{\"inputs\": [\"2 0\\n5 5\", \"5 9\\n3 1 4 1 5\", \"3 3\\n2 2 2\", \"6 1\\n1 6 1 2 0 4\", \"2 0\\n7 5\", \"5 9\\n3 1 4 2 5\", \"3 3\\n2 4 2\", \"2 0\\n1 5\", \"2 1\\n1 2\", \"2 0\\n5 9\", \"3 3\\n4 4 2\", \"2 0\\n1 10\", \"2 0\\n1 0\", \"2 0\\n1 9\", \"6 1\\n2 6 1 2 0 5\", \"3 3\\n8 4 2\", \"2 0\\n...
none
{ "id": "p03862 AtCoder Beginner Contest 048 - Boxes and Candies", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In a class of N students, a class test was held. The...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2 2\\n5 1\\n4 1\\n5 1 7 4\\n4 3\\n15 70 100 31\\n\"], \"outputs\": [\"0\\n6\\n30\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-3335", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Lisa just got a new math workbook. A workbook conta...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n4 2 6 1 10\\n\"], \"outputs\": [\"4\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-9993", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given a collection of intervals, merge all overlappin...
code
{ "ground_truth": "{\"fn_name\": \"merge\", \"inputs\": [[[[1, 3], [2, 6], [8, 10], [15, 18]]], [[[1, 4], [4, 5]]]], \"outputs\": [[[1, 6], [8, 10], [15, 18]], [[1, 5]]]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-6998", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problem statements in [Hindi], [Bengali], [Mand...
code
{ "ground_truth": "{\"inputs\": [\"1\\n5 5\\n1 2\\n1 3\\n2 3\\n2 4\\n3 4\"], \"outputs\": [\"2\\n1 2 1 1 2\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-11569", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "It is only a few days until Seollal (Korean Lunar Ne...
code
{ "ground_truth": "{\"inputs\": [\"4\\n2 2\\nOO\\nOO\\n3 3\\nOOO\\nXOO\\nOOO\\n4 4\\nOOOX\\nXOOX\\nOOXO\\nOOOO\\n5 6\\nOOOOOO\\nOOOOOO\\nOOOOOO\\nOOOOOO\\nOOOOOO\\n\", \"1\\n3 19\\nOOOOOOOOOOOOOOOOOOO\\nOOOOOOOOOOOOOOOOOOO\\nOOOOOOOOOOOOOOOOOOO\\n\", \"1\\n19 20\\nOXOOOOOOOOOOOOOOOOOO\\nOOOOOOOOOOOOXOOOOOXO\\nOOOOOOO...
rating_>1900
{ "id": "1284_G. Seollal", "rating": 3300, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Dante is engaged in a fight with \"The Savior\". Bef...
code
{ "ground_truth": "{\"inputs\": [\"4 6 15\\n\", \"3 2 7\\n\", \"6 11 6\\n\", \"3 12 15\\n\", \"5 5 10\\n\", \"6 6 7\\n\", \"1 1 20\\n\", \"12 14 19\\n\", \"15 12 26\\n\", \"2 4 8\\n\", \"4 5 30\\n\", \"4 5 48\\n\", \"2 17 105\\n\", \"10 25 282\\n\", \"6 34 323\\n\", \"2 47 464\\n\", \"4 53 113\\n\", \"6 64 546\\n\", ...
EASY
{ "id": "taco-train-19195", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given a string s, consisting of lowercase La...
code
{ "ground_truth": "{\"inputs\": [\"6\\ncodeforces\\naezakmi\\nabacaba\\nconvexhull\\nswflldjgpaxs\\nmyneeocktxpqjpz\\n\", \"1\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
rating_>1900
{ "id": "1506_G. Maximize the Remaining String", "rating": 2000, "split": "confidence_train", "sub_source": "rating_>1900" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The whole world got obsessed with robots,and to keep...
code
{ "ground_truth": "{\"inputs\": [\"LLUUUR\", \"RRUULLDD\", \"L\", \"R\", \"R\", \"RR\", \"DL\", \"LD\", \"RUL\", \"ULD\", \"DDR\", \"RRDD\", \"RRLR\", \"RRDL\", \"LRUD\", \"RDRLL\", \"DRDRD\", \"ULURL\", \"LUUDU\", \"RDLUR\", \"DLDLDDRR\", \"RDRDDD\", \"UULLDLUR\", \"LULU\", \"LLDDLDLLDDDLLLDLLLLLUU\", \"LLDDLDLLDDDL...
rating_1201-1400
{ "id": "8B", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A hypergraph is a generalization of a graph, where a...
code
{ "ground_truth": "{\"inputs\": [[\"4\", \"3\", \"4\", \"5\", \"8\", \"\", \"\"]], \"outputs\": [[\"1\", \"6\", \"25\", \"93268\"]]}", "style": "rule" }
HARD
{ "id": "taco-train-21187", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Problem description\nYou will be given a zero-indexe...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2\\n3 2\\n3\\n10 5 2\", \"2\\n2\\n3 2\\n3\\n9 5 2\", \"2\\n2\\n3 3\\n3\\n9 5 2\", \"2\\n2\\n3 3\\n3\\n9 5 4\", \"2\\n2\\n2 3\\n3\\n9 5 4\", \"2\\n2\\n2 3\\n3\\n9 7 4\", \"2\\n2\\n5 2\\n3\\n10 5 2\", \"2\\n2\\n3 1\\n3\\n9 5 2\", \"2\\n2\\n0 3\\n3\\n9 5 4\", \"2\\n2\\n2 3\\n3\\n11...
none
{ "id": "anuund", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The weather in Takahashi's town changes day by day, ...
code
{ "ground_truth": "{\"inputs\": [\"Sunny\\n\", \"Rainy\\n\", \"Cloudy\\n\"], \"outputs\": [\"Cloudy\\n\", \"Sunny\\n\", \"Rainy\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-3398", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Once upon a time Petya and Gena gathered after anoth...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2 4 8\", \"4\\n1 -7 -2 3\", \"10\\n35 11 35 28 48 25 2 43 23 10\", \"100\\n437 89 481 95 29 326 10 304 97 414 52 46 106 181 385 173 337 148 437 133 52 136 86 250 289 61 480 314 166 69 275 486 117 129 353 412 382 469 290 479 388 231 7 462 247 432 488 146 466 422 369 336 148 460 4...
rating_>1900
{ "id": "731E", "rating": 2200, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Ehab loves number theory, but for some reason he hat...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3 3\\n1 2 3\\n3 4\\n1 2 3\\n2 2\\n0 6\\n\", \"5\\n1 3\\n9\\n1 4\\n7\\n1 1\\n0\\n5 10000\\n10000 5000 5000 10000 0\\n8 2\\n0 1 0 1 0 1 0 1\\n\", \"2\\n2\\n1 1\\n1\\n1\\n\", \"2\\n4\\n1 3 3 3\\n3\\n1 2 3\\n\", \"1\\n5\\n1 3 4 5 2\\n\", \"2\\n5\\n1 2 3 4 5\\n4\\n2 3 4 5\\n\", \"2\\...
EASY
{ "id": "taco-train-6319", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Once upon a time, high up on Mount Olympus, it came ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2020 2020 2020\\n\", \"2\\n1 9999999\\n\", \"4\\n1 42 4711 9876\\n\"], \"outputs\": [\"2021 2020 2020\\n\", \"impossible\\n\", \"1 42 4711 3876\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-1081", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given $n$ words. Some words may repeat. For ...
code
{ "ground_truth": "{\"inputs\": [\"4\\nbcdef\\nabcdefg\\nbcde\\nbcdef\\n\"], \"outputs\": [\"3\\n2 1 1\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-13247", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are N oases on a number line. The coordinate o...
code
{ "ground_truth": "{\"inputs\": [\"7 2\\n-10 -4 -2 0 2 4 10\", \"16 19\\n-49 -48 -33 -30 -21 -14 0 15 19 23 44 52 80 81 82 84\", \"3 2\\n1 3 6\", \"7 4\\n-10 -4 -2 0 2 4 10\", \"16 19\\n-49 -48 -33 -30 -21 -14 0 15 19 23 44 55 80 81 82 84\", \"3 2\\n1 3 2\", \"16 19\\n-49 -48 -24 -30 -21 -14 0 15 19 23 44 55 80 81 82...
none
{ "id": "p03771 AtCoder Grand Contest 012 - Camel and Oases", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A video game company called ICPC (International Comp...
code
{ "ground_truth": "{\"inputs\": [\"4 6\\n0 1 5\\n0 2 5\\n0 3 5\\n1 2 5\\n1 3 5\\n2 3 5\", \"2 1\\n0 1 10\", \"3 3\\n0 1 5\\n1 2 3\\n0 2 2\", \"3 3\\n0 1 5\\n1 2 3\\n1 2 2\", \"2 1\\n0 1 13\", \"3 3\\n0 1 5\\n1 2 2\\n0 2 2\", \"3 3\\n0 1 5\\n1 2 5\\n1 2 2\", \"3 3\\n0 1 5\\n1 2 6\\n0 2 2\", \"3 3\\n0 1 9\\n1 2 6\\n0 2...
none
{ "id": "p01347 How to Create a Good Game", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A permutation of length $k$ is a sequence of $k$ int...
code
{ "ground_truth": "{\"inputs\": [\"5\\n4 5 3 5\\n6 7 4 6\\n\", \"3\\n2 4\\n3 2\\n\", \"8\\n2 3 1 1 2 4 3\\n3 4 4 2 5 5 4\\n\", \"2\\n1\\n1000000000\\n\", \"10\\n1 1 1 3 2 1 1 2 1\\n3 2 3 3 3 2 3 3 3\\n\", \"10\\n1 1 4 2 2 1 7 6 7\\n8 9 7 4 6 3 8 7 9\\n\", \"20\\n2 3 2 6 1 1 2 5 2 3 3 1 2 2 3 2 6 1 3\\n2 7 3 6 5 7 3 5...
VERY_HARD
{ "id": "taco-train-22950", "rating": null, "split": "confidence_train", "sub_source": "VERY_HARD" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Your city has *n* junctions. There are *m* one-way r...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n3\\n1 2\\n2 3\\n3 2\", \"5\\n2 8 0 6 0\\n6\\n1 4\\n1 3\\n2 4\\n3 4\\n4 5\\n5 1\", \"10\\n1 3 2 2 1 3 1 4 10 10\\n12\\n1 2\\n2 3\\n3 1\\n3 4\\n4 5\\n5 6\\n5 7\\n6 4\\n7 3\\n8 9\\n9 10\\n10 9\", \"2\\n7 91\\n2\\n1 2\\n2 1\", \"10\\n1 1 1 1 1 1 1 2 2 2\\n15\\n2 3\\n2 4\\n4 ...
rating_1601-1900
{ "id": "427C", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given an integer N, the task is to find the number of...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\", \"N = 4\"], \"outputs\": [\"1\", \"2\"]}", "style": "rule" }
EASY
{ "id": "taco-train-16719", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Consider the following game for two players. There i...
code
{ "ground_truth": "{\"inputs\": [\"4\\n-2 -1\\n0 1\\n0 -3\\n2 -1\", \"4\\n-2 0\\n-1 1\\n0 -2\\n1 -1\", \"16\\n2 1\\n1 2\\n-1 1\\n0 1\\n0 0\\n1 1\\n2 -1\\n2 0\\n1 0\\n-1 -1\\n1 -1\\n2 2\\n0 -1\\n-1 0\\n0 2\\n-1 2\", \"1\\n1 2\", \"4\\n0 99999\\n-99999 0\\n99999 0\\n0 -99999\", \"10\\n-1 3\\n-1 7\\n-8 -4\\n5 14\\n-6 -7...
rating_>1900
{ "id": "930D", "rating": 2500, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "This problem is same as the previous one, but has la...
code
{ "ground_truth": "{\"inputs\": [\"13\\n1 1 1 2 2 2 3 3 3 4 4 4 5\\n\", \"5\\n10 100 20 200 1\\n\", \"1\\n100000\\n\", \"7\\n3 2 1 1 4 5 1\\n\", \"6\\n1 1 1 2 2 2\\n\", \"10\\n30518 96518 74071 59971 50121 4862 43967 73607 19138 90754\\n\", \"10\\n4131 4373 75721 60904 4027 25878 13621 3245 60722 8295\\n\", \"10\\n30...
MEDIUM_HARD
{ "id": "taco-train-5754", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "On a rod of length a+b+c, lengths a, b, c are measur...
code
{ "ground_truth": "{\"inputs\": [\"1\\n1 1 1\\n\\nSAMPLE\", \"7\\n6443 5331 1231\\n12 455 541\\n1100 599 10\\n1552 1479 742\\n1122 258 741\\n12 546 789\\n12 12 12\", \"2\\n100000 100000 100000\\n1 100000 111\", \"7\\n6443 5331 1915\\n12 455 541\\n1100 599 10\\n1552 1479 742\\n1122 258 741\\n12 546 789\\n12 12 12\", \...
none
{ "id": "coincide", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Training is indispensable for achieving good results...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2 3\\nRRGG\\nBRGG\\nBRRR\\nBRRR\", \"2\\n4 4\\n1 1\\nRRRR\\nRRGR\\nRBRR\\nRRRR\", \"1\\n2 3\\nRRGG\\nGGRB\\nBRRR\\nBRRR\", \"2\\n4 5\\n1 1\\nRRRR\\nRRGR\\nRBRR\\nRRRR\", \"2\\n4 5\\n2 1\\nRRRR\\nRRGR\\nRBRR\\nRRRR\", \"1\\n2 1\\nRRGG\\nGGRB\\nBRRR\\nBRRR\", \"1\\n2 1\\nGGRR\\nGG...
none
{ "id": "p01414 Rectangular Stamps", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A flowerbed has many flowers and two fountains.\n\nY...
code
{ "ground_truth": "{\"inputs\": [\"2 -1 0 5 3\\n0 2\\n5 2\\n\", \"4 0 0 5 0\\n9 4\\n8 3\\n-1 0\\n1 4\\n\", \"10 -68 10 87 22\\n30 89\\n82 -97\\n-52 25\\n76 -22\\n-20 95\\n21 25\\n2 -3\\n45 -7\\n-98 -56\\n-15 16\\n\", \"1 -10000000 -10000000 -10000000 -9999999\\n10000000 10000000\\n\", \"5 -6 -4 0 10\\n-7 6\\n-9 7\\n-...
rating_1401-1600
{ "id": "617_C. Watering Flowers", "rating": 1600, "split": "confidence_train", "sub_source": "rating_1401-1600" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A particular name-recording system is used by N empl...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3 3\\naaa\\nccc\\nddd\\n5 1\\na\\na\\nb\\nb\\na\\n\\nSAMPLE\", \"10\\n1 19\\nmvwabkokuwzqgzvscwv\\n10 10\\ncibcezzbig\\naaqwyzwtbx\\njvpbtbmfab\\nngvopgoyea\\nwtfcwzgesd\\nduvgdawcly\\nkevwzyjhvs\\nqubrrsftkf\\nhrgajwbzao\\nacrqkyfjgx\\n5 12\\nvyxabtzcvcin\\nofgsqdbaafgc\\ngbqae...
none
{ "id": "perfect-baseline", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "We have N sticks with negligible thickness.\nThe len...
code
{ "ground_truth": "{\"inputs\": [\"6\\n3 1 2 4 2 1\\n\", \"4\\n1 2 3 4\\n\", \"10\\n3 3 3 3 4 4 4 5 5 5\\n\", \"10\\n3 3 3 3 4 4 2 5 5 5\", \"6\\n3 1 2 4 2 2\", \"6\\n3 2 2 4 2 2\", \"6\\n3 2 2 4 3 2\", \"10\\n3 3 6 3 4 4 1 6 5 5\", \"10\\n3 3 6 3 4 3 1 6 5 6\", \"6\\n3 4 2 3 4 3\", \"10\\n3 3 6 6 4 3 1 6 3 6\", \"10...
EASY
{ "id": "taco-train-14904", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Micro is having a graph having N vertices numbered f...
code
{ "ground_truth": "{\"inputs\": [\"3 2\\n1 2\\n2 3\\n\\nSAMPLE\", \"5 10\\n3 2\\n1 1\\n5 1\\n5 3\\n4 2\\n3 4\\n5 3\\n2 1\\n3 1\\n4 5\"], \"outputs\": [\"2\", \"48\"]}", "style": "rule" }
none
{ "id": "micro-and-permutations", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "You are given two arrays A[] and B[], each of size N,...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\\nA[] = {1, 5, 7}\\nB[] = {2, 4, 8}\", \"N = 2\\nA[] = {1, 5}\\nB[] = {2, 4}\"], \"outputs\": [\"Yes\", \"Yes\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-16072", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given a word pat and a text txt. Return the count of ...
code
{ "ground_truth": "{\"inputs\": [\"txt = forxxorfxdofr\\npat = for\", \"txt = aabaabaa\\npat = aaba\"], \"outputs\": [\"3\", \"4\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-7919", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You can obtain profits from foreign exchange margin ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4\\n3\\n2\", \"6\\n5\\n3\\n1\\n3\\n4\\n3\", \"3\\n4\\n1\\n2\", \"6\\n5\\n3\\n0\\n3\\n4\\n3\", \"3\\n4\\n1\\n3\", \"6\\n5\\n3\\n0\\n2\\n0\\n3\", \"3\\n5\\n0\\n6\", \"3\\n5\\n0\\n10\", \"6\\n5\\n2\\n-1\\n4\\n1\\n3\", \"6\\n5\\n2\\n-1\\n7\\n1\\n3\", \"3\\n3\\n0\\n9\", \"6\\n5\\n2\\...
none
{ "id": "p02258 Maximum Profit", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "In this Kata, you will be given a string that may hav...
code
{ "ground_truth": "{\"fn_name\": \"solve\", \"inputs\": [[\"code\"], [\"CODe\"], [\"COde\"], [\"Code\"]], \"outputs\": [[\"code\"], [\"CODE\"], [\"code\"], [\"code\"]]}", "style": "rule" }
EASY
{ "id": "taco-train-8701", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Mahmoud has an array a consisting of n integers. He ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n2 3 5 4 13\\n\", \"3\\n10 3 7\\n\", \"5\\n7 10 2 5 5\\n\", \"7\\n20 9 7 6 7 9 15\\n\", \"10\\n5 3 2 2 3 3 3 4 2 5\\n\", \"3\\n3 18 2\\n\", \"3\\n3 18 2\\n\", \"7\\n20 9 7 6 7 9 15\\n\", \"5\\n7 10 2 5 5\\n\", \"10\\n5 3 2 2 3 3 3 4 2 5\\n\", \"3\\n4 18 2\\n\", \"7\\n20 9 14 6 7 ...
HARD
{ "id": "taco-train-23317", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problems statements in Mandarin Chinese and Rus...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3 0\\n50 2\\n40 2\\n30 3\\n3 1\\n30 3\\n40 2\\n50 2\", \"2\\n3 0\\n50 2\\n40 2\\n30 3\\n3 1\\n30 3\\n40 2\\n50 2\\n\", \"1\\n4 2\\n25 4\\n35 3\\n45 2\\n55 1\\n\", \"3\\n3 0\\n50 2\\n40 2\\n30 3\\n2 1\\n40 2\\n50 2\\n1 0\\n80 1\\n\", \"2\\n2 0\\n10 10\\n20 5\\n3 2\\n100 1\\n200 0...
VERY_HARD
{ "id": "taco-test-845", "rating": null, "split": "confidence_train", "sub_source": "VERY_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Let's suppose you have an array a, a stack s (initia...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n3 2 1\\n\", \"5 3\\n2 3 1\\n\", \"5 1\\n3\\n\", \"5 2\\n3 4\\n\", \"20 19\\n2 18 19 11 9 20 15 1 8 14 4 6 5 12 17 16 7 13 3\\n\", \"10 1\\n6\\n\", \"20 18\\n8 14 18 10 1 3 7 15 2 12 17 19 5 4 11 13 20 16\\n\", \"10 2\\n3 7\\n\", \"100000 3\\n43791 91790 34124\\n\", \"20 17\\n9...
HARD
{ "id": "taco-train-4690", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Vova is again playing some computer game, now an RPG...
code
{ "ground_truth": "{\"inputs\": [\"10 6 100\\n17 5\\n\", \"11 6 100\\n12 5\\n\", \"25 27 91\\n10 87\\n\", \"79 4 68\\n9 65\\n\", \"9 1 20\\n4 19\\n\", \"6 6 100\\n12 5\\n\", \"9 76 78\\n86 69\\n\", \"62 21 10\\n47 2\\n\", \"4 1 2\\n10 1\\n\", \"1 1 2\\n3 1\\n\", \"14 5 2\\n99 1\\n\", \"20 1 5\\n8 4\\n\", \"12 12 19\\...
EASY
{ "id": "taco-train-19942", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Nura wants to buy *k* gadgets. She has only *s* burl...
code
{ "ground_truth": "{\"inputs\": [\"5 4 2 2\\n1 2 3 2 1\\n3 2 1 2 3\\n1 1\\n2 1\\n1 2\\n2 2\", \"4 3 2 200\\n69 70 71 72\\n104 105 106 107\\n1 1\\n2 2\\n1 2\", \"4 3 1 1000000000\\n900000 910000 940000 990000\\n990000 999000 999900 999990\\n1 87654\\n2 76543\\n1 65432\", \"5 5 3 1000000\\n921 853 547 187 164\\n711 462...
rating_>1900
{ "id": "609D", "rating": 2000, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A new delivery of clothing has arrived today to the ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n5\\n6\\n3\\n1\\n2\\n\", \"12\\n11\\n13\\n20\\n4\\n6\\n\", \"17\\n14\\n5\\n21\\n15\\n17\\n\", \"43475\\n48103\\n50473\\n97918\\n991\\n974\\n\", \"35361\\n35182\\n68078\\n30077\\n870\\n907\\n\", \"84205\\n15736\\n30259\\n79331\\n647\\n378\\n\", \"220\\n623\\n94\\n463\\n28\\n656\\n...
EASY
{ "id": "taco-train-7794", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given two strings, $a$ and $\\boldsymbol{b}$, find a...
code
{ "ground_truth": "{\"inputs\": [\"aa\\nbaaa\\n\"], \"outputs\": [\"4\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-24605", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given coordinates of four points in a plane. Find if ...
code
{ "ground_truth": "{\"inputs\": [\"points=(0,0),(0,1),(1,0),(1,1)\", \"points=(0,0),(1,1),(1,0),(0,2)\"], \"outputs\": [\"1\", \"0\"]}", "style": "rule" }
EASY
{ "id": "taco-train-1003", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Cluster analysis - Unweighted pair-group average\n\nC...
code
{ "ground_truth": "{\"fn_name\": \"cluster\", \"inputs\": [[[[100, 100]], 1]], \"outputs\": [[[[[100, 100]]]]]}", "style": "rule" }
EASY
{ "id": "taco-train-4907", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given a non-empty string s consisting of low...
code
{ "ground_truth": "{\"inputs\": [\"codeforces\\n\", \"abacaba\\n\", \"babbbabaababbaa\\n\", \"bcbacaabcababaccccaaaabacbbcbbaa\\n\", \"cabaccaacccabaacdbdcbcdbccbccbabbdadbdcdcdbdbcdcdbdadcbcda\\n\", \"a\\n\", \"eeeedddccbceaabdaecaebaeaecccbdeeeaadcecdbeacecdcdcceabaadbcbbadcdaeddbcccaaeebccecaeeeaebcaaccbdaccbdcada...
EASY
{ "id": "taco-train-11692", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given a string s. Can you make it a palindrome by de...
code
{ "ground_truth": "{\"inputs\": [\"4\\naaa\\nabc\\nabdbca\\nabba\", \"4\\naaa\\nabc\\nabdbca\\nabca\", \"4\\naaa\\nabc\\nabdbc`\\naaca\", \"4\\naab\\nacc\\n`bd`cb\\naaad\", \"4\\nbaa\\nabc\\n`bd`bb\\naabd\", \"4\\nbab\\nabb\\nbb`db`\\naabd\", \"4\\nbaa\\n`aa\\nbb`c`b\\ndba`\", \"4\\nba`\\n`aa\\nbb`c_c\\ndba`\", \"4\\...
none
{ "id": "prpaln", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are *n* phone numbers in Polycarp's contacts o...
code
{ "ground_truth": "{\"inputs\": [\"3\\n123456789\\n100000000\\n100123456\", \"4\\n123456789\\n193456789\\n134567819\\n934567891\", \"1\\n167038488\", \"5\\n115830748\\n403459907\\n556271610\\n430358099\\n413961410\", \"5\\n139127034\\n452751056\\n193432721\\n894001929\\n426470953\", \"5\\n343216531\\n914073407\\n4202...
rating_1401-1600
{ "id": "858D", "rating": 1600, "split": "confidence_train", "sub_source": "rating_1401-1600" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Computer graphics uses polygon models as a way to re...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 3 2\\n1 2 4\\n1 4 3\\n2 3 4\", \"6\\n1 3 2\\n1 2 4\\n1 4 3\\n2 3 4\\n3 2 1\\n2 3 1\", \"4\\n1 3 2\\n1 2 4\\n1 4 3\\n0 3 4\", \"6\\n1 3 2\\n1 2 4\\n1 4 3\\n0 3 4\\n3 2 1\\n2 3 1\", \"6\\n1 3 1\\n1 2 4\\n1 4 3\\n0 3 4\\n3 2 1\\n2 3 1\", \"4\\n1 3 2\\n1 2 4\\n1 4 0\\n0 3 4\", \"4...
none
{ "id": "p00334 Geometric Data", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Ever wonder what will happen when you meet a person ...
code
{ "ground_truth": "{\"inputs\": [\"4444\\n\", \"20\\n\", \"3211\\n\", \"7654321001234567\\n\"], \"outputs\": [\"924\\n\", \"10\\n\", \"689\\n\", \"FAC688053977\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-13100", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In the country there are n cities and m bidirectiona...
code
{ "ground_truth": "{\"inputs\": [\"4 4\\n1 2 6 3\\n3 5 3 1\\n1 2\\n2 3\\n3 4\\n4 2\\n\", \"2 0\\n1 2\\n2 1\\n\", \"10 20\\n22 3 4 48 12 12 14 37 15 37\\n57 29 35 88 6 54 100 32 91 59\\n10 1\\n4 3\\n4 7\\n2 4\\n7 6\\n1 3\\n2 5\\n5 10\\n1 6\\n4 9\\n6 10\\n8 5\\n3 6\\n6 5\\n8 9\\n3 10\\n2 6\\n9 10\\n8 4\\n8 10\\n\", \"1...
HARD
{ "id": "taco-test-785", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "The new \"Avengers\" movie has just been released! Th...
code
{ "ground_truth": "{\"fn_name\": \"tickets\", \"inputs\": [[[25, 25, 50]], [[25, 25, 50, 100]], [[25, 100]], [[25, 25, 25, 25, 25, 25, 25, 25, 25, 25]], [[50, 50, 50, 50, 50, 50, 50, 50, 50, 50]], [[100, 100, 100, 100, 100, 100, 100, 100, 100, 100]], [[25, 25, 25, 25, 50, 100, 50]], [[50, 100, 100]], [[25, 25, 100]],...
EASY
{ "id": "taco-train-12323", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Let's call an undirected graph of *n* vertices *p*-i...
code
{ "ground_truth": "{\"inputs\": [\"1\\n6 0\", \"1\\n5 0\", \"5\\n6 0\\n5 0\\n7 0\\n8 0\\n9 0\", \"5\\n6 1\\n5 0\\n7 1\\n8 1\\n9 1\", \"5\\n24 0\\n23 0\\n22 0\\n21 0\\n24 1\", \"5\\n24 1\\n23 1\\n22 1\\n21 1\\n20 1\", \"5\\n20 0\\n19 0\\n18 0\\n17 0\\n16 0\", \"5\\n15 0\\n14 0\\n13 0\\n12 0\\n11 0\", \"5\\n10 0\\n20 0...
rating_1401-1600
{ "id": "402C", "rating": 1500, "split": "confidence_train", "sub_source": "rating_1401-1600" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In a small but very proud high school it was decided...
code
{ "ground_truth": "{\"inputs\": [\"1 3 2 1 2 1\", \"1 1 1 1 1 99\", \"1000 1000 1000 1000 1000 1000\", \"0 0 0 0 0 0\", \"633 609 369 704 573 416\", \"353 313 327 470 597 31\", \"835 638 673 624 232 266\", \"936 342 19 398 247 874\", \"417 666 978 553 271 488\", \"71 66 124 199 67 147\", \"54 26 0 171 239 12\", \"72 ...
rating_<=1200
{ "id": "886A", "rating": 1000, "split": "confidence_train", "sub_source": "rating_<=1200" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There is an infinitely long street that runs west to...
code
{ "ground_truth": "{\"inputs\": [\"4 6\\n1 3 2\\n7 13 10\\n18 20 13\\n3 4 2\\n0\\n1\\n2\\n3\\n5\\n8\\n\", \"4 6\\n1 3 2\\n7 13 1\\n18 20 13\\n3 4 2\\n0\\n1\\n2\\n3\\n5\\n8\", \"4 6\\n1 4 2\\n8 13 1\\n18 20 12\\n3 4 2\\n0\\n1\\n2\\n3\\n5\\n8\", \"4 5\\n1 4 2\\n8 13 1\\n18 20 12\\n3 4 2\\n0\\n1\\n2\\n3\\n5\\n8\", \"4 5...
MEDIUM
{ "id": "taco-train-15592", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Sengoku still remembers the mysterious \"colourful m...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 2 3 4 3\\n1 2 5 4 5\", \"5\\n4 4 2 3 1\\n5 4 5 3 1\", \"4\\n1 1 3 4\\n1 4 3 4\", \"10\\n1 2 3 4 7 6 7 8 9 10\\n1 2 3 4 5 6 5 8 9 10\", \"10\\n1 2 3 4 5 6 7 8 7 10\\n1 2 3 4 5 6 7 8 9 9\", \"10\\n1 2 3 4 5 6 7 8 4 10\\n1 2 3 4 5 6 7 6 9 10\", \"10\\n8 6 1 7 9 3 5 2 10 9\\n8 6 1...
rating_1201-1400
{ "id": "814B", "rating": 1300, "split": "confidence_train", "sub_source": "rating_1201-1400" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In a medieval kingdom, the economic crisis is raging...
code
{ "ground_truth": "{\"inputs\": [\"2 3\\n1 2 5\\n1 2 1\\n2 1 10\", \"3 2\\n1 2 10\\n3 2 20\", \"2 2\\n1 2 1\\n1 2 2\", \"3 3\\n1 3 4\\n1 3 2\\n1 3 8\", \"2 1\\n1 2 6\", \"4 3\\n1 2 1\\n2 3 2\\n3 4 1\", \"4 2\\n1 2 4\\n1 2 5\", \"4 2\\n1 2 3\\n1 3 4\", \"4 4\\n1 2 6971\\n1 2 4379\\n3 4 1092\\n3 2 9449\", \"7 6\\n3 5 4...
rating_>1900
{ "id": "875F", "rating": 2500, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Omkar is building a house. He wants to decide how to...
code
{ "ground_truth": "{\"inputs\": [\"4 5\\n2\\n1 2\\n3 5\\n2\\n1 3\\n4 5\\n3\\n1 1\\n2 4\\n5 5\\n3\\n1 1\\n2 2\\n3 5\\n\", \"3 3\\n3\\n1 1\\n2 2\\n3 3\\n3\\n1 1\\n2 2\\n3 3\\n3\\n1 1\\n2 2\\n3 3\\n\", \"5 5\\n1\\n1 5\\n1\\n1 5\\n1\\n1 5\\n1\\n1 5\\n1\\n1 5\\n\", \"5 5\\n1\\n1 5\\n2\\n1 4\\n5 5\\n2\\n1 3\\n4 5\\n3\\n1 1...
VERY_HARD
{ "id": "taco-test-50", "rating": null, "split": "confidence_train", "sub_source": "VERY_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Saksham is fond of perfection in everything. He is a...
code
{ "ground_truth": "{\"inputs\": [\"2\\n5 3\\n10 -3\\n8 1\\n\\nSAMPLE\", \"1000\\n60065146 80268\\n22709169 71940\\n25432977 16093\\n77193281 -60750\\n90748118 -7517\\n66724224 81335\\n49810208 73886\\n31769796 -48214\\n87587072 5767\\n72421175 -93960\\n93233003 -59105\\n17256872 -68273\\n2560514 1250\\n23976371 10882...
none
{ "id": "saksham-and-fifa", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "It was a dark and stormy night that ripped the roof ...
code
{ "ground_truth": "{\"inputs\": [\"4 50 18\\n3\\n4\\n6\\n8\\n14\\n15\\n16\\n17\\n21\\n25\\n26\\n27\\n30\\n31\\n40\\n41\\n42\\n43\", \"50 200 10\\n18\\n69\\n195\\n38\\n73\\n28\\n6\\n172\\n53\\n99\", \"2 10 4\\n2\\n4\\n6\\n8\", \"1 200 8\\n101\\n105\\n102\\n106\\n103\\n107\\n104\\n99\", \"1 200 2\\n1\\n200\", \"3 27 16...
UNKNOWN_DIFFICULTY
{ "id": "taco-train-12254", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Little Petya likes trees a lot. Recently his mother ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 3\\n2 3\\n4 3\\n5 1\\n6 2\\n\", \"4\\n1 2\\n2 3\\n3 4\\n4 5\\n5 6\\n6 7\\n7 8\\n\", \"2\\n1 2\\n3 2\\n4 2\\n\", \"30\\n35 2\\n55 18\\n31 8\\n2 3\\n24 4\\n50 38\\n25 12\\n45 52\\n22 46\\n57 42\\n58 14\\n34 43\\n44 23\\n7 13\\n47 36\\n9 5\\n33 60\\n54 39\\n27 41\\n57 40\\n53 56\...
rating_>1900
{ "id": "251_E. Tree and Table", "rating": 3000, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A bracket sequence S is called *dense* if one of the...
code
{ "ground_truth": "{\"inputs\": [\"4\\n8\\n()(())()\\n6\\n((()))\\n10\\n()()()()()\\n8\\n((()))()\\n\"], \"outputs\": [\"2\\n0\\n4\\n2\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-17389", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Fifa and Fafa are sharing a flat. Fifa loves video g...
code
{ "ground_truth": "{\"inputs\": [\"5 3 3 1 1\\n\", \"10 5 5 5 15\\n\", \"5 0 0 0 7\\n\", \"10 0 0 0 0\\n\", \"100000 100000 100000 10000 10000\\n\", \"100000 -100000 100000 -10000 100000\\n\", \"1 0 0 0 -1\\n\", \"100000 83094 84316 63590 53480\\n\", \"1 0 0 0 0\\n\", \"1 0 0 -2 -2\\n\", \"10 0 0 4 0\\n\", \"82 1928 ...
MEDIUM_HARD
{ "id": "taco-train-22627", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Write a function which converts the input string to u...
code
{ "ground_truth": "{\"fn_name\": \"make_upper_case\", \"inputs\": [[\"hello\"], [\"hello world\"], [\"hello world !\"], [\"heLlO wORLd !\"], [\"1,2,3 hello world!\"]], \"outputs\": [[\"HELLO\"], [\"HELLO WORLD\"], [\"HELLO WORLD !\"], [\"HELLO WORLD !\"], [\"1,2,3 HELLO WORLD!\"]]}", "style": "rule" }
EASY
{ "id": "taco-train-5800", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given an array A containing N integers. A [s...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2\\n1 1\\n2\\n1 2\\n\"], \"outputs\": [\"2\\n3\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-11466", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The only difference between easy and hard versions i...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3\\n1 5\\n2 10\\n2 8\\n7\\n0 1\\n3 1\\n1 1\\n6 1\\n1 1\\n4 1\\n4 1\\n6\\n2 6\\n2 3\\n2 8\\n2 7\\n4 4\\n5 5\\n\", \"3\\n3\\n1 5\\n2 10\\n2 8\\n7\\n0 1\\n3 1\\n1 1\\n6 0\\n1 1\\n4 1\\n4 1\\n6\\n2 6\\n2 3\\n2 8\\n2 7\\n4 4\\n5 5\\n\", \"3\\n3\\n1 5\\n1 10\\n2 8\\n7\\n0 1\\n3 1\\n1 ...
rating_>1900
{ "id": "1251_E2. Voting (Hard Version)", "rating": 2400, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Problem I: Custom paint craftsman\n\nslip likes a vi...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3\\n17 12 7 340 180\\n26 22 10 150 270\\n27 13 5 100 230\\n3\\n0 0 8 0 90\\n10 10 8 180 0\\n50 50 5 180 270\\n2\\n10 10 5 0 270\\n0 0 30 0 90\", \"3\\n3\\n17 12 7 340 180\\n26 22 10 150 270\\n27 13 5 100 230\\n3\\n0 0 8 0 90\\n10 10 8 180 -1\\n50 50 5 180 270\\n2\\n10 10 5 0 270...
none
{ "id": "p01406 Custom Painting Master", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given a permutation $p$ of integers from $0$...
code
{ "ground_truth": "{\"inputs\": [\"4\\n4\\n0 1 3 2\\n2\\n1 0\\n7\\n0 1 2 3 5 6 4\\n5\\n0 3 2 1 4\\n\"], \"outputs\": [\"2\\n0\\n4\\n1\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-5929", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Takahashi is hosting an sports meet. There are N peo...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n2 1 3\\n2 1 3\\n2 1 3\", \"4 5\\n5 1 3 4 2\\n2 5 3 1 4\\n2 3 1 4 5\\n2 5 4 3 1\", \"2 5\\n5 1 3 4 2\\n2 5 3 1 4\\n2 3 1 4 5\\n2 5 4 3 1\", \"2 3\\n2 1 3\\n2 1 3\\n2 1 3\", \"2 5\\n5 1 3 4 2\\n2 5 3 1 4\\n2 3 1 6 5\\n2 5 4 3 1\", \"2 5\\n5 1 3 4 2\\n2 5 3 1 4\\n2 3 1 6 7\\n2 5 ...
none
{ "id": "p03652 AtCoder Grand Contest 018 - Sports Festival", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The Physical education teacher at SESC is a sort of ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n-3 -4 -2 -3 3\", \"5\\n2 -3 -1 -4 3\", \"6\\n94 65 -33 -43 60 -24\", \"3\\n-10000 10000 -10000\", \"2\\n0 0\", \"7\\n-1 -2 -4 -10 6 6 5\", \"10\\n-10 3 -16 -15 14 -16 13 -6 -8 18\", \"50\\n-67 -84 -89 80 40 42 -38 30 74 -12 -66 27 1 11 -45 -44 2 -70 -59 -70 -59 -59 62 100 -5 1 9...
none
{ "id": "394D", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Vasya the Great Magician and Conjurer loves all kind...
code
{ "ground_truth": "{\"inputs\": [\"3 3 2\\n\", \"5 -4 4\\n\", \"5 -4 3\\n\", \"100 -1000 100\\n\", \"20 97 13\\n\", \"100 1000 3\\n\", \"100 -1000 100\\n\", \"50 231 39\\n\", \"60 -728 29\\n\", \"5 2 2\\n\", \"2 1 1\\n\", \"100 -1000 1\\n\", \"100 1000 100\\n\", \"100 -1000 3\\n\", \"100 -10000 100\\n\", \"70 2335 10...
rating_1401-1600
{ "id": "231_B. Magic, Wizardry and Wonders", "rating": 1500, "split": "confidence_train", "sub_source": "rating_1401-1600" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given n arrays that can have different sizes...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n3 2 4 8\\n2 2 5\\n2 6 3\\n\", \"2 2\\n2 7 8\\n1 -8\\n\", \"3 3\\n3 2 4 8\\n2 2 5\\n2 10 3\\n\", \"3 3\\n3 2 4 8\\n2 2 5\\n2 10 2\\n\", \"2 2\\n2 7 2\\n1 -8\\n\", \"3 5\\n3 2 4 8\\n2 2 5\\n2 10 3\\n\", \"3 4\\n3 2 4 8\\n2 2 5\\n2 6 3\\n\", \"3 3\\n3 2 4 8\\n2 2 5\\n2 20 3\\n\",...
rating_>1900
{ "id": "1208_E. Let Them Slide", "rating": 2200, "split": "confidence_train", "sub_source": "rating_>1900" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are going to the beach with the idea to build th...
code
{ "ground_truth": "{\"inputs\": [\"5 2\", \"6 8\", \"20 4\", \"1000000000000000000 1000000000000000000\", \"1 1\", \"1 1000000000000000000\", \"1000000000000000000 1\", \"1036191544337895 45523434\", \"1036191544337896 45523434\", \"1036191544337895 45523433\", \"1036191544337895 1\", \"1036191544337895 1000000000000...
rating_>1900
{ "id": "985D", "rating": 2100, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Gerald found a table consisting of n rows and m colu...
code
{ "ground_truth": "{\"inputs\": [\"2 2\\n1 2\\n3 4\\n\", \"3 3\\n1 0 0\\n0 1 1\\n1 0 0\\n\", \"2 2\\n1000000000 1000000000\\n1000000000 1000000000\\n\", \"2 2\\n0 0\\n0 0\\n\", \"4 4\\n1 0 1 0\\n0 1 0 1\\n1 0 0 1\\n0 1 1 0\\n\", \"10 2\\n1 20\\n19 2\\n3 18\\n17 4\\n5 16\\n15 6\\n7 14\\n13 8\\n9 12\\n11 10\\n\", \"2 5...
rating_>1900
{ "id": "333_D. Characteristics of Rectangles", "rating": 2100, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "This is the time of Akbar and Birbal. One day , in t...
code
{ "ground_truth": "{\"inputs\": [\"100\\n1804246908\\n846901785\\n1681651770\\n1714595508\\n1957703548\\n424217739\\n719858557\\n1649719876\\n596492227\\n1189606931\\n1025170345\\n1350453279\\n783340703\\n1102486856\\n2044852544\\n1967469571\\n1365143593\\n1540344180\\n304071735\\n1303419634\\n34999296\\n521572531\\n...
none
{ "id": "akbar-and-birbal-1", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Vasya collects coins: he has exactly one coin for ev...
code
{ "ground_truth": "{\"inputs\": [\"8\\n1 6 5 4 3 2 7 8\", \"4\\n2 3 4 1\", \"4\\n1 2 3 4\", \"8\\n1 3 2 4 6 5 7 8\", \"8\\n1 3 4 2 6 5 7 8\", \"1\\n1\", \"2\\n1 2\", \"2\\n2 1\", \"149\\n9 120 122 97 93 70 85 56 102 16 103 112 88 84 118 135 113 62 65 19 89 15 108 73 82 21 147 27 115 130 136 6 1 90 29 94 149 17 53 132...
rating_1201-1400
{ "id": "56B", "rating": 1300, "split": "confidence_train", "sub_source": "rating_1201-1400" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Squirrel Liss lived in a forest peacefully, but unex...
code
{ "ground_truth": "{\"inputs\": [\"llrlr\\n\", \"rrlll\\n\", \"lrlrr\\n\", \"lllrlrllrl\\n\", \"llrlrrrlrr\\n\", \"rlrrrllrrr\\n\", \"lrrlrrllrrrrllllllrr\\n\", \"rlrrrlrrrllrrllrlrll\\n\", \"lllrrlrlrllrrrrrllrl\\n\", \"rrrllrrrlllrlllrlrrr\\n\", \"rrlllrrrlrrlrrrlllrlrlrrrlllrllrrllrllrrlrlrrllllrlrrrrlrlllrlrrrlrl...
EASY
{ "id": "taco-train-22580", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "George decided to prepare a Codesecrof round, so he ...
code
{ "ground_truth": "{\"inputs\": [\"3 5\\n1 2 3\\n1 1 1 1 1\\n\", \"3 1\\n2 3 4\\n1\\n\", \"3 5\\n1 2 3\\n1 2 2 3 3\\n\", \"29 100\\n20 32 41 67 72 155 331 382 399 412 465 470 484 511 515 529 616 637 679 715 733 763 826 843 862 903 925 979 989\\n15 15 15 17 18 19 19 20 21 21 22 24 25 26 26 27 28 31 32 32 37 38 38 39 3...
rating_<=1200
{ "id": "387_B. George and Round", "rating": 1200, "split": "confidence_train", "sub_source": "rating_<=1200" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The only difference between easy and hard versions i...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n1 2 2 4 5\\n\", \"5 3\\n1 2 3 4 5\\n\", \"5 3\\n1 2 3 3 3\\n\", \"1 1\\n1337\\n\", \"50 2\\n72548 51391 1788 171949 148789 151619 19225 8774 52484 74830 20086 51129 151145 87650 108005 112019 126739 124087 158096 59027 34500 87415 115058 194160 171792 136832 1114 112592 171746...
MEDIUM_HARD
{ "id": "taco-train-23266", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are participating in Yet Another Tournament. The...
code
{ "ground_truth": "{\"inputs\": [\"5\\n4 401\\n100 100 200 1\\n3 2\\n1 2 3\\n5 0\\n1 1 1 1 1\\n4 0\\n0 1 1 1\\n4 4\\n1 2 2 1\\n\"], \"outputs\": [\"1\\n2\\n6\\n4\\n1\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-15642", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given a multiset $S$ initially consisting of...
code
{ "ground_truth": "{\"inputs\": [\"5\\n4 1\\n0 1 3 4\\n3 1\\n0 1 4\\n3 0\\n0 1 4\\n3 2\\n0 1 2\\n3 2\\n1 2 3\\n\", \"7\\n5 1000000000\\n4 2 3 0 1\\n4 0\\n5 2 0 1\\n3 0\\n100 0 1\\n6 1234567\\n1 2 3 4 5 0\\n3 114514\\n8 0 4\\n1 1000000\\n0\\n1 10000000\\n1\\n\", \"1\\n1 0\\n0\\n\", \"1\\n6 2\\n0 1 2 3 6 8\\n\", \"1\\n...
EASY
{ "id": "taco-train-13991", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Takahashi loves gold coins. He gains 1000 happiness ...
code
{ "ground_truth": "{\"inputs\": [\"0\", \"1000000000\", \"1024\", \"1\", \"1000000001\", \"656\", \"-1\", \"506\", \"685\", \"925\", \"-8\", \"989\", \"-11\", \"1802\", \"2972\", \"2636\", \"1385\", \"1233\", \"865\", \"-20\", \"1608\", \"2611\", \"743\", \"1352\", \"1311\", \"42\", \"8\", \"15\", \"14\", \"-37\", \"...
none
{ "id": "p02724 AtCoder Beginner Contest 160 - Golden Coins", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Every non-negative integer N has a binary representat...
code
{ "ground_truth": "{\"fn_name\": \"bitwiseComplement\", \"inputs\": [[5]], \"outputs\": [2]}", "style": "rule" }
EASY
{ "id": "taco-train-258", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "You are given a number N. Your task is to determine i...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\", \"N = 4\"], \"outputs\": [\"0\", \"1\"]}", "style": "rule" }
EASY
{ "id": "taco-train-13678", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given two integers A and B, find the count of intege...
code
{ "ground_truth": "{\"inputs\": [\"6 15 1 10\\n\", \"235714494 193478285 2 100000000000\\n\"], \"outputs\": [\"6\\n\", \"65435081000\\n\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-3085", "rating": null, "split": "confidence_train", "sub_source": "VERY_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problems statements [Hindi] ,[Bengali] , [Manda...
code
{ "ground_truth": "{\"inputs\": [\"1\\n5\\n2 4 8 1 3\"], \"outputs\": [\"3\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-1286", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "For the purposes of this problem, we will assume tha...
code
{ "ground_truth": "{\"inputs\": [\"11 \\n13 \\n59 \\n60 \\n1999999998 \\n#\"], \"outputs\": [\"10 \\n11 \\n34 \\nImpossible! \\n234567900\"]}", "style": "rule" }
none
{ "id": "csea2", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problems statements in Mandarin Chinese, Russia...
code
{ "ground_truth": "{\"inputs\": [\"2\\n4\\n3 2 2 3 \\n2\\n1 5\"], \"outputs\": [\"YES\\nNO\"]}", "style": "rule" }
EASY
{ "id": "taco-train-13334", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Tomya is a girl. She loves Chef Ciel very much.\n\nT...
code
{ "ground_truth": "{\"inputs\": [[\"4\", \"10\", \"256\", \"255\", \"4096\"], \"4\\n10\\n376\\n255\\n4096\", \"4\\n10\\n376\\n255\\n3088\", \"4\\n11\\n376\\n255\\n3088\", \"4\\n11\\n376\\n255\\n4598\", \"4\\n11\\n73\\n255\\n4598\", \"4\\n11\\n73\\n255\\n2919\", \"4\\n8\\n73\\n255\\n2919\", \"4\\n8\\n73\\n94\\n2919\",...
EASY
{ "id": "taco-train-1471", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given an array A[] of size N. Find the number of pair...
code
{ "ground_truth": "{\"fn_name\": \"calculate\", \"inputs\": [\"arr[ ] = {1, 3, 4, 1, 4}\", \"arr[ ] = {2, 2, 2}\"], \"outputs\": [\"2\", \"\"]}", "style": "rule" }
EASY
{ "id": "taco-train-15266", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "We have a set of consecutive numbers from ```1``` to ...
code
{ "ground_truth": "{\"fn_name\": \"f\", \"inputs\": [[5], [3], [2], [20]], \"outputs\": [[12], [4], [2], [17710]]}", "style": "rule" }
EASY
{ "id": "taco-train-8651", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A serious incident happened at Taro's house, which l...
code
{ "ground_truth": "{\"inputs\": [\"6\\n7\\n5 2\\n1 4\\n3 5\\n4 2\\n1 6\\n6 4\\n3 4\", \"6\\n7\\n5 2\\n1 4\\n3 5\\n8 2\\n1 6\\n6 4\\n3 4\", \"6\\n7\\n7 2\\n1 4\\n3 5\\n8 2\\n1 6\\n6 4\\n2 4\", \"6\\n7\\n3 2\\n1 4\\n6 5\\n3 2\\n1 6\\n6 4\\n3 4\", \"6\\n7\\n5 2\\n1 4\\n3 5\\n8 2\\n2 6\\n6 4\\n3 4\", \"6\\n7\\n3 2\\n1 4\...
none
{ "id": "p00119 Taro's Obsession", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Chef has three numbers A, B, and C.\n\nHe can do the...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 1 2\\n3 7 3\\n4 4 4\\n1 2 3\\n\"], \"outputs\": [\"-1\\n2\\n0\\n-1\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-10869", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are N balls in a row. Initially, the i-th ball...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n1 1 3 4 5\\n1 2\\n2 5\\n5 4\", \"4 4\\n4 4 4 4\\n4 1\\n3 1\\n1 1\\n2 1\", \"10 10\\n8 7 2 9 10 6 6 5 5 4\\n8 1\\n6 3\\n6 2\\n7 10\\n9 7\\n9 9\\n2 4\\n8 1\\n1 8\\n7 7\", \"5 3\\n1 1 5 4 5\\n1 2\\n2 5\\n5 4\", \"10 10\\n8 7 2 9 10 6 6 5 5 4\\n8 1\\n6 3\\n6 2\\n7 10\\n9 7\\n9 9\\...
none
{ "id": "p03667 AtCoder Grand Contest 017 - Snuke and Spells", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Attention: we lost all the test cases for this probl...
code
{ "ground_truth": "{\"inputs\": [\"3\\n\", \"314\\n\", \"18\\n\", \"20\\n\", \"100000\\n\", \"99990\\n\", \"6\\n\", \"17\\n\", \"4\\n\", \"5\\n\", \"10\\n\", \"99971\\n\", \"4063\\n\", \"13\\n\", \"1\\n\", \"9\\n\", \"14\\n\", \"65535\\n\", \"1023\\n\", \"8\\n\", \"11\\n\", \"239\\n\", \"15\\n\", \"16\\n\", \"12\\n\"...
rating_1201-1400
{ "id": "867_B. Save the problem!", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Chef has a string $S$ consisting of lowercase Englis...
code
{ "ground_truth": "{\"inputs\": [\"4\\na\\nab\\nabcd\\naaaaa\"], \"outputs\": [\"YES\\nYES\\nNO\\nYES\"]}", "style": "rule" }
EASY
{ "id": "taco-train-12605", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Little Artem likes electronics. He can spend lots of...
code
{ "ground_truth": "{\"inputs\": [\"2 2 6\\n2 1\\n2 2\\n3 1 1 1\\n3 2 2 2\\n3 1 2 8\\n3 2 1 8\\n\", \"3 3 2\\n1 2\\n3 2 2 5\\n\", \"4 2 5\\n2 1\\n3 1 1 5\\n3 2 1 6\\n3 3 1 7\\n3 4 1 9\\n\", \"1 1 3\\n1 1\\n2 1\\n3 1 1 -1000000000\\n\", \"1 4 5\\n1 1\\n3 1 1 1\\n3 1 2 2\\n3 1 3 3\\n3 1 4 4\\n\", \"5 5 1\\n1 5\\n\", \"1...
rating_1201-1400
{ "id": "641_B. Little Artem and Matrix", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }