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": "Seisu-ya, a store specializing in non-negative integ...
code
{ "ground_truth": "{\"inputs\": [\"3 6\\n3 3\\n4 4\\n2 5\", \"7 14\\n10 5\\n7 4\\n11 4\\n9 8\\n3 6\\n6 2\\n8 9\", \"3 5\\n3 3\\n4 4\\n2 5\", \"3 6\\n3 1\\n4 4\\n2 5\", \"7 14\\n10 4\\n7 4\\n11 4\\n9 8\\n3 6\\n6 2\\n8 9\", \"3 1\\n3 3\\n4 4\\n2 5\", \"3 6\\n4 1\\n4 4\\n2 5\", \"7 14\\n10 4\\n7 4\\n11 1\\n9 8\\n3 6\\n6...
none
{ "id": "p03590 Tenka1 Programmer Beginner Contest - IntegerotS", "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 two binary strings $x$ and $y$, which ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1010\\n11\\n10001\\n110\\n1\\n1\\n1010101010101\\n11110000\\n\", \"1\\n11\\n10\\n\", \"1\\n1010101010111000110\\n1\\n\", \"1\\n1010101010111000100110\\n1\\n\", \"1\\n1010101010111000100110\\n1\\n\", \"1\\n11\\n10\\n\", \"1\\n1010101010111000110\\n1\\n\", \"1\\n101000101011100011...
EASY
{ "id": "taco-train-10146", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The mole family recently decided to dig a new tunnel...
code
{ "ground_truth": "{\"inputs\": [\"3 2\\n3 1\\n2 1\\n\", \"4 3\\n1 3\\n2 3\\n3 4\\n\", \"7 7\\n1 2\\n2 3\\n4 2\\n2 5\\n4 5\\n6 7\\n7 2\\n\"], \"outputs\": [\"3 0\\n3 1 2\\n\", \"2 1\\n3 4\\n2\\n1\\n\", \"3 2\\n5 2 7\\n6 1\\n3 4\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-9111", "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 input string (s) and a pattern (p), implemen...
code
{ "ground_truth": "{\"fn_name\": \"isMatch\", \"inputs\": [[\"\\\"aa\\\"\", \"\\\"a\\\"\"]], \"outputs\": [false]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-17994", "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": "As you probably know, Anton goes to school. One of t...
code
{ "ground_truth": "{\"inputs\": [\")(()()\\n\", \"()()()\\n\", \")))\\n\", \")())((((((()))()((()))()((()()()((()()()))\\n\", \"(\\n\", \")\\n\", \"((\\n\", \"))\\n\", \"()\\n\", \")(\\n\", \"(()\\n\", \"()(\\n\", \")()\\n\", \")((\\n\", \"))(\\n\", \"((((()())))())((((((()(()())(()())()((()()))(((())()()()(())))))()...
HARD
{ "id": "taco-train-19561", "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": "Pair of gloves\n=============\n\nWinter is coming, yo...
code
{ "ground_truth": "{\"fn_name\": \"number_of_pairs\", \"inputs\": [[[\"red\", \"red\"]], [[\"red\", \"green\", \"blue\"]], [[\"gray\", \"black\", \"purple\", \"purple\", \"gray\", \"black\"]], [[]], [[\"red\", \"green\", \"blue\", \"blue\", \"red\", \"green\", \"red\", \"red\", \"red\"]]], \"outputs\": [[1], [0], [3]...
EASY
{ "id": "taco-train-24775", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Little Vasya loves orange juice very much. That's wh...
code
{ "ground_truth": "{\"inputs\": [\"3\\n50 50 100\\n\", \"4\\n0 25 50 75\\n\", \"1\\n0\\n\", \"13\\n2 22 7 0 1 17 3 17 11 2 21 26 22\\n\", \"99\\n60 65 40 63 57 44 30 84 3 10 39 53 40 45 72 20 76 11 61 32 4 26 97 55 14 57 86 96 34 69 52 22 26 79 31 4 21 35 82 47 81 28 72 70 93 84 40 4 69 39 83 58 30 7 32 73 74 12 92 2...
rating_<=1200
{ "id": "200_B. Drinks", "rating": 800, "split": "confidence_train", "sub_source": "rating_<=1200" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Description:\n\nThe mean (or average) is the most pop...
code
{ "ground_truth": "{\"fn_name\": \"median\", \"inputs\": [[[1, 2, 3, 4]], [[3, 4, 1, 2, 5]], [[10, 29, 23, 94, 76, 96, 5, 85, 4, 33, 47, 41, 87]], [[1]], [[1, -1]]], \"outputs\": [[2.5], [3], [41], [1], [0]]}", "style": "rule" }
EASY
{ "id": "taco-train-19447", "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 sequence of $n$ integers, $a_0,a_1,\...
code
{ "ground_truth": "{\"inputs\": [\"4\\n3 6 18 12\\n\"], \"outputs\": [\"6\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-13282", "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": "Polycarp really likes writing the word \"kotlin\". H...
code
{ "ground_truth": "{\"inputs\": [\"2\\nlin\\nkot\\n\", \"4\\nlinkotlinkotlinkotl\\nkotlin\\nin\\nkot\\n\", \"8\\ni\\nn\\ntlin\\no\\nko\\nt\\nk\\nl\\n\"], \"outputs\": [\"\\n2 1 \", \"\\n2 4 1 3 \", \"\\n7 4 3 5 6 8 1 2 \"]}", "style": "rule" }
rating_>1900
{ "id": "1211_F. kotlinkotlinkotlinkotlin...", "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": "Kurohashi has never participated in AtCoder Beginner...
code
{ "ground_truth": "{\"inputs\": [\"111\\n\", \"112\\n\", \"750\\n\", \"234\\n\", \"999\\n\", \"626\\n\", \"555\\n\", \"554\\n\", \"556\\n\", \"680\\n\", \"100\\n\", \"998\\n\", \"426\", \"101\", \"638\", \"268\", \"457\", \"000\", \"985\", \"846\", \"198\", \"706\", \"110\", \"001\", \"409\", \"100\", \"662\", \"011\...
EASY
{ "id": "taco-train-12304", "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": "Ridhiman challenged Ashish to find the maximum value...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3 1 4\\n\", \"4\\n7 7 1 1\\n\", \"1\\n1\\n\", \"3\\n2 1 3\\n\", \"2\\n3 4\\n\", \"10\\n582366931603099761 314858607473442114 530263190370309150 871012489649491233 877068367969362781 671646356752418008 390155369686708364 958695211216189893 919124874293325142 196726357117434998\\n...
rating_1601-1900
{ "id": "1365_E. Maximum Subsequence Value", "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": "Amr is a young coder who likes music a lot. He alway...
code
{ "ground_truth": "{\"inputs\": [\"5 6\\n4 3 1 1 2\\n\", \"1 3\\n4\\n\", \"4 10\\n4 3 1 2\\n\", \"2 100\\n100 100\\n\", \"5 49\\n16 13 7 2 1\\n\", \"99 10000\\n42 88 21 63 59 38 23 100 86 37 57 86 11 22 19 89 6 19 15 64 18 77 83 29 14 26 80 73 8 51 14 19 9 98 81 96 47 77 22 19 86 71 91 61 84 8 80 28 6 25 33 95 96 21 ...
rating_<=1200
{ "id": "507_A. Amr and Music", "rating": 1000, "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": "One particularly well-known fact about zombies is th...
code
{ "ground_truth": "{\"inputs\": [\"4 4\\n1 2\\n2 3\\n3 1\\n4 1\", \"6 5\\n1 2\\n2 3\\n3 4\\n4 5\\n3 6\", \"2 1\\n1 2\", \"3 3\\n2 1\\n1 3\\n3 2\", \"3 2\\n1 2\\n2 3\", \"9 8\\n1 2\\n2 3\\n3 4\\n4 1\\n5 6\\n6 7\\n7 8\\n8 9\", \"8 7\\n6 2\\n1 5\\n4 8\\n4 7\\n6 7\\n8 3\\n8 1\", \"200 5\\n93 101\\n199 164\\n14 94\\n115 6...
rating_1201-1400
{ "id": "690C1", "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": "Vasya plays a popular game the Gnomes of Might and M...
code
{ "ground_truth": "{\"inputs\": [\"6 3\\n1 2 3\\n3 1 4 2\\n3 2 5 3\\n3 3 6 1\\n10\\n+ 1 2\\n+ 4 2\\n+ 1 3\\n+ 2 3\\n? 1 2\\n+ 2 5\\n? 1 2\\n? 1 2\\n+ 1 2\\n? 1 2\\n\", \"7 3\\n1 2 3\\n3 1 4 2\\n3 2 5 3\\n4 3 7 6 1\\n3\\n? 1 3\\n+ 7 6\\n? 7 1\\n\", \"7 3\\n3 2 4\\n4 3 5 7 2\\n3 2 1 4\\n3 4 6 3\\n24\\n+ 2 4\\n+ 4 6\\n+...
rating_>1900
{ "id": "175_F. Gnomes of Might and Magic", "rating": 3000, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Fooland city has a special multi-lane running track. ...
code
{ "ground_truth": "{\"inputs\": [\"N = 5, Track = 20\\nL_{i} = {(1 3), (5 8), (8 13), \\n (14 15), (9 12)}\"], \"outputs\": [\"6\"]}", "style": "rule" }
EASY
{ "id": "taco-train-1014", "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": "Arkady plays Gardenscapes a lot. Arkady wants to bui...
code
{ "ground_truth": "{\"inputs\": [\"3 7 6\\n10 8 C\\n4 3 C\\n5 6 D\\n\", \"2 4 5\\n2 5 C\\n2 1 D\\n\", \"3 10 10\\n5 5 C\\n5 5 C\\n10 11 D\\n\", \"6 68 40\\n1 18 D\\n6 16 D\\n11 16 D\\n7 23 D\\n16 30 D\\n2 20 D\\n\", \"6 4 9\\n6 6 D\\n1 4 D\\n6 7 C\\n7 6 D\\n5 7 D\\n2 5 D\\n\", \"52 38 22\\n9 25 D\\n28 29 C\\n29 25 D\...
MEDIUM_HARD
{ "id": "taco-train-1028", "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": "Snuke signed up for a new website which holds progra...
code
{ "ground_truth": "{\"inputs\": [\"xyz\\nabc\\n\", \"atcoderbeginnercontest\\natcoderregularcontest\\n\", \"atcoderbeeinnercontgst\\natcoderregularcontest\", \"xyz\\nacc\", \"atcoderbeeinnercontgst\\natcoaerreguldrcontest\", \"xyz\\nadc\", \"atcoderbfeinnercontgst\\natcoaerreguldrcontest\", \"xyy\\nadc\", \"atcoderbf...
EASY
{ "id": "taco-train-20530", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A balanced parenthesis string is defined as follows:...
code
{ "ground_truth": "{\"inputs\": [[\"2\", \"4 2\", \"8 6\"]], \"outputs\": [[\"-1\", \"(())(())\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-17174", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problem statements in [Bengali], [Mandarin Chin...
code
{ "ground_truth": "{\"inputs\": [\"3\\nacbbbadzdz\\nabcd\\nxyxyxy\", \"1\\nzrrymdmdyrr\", \"2\\nxyxyxy\\naabb\", \"1\\nhmmh\", \"1\\nzzrqrxzz\", \"3\\naabbcc\\ngiggle\\nnever\", \"2\\nxvnnvnxx\\ndhhhd\", \"1\\naaaaaaa\", \"2\\ngkdkgd\\noho\", \"2\\njabberwocky\\nottomotto\", \"1\\nrrrrrrrr\", \"1\\niiiitiii\", \"1\\n...
MEDIUM_HARD
{ "id": "taco-test-962", "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": "You probably know that the \"mode\" of a set of data ...
code
{ "ground_truth": "{\"fn_name\": \"modes\", \"inputs\": [[\"tomato\"], [[1, 3, 3, 7]], [[\"redder\"]]], \"outputs\": [[[\"o\", \"t\"]], [[3]], [[]]]}", "style": "rule" }
EASY
{ "id": "taco-train-15648", "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": "«Polygon» is a system which allows to create program...
code
{ "ground_truth": "{\"inputs\": [\"1\\n1\", \"2\\n2 1\", \"3\\n3 4 1\", \"4\\n6 4 3 5\", \"5\\n3 2 1 7 4\", \"6\\n4 1 2 5 3 7\", \"7\\n3 2 1 6 5 7 4\", \"8\\n2 8 3 7 6 9 1 5\", \"9\\n10 5 9 3 8 7 1 2 4\", \"10\\n7 2 3 8 9 6 5 4 1 10\", \"1\\n1\", \"2\\n1 2\", \"3\\n2 4 1\", \"4\\n4 2 3 1\", \"5\\n3 1 4 2 5\", \"6\\n1...
rating_<=1200
{ "id": "27A", "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": "Given a collection of integers that might contain dup...
code
{ "ground_truth": "{\"fn_name\": \"subsetsWithDup\", \"inputs\": [[[1, 2, 2]], [[0]]], \"outputs\": [[[], [1], [1, 2], [1, 2, 2], [2], [2, 2]], [[], [0]]]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-3003", "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": "In Omkar's last class of math, he learned about the ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4\\n6\\n9\\n\", \"1\\n646185419\\n\", \"3\\n312736423\\n170982179\\n270186827\\n\", \"3\\n4\\n5\\n2\\n\", \"1\\n142930164\\n\", \"9\\n203197635\\n675378503\\n971363026\\n746226358\\n441100327\\n941328384\\n321242664\\n890263904\\n284574795\\n\", \"7\\n13881727\\n399705329\\n4040...
rating_1201-1400
{ "id": "1372_B. Omkar and Last Class of Math", "rating": 1300, "split": "confidence_train", "sub_source": "rating_1201-1400" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given a sequence of integers a_1, ..., a_{n} and q q...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2 6 3\\n5\\n1\\n2\\n3\\n4\\n6\\n\", \"7\\n10 20 3 15 1000 60 16\\n10\\n1\\n2\\n3\\n4\\n5\\n6\\n10\\n20\\n60\\n1000\\n\", \"10\\n2 2 4 3 2 4 4 2 4 2\\n104\\n3\\n3\\n1\\n4\\n1\\n1\\n4\\n1\\n1\\n3\\n1\\n1\\n4\\n1\\n1\\n1\\n4\\n3\\n1\\n1\\n4\\n1\\n1\\n1\\n1\\n1\\n4\\n1\\n1\\n1\\n4\\...
HARD
{ "id": "taco-train-15622", "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 n, a and d as the number of terms, first term a...
code
{ "ground_truth": "{\"inputs\": [\"5 1 3\", \"3 1 2\"], \"outputs\": [\"35\", \"9\"]}", "style": "rule" }
EASY
{ "id": "taco-train-5813", "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": "Implement atoi which converts a string to an integer....
code
{ "ground_truth": "{\"fn_name\": \"myAtoi\", \"inputs\": [[\"\\\"42\\\"\"]], \"outputs\": [0]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-12424", "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": "This problem differs from one which was on the onlin...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 2 0 2 1\\n3\\n1 0 1\\n\", \"7\\n2 3 1 6 5 4 6\\n4\\n1 3 5 6\\n\", \"9\\n7 4 4 5 0 6 5 4 10\\n4\\n5 2 10 9\\n\", \"13\\n55 160 86 99 92 148 81 36 216 191 214 127 44\\n85\\n92 12 64 21 221 225 119 243 147 47 244 112 212 237 209 121 81 239 43 104 3 254 52 13 1 210 28 18 199 75 25...
rating_>1900
{ "id": "10_D. LCIS", "rating": 2800, "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 playing a game on a $n \\times m$ grid, in w...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2 3\\n3 1\\n\", \"2\\n999 21\\n21 999\\n\"], \"outputs\": [\"2\\n1\\n\", \"2\\n2\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-18394", "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": "Tribonacci numbers are a sequence of numbers, define...
code
{ "ground_truth": "{\"inputs\": [\"4\\n\", \"9\\n\"], \"outputs\": [\"2\\n\", \"18\\n\"]}", "style": "rule" }
rating_1401-1600
{ "id": "130_E. Tribonacci numbers", "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": "Leonid wants to become a glass carver (the person wh...
code
{ "ground_truth": "{\"inputs\": [\"4 3 4\\nH 2\\nV 2\\nV 3\\nV 1\", \"7 6 5\\nH 4\\nV 3\\nV 5\\nH 2\\nV 1\", \"2 2 1\\nV 1\", \"2 2 1\\nH 1\", \"2 2 2\\nV 1\\nH 1\", \"2 2 2\\nH 1\\nV 1\", \"10 10 10\\nV 6\\nH 8\\nV 4\\nV 8\\nH 2\\nH 5\\nV 9\\nH 7\\nH 3\\nV 7\", \"5 15 10\\nH 8\\nH 9\\nV 1\\nH 2\\nH 6\\nH 4\\nH 1\\nV...
rating_1401-1600
{ "id": "527C", "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": "Indian Institute of Technology, Banaras Hindu Univer...
code
{ "ground_truth": "{\"inputs\": [\"5\\n3 2\\n4 5\\n7 4\\n34534985349875439875439875349875 93475349759384754395743975349573495\\n34543987529435983745230948023948 3498573497543987543985743989120393097595572309482304\"], \"outputs\": [\"9\\n1024\\n2401\\n735851262\\n985546465\"]}", "style": "rule" }
none
{ "id": "fest", "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 an array of integers. Vasya can permut...
code
{ "ground_truth": "{\"inputs\": [\"7\\n10 1 1 1 5 5 3\\n\", \"5\\n1 1 1 1 1\\n\", \"6\\n300000000 200000000 300000000 200000000 1000000000 300000000\\n\", \"10\\n1 2 3 4 5 6 7 8 9 10\\n\", \"1\\n1\\n\", \"7\\n3 5 2 2 5 2 4\\n\", \"5\\n1 5 4 2 3\\n\", \"7\\n3 5 2 2 5 2 4\\n\", \"10\\n1 2 3 4 5 6 7 8 9 10\\n\", \"1\\n1...
EASY
{ "id": "taco-train-25083", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Today is August 24, one of the five Product Days in ...
code
{ "ground_truth": "{\"inputs\": [\"15 40\", \"1 1\", \"12 31\", \"15 38\", \"0 1\", \"16 38\", \"16 57\", \"16 94\", \"12 94\", \"12 28\", \"19 28\", \"6 27\", \"12 25\", \"9 48\", \"12 39\", \"26 38\", \"24 94\", \"6 42\", \"30 32\", \"14 68\", \"5 37\", \"31 48\", \"22 79\", \"21 38\", \"21 94\", \"24 51\", \"18 58...
none
{ "id": "p02927 Japanese Student Championship 2019 Qualification - Takahashi Calendar", "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": "Write a program to implement a Stack using Array. You...
code
{ "ground_truth": "{\"inputs\": [\"push(2)\\r\\npush(3)\\r\\npop()\\r\\npush(4) \\r\\npop()\", \"pop()\\r\\npush(4)\\r\\npush(5)\\r\\npop()\"], \"outputs\": [\"3, 4\", \"-1 5\"]}", "style": "rule" }
EASY
{ "id": "taco-train-7307", "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 positive integer n. Output its prime...
code
{ "ground_truth": "{\"inputs\": [\"245\\n\", \"19\\n\", \"13\\n\"], \"outputs\": [\"5*7*7\\n\", \"19\\n\", \"13 \\n\"]}", "style": "rule" }
rating_1601-1900
{ "id": "162_C. Prime factorization", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Think about Zuma Game. You have a row of balls on the...
code
{ "ground_truth": "{\"fn_name\": \"findMinStep\", \"inputs\": [[\"\\\"WRRBBW\\\"\", \"\\\"RB\\\"\"]], \"outputs\": [-1]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-4212", "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": "In the school computer room there are n servers whic...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 6\\n\", \"7\\n10 11 10 11 10 11 11\\n\", \"5\\n1 2 3 4 5\\n\", \"10\\n0 0 0 0 0 0 0 0 0 0\\n\", \"1\\n0\\n\", \"1\\n20000\\n\", \"3\\n1 10000 20000\\n\", \"10\\n19999 19999 20000 20000 19999 20000 20000 20000 19999 19999\\n\", \"10\\n8 5 5 5 6 6 6 6 5 5\\n\", \"2\\n10 3\\n\", ...
MEDIUM
{ "id": "taco-train-2452", "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": "Chef has a square-shaped chart paper with the side l...
code
{ "ground_truth": "{\"inputs\": [\"3\\n5 1\\n2 2\\n5 2\\n\"], \"outputs\": [\"25\\n1\\n4\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-5468", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given is an integer N.\n\nTakahashi chooses an integ...
code
{ "ground_truth": "{\"inputs\": [\"4\", \"1\", \"5\", \"8\", \"11\", \"19\", \"21\", \"3\", \"9\", \"39\", \"-1\", \"53\", \"33\", \"-3\", \"47\", \"69\", \"17\", \"-11\", \"25\", \"-13\", \"-25\", \"57\", \"-9\", \"37\", \"23\", \"-5\", \"-7\", \"45\", \"15\", \"87\", \"29\", \"13\", \"7\", \"139\", \"-21\", \"-17\"...
none
{ "id": "p02897 AtCoder Beginner Contest 142 - Odds of Oddness", "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 three numbers N, X, and Y. Geek and his friend ...
code
{ "ground_truth": "{\"inputs\": [\"N = 5, X = 3, Y = 4\", \"N = 2, X = 3, Y = 4\"], \"outputs\": [\"1\", \"0\"]}", "style": "rule" }
EASY
{ "id": "taco-train-11518", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "You will be given an array of numbers.\n\nFor each nu...
code
{ "ground_truth": "{\"fn_name\": \"num_obj\", \"inputs\": [[[118, 117, 120]], [[101, 121, 110, 113, 113, 103]], [[118, 103, 110, 109, 104, 106]], [[107, 99, 110, 107, 118, 106, 112, 102]], [[100, 100, 116, 105, 117, 121]]], \"outputs\": [[[{\"118\": \"v\"}, {\"117\": \"u\"}, {\"120\": \"x\"}]], [[{\"101\": \"e\"}, {\...
EASY
{ "id": "taco-train-11669", "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 All-Berland National Olympiad in Informatics has...
code
{ "ground_truth": "{\"inputs\": [\"5\\n01 0\\n2 1\\n2extra 0\\n3 1\\n99 0\\n\", \"2\\n1 0\\n2 1\\n\", \"5\\n1 0\\n11 1\\n111 0\\n1111 1\\n11111 0\\n\", \"3\\n1 1\\nzwfnx2 1\\n7g8t6z 1\\n\", \"3\\nqmf7iz 1\\ndjwdce 1\\n1 1\\n\", \"6\\n4 1\\n410jiy 1\\n1 0\\n6 0\\nxc98l2 1\\n5 0\\n\", \"3\\n2 1\\n3 0\\nhs9j9t 1\\n\", \...
rating_>1900
{ "id": "860_C. Tests Renumeration", "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": "Santa Claus is the first who came to the Christmas O...
code
{ "ground_truth": "{\"inputs\": [\"4 3 9\\n\", \"4 3 24\\n\", \"2 4 4\\n\", \"3 10 24\\n\", \"10 3 59\\n\", \"10000 10000 160845880\\n\", \"1 1 1\\n\", \"1 1 2\\n\", \"1 10000 1\\n\", \"1 10000 20000\\n\", \"10000 1 1\\n\", \"10000 1 10000\\n\", \"10000 1 20000\\n\", \"3 2 1\\n\", \"3 2 2\\n\", \"3 2 3\\n\", \"3 2 4\...
EASY
{ "id": "taco-train-13353", "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": "The array *a* with *n* integers is given. Let's call...
code
{ "ground_truth": "{\"inputs\": [\"5 5\\n1 2 3 4 5\", \"9 3\\n6 5 1 2 3 2 1 4 5\", \"3 1\\n1 2 3\", \"1 1\\n747391\", \"5 2\\n171230 171230 171230 171230 171230\", \"10 3\\n512008 512008 452221 512008 314256 123232 314256 512008 314256 123232\", \"6 1\\n1 1 2 1 1 1\", \"5 4\\n1 2 3 4 0\", \"5 4\\n2 3 4 5 0\", \"2 2\\...
rating_1401-1600
{ "id": "616D", "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": "Vova's house is an array consisting of $n$ elements ...
code
{ "ground_truth": "{\"inputs\": [\"6 2\\n0 1 1 0 0 1\\n\", \"5 3\\n1 0 0 0 1\\n\", \"5 10\\n0 0 0 0 0\\n\", \"10 3\\n0 0 1 1 0 1 0 0 0 1\\n\", \"3 6\\n1 1 1\\n\", \"4 3\\n1 1 1 1\\n\", \"2 888\\n1 0\\n\", \"6 1\\n1 1 0 0 1 1\\n\", \"1 81\\n0\\n\", \"3 1\\n1 0 1\\n\", \"69 2\\n0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 0...
MEDIUM
{ "id": "taco-train-4079", "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": "Recently, Pari and Arya did some research about NP-H...
code
{ "ground_truth": "{\"inputs\": [\"4 2\\n1 2\\n2 3\\n\", \"3 3\\n1 2\\n2 3\\n1 3\\n\", \"5 7\\n3 2\\n5 4\\n3 4\\n1 3\\n1 5\\n1 4\\n2 5\\n\", \"10 11\\n4 10\\n8 10\\n2 3\\n2 4\\n7 1\\n8 5\\n2 8\\n7 2\\n1 2\\n2 9\\n6 8\\n\", \"10 9\\n2 5\\n2 4\\n2 7\\n2 9\\n2 3\\n2 8\\n2 6\\n2 10\\n2 1\\n\", \"10 16\\n6 10\\n5 2\\n6 4\...
MEDIUM
{ "id": "taco-train-20783", "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": "Mahmoud and Ehab are on the third stage of their adv...
code
{ "ground_truth": "{\"inputs\": [\"5 5\", \"3 6\", \"3 0\", \"1 0\", \"3 3\", \"100000 41243\", \"100000 100000\", \"32 32\", \"32 31\", \"1 1\", \"2 0\", \"3 1\", \"3 2\", \"3 5\", \"3 4\", \"3 10203\", \"3 10100\", \"5 0\", \"5 1\", \"5 2\", \"5 3\", \"5 4\", \"5 6\", \"5 7\", \"5 8\", \"5 9\", \"100000 1\", \"1000...
rating_1601-1900
{ "id": "862C", "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": "Polycarp is a regular customer at the restaurant \"B...
code
{ "ground_truth": "{\"inputs\": [\"3 21\\n12 75 52\\n\", \"3 39\\n58 64 33\\n\", \"4 42\\n6 15 3 9\\n\", \"100 1\\n252 933 842 913 822 684 918 896 864 794 801 902 654 907 977 921 900 423 761 721 790 779 907 822 996 924 832 840 849 874 787 845 951 737 882 899 780 875 799 760 698 931 879 876 736 913 912 833 964 947 905...
rating_>1900
{ "id": "730_F. Ber Patio", "rating": 3100, "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": "The Finals of the \"Russian Code Cup\" 2214 will be ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 4\\n1 2\\n2 3\\n3\\n1 4\\n1 3\\n2 3\\n\", \"3\\n2 3\\n3 1\\n3\\n2 1\\n2 3\\n3 1\\n\", \"5\\n4 3\\n3 1\\n1 5\\n5 2\\n20\\n4 3\\n4 1\\n4 5\\n4 2\\n3 4\\n3 1\\n3 5\\n3 2\\n1 4\\n1 3\\n1 5\\n1 2\\n5 4\\n5 3\\n5 1\\n5 2\\n2 4\\n2 3\\n2 1\\n2 5\\n\", \"4\\n4 1\\n1 3\\n3 2\\n12\\n4 1...
rating_>1900
{ "id": "418_D. Big Problems for Organizers", "rating": 2800, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A palindrome is a string that reads the same from le...
code
{ "ground_truth": "{\"inputs\": [\"13\\naaaaabbbbaaaa\\n\", \"7\\ncacbbba\\n\", \"12\\neededdeedede\\n\"], \"outputs\": [\"12\\n12\\n10\\n8\\n8\\n9\\n11\\n13\\n11\\n9\\n8\\n8\\n10\\n\", \"3\\n3\\n3\\n3\\n3\\n3\\n3\\n\", \"5\\n7\\n7\\n7\\n7\\n9\\n9\\n9\\n9\\n7\\n5\\n4\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-11250", "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": "Bob is decorating his kitchen, more precisely, the f...
code
{ "ground_truth": "{\"inputs\": [\"2 2\\n\", \"2 4\\n\", \"20 10\\n\", \"1000 1000\\n\", \"1 1000\\n\", \"1000 122\\n\", \"1 2\\n\", \"1 1\\n\", \"2 1\\n\", \"15 22\\n\", \"2 3\\n\", \"2 5\\n\", \"432 333\\n\", \"17 23\\n\", \"843 134\\n\", \"912 584\\n\", \"88 88\\n\", \"3 16\\n\", \"2 1\\n\", \"2 3\\n\", \"17 23\\n...
EASY
{ "id": "taco-train-12227", "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": "##Background - the Collatz Conjecture:\n\nImagine you...
code
{ "ground_truth": "{\"fn_name\": \"longest_collatz\", \"inputs\": [[[1, 5, 27, 4]], [[64, 64, 27, 64]], [[75, 226, 113, 340]], [[340, 113, 226, 75]], [[75, 113, 226, 75]]], \"outputs\": [[27], [27], [75], [75], [75]]}", "style": "rule" }
EASY
{ "id": "taco-train-11209", "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": "Alice and Bob play the following game:\n\nThey choos...
code
{ "ground_truth": "{\"inputs\": [\"2 \\n3 \\n1 3 2 \\n5 \\n5 3 2 1 4 \\n\", \"1 \\n4 \\n4 1 2 3 \\n\", \"3 \\n2 \\n1 2 \\n2 \\n2 1 \\n3 \\n3 2 1 \\n\", \"4 \\n3 \\n2 1 3 \\n4 \\n1 2 3 4 \\n3 \\n3 2 1 \\n2 \\n2 1 \\n\...
MEDIUM
{ "id": "taco-test-256", "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 penguin Polo likes permutations. But most of ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n\", \"7\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"8\\n\", \"10\\n\", \"47\\n\", \"74\\n\", \"99\\n\", \"128\\n\", \"17\\n\", \"18\\n\", \"19\\n\", \"20\\n\", \"20\\n\", \"11\\n\", \"12\\n\", \"13\\n\", \"14\\n\", \"15\\n\", \"17\\n\", \"15475\\n\", \"4587\\n\", \"2\\n\", \"6100\\n\"...
MEDIUM_HARD
{ "id": "taco-train-1936", "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 have 4 bags A, B, C and D each of which includes...
code
{ "ground_truth": "{\"inputs\": [\"3 14\\n3 1 2\\n4 8 2\\n1 2 3\\n7 3 2\", \"5 4\\n1 1 1 1 1\\n1 1 1 1 1\\n1 1 1 1 1\\n1 1 1 1 1\", \"3 14\\n3 1 2\\n4 8 2\\n1 2 5\\n7 3 2\", \"5 4\\n2 1 1 1 1\\n1 1 1 1 1\\n1 1 1 1 1\\n1 1 1 1 1\", \"5 4\\n2 1 1 1 1\\n1 1 1 1 1\\n1 1 0 1 1\\n1 1 1 1 1\", \"5 4\\n2 1 1 1 1\\n1 1 1 1 1\...
none
{ "id": "p02329 Coin Combination Problem", "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": "Today we will be playing a red and white colouring g...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4 6\\n.R....\\n......\\n......\\n.W....\\n4 4\\n.R.W\\n....\\n....\\n....\\n5 1\\nR\\nW\\nR\\nW\\nR\\n\", \"1\\n3 1\\n.\\nR\\n.\\n\", \"1\\n1 1\\n.\\n\", \"1\\n5 5\\n.....\\n.....\\n.....\\n.....\\n....W\\n\", \"1\\n5 5\\n.....\\n.....\\n.....\\n.....\\n....W\\n\", \"1\\n1 1\\n....
EASY
{ "id": "taco-train-15913", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "You will be given two positive numbers M and N. Your ...
code
{ "ground_truth": "{\"inputs\": [\"M = 3, N = 6\", \"M = 7, N = 8\"], \"outputs\": [\"2\", \"1\"]}", "style": "rule" }
EASY
{ "id": "taco-train-5699", "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": "Again, there are hard times in Berland! Many towns h...
code
{ "ground_truth": "{\"inputs\": [\"6 7\\n1 6\\n2 1 6\\n2 3 5\\n3 4 9\\n4 6 4\\n4 6 5\\n4 5 1\\n3 1 3\", \"6 7\\n1 6\\n2 3 1\\n1 2 2\\n1 3 3\\n4 5 4\\n3 6 5\\n4 6 6\\n1 5 7\", \"5 4\\n1 5\\n2 1 3\\n3 2 1\\n3 4 4\\n4 5 2\", \"2 3\\n1 2\\n1 2 734458840\\n1 2 817380027\\n1 2 304764803\", \"2 2\\n1 2\\n1 2 1\\n1 2 3\", \"...
rating_>1900
{ "id": "700C", "rating": 2600, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problem statements in [Russian], [Mandarin Chin...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3\\n2 3 12\\n4 \\n1 2 3 4\\n3\\n2 3 7\"], \"outputs\": [\"2\\n5\\n3\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-18932", "rating": null, "split": "confidence_train", "sub_source": "VERY_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Chinese Version\n\nRussian Version\n\nDefine a 3-D M...
code
{ "ground_truth": "{\"inputs\": [\"2\\n4 5\\nUPDATE 2 2 2 4\\nQUERY 1 1 1 3 3 3\\nUPDATE 1 1 1 23\\nQUERY 2 2 2 4 4 4\\nQUERY 1 1 1 3 3 3\\n2 4\\nUPDATE 2 2 2 1\\nQUERY 1 1 1 1 1 1\\nQUERY 1 1 1 2 2 2\\nQUERY 2 2 2 2 2 2\\n\", \"2\\n4 5\\nUPDATE 2 2 2 4\\nQUERY 1 1 1 3 3 3\\nUPDATE 1 1 1 23\\nQUERY 2 2 2 4 4 4\\nQUER...
MEDIUM_HARD
{ "id": "taco-test-551", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "It is vacation time and Panda is in his hometown Pan...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 3\\n6 10\\n\\nSAMPLE\", \"100\\n846930886 1804289383\\n1681692777 1714636915\\n424238335 1957747793\\n719885386 1649760492\\n596516649 1189641421\\n1025202362 1350490027\\n783368690 1102520059\\n1967513926 2044897763\\n1365180540 1540383426\\n304089172 1303455736\\n35005211 52...
none
{ "id": "panda-and-his-lazy-number", "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 penguin Rocher has n sticks. He has exactly one st...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1\\n2\\n3\\n4\\n\", \"4\\n1\\n2\\n3\\n8\\n\", \"4\\n1\\n2\\n1\\n4\\n\", \"4\\n1\\n2\\n3\\n12\\n\", \"4\\n2\\n2\\n3\\n15\\n\", \"4\\n2\\n2\\n3\\n5\\n\", \"4\\n1\\n2\\n4\\n4\\n\", \"4\\n1\\n2\\n3\\n14\\n\", \"4\\n1\\n3\\n1\\n4\\n\", \"4\\n2\\n2\\n6\\n15\\n\", \"4\\n1\\n2\\n5\\n4\\...
rating_<=1200
{ "id": "1371_A. Magical Sticks", "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": "Let's define logical *OR* as an operation on two log...
code
{ "ground_truth": "{\"inputs\": [\"2 2\\n1 0\\n0 0\", \"2 3\\n1 1 1\\n1 1 1\", \"2 3\\n0 1 0\\n1 1 1\", \"5 5\\n1 1 1 1 1\\n1 0 0 0 0\\n1 0 0 0 0\\n1 0 0 0 0\\n1 0 0 0 0\", \"5 5\\n1 1 1 0 1\\n1 1 0 0 1\\n0 0 1 1 1\\n1 1 1 1 0\\n1 0 1 1 1\", \"5 6\\n1 0 0 0 1 1\\n1 1 1 1 1 1\\n1 1 1 1 1 1\\n1 0 0 0 1 1\\n1 0 0 0 1 1\...
rating_1201-1400
{ "id": "486B", "rating": 1300, "split": "confidence_train", "sub_source": "rating_1201-1400" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Sig has built his own keyboard. Designed for ultimat...
code
{ "ground_truth": "{\"inputs\": [\"3\\n0\\n\", \"300\\n1100100\\n\", \"5000\\n01000001011101000100001101101111011001000110010101110010000\\n\", \"5000\\n01000001011101010100001101101111011001000110010101110010000\", \"3\\n-1\", \"300\\n1100000\", \"3\\n-122\", \"3\\n1\", \"5000\\n0100000101100101010000110110111101100...
HARD
{ "id": "taco-train-19722", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given integers N and M.\nConsider a sequence...
code
{ "ground_truth": "{\"inputs\": [\"3 14\\n\", \"10 123\\n\", \"100000 1000000000\\n\", \"22 743\\n\", \"26 695\\n\", \"72 135\\n\", \"33447 846767407\\n\", \"3497 637445234\\n\", \"7775 812998265\\n\", \"63982 169552300\\n\", \"68417 341263996\\n\", \"100000 73900000\\n\", \"100000 921100000\\n\", \"100000 932262032\...
MEDIUM
{ "id": "taco-train-17988", "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": "Vasya plays the Geometry Horse.\n\nThe game goal is ...
code
{ "ground_truth": "{\"inputs\": [\"1\\n5 10\\n2\\n3 6\", \"2\\n3 8\\n5 10\\n1\\n20\", \"3\\n10 3\\n20 2\\n30 1\\n3\\n30 50 60\", \"1\\n100 1000\\n1\\n1\", \"1\\n1 1000\\n1\\n1\", \"1\\n1 1000\\n1\\n2\", \"2\\n1000000000 1000\\n1 1\\n1\\n10\", \"6\\n5 9\\n63 3\\n30 4\\n25 6\\n48 2\\n29 9\\n8\\n105 137 172 192 632 722 ...
rating_1401-1600
{ "id": "175C", "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": "As you all know, the plum harvesting season is on! L...
code
{ "ground_truth": "{\"inputs\": [\"5 5\\n13 15 10 9 15\\n15 17 12 11 17\\n10 12 7 6 12\\n17 19 14 13 19\\n16 18 13 12 18\\n\", \"5 5\\n13 15 10 9 15\\n15 17 12 11 17\\n10 12 7 6 12\\n17 19 14 13 19\\n16 33 13 12 18\\n\", \"5 1\\n13 15 14 9 15\\n15 17 12 11 17\\n10 12 6 6 12\\n17 19 14 13 19\\n16 33 13 12 18\\n\", \"5...
rating_>1900
{ "id": "1424_L. Milutin's Plums", "rating": 2800, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given N integers. The i-th integer is a_i. F...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1\\n1\\n1\\n2\", \"6\\n1\\n3\\n2\\n3\\n5\\n2\", \"20\\n3\\n1\\n4\\n1\\n5\\n9\\n2\\n6\\n5\\n3\\n5\\n8\\n9\\n7\\n9\\n3\\n2\\n3\\n8\\n4\", \"4\\n1\\n1\\n0\\n2\", \"6\\n1\\n3\\n0\\n3\\n5\\n2\", \"20\\n3\\n1\\n2\\n1\\n5\\n9\\n2\\n6\\n5\\n3\\n5\\n8\\n9\\n7\\n9\\n3\\n2\\n3\\n8\\n4\", \...
none
{ "id": "p03064 Tenka1 Programmer Contest 2019 - Three Colors", "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": "Mirko has been a very good boy, so he got exactly wh...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2 3 6\\n(R1-R2-R3)\\n\", \"3\\n2 3 6\\n(R1|R2|R3)\\n\", \"5\\n5 5 5 5 5\\n((R1-(R2|R3)-(R4|R5))|(R1-(R2|R3)-(R4|R5)))\\n\"], \"outputs\": [\"11.00000\\n\", \"1.00000\\n\", \"5.00000\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-17528", "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": "Your music player contains N different songs and she ...
code
{ "ground_truth": "{\"fn_name\": \"numMusicPlaylists\", \"inputs\": [[3, 3, 1]], \"outputs\": [6]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-11895", "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": "Time Limit: 8 sec / Memory Limit: 64 MB\n\n\n\n\n\nE...
code
{ "ground_truth": "{\"inputs\": [\"3 3 2\\n1 1\\n2 1 1\\n3 1 1 1\", \"3 3 2\\n1 1\\n2 1 2\\n3 1 1 1\", \"3 3 2\\n1 1\\n2 1 2\\n3 2 1 1\", \"3 1 2\\n1 0\\n2 1 2\\n3 2 1 1\", \"3 3 2\\n1 1\\n2 1 2\\n3 2 -1 1\", \"3 3 2\\n1 1\\n2 1 2\\n3 2 -1 0\", \"3 6 2\\n1 1\\n2 1 2\\n4 2 -1 0\", \"3 0 2\\n1 0\\n2 1 0\\n3 2 1 1\", \"...
none
{ "id": "p01483 Elevator", "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": "Where do odds begin, and where do they end? Where do...
code
{ "ground_truth": "{\"inputs\": [\"4\\n3 9 9 3\\n\", \"3\\n4 3 1\\n\", \"5\\n1 0 1 5 1\\n\", \"3\\n1 3 5\\n\", \"4\\n1 0 1 1\\n\", \"2\\n10 10\\n\", \"5\\n1 3 2 4 5\\n\", \"2\\n1 1\\n\", \"4\\n1 1 2 1\\n\", \"6\\n1 2 3 5 6 7\\n\", \"100\\n61 63 34 45 20 91 31 28 40 27 94 1 73 5 69 10 56 94 80 23 79 99 59 58 13 56 91 ...
rating_<=1200
{ "id": "849_A. Odds and Ends", "rating": 1000, "split": "confidence_train", "sub_source": "rating_<=1200" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There is a field of size $2 \\times 2$. Each cell of...
code
{ "ground_truth": "{\"inputs\": [\"3\\n0 0\\n0 0\\n1 0\\n0 1\\n1 1\\n1 1\\n\", \"16\\n0 0\\n1 1\\n0 1\\n1 0\\n1 0\\n0 1\\n0 0\\n0 0\\n0 0\\n0 1\\n0 1\\n1 1\\n1 1\\n0 0\\n0 1\\n0 1\\n1 1\\n0 1\\n1 0\\n0 0\\n1 1\\n1 0\\n1 1\\n1 1\\n0 1\\n0 0\\n0 0\\n1 0\\n1 0\\n1 1\\n1 0\\n1 0\\n\", \"2\\n1 1\\n1 1\\n1 1\\n1 1\\n\", \"...
EASY
{ "id": "taco-train-9814", "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": "Problem\n\nGPA is an abbreviation for \"Galaxy Point...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1.000\\n2.000\\n3.000\", \"3\\n1.000\\n3.000\\n3.000\", \"3\\n1.000\\n2.000\\n3.4274102096399073\", \"3\\n1.3153899733914476\\n3.000\\n3.000\", \"3\\n1.000\\n3.512063887057689\\n3.1230319554116766\", \"3\\n3.0191870253634328\\n3.000\\n3.1230319554116766\", \"3\\n3.57778612630640...
none
{ "id": "p02099 GPA JANKEN", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "In this Kata, you will be given two strings `a` and `...
code
{ "ground_truth": "{\"fn_name\": \"solve\", \"inputs\": [[\"xyab\", \"xzca\"], [\"xyabb\", \"xzca\"], [\"abcd\", \"xyz\"], [\"xxx\", \"xzca\"]], \"outputs\": [[\"ybzc\"], [\"ybbzc\"], [\"abcdxyz\"], [\"zca\"]]}", "style": "rule" }
EASY
{ "id": "taco-train-7263", "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": "In the advanced algorithm class, n2 students sit in ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n4 5 6\\n7 8 9\\n3\\n1 2 3\\n7 8 9\\n4 5 6\\n0\", \"3\\n1 2 3\\n4 5 6\\n7 10 9\\n3\\n1 2 3\\n7 8 9\\n4 5 6\\n0\", \"3\\n1 2 3\\n4 5 6\\n7 10 9\\n3\\n1 2 3\\n7 8 6\\n4 5 6\\n0\", \"3\\n1 2 3\\n4 5 6\\n7 10 9\\n3\\n1 2 3\\n2 8 9\\n4 5 6\\n0\", \"3\\n1 2 3\\n4 5 6\\n7 10 9\\...
none
{ "id": "p00591 Advanced Algorithm Class", "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 an array of N integers. He wants to play a ...
code
{ "ground_truth": "{\"inputs\": [[\"3\", \"-1 -2 -3\", \"2\"], \"3\\n-2 -2 -3\\n2\", \"3\\n-2 -2 -1\\n2\", \"3\\n-2 0 -1\\n4\", \"3\\n0 1 -2\\n4\", \"3\\n1 0 -1\\n3\", \"3\\n2 3 0\\n2\", \"3\\n-2 -3 -3\\n2\", \"3\\n1 1 -7\\n1\", \"3\\n1 1 -9\\n1\", \"3\\n0 -5 -3\\n2\", \"3\\n-6 -3 -2\\n3\", \"3\\n-8 -3 -2\\n3\", \"3\...
MEDIUM_HARD
{ "id": "taco-train-24881", "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": "Monocarp and Polycarp are learning new programming t...
code
{ "ground_truth": "{\"inputs\": [\"5\\n\\n3 2 2\\n2 0\\n0 5\\n\\n4 3 2\\n2 0 5\\n0 6\\n\\n0 2 2\\n1 0\\n2 3\\n\\n5 4 4\\n6 0 8 0\\n0 7 0 9\\n\\n5 4 1\\n8 7 8 0\\n0\\n\", \"5\\n\\n3 2 2\\n2 0\\n0 5\\n\\n4 3 2\\n2 0 5\\n0 6\\n\\n0 2 2\\n1 0\\n2 3\\n\\n5 4 4\\n6 0 8 0\\n0 7 0 9\\n\\n5 4 1\\n8 7 8 0\\n0\\n\", \"5\\n\\n3 ...
rating_<=1200
{ "id": "1547_C. Pair Programming", "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": "Today the kindergarten has a new group of n kids who...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2\\n3\\n4\\n\", \"3\\n2\\n3\\n4\\n\", \"100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\...
rating_<=1200
{ "id": "1443_A. Kids Seating", "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": "A Bingo game is played by one gamemaster and several...
code
{ "ground_truth": "{\"inputs\": [\"4 3\\n10 25 11 20 6 2 1 15 23\\n5 21 3 12 23 17 7 26 2\\n8 18 4 22 13 27 16 5 11\\n19 9 24 2 11 5 14 28 16\\n4 3\\n12 13 20 24 28 32 15 16 17\\n12 13 21 25 29 33 16 17 18\\n12 13 22 26 30 34 17 18 15\\n12 13 23 27 31 35 18 15 16\\n4 3\\n11 12 13 14 15 16 17 18 19\\n21 22 23 24 25 26...
none
{ "id": "p00843 Bingo", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The sequence of m integers is called the permutation...
code
{ "ground_truth": "{\"inputs\": [\"6\\n5\\n1 4 3 2 1\\n6\\n2 4 1 3 2 1\\n4\\n2 1 1 3\\n4\\n1 3 3 1\\n12\\n2 1 3 4 5 6 7 8 9 1 10 2\\n3\\n1 1 1\\n\", \"6\\n5\\n1 4 3 1 1\\n6\\n2 4 1 3 2 1\\n4\\n2 1 1 3\\n4\\n1 3 3 1\\n12\\n2 1 3 4 5 6 7 8 9 1 10 2\\n3\\n1 1 1\\n\", \"6\\n5\\n1 4 3 2 1\\n6\\n2 4 1 3 3 1\\n4\\n2 1 1 3\\...
rating_1201-1400
{ "id": "1330_B. Dreamoon Likes Permutations", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Trouble came from the overseas lands: a three-headed...
code
{ "ground_truth": "{\"inputs\": [\"0 0\\n0 1\\n1 1\", \"-1 -1\\n-3 -3\\n-4 -4\", \"-4 -6\\n-3 -7\\n-2 -6\", \"-44 57\\n-118 -41\\n-216 33\", \"39 100\\n90 85\\n105 136\", \"71 43\\n96 -15\\n171 -189\", \"-22 -84\\n-117 8\\n-25 103\", \"28 -81\\n49 -85\\n45 -106\", \"-20 -60\\n-39 -45\\n-24 -26\", \"-61 -24\\n-61 35\\...
rating_1201-1400
{ "id": "227A", "rating": 1300, "split": "confidence_train", "sub_source": "rating_1201-1400" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Unlike Knights of a Round Table, Knights of a Polygo...
code
{ "ground_truth": "{\"inputs\": [\"4 2\\n4 5 9 7\\n1 2 11 33\", \"5 1\\n1 2 3 4 5\\n1 2 3 4 5\", \"1 0\\n2\\n3\", \"7 1\\n2 3 4 5 7 8 9\\n0 3 7 9 5 8 9\", \"7 2\\n2 4 6 7 8 9 10\\n10 8 4 8 4 5 9\", \"11 10\\n1 2 3 4 5 6 7 8 9 10 11\\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...
rating_1201-1400
{ "id": "994B", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problems statements [Hindi] , [Vietnamese] , [M...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 5 2 3\\n\"], \"outputs\": [\"1 3\\n3 2\\n3 4\\n\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-19927", "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": "Alice and Bob play a game on a grid with n rows and ...
code
{ "ground_truth": "{\"inputs\": [\"1 6\\n0 3 9\\n\", \"1 2\\n0 3 9\\n\", \"10 133\\n-248 -193 -187\\n97 101 202\\n-72 67 91\\n23 89 215\\n-129 -108 232\\n-223 -59 236\\n-99 86 242\\n-137 -109 -45\\n-105 173 246\\n-44 228 243\\n\", \"9 3\\n-3 0 2\\n-3 0 2\\n-3 0 2\\n-1 0 2\\n-3 1 3\\n-3 2 3\\n-3 -2 2\\n-2 -1 2\\n0 1 3...
rating_>1900
{ "id": "1091_H. New Year and the Tricolore Recreation", "rating": 3200, "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": "# Scenario\n\n**_Several people_** are standing in *a...
code
{ "ground_truth": "{\"fn_name\": \"row_weights\", \"inputs\": [[[80]], [[100, 50]], [[50, 60, 70, 80]], [[13, 27, 49]], [[70, 58, 75, 34, 91]], [[29, 83, 67, 53, 19, 28, 96]], [[0]], [[100, 51, 50, 100]], [[39, 84, 74, 18, 59, 72, 35, 61]], [[0, 1, 0]]], \"outputs\": [[[80, 0]], [[100, 50]], [[120, 140]], [[62, 27]],...
EASY
{ "id": "taco-train-10015", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given a sequence of numbers a1, a2, a3, ..., an, fin...
code
{ "ground_truth": "{\"inputs\": [\"7\\n-5\\n-1\\n6\\n4\\n9\\n-6\\n-7\\n13\\n1\\n2\\n3\\n2\\n-2\\n-1\\n1\\n2\\n3\\n2\\n1\\n-2\\n1\\n3\\n1000\\n-200\\n201\\n0\", \"7\\n-5\\n-2\\n6\\n4\\n9\\n-6\\n-7\\n13\\n1\\n2\\n3\\n2\\n-2\\n-1\\n1\\n2\\n3\\n2\\n1\\n-2\\n1\\n3\\n1000\\n-200\\n201\\n0\", \"7\\n-5\\n-2\\n6\\n4\\n9\\n-6\...
none
{ "id": "p00022 Maximum Sum Sequence", "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 two strings s and t both of length 2 a...
code
{ "ground_truth": "{\"inputs\": [\"3\\naa\\nbc\\n\", \"1\\ncb\\nac\\n\", \"2\\nab\\nbc\\n\", \"2\\naa\\nca\\n\", \"1\\nca\\nca\\n\", \"1\\nca\\nba\\n\", \"2\\ncb\\nab\\n\", \"1\\nbc\\nac\\n\", \"50000\\nbc\\nca\\n\", \"5\\nac\\nca\\n\", \"10\\nbb\\nbc\\n\", \"100\\naa\\nba\\n\", \"1000\\ncc\\nca\\n\", \"90\\nbc\\nba\...
rating_1601-1900
{ "id": "1213_E. Two Small Strings", "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": "Read problems statements in Mandarin Chinese and Ru...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 4 5\\n2 4 5\", \"2\\n1 4 5\\n2 4 5\"], \"outputs\": [\"2\\n5\", \"2\\n5\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-5884", "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": "Let's call a fraction x/y good if there exists at le...
code
{ "ground_truth": "{\"inputs\": [\"42\\n\", \"3141592653589793238462643383279\\n\", \"815310726\\n\", \"2097318659323687508035617137837424079869931186772723632174938767232665404223712236447453406038839465\\n\", \"3111171428386487304425879748875728923972141290910307877721323285115284307534957305126508215025448767\\n\"...
rating_>1900
{ "id": "1194_G. Another Meme Problem", "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": "Let a and b be some non-negative integers. Let's def...
code
{ "ground_truth": "{\"inputs\": [\"2 3\\n14\\n2 4\\n2 1\\n1 0\\n\", \"3 1\\n139\\n2 1\\n\", \"2 3\\n14\\n2 4\\n2 1\\n1 1\\n\", \"2 3\\n11\\n2 4\\n2 1\\n1 0\\n\", \"2 3\\n11\\n1 4\\n2 1\\n1 0\\n\", \"2 3\\n14\\n2 4\\n2 1\\n2 0\\n\", \"2 3\\n11\\n1 4\\n2 2\\n1 0\\n\", \"2 3\\n11\\n1 5\\n2 2\\n1 0\\n\", \"3 1\\n139\\n3 ...
rating_>1900
{ "id": "1380_F. Strange Addition", "rating": 2600, "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": "Barney lives in NYC. NYC has infinite number of inte...
code
{ "ground_truth": "{\"inputs\": [\"7\\n1 3 4 30\\n1 4 1 2\\n1 3 6 8\\n2 4 3\\n1 6 1 40\\n2 3 7\\n2 2 4\", \"1\\n2 666077344481199252 881371880336470888\", \"10\\n1 1 63669439577744021 396980128\\n1 2582240553355225 63669439577744021 997926286\\n1 2582240553355225 1 619026011\\n1 1 4 231881718\\n2 63669439577744021 38...
rating_1401-1600
{ "id": "696A", "rating": 1500, "split": "confidence_train", "sub_source": "rating_1401-1600" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Mayor of city S just hates trees and lawns. They tak...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4 5\\n4 5\\n4 10\", \"4\\n1 100\\n100 1\\n1 100\\n100 1\", \"3\\n1 1\\n100 100\\n1 1\", \"10\\n21005 10850\\n27020 13372\\n28183 3724\\n22874 13564\\n27446 11493\\n22522 10012\\n24819 11529\\n24166 11084\\n24539 9211\\n24152 9235\", \"1\\n1 0\", \"1\\n1 1000000\", \"1\\n1000000 ...
rating_1601-1900
{ "id": "883K", "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": "For a sequence a of n integers between 1 and m, incl...
code
{ "ground_truth": "{\"inputs\": [\"1 3\\n\", \"2 2\\n\", \"3 3\\n\", \"1 1000000\\n\", \"1000000 1\\n\", \"500 500\\n\", \"1000000 1000000\\n\", \"500 500\\n\", \"1000000 1\\n\", \"1 1000000\\n\", \"1000000 1000000\\n\", \"1 3\\n\", \"2 2\\n\", \"3 3\\n\", \"4 4\\n\", \"5 5\\n\", \"6 6\\n\", \"7 7\\n\", \"8 8\\n\", \...
HARD
{ "id": "taco-test-548", "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": "Iahub recently has learned Bubble Sort, an algorithm...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3 1 2\", \"5\\n4 2 1 3 5\", \"10\\n1 9 8 10 2 3 4 6 5 7\", \"50\\n12 24 42 43 36 3 40 29 7 34 10 13 28 9 35 23 25 21 19 4 20 18 11 38 41 48 6 46 33 17 31 37 2 30 32 44 45 5 47 49 16 15 50 27 26 14 39 22 1 8\", \"100\\n36 48 92 87 28 85 42 10 44 41 39 3 79 9 14 56 1 16 46 35 93 8...
rating_1401-1600
{ "id": "340D", "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": "In an attempt to make peace with the Mischievious Me...
code
{ "ground_truth": "{\"inputs\": [\"4 1 2\\n6\\n5\\n4\\n3\\n2\\n1\\n\", \"3 3 2\\n4\\n6\\n9\\n8\\n6\\n\", \"9 8 10\\n10\\n9\\n6\\n8\\n8\\n8\\n8\\n6\\n2\\n7\\n1\\n9\\n5\\n10\\n8\\n1\\n1\\n6\\n10\\n\", \"5 1 7\\n10\\n8\\n4\\n5\\n8\\n3\\n9\\n3\\n9\\n3\\n10\\n1\\n\", \"3 3 3\\n6\\n8\\n10\\n12\\n14\\n16\\n\", \"7 2 8\\n2\\...
rating_>1900
{ "id": "645_F. Cowslip Collections", "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": "Once again, Boris needs the help of Anton in creatin...
code
{ "ground_truth": "{\"inputs\": [\"5\\n3\\n1 -1 0\\n1 1 -2\\n3\\n0 1 1\\n0 2 2\\n2\\n1 0\\n1 41\\n2\\n-1 0\\n-1 -41\\n5\\n0 1 -1 1 -1\\n1 1 -1 1 -1\\n\", \"5\\n3\\n1 -1 0\\n1 1 -2\\n3\\n0 1 1\\n0 2 2\\n2\\n1 -1\\n1 41\\n2\\n-1 0\\n-1 -41\\n5\\n0 1 -1 1 -1\\n1 1 -1 1 -1\\n\", \"5\\n3\\n1 -1 0\\n1 1 -2\\n3\\n0 1 1\\n0 ...
EASY
{ "id": "taco-train-17057", "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 permutation of length *n* is an integer sequence s...
code
{ "ground_truth": "{\"inputs\": [\"5\\n0 1 3 4 2\", \"10\\n6 9 4 7 8 2 3 5 0 1\", \"100\\n99 5 40 32 4 31 38 57 94 47 26 16 89 72 9 80 55 86 78 90 42 41 46 74 56 97 21 48 66 27 93 85 88 59 64 95 10 45 12 22 84 60 8 98 62 51 14 65 39 30 11 71 92 19 76 43 87 54 15 53 37 6 25 18 96 35 13 91 2 3 0 23 1 7 49 75 81 33 50 5...
rating_<=1200
{ "id": "347B", "rating": 1100, "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": "After several latest reforms many tourists are plann...
code
{ "ground_truth": "{\"inputs\": [\"1 1\\n2 1\", \"2 2\\n1 3\\n2 2\", \"4 3\\n3 10\\n2 7\\n2 8\\n1 1\", \"5 5\\n3 5\\n2 6\\n3 2\\n1 1\\n1 6\", \"6 6\\n1 6\\n1 4\\n1 8\\n3 2\\n3 2\\n2 8\", \"6 12\\n1 7\\n1 10\\n2 8\\n1 2\\n2 9\\n3 5\", \"6 18\\n3 3\\n1 10\\n2 10\\n3 6\\n1 3\\n2 3\", \"20 25\\n2 13\\n3 11\\n1 32\\n1 43\...
rating_>1900
{ "id": "808E", "rating": 2300, "split": "confidence_train", "sub_source": "rating_>1900" }