data_source
stringclasses
3 values
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
sub_source
stringclasses
12 values
extra_info
dict
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 two arrays each with N elements. Eleme...
code
{ "ground_truth": "{\"inputs\": [\"1 1 1\\n3\\n\\nSAMPLE\", \"6 6 9\\n10\", \"107370538 22744861 967187340\\n10000000\"], \"outputs\": [\"4\", \"22410\\n\", \"228\"]}", "style": "rule" }
none
{ "id": "two-arrays-and-minimum", "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": "Lavrenty, a baker, is going to make several buns wit...
code
{ "ground_truth": "{\"inputs\": [\"100 1 25 50\\n15 5 20 10\\n\", \"10 2 2 1\\n7 3 2 100\\n12 3 1 10\\n\", \"2 1 2 1\\n1 2 1 1\\n\", \"100 5 8 80\\n25 8 2 70\\n27 6 7 30\\n26 1 6 5\\n7 1 1 86\\n18 8 4 54\\n\", \"1000 3 67 88\\n90 86 66 17\\n97 38 63 17\\n55 78 39 51\\n\", \"1000 10 1 87\\n100 1 1 38\\n100 1 1 45\\n10...
rating_1601-1900
{ "id": "106_C. Buns", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-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": "Salve, mi amice.\n\nEt tu quidem de lapis philosopho...
code
{ "ground_truth": "{\"inputs\": [\"2 4 6 8 10\\n\", \"18 13 91 64 22\\n\", \"31 38 47 26 13\\n\", \"65 46 3 77 81\\n\", \"94 21 36 89 20\\n\", \"12 39 3 50 84\\n\", \"75 82 48 95 12\\n\", \"46 68 3 0 51\\n\", \"1 1 2 6 4\\n\", \"50 27 17 31 89\\n\", \"42 9 59 19 24\\n\", \"74 21 36 68 80\\n\", \"50 87 29 81 21\\n\", ...
rating_1601-1900
{ "id": "409_C. Magnum Opus", "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": "# Task\n\nIn the city, a bus named Fibonacci runs on ...
code
{ "ground_truth": "{\"fn_name\": \"calc\", \"inputs\": [[5, 7, 32, 4], [12, 23, 212532, 8]], \"outputs\": [[13], [252]]}", "style": "rule" }
EASY
{ "id": "taco-train-14436", "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": "The new semester at Hogwarts has just started, but s...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n0 1\\n0 3\\n1 2\\n2 4\\n0 2\\n0 4\\n2 3\\n2 4\\n\", \"3 3\\n0 1\\n0 2\\n1 2\\n0 1\\n1 2\\n0 2\\n\"], \"outputs\": [\"2\\nR 0\\nG 2\\n\", \"0\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-11186", "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": "This is an interactive problem.\n\nVasya and Vitya p...
code
{ "ground_truth": "{\"inputs\": [\"5\\n3\\n3\\n2\\n1\\n0\", \"1000000000000000000\\n1 1\\n1\\n1 1 2 3 3\\n\", \"1000000000000000000\\n1 1\\n1\\n1 1 1 1 2\\n\", \"1000000000000000000\\n123123123123123123 789789789789789789\\n1\\n1 1 2 1 2\\n\", \"1000000000000000000\\n123123123123123123 789789789789789789\\n1\\n1 1 1 ...
rating_>1900
{ "id": "1007_C. Guess two numbers", "rating": 3000, "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": "Given are integers L and R. Find the number, modulo ...
code
{ "ground_truth": "{\"inputs\": [\"2 3\", \"10 100\", \"1 1000000000000000000\", \"3 3\", \"10 110\", \"1 1000000100000000000\", \"3 0\", \"10 111\", \"4 110\", \"4 100\", \"6 110\", \"6 111\", \"5 111\", \"9 111\", \"16 111\", \"1 011\", \"3 100\", \"6 100\", \"2 5\", \"15 100\", \"1 1000000000010000000\", \"3 4\", ...
none
{ "id": "p02938 AtCoder Beginner Contest 138 - Coincidence", "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": "The cows have just learned what a primitive root is!...
code
{ "ground_truth": "{\"inputs\": [\"5\\n\", \"3\\n\", \"19\\n\", \"1097\\n\", \"1987\\n\", \"821\\n\", \"1297\\n\", \"2\\n\", \"1583\\n\", \"1597\\n\", \"1949\\n\", \"317\\n\", \"1999\\n\", \"431\\n\", \"953\\n\", \"31\\n\", \"29\\n\", \"211\\n\", \"1277\\n\", \"101\\n\", \"751\\n\", \"11\\n\", \"607\\n\", \"509\\n\",...
rating_1201-1400
{ "id": "284_A. Cows and Primitive Roots", "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": "Once again Tavas started eating coffee mix without w...
code
{ "ground_truth": "{\"inputs\": [\"4\\n\", \"7\\n\", \"77\\n\", \"4\\n\", \"474744\\n\", \"777774\\n\", \"447\\n\", \"774\\n\", \"4\\n\", \"4447747\\n\", \"7747474\\n\", \"4444\\n\", \"4447\\n\", \"7\\n\", \"4\\n\", \"4447744\\n\", \"77474\\n\", \"7747\\n\", \"444\\n\", \"7\\n\", \"7774477\\n\", \"4477774\\n\", \"744...
EASY
{ "id": "taco-train-15012", "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": "The only difference between easy and hard versions a...
code
{ "ground_truth": "{\"inputs\": [\"7 2\\n1 2 3 2 1 3 2\\n\", \"10 4\\n2 3 3 1 1 2 1 2 3 3\\n\", \"1 4\\n1\\n\", \"7 2\\n1 2 3 2 1 6 2\\n\", \"1 8\\n1\\n\", \"10 4\\n2 3 3 1 1 4 1 2 3 3\\n\", \"7 2\\n1 2 3 2 1 8 2\\n\", \"7 4\\n1 2 3 2 2 8 2\\n\", \"7 4\\n1 2 1 2 2 8 2\\n\", \"7 4\\n1 4 1 2 2 8 2\\n\", \"7 2\\n1 2 3 2...
rating_1201-1400
{ "id": "1234_B2. Social Network (hard version)", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "# Task\nAfter a long night (work, play, study) you fi...
code
{ "ground_truth": "{\"fn_name\": \"find_the_missing_tree\", \"inputs\": [[[1, 2, 2, 3, 3]], [[11, 2, 3, 3, 3, 11, 2, 2]], [[234, 76, 45, 99, 99, 99, 99, 45, 234, 234, 45, 45, 76, 234, 76]], [[1, 1, 1, 1, 1, 1, 1, 22, 22, 22, 22, 22, 22, 22, 3, 3, 3, 3, 3, 3]], [[10, 205, 3000, 3000, 10]], [[50, 408, 50, 50, 50, 50, 4...
EASY
{ "id": "taco-train-4168", "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": "Every year Santa Claus gives gifts to all children. ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n\\n5 2\\n2 2\\n1 4\\n\\n3 2\\n2 1\\n2 3\\n\\n6 4\\n2 1\\n2 3\\n2 4\\n2 6\\n\", \"3\\n\\n5 2\\n2 2\\n1 4\\n\\n3 2\\n2 1\\n2 3\\n\\n6 4\\n2 1\\n1 3\\n2 4\\n2 6\\n\", \"3\\n\\n5 2\\n2 2\\n1 4\\n\\n3 2\\n2 2\\n2 3\\n\\n6 4\\n1 1\\n1 5\\n2 4\\n2 6\\n\", \"3\\n\\n5 2\\n2 3\\n1 4\\n\\n...
HARD
{ "id": "taco-test-72", "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": "The life goes up and down, just like nice sequences....
code
{ "ground_truth": "{\"inputs\": [\"5\\n2 8 4 7 7\\n\", \"4\\n200 150 100 50\\n\", \"10\\n3 2 1 4 1 4 1 4 1 4\\n\", \"9\\n1 2 3 4 5 6 7 8 9\\n\", \"30\\n18647 31594 58075 122543 49766 65303 48728 102863 22542 140297 5300 90685 50141 86948 27074 40214 17945 147095 97758 140835 121469 139920 63817 138623 85609 110002 70...
rating_1601-1900
{ "id": "653_C. Bear and Up-Down", "rating": 1900, "split": "confidence_train", "sub_source": "rating_1601-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": "You are the God of Wind.\n\nBy moving a big cloud ar...
code
{ "ground_truth": "{\"inputs\": [\"1\\n0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0\\n7\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\n1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1\\n0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1\\n0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0\\n0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0\\n1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1\\n0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0\\n7\\...
none
{ "id": "p00822 Weather Forecast", "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": "You're given the centers of three equal sides of a s...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 1 2 2 3 3\\n0 1 1 0 2 2\\n9 3 7 9 9 8\\n\", \"3\\n1 1 2 2 3 3\\n0 1 1 0 2 2\\n9 3 7 9 9 8\\n\", \"3\\n0 1 1 0 2 2\\n1 1 2 2 3 3\\n0 1 2 1 2 2\\n\", \"3\\n1 1 2 2 3 3\\n0 1 1 0 2 2\\n9 0 7 9 9 8\\n\", \"3\\n1 1 2 2 3 3\\n0 1 1 0 3 2\\n9 0 7 9 9 12\\n\", \"3\\n1 1 2 2 3 2\\n0 1 ...
rating_>1900
{ "id": "23_D. Tetragon", "rating": 2600, "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": "A lot of people in Berland hates rain, but you do no...
code
{ "ground_truth": "{\"inputs\": [\"1 1 1 1\\n\", \"1 2 3 100\\n\", \"5 2797 5925 9\\n\", \"6 1976 8455 3\\n\", \"72 8534 7042 65\\n\", \"4 495 8813 1\\n\", \"100 5635 9099 23\\n\", \"72 6791 8546 46\\n\", \"72 5272 4552 64\\n\", \"1 47 80 68\\n\", \"10000 10000 10000 10000\\n\", \"48 7946 7992 72\\n\", \"48 6428 9807...
rating_<=1200
{ "id": "667_A. Pouring Rain", "rating": 1100, "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": "Our lazy white falcon finally decided to learn heavy...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n0 1\\n1 2\\n1 0 1\\n1 1 2\\n2 0 2\\n\"], \"outputs\": [\"2\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-10286", "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": "Ivar the Boneless is a great leader. He is trying to...
code
{ "ground_truth": "{\"inputs\": [\"5 5\\n1 2 1 2 1\\n3 10 1 1 1\\n\", \"4 4\\n1 2 3 4\\n9 1 10 6\\n\", \"10 3\\n1 1 1 1 1 1 1 1 1 1\\n10 10 5\\n\", \"1 1\\n56563128\\n897699770\\n\", \"100 55\\n1 2 4 4 3 5 5 2 3 4 2 1 1 2 3 5 1 5 4 2 5 4 4 3 3 5 3 4 4 5 5 2 3 3 4 4 3 4 5 5 5 5 3 5 1 2 4 3 4 5 3 3 2 1 4 5 3 4 4 1 5 1 ...
MEDIUM
{ "id": "taco-train-12135", "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": "The sieve of Eratosthenes is a famous algorithm to f...
code
{ "ground_truth": "{\"inputs\": [\"7 3\\n\", \"15 12\\n\", \"10 7\\n\"], \"outputs\": [\"6\\n\", \"7\\n\", \"9\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-11755", "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": "A total of $n$ depots are located on a number line. ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n5 1\\n1 2 3 4 5\\n9 3\\n-5 -10 -15 6 5 8 3 7 4\\n5 3\\n2 2 3 3 3\\n4 2\\n1000000000 1000000000 1000000000 1000000000\\n\"], \"outputs\": [\"25\\n41\\n7\\n3000000000\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-20764", "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": "Petya is a big fan of mathematics, especially its pa...
code
{ "ground_truth": "{\"inputs\": [\"3\\n\", \"4\\n\", \"12\\n\", \"34\\n\", \"13\\n\", \"11\\n\", \"24\\n\", \"17\\n\", \"10\\n\", \"69\\n\", \"100\\n\", \"57\\n\", \"1000\\n\", \"999\\n\", \"998\\n\", \"997\\n\", \"996\\n\", \"995\\n\", \"994\\n\", \"5\\n\", \"6\\n\", \"8\\n\", \"9\\n\", \"423\\n\", \"876\\n\", \"29\...
EASY
{ "id": "taco-train-10199", "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": "# Task\nYour task is to find the sum for the range `0...
code
{ "ground_truth": "{\"fn_name\": \"S2N\", \"inputs\": [[2, 3], [3, 5], [10, 9], [1, 1], [0, 0], [300, 2], [567, 2], [37, 4], [36, 4]], \"outputs\": [[20], [434], [1762344782], [3], [1], [9090501], [61083856], [15335280], [13409059]]}", "style": "rule" }
EASY
{ "id": "taco-train-21482", "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": "Mashmokh works in a factory. At the end of each day ...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n4 3 1 2\\n\", \"5 5\\n5 4 3 2 1\\n\", \"16 11\\n8 5 12 10 14 2 6 3 15 9 1\\n\", \"79 22\\n76 32 48 28 33 44 58 59 1 51 77 13 15 64 49 72 74 21 61 12 60 57\\n\", \"25 19\\n3 12 21 11 19 6 5 15 4 16 20 8 9 1 22 23 25 18 13\\n\", \"48 8\\n42 27 40 1 18 3 19 2\\n\", \"44 19\\n13 2...
EASY
{ "id": "taco-train-24379", "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": "We have an N×N checkerboard.\n\nFrom the square at t...
code
{ "ground_truth": "{\"inputs\": [\"2\", \"4\", \"0\", \"3\", \"-1\", \"-2\", \"1\", \"-4\", \"-3\", \"-5\", \"-8\", \"-7\", \"-9\", \"-13\", \"-16\", \"-11\", \"-22\", \"-27\", \"-10\", \"-18\", \"-6\", \"-12\", \"-19\", \"-31\", \"-20\", \"-14\", \"-21\", \"-36\", \"-17\", \"-15\", \"-24\", \"-32\", \"-33\", \"-40\"...
none
{ "id": "p03897 CODE FESTIVAL 2016 Relay (Parallel) - Connected Checkerboard", "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": "Note the unusual memory limit for this problem.\n\nY...
code
{ "ground_truth": "{\"inputs\": [\"3 3 2 5\\n1 2\\n2 3\\n1 3\\n1 1\\n2 1\\n3 2\\n3 1\\n2 2\\n\", \"2 1 50 4\\n1 2\\n1 1\\n1 1\\n1 50\\n1 50\\n\", \"2 1 1 1\\n1 2\\n1 1\\n\", \"2 1 1 2\\n1 2\\n1 1\\n1 1\\n\", \"4 5 2 6\\n1 2\\n2 3\\n1 3\\n1 4\\n3 4\\n1 1\\n2 1\\n4 2\\n5 2\\n3 1\\n3 2\\n\", \"3 3 50 7\\n1 2\\n2 3\\n1 3...
rating_>1900
{ "id": "576_E. Painting Edges", "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": "Read problem statements in [Bengali], [Mandarin Chin...
code
{ "ground_truth": "{\"inputs\": [\"3\\n12\\n1 2 3 5 6 8 9 10 11 12 15 17\\n4\\n4 5 7 8\\n1\\n4\"], \"outputs\": [\"1...3,5,6,8...12,15,17\\n4,5,7,8\\n4\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-22348", "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": "Given an integer N. Find eular toitent function of N...
code
{ "ground_truth": "{\"inputs\": [\"100\\n20520\\n58311\\n12672\\n12400\\n12168\\n80256\\n10404\\n14877\\n22620\\n24192\\n20300\\n4968\\n48735\\n76908\\n19800\\n75168\\n12600\\n22475\\n17204\\n40824\\n4080\\n4692\\n13728\\n10240\\n4212\\n53040\\n81900\\n15120\\n27945\\n20930\\n26928\\n15120\\n18144\\n43659\\n5580\\n84...
EASY
{ "id": "taco-train-24731", "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": "Ishaan being curious as always was playing with numbe...
code
{ "ground_truth": "{\"fn_name\": \"findMinimumInvertingFactor\", \"inputs\": [\"arr[ ] = {56, 20, 47, 93, 45}\", \"arr[ ] = {48, 23, 100, 71, 56, 89}\"], \"outputs\": [\"9\", \"14\"]}", "style": "rule" }
EASY
{ "id": "taco-train-4935", "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 binary string S of length N (i.e. ev...
code
{ "ground_truth": "{\"inputs\": [\"3\\n5\\n00100\\n5\\n01010\\n5\\n10001\"], \"outputs\": [\"1\\n2\\n2\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-1577", "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": "A permutation of length k is a sequence of k integer...
code
{ "ground_truth": "{\"inputs\": [\"8\\n2 3 1 1 2 4 3\\n3 4 4 2 5 5 4\\n\", \"5\\n4 5 3 5\\n6 7 4 6\\n\", \"3\\n2 4\\n3 2\\n\", \"30\\n12 3 2 20 12 78 2 25 12 12 31 19 56 34 9 25 20 31 2 12 24 8 6 19 21 89 6 7 2\\n85 9 12 70 97 93 6 51 24 19 95 51 95 56 21 34 37 37 6 89 78 89 7 85 97 93 89 8 70\\n\", \"20\\n22 10 1 38...
rating_>1900
{ "id": "1152_E. Neko and Flashback", "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": "Milly is feeling bored during her winter vaccations,...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2 2\\n1 2\\n3 4\\n\\nSAMPLE\"], \"outputs\": [\"8 3\"]}", "style": "rule" }
none
{ "id": "k-arrays", "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 problem statements in [Bengali], [Mandarin Chin...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 1 1 15 5\\n8 7 6 15 5\\n8 5 7 15 6\"], \"outputs\": [\"YES\\nNO\\nYES\"]}", "style": "rule" }
EASY
{ "id": "taco-train-8865", "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": "There is a \"cloth\" of 10 × 10 squares as shown in ...
code
{ "ground_truth": "{\"inputs\": [\"2\\n0 0 0 0 0 0 0 0 0 0\\n0 0 0 1 0 0 0 0 0 0\\n0 0 1 1 1 0 0 0 0 0\\n0 0 0 1 0 0 0 1 1 1\\n0 0 0 0 0 0 0 1 1 1\\n0 0 0 0 0 0 0 1 1 1\\n0 0 0 0 0 0 0 0 0 0\\n0 0 0 0 0 0 0 0 0 0\\n0 0 0 0 0 0 0 0 0 0\\n0 0 0 0 0 0 0 0 0 0\"], \"outputs\": [\"3 2 1\\n8 4 2\"]}", "style": "rule" }
none
{ "id": "p00091 Blur", "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": "The medians of a triangle are the segments that unit ...
code
{ "ground_truth": "{\"fn_name\": \"bar_triang\", \"inputs\": [[[4, 6], [12, 4], [10, 10]], [[4, 2], [12, 2], [6, 10]], [[4, 8], [8, 2], [16, 6]]], \"outputs\": [[[8.6667, 6.6667]], [[7.3333, 4.6667]], [[9.3333, 5.3333]]]}", "style": "rule" }
EASY
{ "id": "taco-train-3521", "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": "Construct an N \\times M matrix with entries having ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3 3\\n1 2\\n1 1\\n\"], \"outputs\": [\"1 2 3\\n3 6 9\\n5 10 15\\n1 2\\n1\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-22953", "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": "Little Rohu from Pluto is the best bomb defusor on t...
code
{ "ground_truth": "{\"inputs\": [[\"3 3\", \"1 2 3\", \"3 2 1\", \"\", \"\"], [\"2 1\", \"1\", \"1\", \"\", \"\"]], \"outputs\": [[\"2\"], [\"0\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-899", "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": "We have two indistinguishable pieces placed on a num...
code
{ "ground_truth": "{\"inputs\": [\"5 1 3\", \"1000000 100000 200000\", \"10 4 6\", \"10 0 0\", \"5 1 1\", \"1010000 100000 200000\", \"4 4 6\", \"10 0 1\", \"1010000 100001 200000\", \"5 2 2\", \"1011000 100001 200000\", \"1011001 100001 200000\", \"0100111 001111 35243\", \"5 2 3\", \"1000000 110000 200000\", \"16 4...
none
{ "id": "p02878 AtCoder Grand Contest 040 - Two Pieces", "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": "Nezzar designs a brand new game \"Hidden Permutation...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4 2\\n1 2\\n3 4\\n6 4\\n1 2\\n1 3\\n3 5\\n3 6\\n2 1\\n1 2\\n\", \"3\\n4 2\\n1 2\\n3 4\\n6 4\\n1 2\\n1 3\\n3 5\\n3 6\\n2 1\\n1 2\\n\", \"3\\n4 2\\n1 2\\n3 2\\n6 4\\n1 2\\n1 3\\n3 5\\n3 6\\n2 1\\n1 2\\n\", \"3\\n4 2\\n0 2\\n3 2\\n6 4\\n1 2\\n1 3\\n3 5\\n3 6\\n2 1\\n1 2\\n\", \"3\\...
rating_>1900
{ "id": "1477_D. Nezzar and Hidden Permutations", "rating": 2800, "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": "One day, Snuke was given a permutation of length N, ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2 1 3\", \"4\\n1 3 2 4\", \"8\\n5 4 8 1 2 6 7 3\", \"3\\n3 1 2\", \"3\\n1 2 3\", \"4\\n2 3 1 4\", \"4\\n1 3 4 2\", \"8\\n5 3 8 1 2 6 7 4\", \"4\\n3 2 4 1\", \"8\\n4 5 8 1 2 6 7 3\", \"3\\n1 3 2\", \"3\\n2 3 1\", \"3\\n3 2 1\", \"4\\n2 3 4 1\", \"4\\n1 2 3 4\", \"3\\n3 1 2\", \"3...
none
{ "id": "p03987 AtCoder Grand Contest 005 - Minimum Sum", "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": "Example\n\nInput\n\n4\n5\n8\n58\n85\n\n\nOutput\n\n2...
code
{ "ground_truth": "{\"inputs\": [\"4\\n5\\n8\\n58\\n85\", \"4\\n5\\n8\\n58\\n152\", \"4\\n5\\n8\\n55\\n152\", \"4\\n5\\n20\\n55\\n152\", \"4\\n5\\n15\\n58\\n85\", \"4\\n5\\n8\\n58\\n171\", \"4\\n5\\n9\\n55\\n152\", \"4\\n2\\n11\\n55\\n152\", \"4\\n5\\n17\\n55\\n152\", \"4\\n5\\n15\\n58\\n7\", \"4\\n5\\n10\\n58\\n171\...
none
{ "id": "p01490 HullMarathon", "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 tree with $N$ nodes, which are numbe...
code
{ "ground_truth": "{\"inputs\": [\"1\\n7 2\\n1 2\\n1 3\\n2 4\\n2 5\\n3 6\\n3 7\", \"1\\n8 2\\n1 2\\n1 3\\n2 4\\n2 5\\n3 6\\n3 7\\n4 8\", \"2\\n5 3\\n1 2\\n1 3\\n2 4\\n2 5\\n7 2\\n1 2\\n1 3\\n2 4\\n3 5\\n4 6\\n5 7\", \"1\\n3 1\\n1 2\\n1 3\", \"3\\n5 1\\n1 2\\n2 3\\n2 4\\n1 5\\n4 3\\n1 2\\n1 3\\n2 4\\n5 2\\n1 2\\n1 3\\...
HARD
{ "id": "taco-test-779", "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": "Way to go! Heidi now knows how many brains there mus...
code
{ "ground_truth": "{\"inputs\": [\"1\\n\", \"3\\n\", \"2\\n\", \"4\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"11\\n\", \"12\\n\", \"13\\n\", \"14\\n\", \"15\\n\", \"16\\n\", \"17\\n\", \"18\\n\", \"19\\n\", \"20\\n\", \"99\\n\", \"100\\n\", \"9999\\n\", \"21736\\n\", \"873467\\n\", \"4124980...
HARD
{ "id": "taco-train-8616", "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": "Mike takes part in olympiads in informatics. You thi...
code
{ "ground_truth": "{\"inputs\": [\"3 10\\n3 4 5\", \"3 11\\n3 4 5\", \"3 11\\n3 7 5\", \"3 22\\n3 7 5\", \"3 3\\n3 7 5\", \"3 6\\n3 7 5\", \"3 6\\n4 7 5\", \"3 6\\n1 7 5\", \"6 6\\n4 7 1\", \"3 0\\n3 11 2\", \"6 4\\n4 7 1\", \"5 0\\n3 11 2\", \"10 4\\n4 7 1\", \"5 1\\n3 11 2\", \"5 4\\n4 7 1\", \"9 1\\n-1 13 3\", \"1...
none
{ "id": "mike2", "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": "You are given an image A composed of N rows and N co...
code
{ "ground_truth": "{\"inputs\": [\"3 2\\n#.#\\n.#.\\n#.#\\n#.\\n.#\", \"4 1\\n....\\n....\\n....\\n....\", \"3 2\\n.#\\n.#.\\n.#\\n.\\n.#\", \"3 2\\n#.#\\n.#.\\n#-#\\n#.\\n.#\", \"3 2\\n-#\\n.#.\\n.#\\n.\\n.#\", \"4 0\\n....\\n....\\n....\\n....\", \"3 2\\n#.#\\n.\\\".\\n#-#\\n#.\\n.#\", \"4 1\\n..-.\\n....\\n....\\n...
none
{ "id": "p03804 AtCoder Beginner Contest 054 - Template Matching", "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": "Karan's company makes software that provides differen...
code
{ "ground_truth": "{\"fn_name\": \"compare_versions\", \"inputs\": [[\"11\", \"10\"], [\"11\", \"11\"], [\"10.4.6\", \"10.4\"], [\"10.4\", \"10.4.8\"], [\"10.4\", \"11\"], [\"10.4.9\", \"10.5\"], [\"4.3.3\", \"4.3.3.1\"], [\"10.4.9\", \"104.9\"], [\"10.15\", \"10.12\"]], \"outputs\": [[true], [true], [true], [false],...
EASY
{ "id": "taco-train-20509", "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 street of N houses (a row of houses), each ho...
code
{ "ground_truth": "{\"inputs\": [\"N = 5 , K = 10\", \"N = 2 , K = 12\"], \"outputs\": [\"30\", \"12\"]}", "style": "rule" }
EASY
{ "id": "taco-train-13919", "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": "There is a bookshelf which can fit $n$ books. The $i...
code
{ "ground_truth": "{\"inputs\": [\"5\\n7\\n0 0 1 0 1 0 1\\n3\\n1 0 0\\n5\\n1 1 0 0 1\\n6\\n1 0 0 0 0 1\\n5\\n1 1 0 1 1\\n\", \"1\\n8\\n0 0 0 1 1 1 1 1\\n\", \"1\\n8\\n0 0 0 1 1 1 1 1\\n\", \"1\\n8\\n0 0 0 1 1 0 1 1\\n\", \"5\\n7\\n0 0 1 0 1 0 1\\n3\\n1 0 0\\n5\\n1 1 0 1 1\\n6\\n1 0 0 0 0 1\\n5\\n1 1 0 1 1\\n\", \"1\\...
EASY
{ "id": "taco-train-21662", "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": "Bear Limak wants to become the largest of bears, or ...
code
{ "ground_truth": "{\"inputs\": [\"4 7\", \"4 9\", \"1 1\", \"4 6\", \"1 10\", \"1 1\", \"1 2\", \"1 3\", \"1 4\", \"1 5\", \"1 6\", \"1 7\", \"1 8\", \"1 9\", \"1 10\", \"2 2\", \"2 3\", \"2 4\", \"2 5\", \"2 6\", \"2 7\", \"2 8\", \"2 9\", \"2 10\", \"3 3\", \"3 4\", \"3 5\", \"3 6\", \"3 7\", \"3 8\", \"3 9\", \"3...
rating_<=1200
{ "id": "791A", "rating": 800, "split": "confidence_train", "sub_source": "rating_<=1200" }
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 dishes of cuisine placed in front of Tak...
code
{ "ground_truth": "{\"inputs\": [\"3\\n20 10\\n20 20\\n20 30\", \"3\\n10 10\\n20 20\\n30 30\", \"6\\n1 1000000000\\n1 1000000000\\n1 1000000000\\n1 1000000000\\n1 1000000000\\n1 1000000000\", \"3\\n20 10\\n16 20\\n20 30\", \"3\\n10 10\\n20 34\\n30 30\", \"6\\n1 1000000000\\n1 1000000000\\n1 1000000000\\n1 1000000000\...
none
{ "id": "p03141 NIKKEI Programming Contest 2019 - Different Strokes", "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": "Example\n\nInput\n\n5 5 4\n6\n3 2\n4 2\n5 2\n1 4\n3 ...
code
{ "ground_truth": "{\"inputs\": [\"5 5 4\\n6\\n3 2\\n4 2\\n5 2\\n1 4\\n3 4\\n5 4\", \"9 5 4\\n6\\n3 2\\n4 2\\n5 2\\n1 4\\n3 4\\n5 4\", \"9 5 5\\n6\\n3 2\\n4 2\\n5 2\\n1 4\\n3 4\\n5 4\", \"9 5 10\\n6\\n3 1\\n4 2\\n5 2\\n1 4\\n3 4\\n7 4\", \"9 5 6\\n6\\n3 2\\n4 4\\n6 1\\n2 5\\n3 4\\n5 4\", \"9 7 5\\n6\\n3 2\\n7 4\\n6 1...
none
{ "id": "p01887 Pipe Fitter and the Fierce Dogs", "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": "Leha decided to move to a quiet town Vičkopolis, bec...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4 3 1\\n\", \"2\\n4 7\\n\", \"20\\n2 6 8 9 20 23 27 36 43 49 63 65 70 71 85 87 89 91 94 97\\n\", \"3\\n465343471 465343474 465343473\\n\", \"5\\n999999984 999999997 999999994 999999991 999999982\\n\", \"2\\n1000000000 1\\n\", \"1\\n2\\n\", \"5\\n4 7 13 17 18\\n\", \"5\\n20 17 13...
rating_1401-1600
{ "id": "809_A. Do you want a date?", "rating": 1500, "split": "confidence_train", "sub_source": "rating_1401-1600" }
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": "A very passive-aggressive co-worker of yours was just...
code
{ "ground_truth": "{\"fn_name\": \"one_down\", \"inputs\": [[\"Ifmmp\"], [\"Uif usjdl up uijt lbub jt tjnqmf\"], [45], [\"XiBu BcPvU dSbAz UfYu\"], [[\"Hello there\", \"World\"]], [\"BMM DBQT NBZCF\"], [\"qVAamFt BsF gVo\"], [\"CodeWars RockZ\"], [\"\"], [\"J ipqf zpv bsf ibwjoh b ojdf ebz\"]], \"outputs\": [[\"Hello...
EASY
{ "id": "taco-train-16145", "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 sequence of brackets is called balanced if one can...
code
{ "ground_truth": "{\"inputs\": [\"(()(()))()\\n\", \"())()\\n\"], \"outputs\": [\"YES\\n\", \"NO\\n\"]}", "style": "rule" }
rating_1601-1900
{ "id": "162_J. Brackets", "rating": 1800, "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 ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Chef has a string S with him. Chef is happy if the s...
code
{ "ground_truth": "{\"inputs\": [\"4\\naeiou\\nabxy\\naebcdefghij\\nabcdeeafg\\n\"], \"outputs\": [\"Happy\\nSad\\nSad\\nHappy\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-7735", "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 young mischievous boy Harsh, got into a trouble wh...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3\\n2\\n\\nSAMPLE\", \"10\\n977\\n543\\n252\\n979\\n348\\n889\\n876\\n55\\n938\\n610\", \"1000\\n637440000\\n497933618\\n104308126\\n54379600\\n735895362\\n146758511\\n172457069\\n786824866\\n792402682\\n2932951\\n280042089\\n190772473\\n647479785\\n613419369\\n465129597\\n17375...
none
{ "id": "rod-cutting-problem-7", "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], [Rus...
code
{ "ground_truth": "{\"inputs\": [\"4 6\\n1 3 5 100\\n-2\\n2\\n4\\n80\\n107\\n5\", \"5 3\\n1 2 3 4 5\\n-1\\n0\\n6\", \"3 4\\n-1 -2 -3\\n1\\n-1\\n-4\\n0\", \"6 5\\n-1 -2 -3 -4 -5 -6\\n7\\n0\\n-7\\n1\\n-1\", \"2 2\\n-1000000000 1000000000\\n0\\n1000000000\", \"3 5\\n-1 -2 -3\\n4\\n-2\\n0\\n-4\\n3\", \"4 6\\n2 4 6 8\\n-2...
MEDIUM
{ "id": "taco-test-232", "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": "Bob is a pirate looking for the greatest treasure th...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2 5\\n-6 4\\n7 -2\\n-1 -3\\n\", \"4\\n2 2\\n8 2\\n-7 0\\n-2 6\\n1 -14\\n16 -12\\n11 -18\\n7 -14\\n\", \"4\\n5 -10\\n-7 7\\n1 0\\n8 3\\n7 -6\\n0 -9\\n15 -13\\n3 4\\n\", \"10\\n-52 25\\n21 25\\n76 -22\\n-98 -56\\n87 22\\n-20 95\\n45 -7\\n30 89\\n82 -97\\n2 -3\\n-144 32\\n-70 13\\n...
rating_<=1200
{ "id": "1091_B. New Year and the Treasure Geolocation", "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": "Little Leon lives in the forest. He has recently not...
code
{ "ground_truth": "{\"inputs\": [\"4\\n3\\n-2 -2 -2\\n3\\n10 4 7\\n4\\n4 -4 4 -4\\n5\\n1 -2 3 -4 5\\n\"], \"outputs\": [\"2\\n13\\n36\\n33\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-9744", "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": "You are given a Young diagram. \n\nGiven diagram is ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n3 2 2 2 1\\n\", \"1\\n300000\\n\", \"10\\n9 8 7 7 6 4 3 2 1 1\\n\", \"100\\n1980 1932 1906 1898 1892 1883 1877 1858 1842 1833 1777 1710 1689 1678 1660 1653 1648 1647 1644 1639 1635 1635 1593 1571 1534 1470 1440 1435 1389 1272 1269 1268 1263 1255 1249 1237 1174 1174 1128 1069 106...
rating_>1900
{ "id": "1269_D. Domino for Young", "rating": 2000, "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": "Akaki, a patissier, can make N kinds of doughnut usi...
code
{ "ground_truth": "{\"inputs\": [\"3 100 10\\n15\\n10 1\\n20 1\", \"5 1000000000 1000000\\n123\\n159 1\\n111 1\\n135 3\\n147 3\", \"3 100 1\\n15\\n10 1\\n20 1\", \"3 100 10\\n30\\n10 1\\n20 1\", \"5 1000010000 1000000\\n123\\n159 1\\n111 1\\n135 3\\n147 3\", \"3 101 1\\n15\\n10 1\\n20 1\", \"3 000 10\\n30\\n10 1\\n20...
none
{ "id": "p03376 AtCoder Regular Contest 096 - Sweet Alchemy", "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": "Given a sorted linked list, delete all nodes that hav...
code
{ "ground_truth": "{\"inputs\": [\"N = 8\\nLinked List = 23->28->28->35->49->49->53->53\", \"N = 6\\nLinked List = 11->11->11->11->75->75\"], \"outputs\": [\"23 35\", \"Empty list\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-6256", "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": "Geek is learning data structures. He wants to learn t...
code
{ "ground_truth": "{\"inputs\": [\"n = 1, m = 2\\r\\na = 3, b = 4\\r\\nc = 5, d = 6\", \"n = 7, m = 8\\r\\na = 9, b = 10\\r\\nc = 11, d = 12\"], \"outputs\": [\"3 1 38\", \"15 0 2060\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-7341", "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": "Find the convex hull of a given set of points P. In ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n0 0\\n2 2\\n0 2\\n0 1\", \"7\\n2 1\\n0 0\\n1 2\\n2 2\\n4 2\\n1 3\\n3 3\", \"4\\n1 0\\n2 2\\n0 2\\n0 1\", \"7\\n2 1\\n0 0\\n1 2\\n2 0\\n4 2\\n1 3\\n3 3\", \"4\\n1 0\\n3 2\\n0 2\\n0 1\", \"7\\n4 1\\n0 0\\n1 2\\n2 0\\n4 2\\n1 3\\n3 3\", \"7\\n4 1\\n0 0\\n1 2\\n3 0\\n4 2\\n1 3\\n3 3...
none
{ "id": "p02300 Convex Hull", "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": "Note that this is a bit harder version of the proble...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n1 2 1000\\n2 3 1000\\n4 5 500\\n2\\n1 4 300\\n3 5 300\\n\", \"6 5\\n1 2 1000\\n2 3 1000\\n1 3 1000\\n2 4 1000\\n5 6 500\\n2\\n2 5 300\\n4 6 300\\n\"], \"outputs\": [\"3100\\n\", \"5100\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-16537", "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": "Bizon the Champion is called the Champion for a reas...
code
{ "ground_truth": "{\"inputs\": [\"1 0 0\\n1 0 0\\n1\\n\", \"1 1 3\\n2 3 4\\n2\\n\", \"1 1 1\\n1 1 1\\n4\\n\", \"100 100 100\\n100 100 100\\n100\\n\", \"10 10 10\\n0 0 0\\n1\\n\", \"1 2 3\\n2 4 6\\n3\\n\", \"0 0 0\\n0 0 0\\n1\\n\", \"1 2 2\\n2 4 4\\n1\\n\", \"2 3 5\\n2 3 5\\n2\\n\", \"21 61 39\\n63 58 69\\n44\\n\", \...
rating_<=1200
{ "id": "448_A. Rewards", "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 ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Let's say Pak Chanek has an array $A$ consisting of ...
code
{ "ground_truth": "{\"inputs\": [\"6 3\\n1\\n4\\n5\\n\", \"1 0\\n\", \"1000000000 0\\n\", \"1 1\\n1\\n\", \"2 2\\n1\\n2\\n\", \"3 3\\n1\\n2\\n3\\n\", \"4 4\\n1\\n2\\n3\\n4\\n\", \"5 5\\n1\\n2\\n3\\n4\\n5\\n\", \"6 6\\n1\\n2\\n3\\n4\\n5\\n6\\n\", \"7 7\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n\", \"8 8\\n1\\n2\\n3\\n4\\n5\\n6\\n...
VERY_HARD
{ "id": "taco-train-22511", "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": "Mittal lives in the Niti Colony. The colony has N ho...
code
{ "ground_truth": "{\"inputs\": [\"1\\n5 5\\n1 2 2\\n2 3 4\\n3 4 5\\n4 5 1\\n1 4 7\\n3\\n4 20\\n5 21\\n3 5\\n\\nSAMPLE\", \"2\\n2 2\\n1 2 10\\n1 2 2\\n4\\n2 45\\n2 30\\n2 11\\n2 13\\n3 6\\n1 2 2\\n2 3 4\\n2 3 10\\n2 3 4\\n1 2 5\\n2 3 6\\n5\\n3 20\\n3 11\\n3 46\\n2 41\\n3 50\", \"1\\n5 5\\n1 2 2\\n2 3 4\\n3 3 5\\n4 5 ...
none
{ "id": "mittal-wants-to-go-to-play", "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": "You are given a matrix a, consisting of n rows and m...
code
{ "ground_truth": "{\"inputs\": [\"6 1\\n3\\n6\\n2\\n5\\n1\\n4\\n\", \"2 4\\n1 2 3 4\\n10 3 7 3\\n\", \"4 2\\n9 9\\n10 8\\n5 3\\n4 3\\n\", \"5 5\\n1337 1337 1337 1337 1337\\n1337 1337 1337 1337 1337\\n1337 1337 1337 1337 1337\\n1337 1337 1337 1337 1337\\n1337 1337 1337 1337 1337\\n\", \"1 2\\n11 21\\n\", \"2 1\\n21\\...
rating_>1900
{ "id": "1102_F. Elongated Matrix", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given a number n, the task is to check whether it can...
code
{ "ground_truth": "{\"inputs\": [\"n = 10\", \"n = 16\"], \"outputs\": [\"1\", \"0\"]}", "style": "rule" }
EASY
{ "id": "taco-train-4817", "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": "One fine day, when everything was going good, Mehta ...
code
{ "ground_truth": "{\"inputs\": [\"913 19\\n196796598 1352\\n370877841 1266\\n471352986 394\\n976356590 449\\n756022401 646\\n163760458 356\\n593174565 476\\n52284046 555\\n126343927 556\\n432924456 958\\n595835040 1973\\n294969506 1698\\n525729842 728\\n846508000 1534\\n639838704 651\\n260096758 1447\\n504728502 124...
HARD
{ "id": "taco-train-19440", "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, Russia...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1\\n10\\n20\\n4\\n15 7 10 10\\n6 14 21 1\\n3\\n1 100 3\\n1 2 3\"], \"outputs\": [\"30\\n21\\n-1\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-22259", "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": "Given is an undirected connected graph with N vertic...
code
{ "ground_truth": "{\"inputs\": [\"3 4\\n1 2 1\\n2 3 2\\n3 1 3\\n1 3 1\\n\"], \"outputs\": [\"1\\n2\\n1\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-11904", "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": "Given an array of N integers, find the sum of xor of ...
code
{ "ground_truth": "{\"inputs\": [\"arr[ ] = {7, 3, 5}\", \"arr[ ] = {5, 9, 7, 6}\"], \"outputs\": [\"12\", \"47\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-18377", "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 string, eliminate all “b” and “ac” in the str...
code
{ "ground_truth": "{\"inputs\": [\"str = \\\"aacbacc\\\"\", \"str = \\\"aacb\\\"\"], \"outputs\": [\"ac\", \"a\"]}", "style": "rule" }
EASY
{ "id": "taco-train-12333", "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: My Number-My Number-\n\nproblem\n\nI'm sorry! Lat...
code
{ "ground_truth": "{\"inputs\": [\"?12345678901\", \"?123456789/1\", \"1/987654321?\", \"1.987654321?\", \"1.687954321?\", \"1/587954321?\", \"1/687954321?\", \"6/478851321?\", \"?1/315887426\", \"634788413/1?\", \"?12345678900\", \"?123456789.1\", \"1.587954321?\", \"4/687951321?\", \"4/678951321?\", \"6/478951321?\...
none
{ "id": "p01872 My Number", "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 square matrix $M$ with $N$ rows (num...
code
{ "ground_truth": "{\"inputs\": [[\"1\", \"3 2\"], [\"2\", \"2 3\", \"3 4\"], [\"1\", \"10000 5000\"], [\"3\", \"1 2\", \"2 3\", \"3 4\"], [\"3\", \"2 3\", \"3 4\", \"4 5\"], [\"1\", \"1000 500\"], [\"2\", \"5 6\", \"6 7\"], [\"1\", \"7 9\"], [\"2\", \"4 5\", \"5 6\"], [\"1\", \"200 300\"], [\"2\", \"60 80\", \"80 10...
MEDIUM_HARD
{ "id": "taco-test-528", "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 sequence $A_1, A_2, \\ldots, A_N$. Y...
code
{ "ground_truth": "{\"inputs\": [[\"2\", \"3\", \"2 2 3\", \"4\", \"2 3 3 2\"]], \"outputs\": [[\"1\", \"2\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-6083", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
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\\n2 2\\n1 2\"], \"outputs\": [\"3 1\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-16561", "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": "Given two numbers 'N' and 'S' , find the largest numb...
code
{ "ground_truth": "{\"inputs\": [\"N = 2, S = 9\", \"N = 3, S = 20\"], \"outputs\": [\"90\", \"992\"]}", "style": "rule" }
EASY
{ "id": "taco-train-19255", "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": "Santa Claus has *n* candies, he dreams to give them ...
code
{ "ground_truth": "{\"inputs\": [\"5\", \"9\", \"2\", \"1\", \"3\", \"1000\", \"4\", \"6\", \"7\", \"8\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"20\", \"21\", \"22\", \"27\", \"28\", \"29\", \"35\", \"36\", \"37\", \"44\", \"45\", \"46\", \"230\", \"231\", \"232\", \"239\", \"629\", \"630\", \"631\...
rating_<=1200
{ "id": "753A", "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": "You are a given a tree of N vertices. The i-th verte...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3\\n1 1 1\\n2 3 3\\n3 3 3\\n1 2\\n1 3\\n4\\n3 3 4\\n1 3 5\\n2 2 2\\n2 2 2\\n1 2\\n2 3\\n2 4\\n\"], \"outputs\": [\"3\\n1\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-16142", "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": "After the war, the supersonic rocket became the most...
code
{ "ground_truth": "{\"inputs\": [\"3 4\\n0 0\\n0 2\\n2 0\\n0 2\\n2 2\\n2 0\\n1 1\\n\", \"3 4\\n0 0\\n0 2\\n2 0\\n0 2\\n2 2\\n2 0\\n0 0\\n\", \"8 8\\n53212775 61830464\\n32047271 31958754\\n46845363 47341547\\n46097536 79640734\\n25559819 90360169\\n5442822 40309249\\n57656501 31139219\\n1191345 7784770\\n61052639 716...
VERY_HARD
{ "id": "taco-test-774", "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": "Peterson loves to learn new languages, but his favor...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 2 c\\n2 3 a\\n3 4 t\\n2 5 t\\n\", \"16\\n1 2 o\\n2 3 f\\n1 4 p\\n4 5 i\\n5 6 e\\n6 7 c\\n7 8 e\\n4 9 r\\n9 10 e\\n10 11 t\\n11 12 t\\n12 13 y\\n10 14 f\\n14 15 i\\n15 16 x\\n\", \"3\\n1 3 g\\n1 2 o\\n\", \"5\\n1 2 m\\n1 4 v\\n4 5 x\\n2 3 x\\n\", \"5\\n1 2 s\\n1 5 p\\n5 4 w\\n2...
rating_>1900
{ "id": "778_C. Peterson Polyglot", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "You have a garden with n flowers lined up in a row. T...
code
{ "ground_truth": "{\"inputs\": [\"n=6\\r\\nk=2\\r\\nw=3\\r\\na[]={2,2,2,2,1,1}\", \"n=2\\r\\nk=5\\r\\nw=1\\r\\na[]={5,8}\"], \"outputs\": [\"2\", \"9\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-282", "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're given Q queries of the form (L, R). \n\nFor e...
code
{ "ground_truth": "{\"inputs\": [\"6\\n1 4\\n9 9\\n5 7\\n12 29\\n137 591\\n1 1000000\\n\", \"20\\n862 928\\n758 964\\n541 789\\n622 943\\n328 900\\n14 764\\n217 972\\n461 847\\n442 468\\n900 986\\n518 529\\n938 993\\n549 851\\n690 944\\n484 601\\n320 910\\n98 868\\n816 915\\n765 880\\n551 770\\n\", \"20\\n862 928\\n7...
HARD
{ "id": "taco-train-16880", "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": "Geek wants to inspect the quality of vegetables at ea...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\\r\\ncost = {{1, 50, 50}, \\r\\n {50, 50, 50}, \\r\\n {1, 50, 50}}\"], \"outputs\": [\"52\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-15784", "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": "Polycarpus is the director of a large corporation. T...
code
{ "ground_truth": "{\"inputs\": [\"6\\n0 1 7 1 7 10\", \"3\\n1 1 1\", \"1\\n0\", \"5\\n2 2 1 1 3\", \"1\\n1\", \"10\\n4 21 3 21 21 1 1 2 2 3\", \"2\\n1 2\", \"5\\n0 0 0 0 0\", \"6\\n6 6 0 8 0 0\", \"10\\n0 0 0 0 0 1 0 1 0 1\", \"100\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
rating_<=1200
{ "id": "291A", "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 ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problem statements in [Bengali], [Mandarin Chin...
code
{ "ground_truth": "{\"inputs\": [\"1\\n3 3\\n010\\n2 1 3\"], \"outputs\": [\"4\\n3\\n2\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-18547", "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": "Mad scientist Mike is busy carrying out experiments ...
code
{ "ground_truth": "{\"inputs\": [\"4 1 1\\n\", \"3 4 5\\n\", \"1 1 2\\n\", \"3 11 8\\n\", \"1000000 1000000 1000000\\n\", \"5 8 13\\n\", \"602752 645534 784262\\n\", \"10 5 15\\n\", \"8 5 12\\n\", \"93952 49553 83405\\n\", \"688348 726472 442198\\n\", \"310703 820961 326806\\n\", \"246 137 940\\n\", \"3 3 3\\n\", \"1...
rating_<=1200
{ "id": "344_B. Simple Molecules", "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": "Consider a grid of size $n \\times n$. The rows are ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4\\nRD\\n5\\nDRDRDRDR\\n3\\nD\\n\"], \"outputs\": [\"13\\n9\\n3\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-9368", "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": "There is an integer sequence of length 2^N: A_0, A_1...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 2 3 1\\n\", \"3\\n10 71 84 33 6 47 23 25\\n\", \"4\\n75 26 45 72 81 47 97 97 2 2 25 82 84 17 56 32\\n\", \"2\\n1 2 3 2\", \"3\\n10 71 84 33 6 32 23 25\", \"4\\n75 26 45 72 81 47 97 97 2 2 25 95 84 17 56 32\", \"2\\n0 2 3 2\", \"3\\n10 71 155 33 6 32 23 25\", \"4\\n75 26 45 112...
HARD
{ "id": "taco-train-14598", "rating": null, "split": "confidence_train", "sub_source": "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": "You are given two arrays of integers *a* and *b*. Fo...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n1 3 5 7 9\\n6 4 2 8\", \"5 5\\n1 2 1 2 5\\n3 1 4 1 5\", \"1 1\\n-1\\n-2\", \"1 1\\n-80890826\\n686519510\", \"11 11\\n237468511 -779187544 -174606592 193890085 404563196 -71722998 -617934776 170102710 -442808289 109833389 953091341\\n994454001 322957429 216874735 -606986750 -4...
rating_1201-1400
{ "id": "600B", "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": "A camera you have accidentally left in a desert has ...
code
{ "ground_truth": "{\"inputs\": [\"9\\n0 0 0 1 1 1 0 0 0\\n\", \"7\\n0 0 0 1 1 1 1\\n\", \"5\\n1 1 1 1 1\\n\", \"8\\n1 1 1 0 0 0 1 1\\n\", \"9\\n1 1 0 1 1 0 1 1 0\\n\", \"1\\n0\\n\", \"1\\n1\\n\", \"2\\n0 0\\n\", \"2\\n0 1\\n\", \"2\\n1 0\\n\", \"2\\n1 1\\n\", \"3\\n1 1 0\\n\", \"7\\n0 0 0 1 1 1 0\\n\", \"3\\n0 1 1\\...
MEDIUM_HARD
{ "id": "taco-train-21599", "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": "Gandalf's army is fighting against Sauron's army and...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2\\n\\nSAMPLE\", \"1\\n0\\n\\nSAMPLE\", \"1\\n2\\n\\nSAMPLD\", \"1\\n4\\n\\nSAMPLD\", \"1\\n8\\n\\nSLQNAD\", \"1\\n14\\n\\nDANQLS\", \"1\\n16\\n\\nDANQLS\", \"1\\n-2\\n\\nSAMPLC\", \"1\\n6\\n\\nSLQNAD\", \"1\\n-4\\n\\nDLPMAR\", \"1\\n24\\n\\nDANQLS\", \"1\\n-8\\n\\nCAPSML\", \"1...
none
{ "id": "fast-and-furious", "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": "# Task\n Yesterday you found some shoes in your room....
code
{ "ground_truth": "{\"fn_name\": \"pair_of_shoes\", \"inputs\": [[[[0, 21], [1, 23], [1, 21], [0, 23]]], [[[0, 21], [1, 23], [1, 21], [1, 23]]], [[[0, 23], [1, 21], [1, 23], [0, 21], [1, 22], [0, 22]]], [[[0, 23], [1, 21], [1, 23], [0, 21]]], [[[0, 23], [1, 21], [1, 22], [0, 21]]], [[[0, 23]]], [[[0, 23], [1, 23]]], ...
EASY
{ "id": "taco-train-11007", "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": "Today Oz is playing a new game. He has an array arr[...
code
{ "ground_truth": "{\"inputs\": [\"1\\n6\\n291 292 295 297 298 299\\n\\nSAMPLE\", \"1\\n6\\n291 292 295 297 158 299\\n\\nSAMPLE\", \"1\\n6\\n559 292 295 297 158 299\\n\\nSAMPLE\", \"1\\n6\\n291 292 529 297 298 299\\n\\nSAMPLE\", \"1\\n6\\n559 292 295 297 158 115\\n\\nSAMPLE\", \"1\\n6\\n559 292 295 297 158 115\\n\\nP...
none
{ "id": "new-game-of-oz", "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": "Your friend recently gave you some slimes for your b...
code
{ "ground_truth": "{\"inputs\": [\"8\\n\", \"2\\n\", \"3\\n\", \"1\\n\", \"91706\\n\", \"8192\\n\", \"97205\\n\", \"149\\n\", \"100000\\n\", \"34768\\n\", \"12345\\n\", \"16277\\n\", \"32\\n\", \"32728\\n\", \"33301\\n\", \"99701\\n\", \"85371\\n\", \"97593\\n\", \"256\\n\", \"12705\\n\", \"70958\\n\", \"65536\\n\", ...
rating_<=1200
{ "id": "618_A. Slime Combining", "rating": 800, "split": "confidence_train", "sub_source": "rating_<=1200" }
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, or Mr. Vasily Petrov is a dean of a departmen...
code
{ "ground_truth": "{\"inputs\": [\"3 5\\n91728\\n11828\\n11111\\n\", \"3 3\\n223\\n232\\n112\\n\", \"13 9\\n514562255\\n322655246\\n135162979\\n733845982\\n473117129\\n513967187\\n965649829\\n799122777\\n661249521\\n298618978\\n659352422\\n747778378\\n723261619\\n\", \"5 20\\n11111111111111111111\\n111111111111111111...
rating_<=1200
{ "id": "152_A. Marks", "rating": 900, "split": "confidence_train", "sub_source": "rating_<=1200" }
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 undirected graph consisting of N ve...
code
{ "ground_truth": "{\"inputs\": [\"13 17\\nBBABBBAABABBA\\n7 1\\n7 9\\n11 12\\n3 9\\n11 9\\n2 1\\n11 5\\n12 11\\n10 8\\n1 11\\n1 8\\n7 7\\n9 10\\n8 8\\n8 12\\n6 2\\n13 11\", \"2 3\\nAB\\n1 1\\n1 2\\n2 2\", \"4 3\\nABAB\\n1 2\\n2 3\\n3 1\", \"13 23\\nABAAAABBBBAAB\\n7 1\\n10 6\\n1 11\\n2 10\\n2 8\\n2 11\\n11 12\\n8 3\...
none
{ "id": "p03256 AtCoder Grand Contest 027 - ABland Yard", "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": "Sasha is taking part in a programming competition. I...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 1 1\\n\", \"2\\n1 2 2\\n\", \"10\\n1 1 1 1 1 1 1 1 1 1 1\\n\", \"10\\n1 1 1 1 1 2 1 1 1 1 1\\n\", \"10\\n1 1 1 1 2 2 1 1 1 1 1\\n\", \"10\\n1 1 1 1 1 1 1 2 1 1 2\\n\", \"10\\n1 1 1 3 2 1 2 4 1 3 1\\n\", \"10\\n1 1 1 4 1 1 2 1 5 1 2\\n\", \"10\\n1 1 21 1 20 1 14 1 19 1 20\\n\",...
MEDIUM
{ "id": "taco-train-10881", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }