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": "Takahashi, Aoki and Snuke love cookies. They have A,... | code | {
"ground_truth": "{\"inputs\": [\"14 14 14\", \"454 414 444\", \"4 12 20\", \"15 14 14\", \"454 414 846\", \"454 414 1200\", \"1390 18 4202\", \"0 0 0\", \"4 12 13\", \"15 14 7\", \"4 0 13\", \"15 17 7\", \"781 414 1200\", \"3 0 13\", \"15 17 13\", \"781 94 1200\", \"6 0 13\", \"15 25 13\", \"1390 94 1200\", \"6 0 2... | none | {
"id": "p03723 AtCoder Grand Contest 014 - Cookie Exchanges",
"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": "Astronaut Natasha arrived on Mars. She knows that th... | code | {
"ground_truth": "{\"inputs\": [\"3 10\\n10 20 30\\n\", \"2 8\\n12 20\\n\", \"2 300\\n3 10\\n\", \"60 30\\n10 30 45 15 25 60 10 40 35 25 5 40 35 40 15 5 15 35 10 60 25 15 60 10 30 10 5 25 10 15 60 20 30 5 50 50 40 20 55 40 35 15 15 10 60 40 50 50 30 15 25 45 35 40 15 5 5 20 60 45\\n\", \"1 8\\n6\\n\", \"30 30\\n11 2... | rating_1601-1900 | {
"id": "1010_C. Border",
"rating": 1800,
"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": "Multiplication of Big Integers\n\nGiven two integers... | code | {
"ground_truth": "{\"inputs\": [\"5 8\", \"5 16\", \"0 16\", \"-1 9\", \"-1 5\", \"-2 5\", \"-2 2\", \"-1 2\", \"-1 3\", \"1 -8\", \"1 -14\", \"1 -18\", \"1 -12\", \"1 -21\", \"1 -17\", \"1 -25\", \"1 -39\", \"1 -67\", \"2 -67\", \"2 -134\", \"3 -134\", \"6 -134\", \"6 -51\", \"7 -51\", \"3 -51\", \"3 -82\", \"6 -82... | none | {
"id": "p02474 Multiplication of Big Integers",
"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 a Hunter, you will undoubtedly face difficult obs... | code | {
"ground_truth": "{\"inputs\": [\"H\\nT\\n0.5\\n\", \"HH\\nTH\\n0.5\\n\"], \"outputs\": [\"0.5\\n\", \"0.25\\n\"]}",
"style": "rule"
} | HARD | {
"id": "taco-train-13490",
"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": "Count the number of labeled strongly connected digra... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1\\n2\\n3\\n4\\n1000\\n\"], \"outputs\": [\"1\\n1\\n18\\n1606\\n871606913\\n\"]}",
"style": "rule"
} | MEDIUM_HARD | {
"id": "taco-train-13403",
"rating": null,
"split": "confidence_train",
"sub_source": "MEDIUM_HARD"
} |
taco | [
{
"content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.",
"role": "system"
},
{
"content": "Write a function called that takes a string of parent... | code | {
"ground_truth": "{\"fn_name\": \"valid_parentheses\", \"inputs\": [[\")\"], [\"(\"], [\"\"], [\"hi)(\"], [\"hi(hi)\"], [\"hi(hi)(\"], [\"((())()())\"], [\"(c(b(a)))(d)\"], [\"hi(hi))(\"], [\"())(()\"]], \"outputs\": [[false], [false], [true], [false], [true], [false], [true], [true], [false], [false]]}",
"style":... | EASY | {
"id": "taco-train-1743",
"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": "Vasily the Programmer loves romance, so this year he... | code | {
"ground_truth": "{\"inputs\": [\"4 2\\n\", \"6 3\\n\", \"1000 1000\\n\", \"123 5\\n\", \"1000 2\\n\", \"1 2\\n\", \"1 3\\n\", \"1 4\\n\", \"2 2\\n\", \"3 2\\n\", \"3 3\\n\", \"999 2\\n\", \"1000 3\\n\", \"1000 4\\n\", \"1 1000\\n\", \"80 970\\n\", \"80 970\\n\", \"80 970\\n\", \"80 970\\n\", \"80 970\\n\", \"80 970... | EASY | {
"id": "taco-train-4874",
"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": "An exam for n students will take place in a long and... | code | {
"ground_truth": "{\"inputs\": [\"6\\n\", \"3\\n\", \"1\\n\", \"2\\n\", \"4\\n\", \"5\\n\", \"7\\n\", \"8\\n\", \"9\\n\", \"10\\n\", \"13\\n\", \"16\\n\", \"25\\n\", \"29\\n\", \"120\\n\", \"128\\n\", \"13\\n\", \"16\\n\", \"25\\n\", \"729\\n\", \"4993\\n\", \"10\\n\", \"4992\\n\", \"5\\n\", \"120\\n\", \"4181\\n\",... | EASY | {
"id": "taco-train-18713",
"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": "Recall that the permutation is an array consisting o... | code | {
"ground_truth": "{\"inputs\": [\"1 993244853\\n\", \"2 993244853\\n\", \"3 993244853\\n\", \"2019 993244853\\n\", \"2020 437122297\\n\", \"250000 993244853\\n\", \"244435 994838543\\n\", \"234324 994631069\\n\", \"249996 997202249\\n\", \"32433 992864681\\n\", \"4 389349601\\n\", \"5 141602633\\n\", \"6 223676287\\... | MEDIUM_HARD | {
"id": "taco-train-25215",
"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 a non-empty array containing only positive inte... | code | {
"ground_truth": "{\"fn_name\": \"canPartition\", \"inputs\": [[[1, 5, 5, 11]]], \"outputs\": [true]}",
"style": "rule"
} | MEDIUM_HARD | {
"id": "taco-train-6912",
"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 three strings (s1, s2, s3). For each i... | code | {
"ground_truth": "{\"inputs\": [\"abc\\nbc\\ncbc\\n\", \"abacaba\\nabac\\nabcd\\n\", \"aaaaa\\naaaaa\\naaaaa\\n\", \"abcde\\nghjra\\nabcde\\n\", \"a\\na\\na\\n\", \"asdfsasd\\nasdasfasd\\nasdasdasdasd\\n\", \"rmcykubkmzfzytwmzsptmcmvwtacraeurcyijydtufydwusmgy\\nrmcykubkmzfzytwmzsptmcmvwgacraeurcyijydtufydwufmgy\\nrt... | rating_>1900 | {
"id": "452_E. Three strings",
"rating": 2400,
"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": "Iahub likes chess very much. He even invented a new ... | code | {
"ground_truth": "{\"inputs\": [\"2\", \"3\", \"4\", \"10\", \"15\", \"100\", \"101\", \"500\", \"501\", \"755\", \"888\", \"998\", \"999\", \"1000\", \"1\"], \"outputs\": [\"2\\nC.\\n.C\", \"5\\nC.C\\n.C.\\nC.C\", \"8\\nC.C.\\n.C.C\\nC.C.\\n.C.C\", \"50\\nC.C.C.C.C.\\n.C.C.C.C.C\\nC.C.C.C.C.\\n.C.C.C.C.C\\nC.C.C.C.... | rating_<=1200 | {
"id": "384A",
"rating": 800,
"split": "confidence_train",
"sub_source": "rating_<=1200"
} |
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": "Harry came to know from Dumbledore that Salazar Slyt... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2 4 9\\n3 1 10\", \"2\\n2 1 100\\n5 1 100\", \"10\\n4 108 114\\n5 30 155\\n8 193 197\\n9 71 169\\n2 163 166\\n8 120 144\\n8 22 151\\n4 21 166\\n2 46 127\\n8 38 51\", \"20\\n9 142 172\\n7 132 256\\n8 245 315\\n9 496 496\\n3 345 362\\n8 13 162\\n5 342 470\\n9 16 488\\n9 467 482\\n... | rating_>1900 | {
"id": "855E",
"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 are two strings S and T consisting of lowercas... | code | {
"ground_truth": "{\"inputs\": [\"oder atc\\n\", \"humu humu\\n\", \"c a\\n\", \"oekdkfjdjgjknbfkwnfnhaoekdkfjdjgjknbfkwnfnhahjekkengkfoekdkfjdjgjknbfkwnfnhaoekdkfjdjgjknbfkwnfnhahj yowkymbmhkkgjjeokdlakbndkkworqotkfnblgpnkkrogjrfnvmbjisnbkzvmbnrrrigeoibgpefjobvmovpqosqoqrgrkengrlk\\n\", \"dttd dttddttddttddttddttdd... | EASY | {
"id": "taco-train-1711",
"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": "Programmers' kids solve this riddle in 5-10 minutes.... | code | {
"ground_truth": "{\"inputs\": [\"11\\n\", \"14\\n\", \"61441\\n\", \"571576\\n\", \"2128506\\n\", \"0\\n\", \"2000000000\\n\", \"143165576\\n\", \"1741\\n\", \"1919020031\\n\", \"1795248373\\n\", \"1818960378\\n\", \"1285316221\\n\", \"1309028227\\n\", \"1304312649\\n\", \"1180540990\\n\", \"1204252996\\n\", \"1199... | HARD | {
"id": "taco-train-18456",
"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": "Fox Ciel is going to travel to New Foxland during th... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n1 2\\n2 3\", \"4 4\\n1 2\\n2 3\\n3 4\\n4 1\", \"12 11\\n2 3\\n4 7\\n4 5\\n5 6\\n4 6\\n6 12\\n5 12\\n5 8\\n8 9\\n10 8\\n11 9\", \"13 0\", \"1 0\", \"2 0\", \"2 1\\n1 2\", \"4 4\\n1 2\\n2 3\\n3 1\\n1 4\", \"10 9\\n1 2\\n1 3\\n1 4\\n2 5\\n2 6\\n3 7\\n3 8\\n4 9\\n4 10\", \"5 10\\n... | rating_>1900 | {
"id": "512D",
"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 ... ```). Implement the required function(s) as specified; do not read from standard input.",
"role": "system"
},
{
"content": "Given a string s, return the maximum number of ocurre... | code | {
"ground_truth": "{\"fn_name\": \"maxFreq\", \"inputs\": [[\"\\\"aababcaab\\\"\", 2, 3, 4]], \"outputs\": [2]}",
"style": "rule"
} | MEDIUM | {
"id": "taco-train-13418",
"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 binary tree and a node data called target. Fi... | code | {
"ground_truth": "{\"inputs\": [\"1\\r\\n / \\\\\\r\\n 2 3\\r\\n / \\\\ \\\\\\r\\n 4 5 6\\r\\n / \\\\ \\\\\\r\\n 7 8 9\\r\\n \\\\\\r\\n 10\\r\\nTarget Node = 8\", \"1\\r\\n / \\\\\\r\\n 2 3\\r\\n / ... | MEDIUM_HARD | {
"id": "taco-train-15370",
"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": "It's dinner time. Ashish is very hungry and wants to... | code | {
"ground_truth": "{\"inputs\": [\"3\\n50 40 60\\n40 55 39\\n30 42 37\\n\"], \"outputs\": [\"PIZZA\\nBURGER\\nNOTHING\\n\"]}",
"style": "rule"
} | EASY | {
"id": "taco-train-4521",
"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": "Vasya has got $n$ books, numbered from $1$ to $n$, a... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n2 1 3\\n\", \"5\\n3 1 4 2 5\\n4 5 1 3 2\\n\", \"6\\n6 5 4 3 2 1\\n6 5 3 4 2 1\\n\", \"1\\n1\\n1\\n\", \"7\\n7 6 3 1 5 4 2\\n2 3 1 6 4 7 5\\n\", \"10\\n4 7 10 2 1 8 3 5 9 6\\n4 2 7 1 8 10 5 3 9 6\\n\", \"1\\n1\\n1\\n\", \"10\\n4 7 10 2 1 8 3 5 9 6\\n4 2 7 1 8 10 5 3 9 6\\... | EASY | {
"id": "taco-train-6377",
"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 has an empty grid with n rows and m columns. S... | code | {
"ground_truth": "{\"inputs\": [\"5 5\\n.....\\n.XXX.\\n.X.X.\\n.XXX.\\n.....\\n\", \"3 2\\n..\\n..\\n..\\n\", \"5 5\\n.....\\n.XXX.\\n.XXX.\\n.XXX.\\n.....\\n\", \"9 9\\n.........\\n.XXXXX.X.\\n.X...X...\\n.X.XXXXX.\\n.X.X.X.X.\\n.X.XXX.X.\\n.X.....X.\\n.XXXXXXX.\\n.........\\n\", \"5 5\\n.....\\n.XXX.\\n.X.X.\\n.X... | rating_>1900 | {
"id": "1567_F. One-Four Overload",
"rating": 2700,
"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": "Your task is to calculate the distance between two $... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n2 0 4\", \"3\\n2 2 3\\n2 0 4\", \"3\\n2 2 3\\n2 -1 4\", \"3\\n2 4 5\\n2 -1 4\", \"3\\n3 4 5\\n2 -1 4\", \"3\\n6 4 5\\n2 -1 4\", \"3\\n6 5 5\\n2 -1 4\", \"3\\n6 5 5\\n2 -1 3\", \"3\\n6 5 8\\n2 -1 3\", \"3\\n6 5 8\\n3 -1 3\", \"3\\n6 7 8\\n3 -1 3\", \"3\\n6 9 8\\n3 -1 3\",... | none | {
"id": "p02382 Distance II",
"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 going to eat X red apples and Y green apples... | code | {
"ground_truth": "{\"inputs\": [\"1 2 2 2 1\\n2 4\\n5 1\\n3\\n\", \"2 2 2 2 2\\n8 6\\n9 1\\n2 1\\n\", \"2 2 4 4 4\\n11 12 13 14\\n21 22 23 24\\n1 2 3 4\\n\", \"2 2 2 2 3\\n8 6\\n9 1\\n2 1\", \"1 2 2 2 1\\n3 4\\n5 1\\n3\", \"2 2 4 4 4\\n11 12 13 14\\n21 22 23 22\\n1 2 3 4\", \"2 2 2 2 3\\n8 1\\n9 1\\n2 1\", \"0 2 2 2... | MEDIUM | {
"id": "taco-train-24295",
"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": "Kuro is living in a country called Uberland, consist... | code | {
"ground_truth": "{\"inputs\": [\"3 1 3\\n1 2\\n2 3\", \"3 1 3\\n1 2\\n1 3\", \"61 26 12\\n33 38\\n32 8\\n27 59\\n1 21\\n61 57\\n61 22\\n35 18\\n61 14\\n39 56\\n50 10\\n1 42\\n21 43\\n61 41\\n31 30\\n35 9\\n23 28\\n39 34\\n39 4\\n39 25\\n27 60\\n45 51\\n1 11\\n35 26\\n29 15\\n23 44\\n31 2\\n35 27\\n39 20\\n1 24\\n1 ... | rating_1401-1600 | {
"id": "979C",
"rating": 1600,
"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 ... ```). The program must read from standard input and write the answer to standard output.",
"role": "system"
},
{
"content": "You are given two integers N and K. Find number of o... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2 1\\n3 0\\n9 100\\n\"], \"outputs\": [\"6\\n42\\n260610\\n\"]}",
"style": "rule"
} | MEDIUM_HARD | {
"id": "taco-train-9909",
"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 square matrices Grid1 and Grid2 with the sa... | code | {
"ground_truth": "{\"inputs\": [\"N=2\\nGrid1=[[1,2],[3,4]]\\nGrid2=[[1,2],[3,4]]\", \"N=2\\nGrid1=[[1,2][3,4]]\\nGrid2=[[1,2][3,2]]\"], \"outputs\": [\"1\", \"0\"]}",
"style": "rule"
} | EASY | {
"id": "taco-train-16394",
"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": "Snuke has permutations (P_0,P_1,\\cdots,P_{N-1}) and... | code | {
"ground_truth": "{\"inputs\": [\"32\\n22 31 30 29 7 17 16 3 14 9 19 11 2 5 10 1 25 18 15 24 20 0 12 21 27 4 26 28 8 6 23 13\\n22 3 2 7 17 9 16 4 14 8 19 26 28 5 10 1 25 18 15 13 11 0 12 23 21 20 29 24 27 6 30 31\", \"4\\n2 1 3 0\\n0 2 3 1\", \"10\\n0 4 5 3 7 8 2 1 9 6\\n3 8 5 6 4 0 2 1 7 9\", \"4\\n2 1 3 0\\n2 0 3 ... | none | {
"id": "p02908 AtCoder Grand Contest 038 - Two Permutations",
"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": "Lots of geeky customers visit our chef's restaurant ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n11111110\\n10101010101010\", \"2\\n11101110\\n10101010101010\", \"2\\n11111110\\n10101010111010\", \"2\\n01010010\\n10000000111111\", \"2\\n11111111\\n11000001111100\", \"2\\n11101110\\n10101010111010\", \"2\\n11111110\\n10100010111010\", \"2\\n01111110\\n10100010111010\", \"2\\... | none | {
"id": "error",
"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": "Let's define a forest as a non-directed acyclic grap... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2 3\\n1 0\\n1 0\", \"2\\n1 1\\n1 0\", \"10\\n3 13\\n2 6\\n1 5\\n3 5\\n1 3\\n2 2\\n2 6\\n1 6\\n1 3\\n2 3\", \"10\\n1 2\\n1 7\\n1 0\\n1 8\\n0 0\\n1 9\\n0 0\\n1 1\\n1 3\\n1 5\", \"5\\n1 1\\n2 2\\n2 2\\n2 6\\n1 3\", \"10\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\\n0 0\",... | rating_1401-1600 | {
"id": "501C",
"rating": 1500,
"split": "confidence_train",
"sub_source": "rating_1401-1600"
} |
codecontests | [
{
"content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.",
"role": "system"
},
{
"content": "You've got a table of size n × m. We'll consider the... | code | {
"ground_truth": "{\"inputs\": [\"4 5\\n.....\\n.###.\\n.###.\\n.....\\n\", \"2 3\\n...\\n...\\n\", \"10 10\\n.#.#.#.#..\\n#...##.###\\n...#...##.\\n..##......\\n#.###..#.#\\n.###..#.#.\\n...#...##.\\n.....#.##.\\n.#.#....##\\n#....###..\\n\", \"8 10\\n.#........\\n..........\\n...#....#.\\n...#......\\n..........\\... | rating_>1900 | {
"id": "348_D. Turtles",
"rating": 2500,
"split": "confidence_train",
"sub_source": "rating_>1900"
} |
taco | [
{
"content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.",
"role": "system"
},
{
"content": "Strings of yarn have been popular in Catland for age... | code | {
"ground_truth": "{\"inputs\": [\"pastimeofwhimsy\\n\", \"yarn\\n\"], \"outputs\": [\"1\\n\", \"4\\n\"]}",
"style": "rule"
} | HARD | {
"id": "taco-train-6941",
"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": "# Task\n The `hamming distance` between a pair of num... | code | {
"ground_truth": "{\"fn_name\": \"hamming_distance\", \"inputs\": [[25, 87], [256, 302], [543, 634], [34013, 702]], \"outputs\": [[4], [4], [4], [7]]}",
"style": "rule"
} | EASY | {
"id": "taco-train-8715",
"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 n integers is called a permutation if ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 0\\n5 2\\n6 6\\n2 1\\n6 1\\n\", \"5\\n1 0\\n5 2\\n6 6\\n2 1\\n6 1\\n\", \"1\\n79 29\\n\", \"5\\n1 0\\n5 2\\n6 6\\n2 0\\n6 1\\n\", \"5\\n1 0\\n2 2\\n6 6\\n2 0\\n6 1\\n\", \"1\\n79 31\\n\", \"5\\n1 0\\n5 2\\n6 6\\n2 1\\n4 1\\n\", \"5\\n1 1\\n5 2\\n6 6\\n2 0\\n6 1\\n\", \"1\\n79 ... | rating_<=1200 | {
"id": "1513_A. Array and Peaks",
"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": "By the age of three Smart Beaver mastered all arithm... | code | {
"ground_truth": "{\"inputs\": [\"5 5\\n1 3 1 2 4\\n2 1 4\\n2 1 5\\n2 2 4\\n1 3 10\\n2 1 5\\n\", \"1 3\\n2\\n2 1 1\\n1 1 3\\n2 1 1\\n\", \"11 11\\n6 1 9 0 2 9 1 6 2 8 0\\n2 9 9\\n1 9 0\\n1 1 8\\n2 2 5\\n2 7 11\\n2 2 8\\n1 3 2\\n1 10 0\\n2 1 8\\n2 9 11\\n1 9 7\\n\", \"11 18\\n14 13 18 17 14 17 13 3 0 3 21\\n2 6 9\\n2... | MEDIUM | {
"id": "taco-train-22369",
"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 string S and T consisting of lowercase... | code | {
"ground_truth": "{\"inputs\": [\"aaaaaaaaaaaaaaab\\naaaaaaaaaaaaaaab\", \"kyoto\\ntokyo\", \"abc\\narc\", \"aaaaaaaaaaaaaaab\\naaaabaaaaaaaaaaa\", \"kyoto\\ntnkyo\", \"cba\\narc\", \"aaaaaabaaaaaaaab\\naaaabaaaaaaaaaaa\", \"kyoto\\ntmkyo\", \"cba\\ncra\", \"aaaaaabaaaaaaaab\\naaaaaaaaaaabaaaa\", \"kyoso\\ntmkyo\", ... | none | {
"id": "p03293 AtCoder Beginner Contest 103 - String Rotation",
"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 table consisting of n rows and m col... | code | {
"ground_truth": "{\"inputs\": [\"2 4\\n1 3 2 4\\n1 3 4 2\\n\", \"4 4\\n1 2 3 4\\n2 3 4 1\\n3 4 1 2\\n4 1 2 3\\n\", \"3 6\\n2 1 3 4 5 6\\n1 2 4 3 5 6\\n1 2 3 4 6 5\\n\", \"3 10\\n1 2 3 4 5 6 7 10 9 8\\n5 2 3 4 1 6 7 8 9 10\\n1 2 3 4 5 6 7 8 9 10\\n\", \"5 12\\n1 2 3 4 5 6 7 10 9 8 11 12\\n1 2 3 4 5 6 7 10 9 8 11 12\... | MEDIUM | {
"id": "taco-train-25320",
"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": "You are given a string *s* and should process *m* qu... | code | {
"ground_truth": "{\"inputs\": [\"abacaba\\n2\\n3 6 1\\n1 4 2\", \"u\\n1\\n1 1 1\", \"p\\n5\\n1 1 5\\n1 1 9\\n1 1 10\\n1 1 10\\n1 1 4\", \"ssssssssss\\n5\\n5 7 9\\n3 9 3\\n2 7 1\\n7 7 10\\n1 9 6\", \"tcpyzttcpo\\n10\\n2 3 6\\n2 4 1\\n2 6 9\\n7 10 5\\n2 3 5\\n4 5 6\\n3 4 5\\n7 9 4\\n9 10 7\\n1 10 8\", \"yywlblbblw\\n... | rating_1201-1400 | {
"id": "598B",
"rating": 1300,
"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": "Snuke and Raccoon have a heap of N cards. The i-th c... | code | {
"ground_truth": "{\"inputs\": [\"6\\n1 2 3 4 5 6\", \"2\\n10 -10\", \"6\\n0 2 3 4 5 6\", \"2\\n0 -10\", \"6\\n0 2 3 7 5 6\", \"2\\n0 -19\", \"6\\n-1 2 3 7 5 6\", \"2\\n1 -19\", \"2\\n1 -33\", \"2\\n0 -33\", \"6\\n1 2 3 7 8 8\", \"2\\n-1 -33\", \"6\\n1 2 3 7 8 13\", \"2\\n-1 -47\", \"6\\n1 3 3 7 8 13\", \"2\\n-1 -75... | none | {
"id": "p03659 AtCoder Beginner Contest 067 - Splitting Pile",
"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": "We have a tree with N vertices. Vertex 1 is the root... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 1\\n4 3 2\", \"8\\n1 1 1 3 4 5 5\\n4 1 6 2 2 1 3 3\", \"1\\n\\n0\", \"3\\n1 2\\n1 2 3\", \"3\\n1 1\\n6 3 2\", \"8\\n1 2 2 3 4 5 5\\n4 1 6 2 2 1 3 3\", \"8\\n1 1 1 3 4 5 5\\n6 1 6 2 2 1 3 3\", \"1\\n\\n1\", \"3\\n1 1\\n6 6 2\", \"1\\n\\n2\", \"3\\n1 1\\n3 6 2\", \"1\\n\\n3\", \... | none | {
"id": "p03603 AtCoder Regular Contest 083 - Bichrome Tree",
"rating": 0,
"split": "confidence_train",
"sub_source": "none"
} |
taco | [
{
"content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.",
"role": "system"
},
{
"content": "Read problems statements in Mandarin Chinese, Russia... | code | {
"ground_truth": "{\"inputs\": [\"2\\n1\\n8\", \"2\\n0\\n8\", \"2\\n0\\n6\", \"2\\n-1\\n1\", \"2\\n-4\\n0\", \"2\\n0\\n1\", \"2\\n0\\n0\", \"2\\n0\\n-1\", \"2\\n1\\n-1\", \"2\\n2\\n-1\", \"2\\n-1\\n-1\", \"2\\n-2\\n-1\", \"2\\n-4\\n-1\", \"2\\n-4\\n-2\", \"2\\n-4\\n1\", \"2\\n-3\\n1\", \"2\\n-3\\n2\", \"2\\n-4\\n2\"... | MEDIUM | {
"id": "taco-train-484",
"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": "Division of Big Integers\n\nGiven two integers $A$ a... | code | {
"ground_truth": "{\"inputs\": [\"5 8\", \"5 16\", \"9 6\", \"18 6\", \"18 3\", \"21 3\", \"21 4\", \"16 4\", \"2 1\", \"52 6\", \"36 4\", \"-1 1\", \"18 1\", \"36 1\", \"21 1\", \"45 1\", \"11 1\", \"29 1\", \"-2 1\", \"4 -1\", \"3 -1\", \"14 1\", \"22 1\", \"17 1\", \"28 1\", \"21 2\", \"-6 1\", \"41 1\", \"55 4\"... | none | {
"id": "p02475 Division of Big Integers",
"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\nYou have to write a function **pattern** ... | code | {
"ground_truth": "{\"fn_name\": \"pattern\", \"inputs\": [[1], [3], [7], [0], [-25]], \"outputs\": [[\"1\"], [\" 1 \\n 121 \\n12321\\n 121 \\n 1 \"], [\" 1 \\n 121 \\n 12321 \\n 1234321 \\n 123454321 \\n 12345654321 \\n1234567654321\\n 12345654321 \\n 123454321 \\n 1234321 \\n... | EASY | {
"id": "taco-train-1482",
"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\nTwo players - `\"black\"` and `\"white\"` are... | code | {
"ground_truth": "{\"fn_name\": \"whoseMove\", \"inputs\": [[\"black\", false], [\"white\", false], [\"black\", true], [\"white\", true]], \"outputs\": [[\"white\"], [\"black\"], [\"black\"], [\"white\"]]}",
"style": "rule"
} | EASY | {
"id": "taco-train-24891",
"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 arr.\nWe want to select th... | code | {
"ground_truth": "{\"fn_name\": \"countTriplets\", \"inputs\": [[[2, 3, 1, 6, 7]]], \"outputs\": [4]}",
"style": "rule"
} | MEDIUM | {
"id": "taco-train-10634",
"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": "This time no story, no theory. The examples below sho... | code | {
"ground_truth": "{\"fn_name\": \"accum\", \"inputs\": [[\"ZpglnRxqenU\"], [\"NyffsGeyylB\"], [\"MjtkuBovqrU\"], [\"EvidjUnokmM\"], [\"HbideVbxncC\"], [\"VwhvtHtrxfE\"], [\"KurgiKmkphY\"], [\"NctlfBlnmfH\"], [\"WegunHvbdmV\"], [\"VoywwSpqidE\"], [\"VbaixFpxdcO\"], [\"OlyqvYwkuzF\"], [\"JrhfdMtchiH\"], [\"JiwpcSwslvW... | EASY | {
"id": "taco-train-1926",
"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": "Vladik often travels by trains. He remembered some o... | code | {
"ground_truth": "{\"inputs\": [\"6\\n4 4 2 5 2 3\\n\", \"9\\n5 1 3 1 5 2 4 2 5\\n\", \"5\\n1558 4081 3591 1700 3232\\n\", \"10\\n3838 1368 4825 2068 4755 2048 1342 4909 2837 4854\\n\", \"10\\n4764 4867 2346 1449 1063 2002 2577 2089 1566 614\\n\", \"10\\n689 3996 3974 4778 1740 3481 2916 2744 294 1376\\n\", \"100\\n... | HARD | {
"id": "taco-train-25136",
"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": "As a proud hero, you are finally about to reach the ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3\\n1 1\\n2 2\\n1 2\\n3\\n-1 1\\n-1 2\\n-2 2\\n1 1 2 2\\n0 0 0 1\\n2\\n10\\n1 1\\n7 1\\n7 5\\n5 5\\n5 3\\n6 3\\n6 2\\n3 2\\n3 5\\n1 5\\n10\\n-1 1\\n-1 5\\n-3 5\\n-3 3\\n-2 3\\n-2 2\\n-5 2\\n-5 5\\n-7 5\\n-7 1\\n2 4 6 4\\n0 0 0 1\\n2\\n7\\n-7 0\\n-5 0\\n-4 3\\n-3 0\\n-1 0\\n-1 4\... | none | {
"id": "p01626 MirrorLabyrinth",
"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 array a consisting of n positive in... | code | {
"ground_truth": "{\"inputs\": [\"3\\n3\\n1 4 3\\n1\\n15\\n2\\n3 5\\n\", \"1\\n2\\n1 1\\n\", \"14\\n1\\n2\\n1\\n1\\n2\\n2 2\\n2\\n2 1\\n2\\n1 2\\n2\\n1 1\\n3\\n2 2 2\\n3\\n2 2 1\\n3\\n2 1 2\\n3\\n2 1 1\\n3\\n1 2 2\\n3\\n1 2 1\\n3\\n1 1 2\\n3\\n1 1 1\\n\", \"1\\n3\\n1 1\\n\", \"3\\n3\\n1 4 3\\n1\\n15\\n2\\n2 5\\n\", ... | rating_<=1200 | {
"id": "1323_A. Even Subset Sum Problem",
"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": "Little Robber Girl likes to scare animals in her zoo... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 2 1 2 1\\n\", \"4\\n2 1 4 3\\n\", \"7\\n36 28 57 39 66 69 68\\n\", \"7\\n36 28 57 39 66 69 68\\n\", \"4\\n2 1 4 3\\n\", \"87\\n2 2 1 2 3 1 3 2 3 2 3 3 1 3 3 3 2 2 1 1 2 3 2 1 2 2 3 3 1 1 1 3 2 3 1 2 1 3 3 3 3 3 3 2 3 2 3 3 2 1 1 3 1 1 3 3 2 3 1 1 3 3 3 2 3 1 3 2 2 2 1 3 3 3 1 ... | rating_<=1200 | {
"id": "686_B. Little Robber Girl's Zoo",
"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": "We call a sequence of $n$ non-negative integers, ${A... | code | {
"ground_truth": "{\"inputs\": [\"3 5\\n2 6 4\\n\", \"1 5\\n7\\n\", \"3 5\\n2 6 4\\n\", \"1 5\\n7\\n\", \"2 10\\n5 5\\n\", \"4 20\\n6 12 18 24\\n\", \"3 8\\n8 8 8\\n\", \"2 10\\n10 5\\n\", \"3 15\\n3 6 9\\n\", \"2 5\\n2 4\\n\", \"4 50\\n10 20 30 40\\n\", \"2 4\\n4 4\\n\", \"3 6\\n2 4 6\\n\", \"1 1\\n1\\n\", \"4 100\... | MEDIUM | {
"id": "taco-test-833",
"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": "-----Input-----\n\nThe input contains a single integ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n\", \"4\\n\", \"27\\n\", \"42\\n\", \"1\\n\", \"3\\n\", \"64\\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\", \"21\\n\", \"22\\n\", \"23\\n\", \"24\\n\... | HARD | {
"id": "taco-train-5815",
"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": "In some country live wizards. They love to ride trol... | code | {
"ground_truth": "{\"inputs\": [\"1 2 26\\n28 29\\n\", \"3 10 10000\\n0 10\\n5 11\\n1000 1\\n\", \"3 6 19\\n12 3\\n20 24\\n30 2\\n\", \"1 2 7\\n20 13\\n\", \"7 8 3\\n1 3\\n5 26\\n7 3\\n10 15\\n18 7\\n21 17\\n23 21\\n\", \"1 1 722397\\n556297 454495\\n\", \"1 100000 363166\\n560443 753304\\n\", \"1 1000000 1000000\\n... | rating_1401-1600 | {
"id": "167_A. Wizards and Trolleybuses",
"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": "This is an interactive problem.\n\nKochiya Sanae is ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n4\\n\\n\\n\\n0\\n\\n\\n\\n1\\n\\n\\n\\n0\\n\\n\\n\\n0\\n\\n\", \"1\\n4\\nNN--\\n\", \"1\\n4\\nON--\\n\", \"1\\n4\\n\\n\\n\\n0\\n\\n\\n\\n1\\n\\n\\n\\n1\\n\\n\\n\\n0\\n\\n\", \"1\\n4\\n\\n\\n\\n0\\n\\n\\n\\n0\\n\\n\\n\\n1\\n\\n\\n\\n1\\n\\n\", \"1\\n6\\n.-NO\\n\", \"1\\n4\\n\\n\\... | rating_>1900 | {
"id": "1491_F. Magnets",
"rating": 2700,
"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": "Dark is going to attend Motarack's birthday. Dark de... | code | {
"ground_truth": "{\"inputs\": [\"7\\n5\\n-1 10 -1 12 -1\\n5\\n-1 40 35 -1 35\\n6\\n-1 -1 9 -1 3 -1\\n2\\n-1 -1\\n2\\n0 -1\\n4\\n1 -1 3 -1\\n7\\n1 -1 7 5 2 -1 5\\n\", \"7\\n5\\n-1 10 -1 12 -1\\n5\\n-1 40 35 -1 35\\n6\\n-1 -1 9 -1 3 -1\\n2\\n-1 -1\\n2\\n0 -1\\n4\\n1 -1 3 -1\\n7\\n1 -1 7 5 2 -1 5\\n\", \"7\\n5\\n-1 10... | MEDIUM | {
"id": "taco-train-3377",
"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 Chris is bored during his physics lessons (to... | code | {
"ground_truth": "{\"inputs\": [\"4\\n3 2 1 2\\n\", \"3\\n2 3 8\\n\", \"5\\n2 1 2 1 2\\n\", \"1\\n1\\n\", \"2\\n4 3\\n\", \"6\\n100 40 60 20 1 80\\n\", \"10\\n10 8 6 7 5 3 4 2 9 1\\n\", \"10\\n1 2 3 4 5 6 7 8 9 10\\n\", \"100\\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 ... | EASY | {
"id": "taco-train-5490",
"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\nGiven an array `arr`, find the maximal value ... | code | {
"ground_truth": "{\"fn_name\": \"finding_k\", \"inputs\": [[[1, 2, 3]], [[1, 1, 1]], [[5, 2, 8]], [[4, 1, 7]], [[1, 7, 13]], [[4, 5, 4]], [[5, 6, 7, 8]], [[10, 100]], [[64, 8, 1]], [[2, 9, 30]]], \"outputs\": [[1], [-1], [3], [3], [6], [1], [1], [90], [7], [7]]}",
"style": "rule"
} | EASY | {
"id": "taco-train-2162",
"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 October day a mathematics teacher Vasily Pe... | code | {
"ground_truth": "{\"inputs\": [\"6\\nLLRLLL\\n\", \"4\\nRRLL\\n\", \"4\\nLLRR\\n\", \"6\\nRLLRRL\\n\", \"8\\nLRLRLLLR\\n\", \"10\\nRLLRLRRRLL\\n\", \"12\\nLRRRRRLRRRRL\\n\", \"14\\nRLLRLLLLRLLLRL\\n\", \"16\\nLLLRRRLRRLLRRLLL\\n\", \"18\\nRRRLLLLRRRLRLRLLRL\\n\", \"20\\nRLRLLRLRRLLRRRRRRLRL\\n\", \"22\\nRLLLRLLLRRL... | EASY | {
"id": "taco-train-22299",
"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 Zuia Kingdom has finally emerged through annexat... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 2\\n3 4\\n3 2\", \"5\\n7 41\\n10 0\\n99 27\\n71 87\\n14 25\", \"3\\n1 2\\n3 4\\n10 1\", \"3\\n1 2\\n3 4\\n3 3\", \"5\\n7 60\\n10 0\\n99 27\\n71 87\\n14 25\", \"3\\n0 2\\n3 4\\n10 1\", \"3\\n1 2\\n5 4\\n3 3\", \"5\\n7 60\\n10 0\\n99 27\\n71 87\\n3 25\", \"3\\n-1 2\\n3 4\\n10 1\... | none | {
"id": "p00398 Road Construction",
"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 string containing only three types of charact... | code | {
"ground_truth": "{\"fn_name\": \"checkValidString\", \"inputs\": [[\"\\\"()\\\"\"]], \"outputs\": [true]}",
"style": "rule"
} | MEDIUM_HARD | {
"id": "taco-train-10466",
"rating": null,
"split": "confidence_train",
"sub_source": "MEDIUM_HARD"
} |
taco | [
{
"content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.",
"role": "system"
},
{
"content": "Read problem statements in [Hindi], [Bengali], [Mand... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2 2 7\\n4 3 17\\n3 5 13\"], \"outputs\": [\"6\\n-1\\n28\"]}",
"style": "rule"
} | VERY_HARD | {
"id": "taco-train-1600",
"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": "Given two integers L and R find (number of composites... | code | {
"ground_truth": "{\"inputs\": [\"L = 4, R = 6\", \"L = 4, R = 4\"], \"outputs\": [\"1\", \"1\"]}",
"style": "rule"
} | MEDIUM | {
"id": "taco-train-12335",
"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": "The country Treeland consists of n cities connected ... | code | {
"ground_truth": "{\"inputs\": [\"6 2\\n1 2\\n1 3\\n2 4\\n2 5\\n3 6\\n2 5 4 6\\n\", \"10 1\\n4 2\\n9 2\\n1 4\\n4 10\\n2 3\\n7 10\\n9 6\\n4 5\\n8 2\\n2 9\\n\", \"10 5\\n2 6\\n2 1\\n7 2\\n4 6\\n7 10\\n4 3\\n3 5\\n9 6\\n8 7\\n10 9 2 7 8 5 6 1 3 4\\n\", \"6 2\\n1 6\\n6 2\\n6 5\\n5 3\\n5 4\\n1 3 4 2\\n\", \"7 2\\n6 1\\n6... | rating_>1900 | {
"id": "748_F. Santa Clauses and a Soccer Championship",
"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": "This is a rather simple problem to describe. You wil... | code | {
"ground_truth": "{\"inputs\": [[\"11 48 3\"], [\"11 100 3\"]], \"outputs\": [[\"3 4 4\"], [\"NO\"]]}",
"style": "rule"
} | UNKNOWN_DIFFICULTY | {
"id": "taco-train-7173",
"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 ... ```). Implement the required function(s) as specified; do not read from standard input.",
"role": "system"
},
{
"content": "Geek is learning about functions and calling a functi... | code | {
"ground_truth": "{\"inputs\": [\"a = 1\\r\\nb = 2\", \"a = 10\\r\\n\\r\\nb = 20\"], \"outputs\": [\"2 4\", \"11 22\"]}",
"style": "rule"
} | EASY | {
"id": "taco-train-4088",
"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 arr[] of size N, enqueue the elements ... | code | {
"ground_truth": "{\"fn_name\": \"push\", \"inputs\": [\"N = 5 \\narr[] = 1 2 3 4 5\", \"N = 7\\narr[] = 1 6 43 1 2 0 5\"], \"outputs\": [\"1 2 3 4 5\", \"1 6 43 1 2 0 5\"]}",
"style": "rule"
} | EASY | {
"id": "taco-train-22947",
"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": "T is playing a game with his friend, HL.\n\nThere ar... | code | {
"ground_truth": "{\"inputs\": [\"2\\n1\\n2\\n2\\n1 1\\n\", \"1\\n4\\n2 3 1 2\\n\", \"2\\n2\\n1 4\\n3\\n3 1 3\\n\", \"3\\n2\\n4 3\\n4\\n2 2 2 3\\n3\\n1 4 1\\n\", \"4\\n5\\n1 3 1 3 4\\n1\\n4\\n1\\n5\\n2\\n3 3\\n\", \"1\\n3\\n2 1 1\\n\", \"1\\n4\\n3 1 1 1\\n\", \"1\\n7\\n10 3 1 1 1 1 1\\n\", \"1\\n2\\n1 13\\n\", \"1\\... | MEDIUM_HARD | {
"id": "taco-train-24159",
"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": "Consider the following series:\n\n`0,1,2,3,4,5,6,7,8,... | code | {
"ground_truth": "{\"fn_name\": \"find_num\", \"inputs\": [[1], [5], [11], [100], [500]], \"outputs\": [[1], [5], [22], [103], [476]]}",
"style": "rule"
} | EASY | {
"id": "taco-train-15885",
"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": "Given an integer $x$. Your task is to find out how m... | code | {
"ground_truth": "{\"inputs\": [\"2 3 5 8\", \"4 6 7 13\", \"233 233 10007 1\", \"338792 190248 339821 152634074578\", \"629260 663548 739463 321804928248\", \"656229 20757 818339 523535590429\", \"1000002 1000002 1000003 1000000000000\", \"345 2746 1000003 5000000\", \"802942 824238 836833 605503824329\", \"1 1 2 8... | rating_>1900 | {
"id": "919E",
"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": "Consider two points, $p=(p_x,p_y)$ and $q=(q_x,q_y)$... | code | {
"ground_truth": "{\"inputs\": [\"2\\n0 0 1 1\\n1 1 2 2\\n\"], \"outputs\": [\"2 2\\n3 3\\n\"]}",
"style": "rule"
} | EASY | {
"id": "taco-train-6296",
"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": "Peppa the Pig was walking and walked into the forest... | code | {
"ground_truth": "{\"inputs\": [\"3 4\\naaab\\nbaaa\\nabba\\n\", \"5 2\\nab\\nab\\ncc\\nba\\nba\\n\", \"1 5\\nabbba\\n\", \"1 5\\nabbbb\\n\", \"5 5\\naaaaa\\naaaaa\\naaaaa\\naaaaa\\naaaaa\\n\", \"10 9\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaaaaa\\naaaaaa... | rating_>1900 | {
"id": "570_E. Pig and Palindromes",
"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": "There are $n$ cities in the Magical Island, numbered... | code | {
"ground_truth": "{\"inputs\": [\"4 7\\n1 2 1\\n1 2 3\\n1 3 2\\n1 4 1\\n2 3 4\\n2 4 4\\n3 4 4\\n3\\n1 2\\n1 3\\n3 4\\n\", \"6 6\\n1 2 1\\n2 3 2\\n3 4 3\\n4 5 4\\n5 6 5\\n6 1 6\\n3\\n1 4\\n2 5\\n3 6\\n\"], \"outputs\": [\"1\\n2\\n3\\n\", \"3\\n7\\n7\\n\"]}",
"style": "rule"
} | HARD | {
"id": "taco-train-6014",
"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": "Permutation p is an ordered set of integers p_1, p_... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3 0\\n\", \"3\\n-1 -1 2\\n\", \"5\\n-3 5 -3 3 3\\n\", \"10\\n9 6 -2 4 1 1 1 9 6 2\\n\", \"9\\n2 0 0 6 5 4 1 9 3\\n\", \"100\\n-77 57 -95 -23 53 -28 82 -83 38 -73 85 28 25 6 -43 4 -10 -30 -9 -92 14 34 -93 61 36 -100 90 -68 28 16 100 -3 97 30 36 -55 62 -62 53 74 -50 -23 67 11 22 -... | EASY | {
"id": "taco-train-11670",
"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": "A line on the plane is described by an equation *Ax*... | code | {
"ground_truth": "{\"inputs\": [\"2 5 3\", \"0 2 3\", \"931480234 -1767614767 -320146190\", \"-1548994394 -1586527767 -1203252104\", \"296038088 887120955 1338330394\", \"1906842444 749552572 -1693767003\", \"-1638453107 317016895 -430897103\", \"-1183748658 875864960 -1315510852\", \"427055698 738296578 -52640953\"... | rating_1601-1900 | {
"id": "7C",
"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": "Aditya can always be seen eating bananas. On his bi... | code | {
"ground_truth": "{\"inputs\": [\"1 0\", \"24 8\", \"6899999 500000000\", \"1000000000\\n1000000000\", \"1 1\", \"14 3\", \"1331 11\"], \"outputs\": [\"YES\\n1\", \"NO\", \"YES\\n121\", \"NO\", \"YES\\n3\", \"YES\\n1\", \"NO\"]}",
"style": "rule"
} | EASY | {
"id": "taco-train-24665",
"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": "Acacius is studying strings theory. Today he came wi... | code | {
"ground_truth": "{\"inputs\": [\"6\\n7\\nabacaba\\n7\\n???????\\n11\\naba?abacaba\\n11\\nabacaba?aba\\n15\\nasdf???f???qwer\\n11\\nabacabacaba\\n\", \"1\\n13\\nabacab?bacaba\\n\", \"1\\n13\\nabacab?bacab`\\n\", \"6\\n7\\nabacaba\\n7\\n???????\\n11\\naba?abacaba\\n11\\nabacaba>aba\\n15\\nasdf???f???qwer\\n11\\nabaca... | rating_1401-1600 | {
"id": "1379_A. Acacius and String",
"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 link list of size N, modify the list such tha... | code | {
"ground_truth": "{\"inputs\": [\"N = 7\\nLink List:\\n17 -> 15 -> 8 -> 9 -> 2 -> 4 -> 6 -> NULL\", \"N = 4\\nLink List:\\n1 -> 3 -> 5 -> 7\"], \"outputs\": [\"8 2 4 6 17 15 9\", \"1 3 5 7\"]}",
"style": "rule"
} | MEDIUM | {
"id": "taco-train-11229",
"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": "IndiaHacks-2016 is going on and Tom and Jerry also c... | code | {
"ground_truth": "{\"inputs\": [\"10\\n1 1 3\\n3 3 5\\n7 7 9\\n13 0 2\\n21 8 10\\n31 5 7\\n43 4 6\\n57 5 7\\n73 8 10\\n91 0 2\", \"10\\n1 1 2\\n2 1 2\\n3 1 2\\n4 1 2\\n5 1 2\\n6 1 2\\n7 1 2\\n8 1 2\\n9 1 2\\n10 1 2\", \"10\\n1 1 708\\n4 4 699\\n39 39 830\\n256 256 647\\n1045 42 159\\n3156 147 575\\n7819 798 988\\n16... | UNKNOWN_DIFFICULTY | {
"id": "taco-train-1750",
"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": "Friends are going to play console. They have two joy... | code | {
"ground_truth": "{\"inputs\": [\"4 4\\n\", \"3 5\\n\", \"1 4\\n\", \"7 2\\n\", \"100 25\\n\", \"29 1\\n\", \"3 73\\n\", \"14 15\\n\", \"1 1\\n\", \"24 57\\n\", \"1 2\\n\", \"3 2\\n\", \"24 15\\n\", \"2 97\\n\", \"15 31\\n\", \"15 25\\n\", \"2 3\\n\", \"8 8\\n\", \"2 99\\n\", \"59 45\\n\", \"23 12\\n\", \"3 1\\n\", ... | rating_<=1200 | {
"id": "651_A. Joysticks",
"rating": 1100,
"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": "One day, the Grasshopper was jumping on the lawn and... | code | {
"ground_truth": "{\"inputs\": [\"ABABBBACFEYUKOTT\\n\", \"AAA\\n\", \"HDDRZDKCHHHEDKHZMXQSNQGSGNNSCCPVJFGXGNCEKJMRKSGKAPQWPCWXXWHLSMRGSJWEHWQCSJJSGLQJXGVTBYALWMLKTTJMFPFS\\n\", \"AABBYYYYYYYY\\n\", \"XXFPZDRPXLNHGDVCBDKJMKLGUQZXLLWYLOKFZVGXVNPJWZZZNRMQBRJCZTSDRHSNCVDMHKVXCXPCRBWSJCJWDRDPVZZLCZRTDRYA\\n\", \"SGDDFCD... | rating_<=1200 | {
"id": "733_A. Grasshopper And the String",
"rating": 1000,
"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": "Roy wants to change his profile picture on Facebook.... | code | {
"ground_truth": "{\"inputs\": [\"180\\n3\\n640 480\\n120 300\\n180 180\\n\\nSAMPLE\", \"180\\n3\\n640 480\\n120 300\\n180 180\\n\\nSAMELP\", \"180\\n3\\n640 908\\n120 300\\n297 180\\n\\nSAMELP\", \"180\\n2\\n640 908\\n120 300\\n297 180\\n\\nSAMELP\", \"180\\n3\\n717 340\\n241 300\\n180 180\\n\\nSAMELP\", \"180\\n2\... | none | {
"id": "roy-and-profile-picture",
"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": "Orac is studying number theory, and he is interested... | code | {
"ground_truth": "{\"inputs\": [\"3\\n5 1\\n8 2\\n3 4\\n\", \"5\\n497347 19283\\n2568 1000000000\\n499979 123987\\n93 19\\n13 5\\n\", \"1\\n1000000 100008\\n\", \"1\\n13 5\\n\", \"1\\n19 6\\n\", \"1\\n17 6\\n\", \"1\\n19 10\\n\", \"1\\n93 19\\n\", \"1\\n95 16\\n\", \"1\\n23 15\\n\", \"1\\n5 17\\n\", \"1\\n71 18\\n\"... | EASY | {
"id": "taco-train-11862",
"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 got an array of length n as a birthday present... | code | {
"ground_truth": "{\"inputs\": [\"2 3\\n-1 3\\n0 0\\n-1 -4\\n\", \"3 2\\n0 2\\n5 0\\n\", \"1 2\\n0 -3\\n0 -3\\n\", \"1 3\\n4 2\\n5 0\\n6 -1\\n\", \"3 1\\n5 -5\\n\", \"1 1\\n0 -1\\n\", \"3 1\\n2 -1\\n\", \"5 12\\n634 895\\n143 730\\n901 245\\n386 486\\n395 -111\\n-469 -104\\n-681 -623\\n-900 843\\n889 -883\\n476 -304... | rating_1601-1900 | {
"id": "1009_C. Annoying Present",
"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": "The Frog Regent has arranged his $N$ frog servants i... | code | {
"ground_truth": "{\"inputs\": [\"6\\n1 5 4 3 2 6\\n1 2 5 4 3 6\\n\", \"5\\n1 5 3 2 4\\n1 5 4 2 3\\n\"], \"outputs\": [\"2\\n\", \"5\\n3\\n5\\n2\\n\"]}",
"style": "rule"
} | HARD | {
"id": "taco-train-21557",
"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 unusual problem in an unusual contest, he... | code | {
"ground_truth": "{\"inputs\": [\"5 4\\n1 2\\n2 3\\n3 4\\n4 5\\n\", \"12 6\\n1 2\\n3 4\\n5 6\\n8 7\\n10 9\\n12 11\\n\", \"7 6\\n1 2\\n1 3\\n2 4\\n2 5\\n3 6\\n3 7\\n\"], \"outputs\": [\"\\n55\\n\", \"\\n30\\n\", \"\\n45\\n\"]}",
"style": "rule"
} | none | {
"id": "1302_B. DAG",
"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 integer array a of size n.\n\nYou h... | code | {
"ground_truth": "{\"inputs\": [\"12 11\\n2 1 1 2 1 1 3 2 1 1 3 3\\n1 2 10 3\\n1 2 11 3\\n2 7 2\\n1 3 9 2\\n1 1 12 1\\n1 1 12 4\\n2 12 4\\n1 1 12 4\\n2 1 5\\n1 3 12 2\\n1 1 4 3\\n\", \"12 11\\n2 1 1 2 1 1 3 2 1 1 3 3\\n1 2 10 3\\n1 2 11 3\\n2 7 2\\n1 3 9 2\\n1 1 12 2\\n1 1 12 4\\n2 12 4\\n1 1 12 4\\n2 1 5\\n1 3 12 2... | rating_>1900 | {
"id": "1476_G. Minimum Difference",
"rating": 3100,
"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 tree with $N$ vertices (numbered $1$... | code | {
"ground_truth": "{\"inputs\": [[\"2\", \"4\", \"1 2 3 4\", \"1 2\", \"2 3\", \"2 4\", \"5\", \"1 2 3 4 5\", \"1 2\", \"2 3\", \"3 4\", \"4 5\"]], \"outputs\": [[\"24\", \"15\"]]}",
"style": "rule"
} | VERY_HARD | {
"id": "taco-train-6209",
"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": "Problem description\nIt is winter super sale and all... | code | {
"ground_truth": "{\"inputs\": [\"3\\n4\\n1 1 2 2\\n2\\n10 200\\n7\\n1 1 10 2 2 2 1\", \"3\\n4\\n1 1 2 1\\n2\\n10 200\\n7\\n1 1 10 2 2 2 1\", \"3\\n4\\n1 1 2 2\\n2\\n10 200\\n7\\n1 2 10 2 2 2 1\", \"3\\n4\\n1 1 2 2\\n2\\n10 200\\n7\\n1 2 10 2 2 3 1\", \"3\\n4\\n1 1 2 2\\n2\\n20 200\\n7\\n1 2 10 2 2 3 1\", \"3\\n4\\n... | none | {
"id": "anubtg",
"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": "Given a positive integer k, two arrays are called k-... | code | {
"ground_truth": "{\"inputs\": [\"6 5 10\\n2 4 6 7 8 9\\n1 4\\n1 2\\n3 5\\n1 6\\n5 5\\n\", \"4 2 5\\n1 2 4 5\\n2 3\\n3 4\\n\", \"1 5 10\\n3\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n\", \"1 1 20\\n3\\n1 1\\n\", \"1 5 10\\n2\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n\", \"6 5 10\\n2 4 6 7 8 9\\n1 4\\n1 2\\n5 5\\n1 6\\n5 5\\n\", \"1 5 4\... | rating_<=1200 | {
"id": "1485_B. Replace and Keep Sorted",
"rating": 1200,
"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": "Takahashi is now competing in a programming contest,... | code | {
"ground_truth": "{\"inputs\": [\"100 5\", \"10 2\", \"1 1\", \"100 1\", \"10 4\", \"1 0\", \"110 1\", \"10 7\", \"0 0\", \"111 1\", \"10 3\", \"-1 0\", \"101 1\", \"10 5\", \"111 2\", \"8 5\", \"011 2\", \"7 5\", \"011 3\", \"7 2\", \"111 0\", \"12 2\", \"110 0\", \"2 2\", \"2 4\", \"2 0\", \"4 0\", \"4 1\", \"4 2\... | none | {
"id": "p03549 AtCoder Beginner Contest 078 - HSI",
"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": "Something happened in Uzhlyandia again... There are ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 4 2 3 1\", \"4\\n1 5 4 7\", \"8\\n16 14 12 10 8 100 50 0\", \"2\\n1 1\", \"50\\n-5 -9 0 44 -10 37 34 -49 11 -22 -26 44 8 -13 23 -46 34 12 -24 2 -40 -15 -28 38 -40 -42 -42 7 -43 5 2 -11 10 43 9 49 -13 36 2 24 46 50 -15 -26 -6 -6 8 4 -44 -3\", \"100\\n23 64 60 -45 -36 -64 -59 15... | rating_1401-1600 | {
"id": "788A",
"rating": 1600,
"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": "We are still with squared integers.\n\nGiven 4 intege... | code | {
"ground_truth": "{\"fn_name\": \"prod2sum\", \"inputs\": [[1, 2, 1, 3], [2, 3, 4, 5], [1, 2, 2, 3], [1, 1, 3, 5], [10, 11, 12, 13], [1, 20, -4, -5], [100, 100, 100, 100], [0, 0, 0, 0], [-14, 12, -10, 8], [7, 96, -1, 81], [112, 0, 0, 1]], \"outputs\": [[[[1, 7], [5, 5]]], [[[2, 23], [7, 22]]], [[[1, 8], [4, 7]]], [[... | EASY | {
"id": "taco-train-4832",
"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": "Utkarsh has recently started taking English-language... | code | {
"ground_truth": "{\"inputs\": [\"2\\n10\\nabcdefghij\\n7\\nbcadage\"], \"outputs\": [\"hgfeabcdij\\ngacbade\"]}",
"style": "rule"
} | MEDIUM_HARD | {
"id": "taco-train-4658",
"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 loves to play games. Now he plays very interest... | code | {
"ground_truth": "{\"inputs\": [[\"4\", \"10 1\", \"10 2\", \"10 3\", \"1000000000 1234567\"], \"4\\n10 2\\n10 2\\n10 3\\n1000000000 1234567\", \"4\\n10 2\\n10 3\\n10 3\\n1000000000 1234567\", \"4\\n14 2\\n10 3\\n10 3\\n1000000000 1234567\", \"4\\n14 2\\n10 3\\n13 3\\n1000000000 1234567\", \"4\\n10 2\\n10 3\\n13 3\\... | MEDIUM_HARD | {
"id": "taco-train-14765",
"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 created a special dividing machine that sup... | code | {
"ground_truth": "{\"inputs\": [[\"2\", \"6 7\", \"2 5 8 10 3 44\", \"1 2 6\", \"0 2 3\", \"1 2 6\", \"0 4 6\", \"1 1 6\", \"0 1 6\", \"1 4 6\", \"2 2\", \"1 3\", \"0 2 2\", \"1 1 2\"]], \"outputs\": [[\"5 3 5 11\", \"1\"]]}",
"style": "rule"
} | UNKNOWN_DIFFICULTY | {
"id": "taco-train-12125",
"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 ... ```). Implement the required function(s) as specified; do not read from standard input.",
"role": "system"
},
{
"content": "Create a function that takes a string and returns tha... | code | {
"ground_truth": "{\"fn_name\": \"sillycase\", \"inputs\": [[\"foobar\"], [\"codewars\"], [\"jAvASCript\"], [\"brian\"], [\"jabberwock\"], [\"SCOTland\"], [\"WeLlDoNe\"]], \"outputs\": [[\"fooBAR\"], [\"codeWARS\"], [\"javasCRIPT\"], [\"briAN\"], [\"jabbeRWOCK\"], [\"scotLAND\"], [\"wellDONE\"]]}",
"style": "rule"... | EASY | {
"id": "taco-train-21439",
"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": "Our world is one-dimensional, and ruled by two empir... | code | {
"ground_truth": "{\"inputs\": [\"3 2 10 20\\n8 15 13\\n16 22\\n\", \"4 2 -48 -1\\n-20 -35 -91 -23\\n-22 66\\n\", \"5 3 6 8\\n-10 3 1 5 -100\\n100 6 14\\n\", \"1 1 -100 100\\n-99\\n99\\n\", \"1 1 -100 100\\n99\\n-99\\n\", \"99 99 -20 74\\n-51 -77 -13 -11 -45 47 -33 13 17 -58 -93 -72 -76 -22 -53 59 -97 53 -47 -64 0 4... | EASY | {
"id": "taco-train-25144",
"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 likes arithmetic progressions. A sequence $... | code | {
"ground_truth": "{\"inputs\": [\"4\\n24 21 14 10\\n\", \"2\\n500 500\\n\", \"3\\n14 5 1\\n\", \"5\\n1 3 6 9 12\\n\", \"1\\n1000000000\\n\", \"2\\n1000000000 1\\n\", \"3\\n34 70 52\\n\", \"3\\n1 2 1\\n\", \"6\\n1 1 3 5 6 5\\n\", \"3\\n2 1 2\\n\", \"10\\n9 5 3 4 7 1 2 8 10 6\\n\", \"4\\n20 15 20 15\\n\", \"4\\n10 21 ... | MEDIUM | {
"id": "taco-train-18808",
"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": "An Introduction to the Longest Increasing Subsequenc... | code | {
"ground_truth": "{\"inputs\": [\"5\\n2\\n7\\n4\\n3\\n8\\n\", \"6\\n2\\n4\\n3\\n7\\n4\\n5\\n\"], \"outputs\": [\"3\\n\", \"4\\n\"]}",
"style": "rule"
} | HARD | {
"id": "taco-train-24058",
"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": "Two participants are each given a pair of distinct n... | code | {
"ground_truth": "{\"inputs\": [\"2 2\\n1 2 3 4\\n1 5 3 4\\n\", \"2 2\\n1 2 3 4\\n1 5 6 4\\n\", \"2 3\\n1 2 4 5\\n1 2 1 3 2 3\\n\", \"2 1\\n1 2 1 3\\n1 2\\n\", \"4 4\\n1 2 3 4 5 6 7 8\\n2 3 4 5 6 7 8 1\\n\", \"3 3\\n1 2 5 6 7 8\\n2 3 4 5 8 9\\n\", \"4 3\\n1 2 4 5 6 7 8 9\\n1 2 8 9 3 1\\n\", \"3 4\\n2 1 8 9 3 1\\n1 2... | HARD | {
"id": "taco-train-22791",
"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": "Given an array of lowercase strings A[] of size N, de... | code | {
"ground_truth": "{\"inputs\": [\"N = 3\\nA[] = { \\\"abc\\\", \\\"bcd\\\", \\\"cdf\\\" }\", \"N = 4\\nA[] = { \\\"ab\\\" , \\\"bc\\\", \\\"cd\\\", \\\"da\\\" }\"], \"outputs\": [\"0\", \"1\"]}",
"style": "rule"
} | MEDIUM | {
"id": "taco-train-21675",
"rating": null,
"split": "confidence_train",
"sub_source": "MEDIUM"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.