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 ... ```). 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 largest nu...
code
{ "ground_truth": "{\"inputs\": [\"N = 200\", \"N = 139\"], \"outputs\": [\"199\", \"139\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-18057", "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": "Vasya started working in a machine vision company of...
code
{ "ground_truth": "{\"inputs\": [\"60\\n\", \"-60\\n\", \"0\\n\", \"44\\n\", \"45\\n\", \"46\\n\", \"134\\n\", \"135\\n\", \"136\\n\", \"224\\n\", \"225\\n\", \"226\\n\", \"227\\n\", \"313\\n\", \"314\\n\", \"315\\n\", \"316\\n\", \"358\\n\", \"359\\n\", \"360\\n\", \"361\\n\", \"999999999999999340\\n\", \"9999999999...
MEDIUM_HARD
{ "id": "taco-test-758", "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": "Bob decided to take a break from calculus homework a...
code
{ "ground_truth": "{\"inputs\": [\"6\\n2\\n2 2\\n3\\n1 2 3\\n4\\n1 1 1 1\\n4\\n1 2 2 1\\n4\\n1 2 1 2\\n8\\n1 2 1 2 1 2 1 2\\n\", \"9\\n1\\n0\\n1\\n1000000000\\n8\\n1 2 1 2 1 2 1 2\\n2\\n1000000000 1000000000\\n11\\n1 1 1 1 0 1 0 1 2 1 2\\n11\\n1 2 1 2 0 1 0 1 1 1 1\\n7\\n1 3 2 2 2 2 2\\n9\\n1 5 1 1 2 1 1 7 1\\n7\\n1 ...
HARD
{ "id": "taco-train-22800", "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": "Alice and Bob play a game on an array of N integers....
code
{ "ground_truth": "{\"inputs\": [\"3\\n4\\n1 2 3 4\\n3\\n45 10 53\\n6\\n7 5 2 2 6 2\"], \"outputs\": [\"5\\n55\\n15\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-11915", "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": "Mayor of city M. decided to launch several new metro...
code
{ "ground_truth": "{\"inputs\": [\"7 5\\n3 4\\n4 2\\n2 5\\n5 1\\n2 6\\n4 7\\n1 3\\n6 7\\n3 7\\n2 1\\n3 6\\n\", \"3 1\\n1 2\\n2 3\\n1 3\\n\", \"4 3\\n1 2\\n1 3\\n1 4\\n2 3\\n2 4\\n3 4\\n\", \"4 2\\n2 1\\n3 1\\n4 3\\n1 2\\n1 3\\n\", \"7 8\\n6 3\\n5 1\\n1 2\\n1 7\\n4 3\\n3 5\\n5 3\\n2 1\\n1 7\\n1 3\\n2 6\\n1 2\\n3 6\\n4...
rating_>1900
{ "id": "1322_F. Assigning Fares", "rating": 3500, "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": "A Hamiltonian path, is a path in an undirected graph ...
code
{ "ground_truth": "{\"inputs\": [\"N = 4, M = 4\\r\\nEdges[][]= { {1,2}, {2,3}, {3,4}, {2,4} }\", \"N = 4, M = 3 \\r\\nEdges[][] = { {1,2}, {2,3}, {2,4} }\"], \"outputs\": [\"1\", \"0\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-23790", "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 are given a sequence a1, a2, ..., aN. Find the s...
code
{ "ground_truth": "{\"inputs\": [\"1\\n4\\n5 1 3 4\", \"1\\n4\\n5 1 3 8\", \"1\\n4\\n4 0 3 8\", \"1\\n4\\n7 1 3 0\", \"1\\n4\\n7 0 3 0\", \"1\\n4\\n5 1 6 8\", \"1\\n4\\n1 1 3 8\", \"1\\n4\\n5 2 9 8\", \"1\\n4\\n5 3 12 8\", \"1\\n4\\n2 1 2 -2\", \"1\\n4\\n2 0 2 -2\", \"1\\n4\\n2 -1 0 -2\", \"1\\n4\\n9 1 11 8\", \"1\\n...
none
{ "id": "smpair", "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 princess is going to escape the dragon's cave, a...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2\\n1\\n1\\n10\", \"1\\n2\\n1\\n1\\n8\", \"5\\n8\\n1\\n2\\n100\", \"2\\n100\\n10\\n10\\n739\", \"17\\n99\\n2\\n3\\n293\", \"5\\n5\\n1\\n1\\n1000\", \"100\\n99\\n1\\n1\\n1000\", \"1\\n100\\n1\\n1\\n1\", \"1\\n100\\n1\\n1\\n1000\", \"10\\n1\\n10\\n1\\n11\", \"98\\n94\\n4\\n3\\n437...
rating_1401-1600
{ "id": "148B", "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": "Given a directed graph, find out if a vertex j is rea...
code
{ "ground_truth": "{\"inputs\": [\"N = 4\\ngraph = {{1, 1, 0, 1}, \\n {0, 1, 1, 0}, \\n {0, 0, 1, 1}, \\n {0, 0, 0, 1}}\"], \"outputs\": [\"{{1, 1, 1, 1}, \\n {0, 1, 1, 1}, \\n {0, 0, 1, 1}, \\n {0, 0, 0, 1}}\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-20418", "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": "For a given polygon g and target points t, print \"2...
code
{ "ground_truth": "{\"inputs\": [\"4\\n0 0\\n3 1\\n2 3\\n0 3\\n3\\n2 1\\n0 2\\n3 2\", \"4\\n0 0\\n3 1\\n2 3\\n0 3\\n3\\n2 1\\n0 2\\n0 2\", \"4\\n0 0\\n3 0\\n2 3\\n0 1\\n3\\n2 1\\n0 2\\n0 2\", \"4\\n0 -1\\n3 1\\n2 3\\n0 3\\n1\\n2 1\\n0 2\\n3 1\", \"4\\n0 -1\\n2 1\\n2 3\\n0 3\\n1\\n2 1\\n0 1\\n3 1\", \"4\\n0 -1\\n3 0\\...
none
{ "id": "p02299 Polygon-Point Containment", "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": "Scott Lang is at war with Darren Cross. There are *n...
code
{ "ground_truth": "{\"inputs\": [\"7 4 3\\n8 11 12 16 17 18 20\\n17 16 20 2 20 5 13\\n17 8 8 16 12 15 13\\n12 4 16 4 15 7 6\\n8 14 2 11 17 12 8\", \"2 1 2\\n75475634 804928248\\n476927808 284875072\\n503158867 627937890\\n322595515 786026685\\n645468307 669240390\", \"2 2 1\\n396750123 498712414\\n41068575 397815498\...
rating_>1900
{ "id": "704B", "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": "Given a number N, count the numbers from 1 to N which...
code
{ "ground_truth": "{\"inputs\": [\"N = 20\", \"N = 100\"], \"outputs\": [\"10\", \"30\"]}", "style": "rule" }
EASY
{ "id": "taco-train-15056", "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": "Luke likes to eat. There are $n$ piles of food align...
code
{ "ground_truth": "{\"inputs\": [\"7\\n5 3\\n3 8 5 6 7\\n5 3\\n3 10 9 8 7\\n12 8\\n25 3 3 17 8 6 1 16 15 25 17 23\\n10 2\\n1 2 3 4 5 6 7 8 9 10\\n8 2\\n2 4 6 8 6 4 12 14\\n8 2\\n2 7 8 9 6 13 21 28\\n15 5\\n11 4 13 23 7 10 5 21 20 11 17 5 29 16 11\\n\"], \"outputs\": [\"0\\n1\\n2\\n1\\n2\\n4\\n6\\n\"]}", "style": "r...
EASY
{ "id": "taco-train-2303", "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": "Babul’s favourite number is 17. He likes the numbers ...
code
{ "ground_truth": "{\"inputs\": [\"n = 17\", \"n = 15\"], \"outputs\": [\"17\", \"51\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-16212", "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": "This is the easy version of the problem. The differe...
code
{ "ground_truth": "{\"inputs\": [\"4 3\\n2 3 5 6\\n\", \"3 2\\n3 4 5\\n\", \"4 3\\n9 1 1 1\\n\", \"6 5\\n589325244 589325243 589325246 589325243 589325246 589325243\\n\", \"4 2\\n1070 1070 1069 1069\\n\", \"3 2\\n568378695 568378695 568378694\\n\", \"6 5\\n880 883 884 882 878 881\\n\", \"3 2\\n795 611 751\\n\", \"3 2...
rating_1601-1900
{ "id": "1371_E1. Asterism (Easy Version)", "rating": 1900, "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 array arr[] of N positive integers. Find an ...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\\r\\narr[] = {2, 4, 5}\", \"N= 3\\r\\narr[] = {9, 8, 5}\"], \"outputs\": [\"7\", \"13\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-14254", "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": "Chef has N subordinates. In order to complete a very...
code
{ "ground_truth": "{\"inputs\": [[\"3\", \"2 1\", \"3 3\", \"10 5\"]], \"outputs\": [[\"2\", \"1\", \"252\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-1770", "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": "After decrypting the code Enigma crew came to know t...
code
{ "ground_truth": "{\"inputs\": [\"10\\n1 3 5 17 21 17 5 11 10 40\\n\\nSAMPLE\", \"10\\n1 3 5 17 21 17 5 11 7 40\\n\\nSAMPLE\", \"10\\n1 3 5 17 19 17 5 11 1 38\\n\\nSAMPLE\", \"10\\n2 3 5 17 21 29 5 16 7 38\\n\\nSAMPLE\", \"10\\n1 3 5 17 19 5 5 19 1 38\\n\\nSAMPLD\", \"10\\n1 0 4 4 19 5 5 9 1 23\\n\\nSAMPLE\", \"10\\...
none
{ "id": "find-the-hub", "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": "I have n tickets for a train with a rabbit. Each tic...
code
{ "ground_truth": "{\"inputs\": [\"6 1 2 3 4 5\", \"6 200 2 3 4 5\", \"6 1 2 3 4 7\", \"6 106 2 3 4 5\", \"6 2 2 3 4 7\", \"6 159 2 3 4 5\", \"6 200 2 3 8 8\", \"6 159 2 3 3 5\", \"6 3 1 3 4 8\", \"22 144 2 3 3 5\", \"17 144 2 3 6 5\", \"9 5 1 3 15 9\", \"17 22 2 3 6 7\", \"6 373 2 3 4 5\", \"6 200 2 4 8 5\", \"6 159...
none
{ "id": "p01356 Nearest Station", "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 plane is flying at a constant height of h meters a...
code
{ "ground_truth": "{\"inputs\": [\"3 4\\n2 5\\n7 9\\n10 11\\n\", \"1 1000000000\\n1 1000000000\\n\", \"5 10\\n5 7\\n11 12\\n16 20\\n25 26\\n30 33\\n\", \"5 10\\n2 3\\n4 5\\n6 7\\n10 14\\n16 20\\n\", \"5 10\\n4 5\\n6 8\\n9 10\\n11 13\\n16 17\\n\", \"5 10\\n2 5\\n6 8\\n9 10\\n12 14\\n18 19\\n\", \"2 3\\n1 2\\n3 4\\n\",...
rating_1601-1900
{ "id": "1041_D. Glider", "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": "Polycarp is an experienced participant in Codehorses...
code
{ "ground_truth": "{\"inputs\": [\"6 3\\n8 -5 -4 1 -7 4\\n0 7 3\\n\", \"5 5\\n0 0 -1 0 1\\n1 0 1 5 8\\n\", \"3 1\\n-10 -1 -1\\n10\\n\", \"1 5\\n-7\\n1 3 5 7 9\\n\", \"1 5\\n7\\n1 3 5 7 9\\n\", \"25 17\\n-747290759 -394391961 54166514 -794614361 -534923452 -493779839 -507474899 -872392162 -629654157 -859929908 -696685...
rating_>1900
{ "id": "727_F. Polycarp's problems", "rating": 2300, "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": "Polycarpus likes giving presents to Paraskevi. He ha...
code
{ "ground_truth": "{\"inputs\": [\"2 6\\n2 3\\n\", \"36 5\\n10 16\\n\", \"3 5\\n2 1\\n\", \"36 5\\n10 12\\n\", \"1 1\\n1 1\\n\", \"2 1\\n1 2\\n\", \"3 6\\n2 1\\n\", \"1 27\\n1 1\\n\", \"2 5\\n20 2\\n\", \"40 5\\n150 36\\n\", \"60 1080\\n60 45\\n\", \"2160 3240\\n7200 384\\n\", \"51840 900\\n48 27000\\n\", \"100 200\\...
HARD
{ "id": "taco-train-18453", "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": "Write a command line tool which takes a file path as...
code
{ "ground_truth": "{\"inputs\": [\"/home/sample.txt\\n\\nSAMPLE\", \"/home/input\", \"/home/inqut\", \"/home/sample.txt\\n\\nFLORMA\", \"txt.elpmas/emoh/\\n\\nSAMPLE\", \"/gome/inqut\", \"txt.elpmas/emoh/\\n\\nRAMPLE\", \"/gmoe/inqut\", \"txt.elpmas/emoh/\\n\\nMARPLE\", \"/gnoe/inqut\", \"txt.elpmas/emoh/\\n\\nMARPLF...
none
{ "id": "file-statistics", "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": "Takahashi wants to grill N pieces of meat on a grill...
code
{ "ground_truth": "{\"inputs\": [\"4 3\\n-1 0 3\\n0 0 3\\n1 0 2\\n1 1 40\\n\", \"10 5\\n-879 981 26\\n890 -406 81\\n512 859 97\\n362 -955 25\\n128 553 17\\n-885 763 2\\n449 310 57\\n-656 -204 11\\n-270 76 40\\n184 170 16\\n\", \"1 1\\n1000 1000 1\\n\", \"2 2\\n1000 1000 1\\n-1000 -1000 1\\n\", \"60 1\\n33 -822 93\\n4...
MEDIUM_HARD
{ "id": "taco-train-4429", "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": "Valera's finally decided to go on holiday! He packed...
code
{ "ground_truth": "{\"inputs\": [\"5\\n0 0 0 0 1\\n0 1 2 3 4\\n\", \"5\\n0 0 1 0 1\\n0 1 2 2 4\\n\", \"4\\n1 0 0 0\\n2 3 4 2\\n\", \"10\\n0 0 0 0 0 0 0 0 0 1\\n4 0 8 4 7 8 5 5 7 2\\n\", \"50\\n0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0\\n28 4 33 22 4 35 36 31 4...
MEDIUM
{ "id": "taco-train-15752", "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": "Lena is the most economical girl in Moscow. So, when...
code
{ "ground_truth": "{\"inputs\": [\"5\\n2 7\\n2 8\\n1 2\\n2 4\\n1 8\\n\", \"3\\n3 4\\n1 3\\n1 5\\n\", \"8\\n1 8\\n1 6\\n1 5\\n1 3\\n1 3\\n1 8\\n1 7\\n1 3\\n\", \"4\\n4 1\\n2 2\\n1 6\\n1 2\\n\", \"7\\n2 11\\n3 12\\n2 1\\n2 6\\n1 6\\n2 2\\n3 14\\n\", \"8\\n1 7\\n3 16\\n1 15\\n2 1\\n1 15\\n4 11\\n1 4\\n2 15\\n\", \"4\\n2...
rating_1401-1600
{ "id": "1539_D. PriceFixed", "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": "Mike has a sequence A = [a1, a2, ..., an] of length ...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 1\\n\", \"2\\n1 3\\n\", \"3\\n6 2 4\\n\", \"2\\n3 3\\n\", \"5\\n6 6 9 15 21\\n\", \"2\\n3 6\\n\", \"3\\n3 9 15\\n\", \"4\\n3 6 9 12\\n\", \"4\\n3 3 3 3\\n\", \"2\\n78 26\\n\", \"9\\n57 30 28 81 88 32 3 42 25\\n\", \"5\\n3 3 3 3 3\\n\", \"2\\n9 9\\n\", \"4\\n2 3 9 13\\n\", \"4\...
rating_1601-1900
{ "id": "798_C. Mike and gcd problem", "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 ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Ved is a salesman. He needs to earn at least W rupee...
code
{ "ground_truth": "{\"inputs\": [\"3\\n5 10\\n3 2 6 1 3\\n4 15\\n3 2 4 6\\n6 8\\n9 12 6 5 2 2\\n\"], \"outputs\": [\"2\\n0\\n5\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-16792", "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": "Polycarp doesn't like integers that are divisible by...
code
{ "ground_truth": "{\"inputs\": [\"10\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n1000\\n\", \"100\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n10\\n11\\n12\\n13\\n14\\n15\\n16\\n17\\n18\\n19\\n20\\n21\\n22\\n23\\n24\\n25\\n26\\n27\\n28\\n29\\n30\\n971\\n972\\n973\\n974\\n975\\n976\\n977\\n978\\n979\\n980\\n981\\n982\\n983\\n984\...
EASY
{ "id": "taco-train-9473", "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 was an electronic store heist last night.\n\nA...
code
{ "ground_truth": "{\"inputs\": [\"4\\n10 13 12 8\\n\", \"5\\n7 5 6 4 8\\n\", \"1\\n2\\n\", \"3\\n1000000000 500000000 2\\n\", \"30\\n793 656 534 608 971 970 670 786 978 665 92 391 328 228 340 681 495 175 659 520 179 396 554 481 631 468 799 390 563 471\\n\", \"40\\n194 121 110 134 172 142 195 135 186 187 128 161 185 ...
EASY
{ "id": "taco-train-10664", "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 string A. Find a string B, where B i...
code
{ "ground_truth": "{\"inputs\": [\"aba\\n\", \"ab\\n\", \"abcab\\n\", \"baaaaaaa\\n\", \"baaaaaa\\n\", \"baaaaaaaaa\\n\", \"baaaaaaaa\\n\", \"fggbyzobbmxtwdajawqdywnppflkkmtxzjvxopqvliwdwhzepcuiwelhbuotlkvesexnwkytonfrpqcxzzqzdvsmbsjcxxeugavekozfjlolrtqgwzqxsfgrnvrgfrqpixhsskbpzghndesvwptpvvkasfalzsetopervpwzmkgpcexq...
EASY
{ "id": "taco-train-11595", "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 an infinite one dimensional array ranging f...
code
{ "ground_truth": "{\"inputs\": [\"8000\\n1 1 1\\n1 1 2\\n1 1 3\\n1 1 4\\n1 1 5\\n1 1 6\\n1 1 7\\n1 1 8\\n1 1 9\\n1 1 10\\n1 1 11\\n1 1 12\\n1 1 13\\n1 1 14\\n1 1 15\\n1 1 16\\n1 1 17\\n1 1 18\\n1 1 19\\n1 1 20\\n1 2 1\\n1 2 2\\n1 2 3\\n1 2 4\\n1 2 5\\n1 2 6\\n1 2 7\\n1 2 8\\n1 2 9\\n1 2 10\\n1 2 11\\n1 2 12\\n1 2 13...
MEDIUM_HARD
{ "id": "taco-train-5759", "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": "problem\n\nThe city of IOI, where JOI lives, has a r...
code
{ "ground_truth": "{\"inputs\": [\"5 5\\n..483\\n.59.9\\n3.866\\n79...\\n4.8..\", \"5 5\\n..483\\n.59/9\\n3.866\\n79...\\n4.8..\", \"5 5\\n..438\\n.59.8\\n3.866\\n78...\\n4.8..\", \"5 5\\n..483\\n.59/:\\n3.866\\n79...\\n..84.\", \"5 5\\n..327\\n.69/8\\n3.866\\n7.9..\\n4.8..\", \"5 5\\n..438\\n.59.9\\n3.866\\n.97..\\n...
none
{ "id": "p00547 Food stalls", "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": "One day Kefa found n baloons. For convenience, we de...
code
{ "ground_truth": "{\"inputs\": [\"4 2\\naabb\\n\", \"6 3\\naacaab\\n\", \"2 2\\nlu\\n\", \"5 3\\novvoo\\n\", \"36 13\\nbzbzcffczzcbcbzzfzbbfzfzzbfbbcbfccbf\\n\", \"81 3\\nooycgmvvrophvcvpoupepqllqttwcocuilvyxbyumdmmfapvpnxhjhxfuagpnntonibicaqjvwfhwxhbv\\n\", \"100 100\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
EASY
{ "id": "taco-train-8332", "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": "J - Tree Reconstruction\n\nProblem Statement\n\nYou ...
code
{ "ground_truth": "{\"inputs\": [\"9 13\\n1 2\\n1 3\\n2 9\\n3 4\\n3 5\\n3 6\\n4 9\\n5 7\\n6 7\\n6 8\\n7 9\\n8 9\\n9 1\", \"9 13\\n1 2\\n1 3\\n2 9\\n3 4\\n3 5\\n3 6\\n4 9\\n5 8\\n6 7\\n6 8\\n7 9\\n8 9\\n9 1\", \"9 13\\n1 2\\n1 3\\n1 9\\n1 4\\n3 5\\n5 6\\n4 9\\n5 7\\n6 7\\n8 8\\n7 9\\n5 9\\n9 1\", \"9 1\\n1 1\\n1 3\\n1...
none
{ "id": "p01676 Tree Reconstruction", "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": "Ashish and Chandu were travelling to Japan. Chandu g...
code
{ "ground_truth": "{\"inputs\": [\"100000 676\\nddkqsktymyajyhvsdwbdhwydfhunbbacectejysgqkrcvatqvuskdgourwjnsjgnrysgqoqinwavdwomihpxmxlvbmiskruwizuuxdlafeakopicltrfsgdcohzjjphfbbzrumnetchwxwqblpcvhmqhswtrjnjdzmvvxhmlwckmykfsfyugkjsquvkdsqezuedshrbjprcktwxxzzohccvrnazdcmfyksynauybjjsnqklrrwofoeazxtujfnrzpmduhbkhykjwzk...
UNKNOWN_DIFFICULTY
{ "id": "taco-train-20563", "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 a rooted binary tree with N vertices, where ...
code
{ "ground_truth": "{\"inputs\": [\"15\\n123 119\\n129 120\\n132 112\\n126 109\\n118 103\\n115 109\\n102 100\\n130 120\\n105 105\\n132 115\\n104 102\\n107 107\\n127 116\\n121 104\\n121 115\\n8\\n8 234\\n9 244\\n10 226\\n11 227\\n12 240\\n13 237\\n14 206\\n15 227\", \"3\\n1 2\\n2 3\\n3 4\\n3\\n1 1\\n2 5\\n3 5\", \"15\\...
none
{ "id": "p02648 Tokio Marine & Nichido Fire Insurance Programming Contest 2020 - Knapsack Queries on a tree", "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": "Lakhesh loves to make movies, so Nephren helps her r...
code
{ "ground_truth": "{\"inputs\": [\"4 100 0 4\\n\", \"4 97 2 3\\n\", \"100000 996991027 54321 67890\\n\", \"95 1001 16 88\\n\", \"4 7 0 0\\n\", \"2 14 0 0\\n\", \"1 1 0 0\\n\", \"6536 692001792 2018 6535\\n\", \"100000 1073741824 2 98304\\n\", \"2 39 0 1\\n\", \"100000 100160063 2332 99774\\n\", \"3 999 0 3\\n\", \"4 ...
rating_>1900
{ "id": "896_D. Nephren Runs a Cinema", "rating": 2900, "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": "$2^n$ teams participate in a playoff tournament. The...
code
{ "ground_truth": "{\"inputs\": [\"3\\n101\\n\", \"1\\n1\\n\", \"2\\n01\\n\", \"2\\n00\\n\", \"1\\n0\\n\", \"2\\n11\\n\", \"3\\n000\\n\", \"3\\n010\\n\", \"3\\n111\\n\", \"4\\n0000\\n\", \"4\\n0100\\n\", \"4\\n0110\\n\", \"4\\n1011\\n\", \"4\\n1111\\n\", \"5\\n10110\\n\", \"5\\n01100\\n\", \"6\\n111000\\n\", \"6\\n10...
MEDIUM
{ "id": "taco-train-551", "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 are given an integer m.\n\nLet M = 2^{m} - 1.\n\...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n11010\\n00101\\n11000\\n\", \"30 2\\n010101010101010010101010101010\\n110110110110110011011011011011\\n\", \"30 10\\n001000000011000111000010010000\\n000001100001010000000000000100\\n000110100010100000000000101000\\n110000010000000001000000000000\\n1000010000000000100101010001...
VERY_HARD
{ "id": "taco-train-4359", "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": "You are given an array a of length n. We define fa t...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 3\\n\", \"3\\n1 1 2\\n\", \"7\\n177679021 237356752 791250000 455912656 693129227 678510224 60382864\\n\", \"1\\n364489807\\n\", \"1\\n194945396\\n\", \"3\\n855856619 518546431 920370158\\n\", \"4\\n1 1 8 10\\n\", \"9\\n25401015 88843847 702650194 306965770 57623156 571088345 ...
rating_>1900
{ "id": "938_E. Max History", "rating": 2300, "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": "Chef gives an integer $K$ in the input. If the give...
code
{ "ground_truth": "{\"inputs\": [[\"3\", \"3\", \"6\", \"8\"]], \"outputs\": [[\"2\", \"5\", \"8\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-18156", "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": "A simple recommendation system would recommend a use...
code
{ "ground_truth": "{\"inputs\": [\"3 3 2\\nYYY\\nNNN\\nYNY\\n\", \"4 4 1\\nNNNY\\nNNYN\\nNYNN\\nYNNN\\n\", \"3 5 2\\nNYNNY\\nYNNNN\\nNNYYN\\n\", \"1 10 1\\nYYYNYNNYNN\\n\", \"10 1 5\\nY\\nN\\nN\\nN\\nY\\nN\\nN\\nY\\nN\\nN\\n\", \"10 10 1\\nNNNNNNNNNN\\nNNNNNNNNNN\\nNNNNNNNNNN\\nNNNNNNNNNN\\nNNNNNNNNNN\\nNNNNNNNNNN\\n...
HARD
{ "id": "taco-train-7244", "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": "Anya loves to fold and stick. Today she decided to d...
code
{ "ground_truth": "{\"inputs\": [\"2 2 7\\n4 3\\n\", \"3 1 1\\n1 1 1\\n\", \"2 2 30\\n4 3\\n\", \"1 1 1\\n1\\n\", \"23 2 5065472115\\n428801639 184568779 477337858 18989778 249804431 579004904 679880522 901530462 200642926 941909941 377757672 300378484 103633484 503801915 910270476 13399319 214483686 671551510 986061...
rating_>1900
{ "id": "525_E. Anya and Cubes", "rating": 2100, "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": "Ramesses knows a lot about problems involving trees ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 2\\n2 3\\n3 4\", \"6\\n1 2\\n2 3\\n3 4\\n2 5\\n3 6\", \"5\\n1 2\\n1 3\\n1 4\\n1 5\", \"2\\n1 2\", \"8\\n1 2\\n1 3\\n1 4\\n1 8\\n7 8\\n6 8\\n5 8\", \"9\\n1 2\\n1 3\\n1 4\\n1 5\\n1 6\\n6 7\\n7 8\\n7 9\", \"3\\n2 3\\n1 2\"], \"outputs\": [\"Yes\\n1\\n1 4\", \"No\", \"Yes\\n4\\n1 ...
rating_1201-1400
{ "id": "981C", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }
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": "Illumination\n\nIlluminations are displayed in the c...
code
{ "ground_truth": "{\"inputs\": [\"10\\n1 1 0 0 1 0 1 1 1 0\", \"10\\n1 1 0 0 0 0 1 1 1 0\", \"10\\n1 1 0 0 0 0 1 1 1 1\", \"10\\n1 1 0 0 0 0 1 2 1 1\", \"10\\n1 1 0 0 -1 0 1 2 1 1\", \"10\\n1 1 0 0 -1 1 1 2 1 1\", \"10\\n1 1 0 0 -1 2 1 2 1 2\", \"10\\n-1 1 1 1 1 -1 -21 1 1 15\", \"10\\n1 1 0 0 -1 1 1 2 1 2\", \"10\\...
none
{ "id": "p00526 Illumination", "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 develops his own computer program for playing c...
code
{ "ground_truth": "{\"inputs\": [[\"4\", \"a1-b3\", \"d2-h8\", \"a3 c4\", \"ErrorError\"]], \"outputs\": [[\"Yes\", \"No\", \"Error\", \"Error\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-21154", "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": "D: XORANDORBAN\n\nProblem Statement\n\nYou are given...
code
{ "ground_truth": "{\"inputs\": [\"2 6 1 5\", \"2 6 0 5\", \"2 6 0 6\", \"2 5 0 4\", \"2 5 1 1\", \"2 5 1 0\", \"2 4 1 4\", \"2 4 0 3\", \"3 5 1 1\", \"3 5 1 0\", \"2 4 2 4\", \"3 4 0 3\", \"2 4 2 0\", \"4 4 2 0\", \"4 4 2 1\", \"4 7 2 1\", \"4 11 2 1\", \"4 11 3 1\", \"4 11 1 1\", \"9 2 0 1\", \"9 1 0 2\", \"2 6 1 3...
none
{ "id": "p02091 XORANDORBAN", "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": "As lockdown is going on so no is allowed to go outsi...
code
{ "ground_truth": "{\"inputs\": [[\"3 1\", \"3 5 11\"]], \"outputs\": [[\"2\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-17340", "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": "Permutation p is a sequence of integers p=[p_1, p_2,...
code
{ "ground_truth": "{\"inputs\": [\"4\\n5\\n1 3 4 5 5\\n4\\n1 1 3 4\\n2\\n2 2\\n1\\n1\\n\", \"4\\n5\\n2 3 4 5 5\\n4\\n1 1 3 4\\n2\\n2 2\\n1\\n1\\n\", \"4\\n5\\n1 3 4 5 5\\n4\\n1 1 4 4\\n2\\n2 2\\n1\\n1\\n\", \"4\\n5\\n1 3 3 5 5\\n4\\n1 1 1 4\\n2\\n2 2\\n1\\n1\\n\", \"4\\n5\\n1 3 4 4 5\\n4\\n1 1 1 4\\n2\\n2 2\\n1\\n1\\...
rating_<=1200
{ "id": "1227_B. Box", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Geek has N dollars in his bank account. He wants to w...
code
{ "ground_truth": "{\"inputs\": [\"N = 12\", \"N = 21\"], \"outputs\": [\"5\", \"7\"]}", "style": "rule" }
EASY
{ "id": "taco-train-22313", "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 of integers and an integer k, you need...
code
{ "ground_truth": "{\"fn_name\": \"findPairs\", \"inputs\": [[[3, 1, 4, 1, 5], 2]], \"outputs\": [2]}", "style": "rule" }
EASY
{ "id": "taco-train-7091", "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": "Read problems statements in Vietnamese .\n\nChef li...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2\\n1 2\\n3\\n1 2 1\\n4\\n2 6 5 2\"], \"outputs\": [\"2\\n2 1\\n2\\n2 1 1\\n4\\n6 2 2 5\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-5067", "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 stardate is 1977 and the science and art of dete...
code
{ "ground_truth": "{\"inputs\": [\"4\\nXOOO\\nXXOO\\nOOOO\\nXXXX\\nXOOO\\nXOOO\\nXOXO\\nXOXX\\n\", \"2\\nXX\\nOO\\nXO\\nOX\\n\", \"10\\nXXXOXOOXXX\\nOOXXOXXOXO\\nOOOOXOOXOX\\nXOOXOXOOXX\\nXOXXOXOOXX\\nOOOXXOXOXX\\nOOOXOOOOXO\\nOOXOOXXOXX\\nXXOXOOXOOX\\nOXXXOOXOXX\\nXXOXOOXXXO\\nXOOXOOXOXX\\nXXOXXOOXOO\\nOXOOOOXOOO\\n...
rating_1201-1400
{ "id": "958_A1. Death Stars (easy)", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "# Task\n\nYou are a lonely frog. \n\nYou live on an i...
code
{ "ground_truth": "{\"fn_name\": \"jumping\", \"inputs\": [[[0, 3, 0, 1, -3], 3], [[0, -1, -2, -3, -4], 4], [[0, -1, -2, -3, -4], 3], [[0, -1, -2, -3, -4], 2], [[0, -1, -2, -3, -4], 1]], \"outputs\": [[2], [2], [0], [3], [0]]}", "style": "rule" }
EASY
{ "id": "taco-train-15646", "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 integer array arr of size N. The Range of a ...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\\r\\n\\r\\narr[ ] = {1, 2, 3}\", \"N = 4\\r\\n\\r\\narr[ ] = {-32, 0, -2, 72}\"], \"outputs\": [\"4\", \"318\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-11169", "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": "Many years have passed, and n friends met at a party...
code
{ "ground_truth": "{\"inputs\": [\"3\\n10 1\\n20 2\\n30 3\\n\", \"3\\n3 1\\n2 2\\n4 3\\n\", \"1\\n5 10\\n\", \"1\\n1 1\\n\", \"1\\n1000 1000\\n\", \"1\\n1 1000\\n\", \"2\\n1 1000\\n1000 1\\n\", \"2\\n1 1\\n1000 1000\\n\", \"1\\n1000 1\\n\", \"5\\n407 830\\n12 199\\n768 215\\n668 28\\n628 310\\n\", \"3\\n379 820\\n923...
HARD
{ "id": "taco-train-21077", "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": "In an infinite binary tree:\n - Each node has exactl...
code
{ "ground_truth": "{\"inputs\": [\"P*P\\n\", \"L*R\\n\", \"**\\n\", \"LLLLLRRRRRLLLLLRRRRRLLLLLRRRRRLLLLL\\n\"], \"outputs\": [\"6\\n\", \"25\\n\", \"33\\n\", \"35400942560\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-6647", "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": "Knights' tournaments were quite popular in the Middl...
code
{ "ground_truth": "{\"inputs\": [\"2\", \"1\", \"3\", \"6\", \"4\", \"5\", \"7\", \"8\", \"11\", \"10\", \"9\", \"13\", \"12\", \"14\"], \"outputs\": [\"0\\n8\\n16\\n24\", \"2\\n2\", \"0\\n0\\n0\\n1152\\n4608\\n11520\\n23040\\n40320\\n\", \"0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0\\n0...
none
{ "id": "bintour", "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 is an infinite board of square tiles. Initiall...
code
{ "ground_truth": "{\"inputs\": [\"3 9\\n\", \"4 4\\n\", \"506 2708\\n\", \"3 6\\n\", \"9 3\\n\", \"97821761637600 97821761637600\\n\", \"99999999999962 99999999999973\\n\", \"1 1\\n\", \"11 49\\n\", \"2 2\\n\", \"1 6\\n\", \"99999999999973 99999999999971\\n\", \"11003163441270 11003163441270\\n\", \"87897897895 2983...
rating_>1900
{ "id": "1029_F. Multicolored Markers", "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": "There are N (labelled 1 to N) kingdoms in a country....
code
{ "ground_truth": "{\"inputs\": [\"1\\n4 4\\n1 2 24\\n1 4 20\\n3 1 3\\n4 3 12\\n1\\n\\nSAMPLE\"], \"outputs\": [\"24 3 15\"]}", "style": "rule" }
none
{ "id": "alexanders-journey-4", "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": "Right now you are to solve a very, very simple probl...
code
{ "ground_truth": "{\"inputs\": [\"3 3 1 1\\n\", \"2 1 2 4\\n\", \"1 2 4 2\\n\", \"1 1 1 1\\n\", \"698797440 708706737 226921438 376988902\\n\", \"787217985 597629316 333185503 222888215\\n\", \"2 2 2 2\\n\", \"844565526 132558538 559319000 336388544\\n\", \"698797440 708706737 226921438 376988902\\n\", \"502963600 6...
rating_>1900
{ "id": "42_C. Safe cracking", "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": "Given a triangle of numbers where each number is equ...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3\\n4\\n\"], \"outputs\": [\"2\\n3\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-24374", "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": "A magic number is a number formed by concatenation o...
code
{ "ground_truth": "{\"inputs\": [\"114114\\n\", \"1111\\n\", \"441231\\n\", \"1\\n\", \"14\\n\", \"114\\n\", \"9\\n\", \"414\\n\", \"1000000000\\n\", \"144144144\\n\", \"1444\\n\", \"11\\n\", \"141414141\\n\", \"11110111\\n\", \"114114144\\n\", \"444\\n\", \"9999\\n\", \"111444\\n\", \"11114\\n\", \"41111\\n\", \"114...
EASY
{ "id": "taco-train-2046", "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 want to encode a given string $S$ to a binary str...
code
{ "ground_truth": "{\"inputs\": [\"z\", \"aaabbcccdeeeffg\", \"abca\", \"y\", \"aaabbcccdeeegfg\", \"baca\", \"aaadbcccbeedgfg\", \"bbcb\", \"gegdeebcccbeaaa\", \"aeaaacccbeedgeg\", \"gegdeebccdaaaea\", \"gegdfebccdaaaea\", \"bedc\", \"abadbcccbeedhfg\", \"cggdeebcgcbeaaa\", \"x\", \"gfgeeedcccbbaaa\", \"acab\", \"w\...
none
{ "id": "p02254 Huffman Coding", "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 Pero has been into robotics recently, so he ...
code
{ "ground_truth": "{\"fn_name\": \"cards_and_pero\", \"inputs\": [[\"P01K02H03H04\"], [\"H02H10P11H02\"], [\"P10K10H10T01\"], [\"P05P01P02P03P13P09P11P07K01P12K03K02K13K12K10K08H03H02H13H12H10H08T01T03T02T13T12T10T08P04K07H02T07H06T11K11T05K05H05H11\"], [\"P01K02P03P11K09K10P13P10\"]], \"outputs\": [[[12, 12, 11, 13]...
EASY
{ "id": "taco-train-1457", "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": "Alice and Bob are going to drive from their home to ...
code
{ "ground_truth": "{\"inputs\": [\"5 1 5\\n1 0 1 0 0\\n0 2 1 0 0\\n2 0 0 1 0\\n1 0 0 1 0\\n0 1 1 0 1\\n0 0 0 1 0\\n0 0 0\", \"5 1 5\\n0 0 1 0 0\\n0 2 1 0 0\\n2 0 0 1 0\\n1 0 0 1 0\\n0 1 1 0 1\\n0 0 0 1 0\\n0 0 0\", \"5 1 5\\n1 0 1 0 1\\n0 2 1 0 0\\n2 0 0 1 0\\n1 0 0 1 0\\n0 1 1 0 1\\n0 0 0 1 0\\n0 0 0\", \"5 1 5\\n1 ...
none
{ "id": "p01289 Strange Couple", "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": "Franklin Jenkins is a programmer, but he isn’t good ...
code
{ "ground_truth": "{\"inputs\": [\"14\\nVAR ga;\\nVAR gb;\\nIF(ga > gb) {\\nVAR saa;\\nVAR sab;\\nIF(saa > ga) {\\nsaa = sab;\\n}\\n}\\nWHILE(gb > ga) {\\nVAR sba;\\nsba = ga;\\nga = gb;\\n}\\n7\\nVAR thisisthelongest;\\nIF(thisisthelongest / 0) {\\nVARone;\\none = thisisthelongest + 1234567890123456789012345;\\n}\\n...
none
{ "id": "p01221 Two-finger Programming", "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 two integers X and Y. Chef wants to perform...
code
{ "ground_truth": "{\"inputs\": [\"5\\n3 4\\n5 5\\n7 3\\n5 2\\n7 12\\n\"], \"outputs\": [\"1\\n0\\n2\\n3\\n5\\n\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-14516", "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": "Omar loves problem solving very much and today he fa...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n2 4 5 8 10\\n\\nSAMPLE\", \"39 7720\\n21239 2438 8856 11798 8366 32286 10451 30613 5854 28101 1143 282 20538 15922 8946 26286 2998 14681 20977 31892 21656 25907 18458 1324 28882 2241 9726 32279 2447 591 841 18588 16908 21238 23612 12618 12457 868 29534\", \"5 100\\n2 4 5 10000...
none
{ "id": "double-or-divide-1", "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": "*Jagdish Bhagat bolta hai... Gav se gav jod diya hai...
code
{ "ground_truth": "{\"inputs\": [\"3\\n5\\n0 0\\n0 1\\n0 2\\n2 0\\n1 0\\n5\\n-1 0\\n0 0\\n1 0\\n0 5\\n0 4\\n6\\n0 -1\\n1 0\\n-1 0\\n0 1\\n2 0\\n-2 0\"], \"outputs\": [\"2\\n2\\n5\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-10358", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "This kata is the second part of a series: [Neighbourh...
code
{ "ground_truth": "{\"fn_name\": \"get_neighbourhood\", \"inputs\": [[\"moore\", [[]], [0, 0]], [\"von_neumann\", [[]], [0, 0]], [\"moore\", [[], [], []], [0, 0]], [\"von_neumann\", [[], [], []], [0, 0]]], \"outputs\": [[[]], [[]], [[]], [[]]]}", "style": "rule" }
EASY
{ "id": "taco-train-11155", "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 set of points on a plane with positi...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 1\\n1 3\\n\", \"2\\n2 1\\n1 2\\n\"], \"outputs\": [\"6.0\\n\", \"4.5\\n\"]}", "style": "rule" }
rating_>1900
{ "id": "530_H. Points in triangle", "rating": 2100, "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": "In an attempt to control the rise in population, Arc...
code
{ "ground_truth": "{\"inputs\": [\"3\\njohn johanna\\nira ira\\nkayla jayla\", \"3\\njohn johanna\\nira ria\\nkayla jayla\", \"3\\njohn johanna\\nria ria\\nkayla jayla\", \"3\\njogn johanna\\nria qia\\nkayma jayla\", \"3\\nipoh o`gomka\\nbjr bjr\\njmya` aayjk\", \"3\\njohn johanna\\nria ria\\nkayma jayla\", \"3\\njoh...
EASY
{ "id": "taco-train-20374", "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 expression string x. Examine whether the pai...
code
{ "ground_truth": "{\"inputs\": [\"{([])}\", \"()\", \"([]\"], \"outputs\": [\"true\", \"true\", \"false\"]}", "style": "rule" }
EASY
{ "id": "taco-train-21174", "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": "Ilya is a very good-natured lion. He likes maths. Of...
code
{ "ground_truth": "{\"inputs\": [\"1\\n13\\n\", \"4\\n1 2 3 4\\n\", \"16\\n978618343 473608041 799158564 800910753 461479363 520477481 780529176 678879534 118274424 720632652 639921017 582019792 143353286 537373229 944668919 758615621\\n\", \"16\\n521848329 105907607 414661942 473600423 264555612 186332345 774233687 ...
MEDIUM
{ "id": "taco-train-16564", "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 an integer array arr and an integer difference,...
code
{ "ground_truth": "{\"fn_name\": \"longestSubsequence\", \"inputs\": [[[1, 2, 3, 4], 1]], \"outputs\": [4]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-17516", "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": "It's not the rivers that you might be thinking about...
code
{ "ground_truth": "{\"inputs\": [\"86\\n 12345\\n 0\", \"86\\n 12444\\n 0\", \"86\\n 5862\\n 0\", \"86\\n 9079\\n 0\", \"86\\n 7745\\n 0\", \"86\\n 9113\\n 0\", \"86\\n 9885\\n 0\", \"86\\n 4733\\n 0\", \"86\\n 18793\\n 0\", \"86\\n 6477\\n 0\", \"86\\n 18588\\n 0\", \"86\\n 4494\\n 0\", \"86\...
none
{ "id": "ai04", "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": "Let us call a non-empty sequence of lowercase Englis...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3\\naba\\nbaba\\naaab\\n2\\naa\\na\\n\", \"2\\n3\\naba\\nbaba\\naaab\\n2\\nab\\na\\n\", \"2\\n3\\naba\\nbaba\\ncaaa\\n2\\nab\\na\\n\", \"2\\n3\\naba\\nabab\\nacaa\\n2\\nab\\nb\\n\", \"2\\n3\\naab\\nbaba\\nacaa\\n2\\nbb\\na\\n\", \"2\\n3\\naba\\nbaba\\naaab\\n1\\naa\\na\\n\", \"2...
rating_>1900
{ "id": "856_B. Similar Words", "rating": 2300, "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": "You are given a permutation $p$ of $n$ integers $1$,...
code
{ "ground_truth": "{\"inputs\": [\"5\\n3 4 1 5 2\\n\", \"3\\n1 3 2\\n\", \"3\\n2 3 1\\n\", \"3\\n3 2 1\\n\", \"5\\n4 5 1 3 2\\n\", \"3\\n2 1 3\\n\", \"3\\n1 2 3\\n\", \"5\\n5 4 1 3 2\\n\", \"5\\n3 4 2 5 1\\n\", \"3\\n3 1 2\\n\", \"3\\n1 3 2\\n\", \"5\\n3 4 1 5 2\\n\"], \"outputs\": [\"2\\n\", \"1\\n\", \"1\\n\", \"0\...
HARD
{ "id": "taco-train-15576", "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 a sheet of paper that can be represented wi...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 1 3 2\\n1 1\\n1 1\\n2 2 2 3\\n2 1\\n1 1\\n2 2\\n\", \"1\\n2 4 2 5\\n2 3\\n2 4\\n2 1\\n1 3\\n2 4\\n\", \"3\\n5 5 7 6\\n1 1\\n2 2\\n3 3\\n4 4\\n5 5\\n1 5\\n5 5 7 5\\n1 1\\n2 2\\n3 3\\n4 4\\n5 5\\n5 5 7 7\\n1 1\\n2 2\\n3 3\\n4 4\\n5 5\\n1 5\\n2 3\\n\"], \"outputs\": [\"3\\n4\\n\"...
MEDIUM_HARD
{ "id": "taco-train-13067", "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": "-----Input-----\n\nThe only line of the input contai...
code
{ "ground_truth": "{\"inputs\": [\"A278832\\n\", \"A089956\\n\", \"A089957\\n\", \"A144045\\n\", \"A089946\\n\", \"A144035\\n\", \"A378822\\n\", \"A089947\\n\", \"A378282\\n\", \"A079948\\n\", \"A388282\\n\", \"A079848\\n\", \"A388822\\n\", \"A079849\\n\", \"B388822\\n\", \"A079749\\n\", \"B398822\\n\", \"A079759\\n\...
MEDIUM
{ "id": "taco-train-23891", "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": "Rikhail Mubinchik believes that the current definiti...
code
{ "ground_truth": "{\"inputs\": [\"1 1\", \"1 42\", \"6 4\", \"3 1\", \"42 1\", \"10000 239\", \"5 8\", \"7 11\", \"16 60\", \"214 210\", \"620 35\", \"940 480\", \"1307 3420\", \"6811 5416\", \"7 267\", \"106 6\", \"10000 10000\", \"10000 9999\", \"9999 9998\", \"9999 9999\", \"4 9\", \"1000 10000\", \"238 9996\", \...
rating_1401-1600
{ "id": "568A", "rating": 1600, "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": "The first algorithm for detecting a face on the imag...
code
{ "ground_truth": "{\"inputs\": [\"6 8\\nBBBBBBBB\\nBBBBBBBB\\nBBBBBBBB\\nWWWWWWWW\\nWWWWWWWW\\nWWWWWWWW\", \"3 3\\nWBW\\nBWW\\nWWW\", \"3 6\\nWWBBWW\\nWWBBWW\\nWWBBWW\", \"4 4\\nBBBB\\nBBBB\\nBBBB\\nBBBW\", \"10 9\\nBWWWBWWBB\\nBBWWBWBBW\\nBBWBWBWBB\\nBWBWBBBBB\\nBBWBWBWBW\\nBWWBWWBBW\\nWBWWWBWWW\\nWBBWBWBWW\\nBBWWB...
rating_1601-1900
{ "id": "549D", "rating": 1900, "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": "Alice likes word \"nineteen\" very much. She has a s...
code
{ "ground_truth": "{\"inputs\": [\"nniinneetteeeenn\\n\", \"nneteenabcnneteenabcnneteenabcnneteenabcnneteenabcii\\n\", \"nineteenineteen\\n\", \"nssemsnnsitjtihtthij\\n\", \"eehihnttehtherjsihihnrhimihrjinjiehmtjimnrss\\n\", \"rrrteiehtesisntnjirtitijnjjjthrsmhtneirjimniemmnrhirssjnhetmnmjejjnjjritjttnnrhnjs\\n\", \"...
MEDIUM
{ "id": "taco-train-959", "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": "Palindrome\n\nProblem Statement\n\nFind the number o...
code
{ "ground_truth": "{\"inputs\": [\"13\", \"106\", \"7447\", \"4\", \"8\", \"4752\", \"7\", \"23\", \"8517\", \"6\", \"39\", \"3483\", \"5\", \"1868\", \"1\", \"2667\", \"92\", \"3332\", \"61\", \"4989\", \"2\", \"5975\", \"5760\", \"741\", \"1111\", \"1000\", \"1001\", \"117\", \"6777\", \"3\", \"9\", \"209\", \"11\"...
none
{ "id": "p01601 Palindromic Number", "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": "Even the most successful company can go through a cr...
code
{ "ground_truth": "{\"inputs\": [\"8 6\\n3 2 5\\n1 2 5\\n3 2 5\\n2 4 7\\n2 1 2\\n3 1 7\", \"1 1\\n3 1 1\", \"1 3\\n1 1 1\\n2 1 1\\n3 1 1\"], \"outputs\": [\"NO\\nYES\\nYES\", \"YES\", \"YES\"]}", "style": "rule" }
rating_1601-1900
{ "id": "566D", "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 given a binary matrix a of size n × m. A bin...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n0 0 0\\n1 0 1\\n1 1 0\\n\", \"3 4\\n0 0 0 1\\n0 0 0 0\\n1 1 1 1\\n\", \"2 2\\n1 1\\n0 1\\n\", \"2 2\\n1 1\\n1 1\\n\", \"2 1\\n0\\n0\\n\", \"2 2\\n1 0\\n1 0\\n\", \"1 1\\n0\\n\", \"2 2\\n0 0\\n0 0\\n\", \"2 2\\n1 1\\n1 0\\n\", \"2 3\\n1 0 0\\n0 1 0\\n\", \"4 5\\n0 1 1 1 1\\n1 1...
rating_>1900
{ "id": "1157_G. Inverse of Rows and Columns", "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": "Malek has recently found a treasure map. While he wa...
code
{ "ground_truth": "{\"inputs\": [\"(((#)((#)\\n\", \"()((#((#(#()\\n\", \"#\\n\", \"(#)\\n\", \"(((((#(#(#(#()\\n\", \"#))))\\n\", \"((#(()#(##\\n\", \"##((((((()\\n\", \"(((((((((((((((((((###################\\n\", \"((#)(\\n\", \"((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((##\\n\", \")((##((###\\n...
MEDIUM
{ "id": "taco-train-2065", "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": "Training is indispensable for achieving good results...
code
{ "ground_truth": "{\"inputs\": [\"9 4 3 2 3\\n2 1\\n7 3\", \"9 4 3 2 1\\n2 1\\n7 3\", \"9 4 4 2 3\\n2 1\\n7 3\", \"9 4 3 2 0\\n2 1\\n7 3\", \"9 4 4 2 3\\n1 1\\n7 2\", \"9 6 4 2 3\\n2 1\\n7 3\", \"9 4 4 2 3\\n1 1\\n9 3\", \"16 4 4 2 3\\n1 1\\n7 2\", \"9 6 4 2 3\\n3 1\\n7 3\", \"9 5 4 2 3\\n1 1\\n9 3\", \"16 6 4 2 3\\...
none
{ "id": "p01411 Entangled with Lottery", "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": "One day Dima and Alex had an argument about the pric...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 2\\n2 1\\n\", \"3\\n1 2\\n2 3\\n3 1\\n\", \"3\\n2 2\\n3 3\\n1 1\\n\", \"4\\n4 1\\n3 2\\n2 3\\n1 4\\n\", \"3\\n1 2\\n2 1\\n3 3\\n\", \"1\\n1 1\\n\", \"3\\n3 3\\n1 2\\n2 1\\n\", \"3\\n3 2\\n1 1\\n2 3\\n\", \"2\\n2 1\\n1 2\\n\", \"2\\n1 1\\n2 2\\n\", \"3\\n2 3\\n1 1\\n3 2\\n\", \...
rating_<=1200
{ "id": "456_A. Laptops", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Geek is playing an array game. He is weak in the conc...
code
{ "ground_truth": "{\"inputs\": [\"arr[] = {7, 5, 3, 2},\\r\\n brr[] = {5, 4, 8, 7} and n = 4\", \"arr[] = {1, 2, 4},\\r\\n brr[] = {1, 2, 3} and n = 3\"], \"outputs\": [\"YES\", \"NO\"]}", "style": "rule" }
EASY
{ "id": "taco-train-19748", "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": "Scrooge McDuck keeps his most treasured savings in a...
code
{ "ground_truth": "{\"inputs\": [\"5\\n82195\\n64723\\n\", \"1\\n9\\n2\\n\", \"1\\n7\\n9\\n\", \"125\\n23269567683904664184142384849516523616863461607751021071772615078579713054027902974007001544768640273491193035874486891541257\\n476351103037033995058050440190262436954516096395566490124473700815528703400119715723634...
rating_<=1200
{ "id": "540_A. Combination Lock", "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": "Flatland is inhabited by pixels of three colors: red...
code
{ "ground_truth": "{\"inputs\": [\"1 1 1\\n\", \"3 1 0\\n\", \"9 530792195 6\\n\", \"0 0 10\\n\", \"1944219055 454183506 1369298327\\n\", \"914835 2742837 9234739\\n\", \"10 10 0\\n\", \"2 2 0\\n\", \"0 0 1\\n\", \"3 10 1007169359\\n\", \"0 1 0\\n\", \"1016450951 2 9\\n\", \"0 2 10\\n\", \"2147483648 0 2147483647\\n\...
rating_>1900
{ "id": "209_B. Pixels", "rating": 2100, "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": "### Longest Palindrome\n\nFind the length of the long...
code
{ "ground_truth": "{\"fn_name\": \"longest_palindrome\", \"inputs\": [[\"a\"], [\"aa\"], [\"baa\"], [\"aab\"], [\"baabcd\"], [\"baablkj12345432133d\"], [\"I like racecars that go fast\"], [\"abcdefghba\"], [\"\"], [\"FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedic...
EASY
{ "id": "taco-train-22042", "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": "Atish is very talkative. He just doesn't stop speaki...
code
{ "ground_truth": "{\"inputs\": [\"5\\n\\n0\\n1\\n24\\n13\\n87\\n\\nSAMPLE\", \"10\\n\\n24\\n39\\n1500\\n9999\\n9856\\n857\\n2365\\n998\\n7489\\n0\", \"5\\n\\n0\\n1\\n24\\n13\\n87\\n\\nRAMPLE\", \"5\\n\\n1\\n2\\n24\\n13\\n87\\n\\nRAMPLE\", \"5\\n\\n1\\n2\\n5\\n13\\n87\\n\\nRAMPLE\", \"5\\n\\n1\\n2\\n5\\n13\\n150\\n\\...
none
{ "id": "just-shut-up", "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": "Design a data structure that works like a LRU Cache. ...
code
{ "ground_truth": "{\"inputs\": [\"cap = 2\\r\\nQ = 2\\r\\nQueries = SET 1 2 GET 1\", \"cap = 2\\r\\nQ = 8\\r\\nQueries = SET 1 2 SET 2 3 SET 1 5\\r\\nSET 4 5 SET 6 7 GET 4 SET 1 2 GET 3\"], \"outputs\": [\"2\", \"5 -1\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-719", "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": "Ramesh and Suresh are now given One Last Task, to di...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2\\n\\nSAMPLE\", \"1\\n2\", \"1\\n100000000\"], \"outputs\": [\"3\", \"3\", \"987459712\"]}", "style": "rule" }
none
{ "id": "p-4", "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": "## A square of squares\nYou like building blocks. You...
code
{ "ground_truth": "{\"fn_name\": \"is_square\", \"inputs\": [[-1], [25], [26]], \"outputs\": [[false], [true], [false]]}", "style": "rule" }
EASY
{ "id": "taco-train-3127", "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": "This problem is same as the next one, but has smalle...
code
{ "ground_truth": "{\"inputs\": [\"6\\n1 1 1 2 2 2\\n\", \"7\\n3 2 1 1 4 5 1\\n\", \"1\\n10\\n\", \"5\\n10 2 5 4 1\\n\", \"13\\n1 1 1 2 2 2 3 3 3 4 4 4 5\\n\", \"1\\n100000\\n\", \"6\\n6 1 2 1 6 2\\n\", \"5\\n10 100 20 200 1\\n\", \"10\\n30518 30518 30518 30518 30518 30518 30518 30518 30518 30518\\n\", \"10\\n30518 9...
rating_1401-1600
{ "id": "1163_B1. Cat Party (Easy Edition)", "rating": 1500, "split": "confidence_train", "sub_source": "rating_1401-1600" }