data_source
stringclasses
3 values
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
sub_source
stringclasses
12 values
extra_info
dict
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "An array $b$ is called to be a subarray of $a$ if it...
code
{ "ground_truth": "{\"inputs\": [\"9 2 3\\n5 2 5 2 4 1 1 3 2\\n\", \"6 1 4\\n4 1 3 2 2 3\\n\", \"2 1 2\\n-1000000000 1000000000\\n\", \"11 3 3\\n-6 9 10 -9 -7 -2 -1 -8 0 2 7\\n\", \"37 3 10\\n74 42 92 -64 -11 -37 63 81 -58 -88 52 -6 40 -24 29 -10 -23 41 -36 -53 1 94 -65 47 87 -40 -84 -65 -1 99 35 51 40 -21 36 84 -48\...
MEDIUM
{ "id": "taco-train-20738", "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": "Read problem statements in [Mandarin], [Russian], an...
code
{ "ground_truth": "{\"inputs\": [\"2\\n5\\n18 6 4 3 12\\n5\\n12 4 6 16 28 \"], \"outputs\": [\"6\\n4\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-15649", "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": "Note that the memory limit is unusual.\n\nThere are ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 0 -2 -2 4\\n4 2 3 4 5\\n1 3\\n1 4\\n1 5\\n0\\n7\\n1 1 1 5\\n2 4 3\\n1 1 1 5\\n2 3 2\\n1 2 2 4\\n2 5 1\\n1 981 4 5\\n\", \"5\\n1 0 -2 -2 4\\n4 2 3 4 5\\n1 3\\n1 4\\n1 5\\n0\\n7\\n1 1 1 5\\n2 4 3\\n1 1 1 5\\n2 3 2\\n1 2 2 4\\n2 5 1\\n1 981 4 4\\n\", \"5\\n1 0 -2 -2 4\\n4 2 3 4 5...
rating_>1900
{ "id": "1540_E. Tasty Dishes", "rating": 3500, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Smart number is a number which has at least three dis...
code
{ "ground_truth": "{\"inputs\": [\"n = 1\", \"n = 2\"], \"outputs\": [\"30\", \"42\"]}", "style": "rule" }
EASY
{ "id": "taco-train-10242", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problems statements in [Hindi], [Mandarin Chine...
code
{ "ground_truth": "{\"inputs\": [\"2\\n8 2\\n00011101\\n6 2\\n100111\"], \"outputs\": [\"01100110\\nIMPOSSIBLE\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-3997", "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": "Little boy Valera studies an algorithm of sorting an...
code
{ "ground_truth": "{\"inputs\": [\"1\\n\", \"2\\n\", \"4\\n\", \"26\\n\", \"5\\n\", \"7\\n\", \"38\\n\", \"6\\n\", \"18\\n\", \"30\\n\", \"8\\n\", \"9\\n\", \"34\\n\", \"50\\n\", \"3\\n\", \"12\\n\", \"46\\n\", \"22\\n\", \"32\\n\", \"17\\n\", \"14\\n\", \"25\\n\", \"42\\n\", \"11\\n\", \"10\\n\", \"20\\n\", \"33\\n\...
rating_<=1200
{ "id": "246_A. Buggy Sorting", "rating": 900, "split": "confidence_train", "sub_source": "rating_<=1200" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Ridbit starts with an integer n.\n\nIn one move, he ...
code
{ "ground_truth": "{\"inputs\": [\"6\\n1\\n2\\n3\\n4\\n6\\n9\\n\", \"6\\n1\\n2\\n3\\n4\\n6\\n16\\n\", \"6\\n1\\n2\\n3\\n7\\n6\\n16\\n\", \"6\\n1\\n2\\n3\\n7\\n1\\n30\\n\", \"6\\n1\\n2\\n3\\n4\\n11\\n9\\n\", \"6\\n1\\n3\\n3\\n4\\n6\\n16\\n\", \"6\\n1\\n2\\n3\\n7\\n6\\n45\\n\", \"6\\n1\\n2\\n3\\n7\\n1\\n17\\n\", \"6\\n...
rating_<=1200
{ "id": "1451_A. Subtract or Divide", "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": "This time your assignment is really simple.\n\nCalcu...
code
{ "ground_truth": "{\"inputs\": [\"4 4\\n\"], \"outputs\": [\"96\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-10311", "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": "Igor the analyst fell asleep on the work and had a s...
code
{ "ground_truth": "{\"inputs\": [\"4\\n7 7 9 8\\n0 3 -5 4\\n5 0 5 4\\n9 9 -1 -6\\n10 5 -7 -10\\n\", \"4\\n7 7 9 8\\n3 5 7 5\\n7 5 2 4\\n3 3 7 8\\n6 6 3 2\\n\", \"1\\n0 0 10 10\\n5 5 5 5\\n\", \"1\\n0 0 5 5\\n2 5 0 0\\n\", \"4\\n0 49998 2 50002\\n1 50000 0 0\\n1 50000 0 0\\n1 0 0 1\\n1 100000 0 -1\\n\", \"1\\n0 0 1000...
rating_>1900
{ "id": "793_C. Mice problem", "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": "It is given a positive integer $n$. In $1$ move, one...
code
{ "ground_truth": "{\"inputs\": [\"5\\n100\\n71345\\n3259\\n50555\\n2050047\\n\"], \"outputs\": [\"0\\n3\\n1\\n3\\n2\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-9243", "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": "Chef initially had two non-empty arrays A and B, whe...
code
{ "ground_truth": "{\"inputs\": [\"2\\n6\\n7 6 3 8 2 9\\n2\\n2 1\\n\"], \"outputs\": [\"3\\n7 6 3\\n3\\n8 2 9\\n-1\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-13784", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given a prime number $p$, $n$ integers $a_1,...
code
{ "ground_truth": "{\"inputs\": [\"3 3 0\\n0 1 2\\n\", \"6 7 2\\n1 2 3 4 5 6\\n\", \"5 5 3\\n3 0 4 1 2\\n\", \"7 7 3\\n4 0 5 3 1 2 6\\n\", \"2 2 1\\n1 0\\n\", \"3 3 0\\n0 2 1\\n\", \"2 2 0\\n1 0\\n\", \"3 3 1\\n0 2 1\\n\", \"3 3 2\\n0 1 2\\n\", \"3 3 0\\n0 2 1\\n\", \"2 2 1\\n1 0\\n\", \"3 3 2\\n0 1 2\\n\", \"7 7 3\\...
HARD
{ "id": "taco-train-4200", "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": "It's well known that the best way to distract from s...
code
{ "ground_truth": "{\"inputs\": [\"4 5\\n1 3 4\\n1 2 5\\n5 6 1\\n1 2 4\\n\", \"3 2\\n4 6 3\\n2 4 1\\n3 5 4\\n\", \"2 2\\n1 1 1000000000\\n2 2 1000\\n\", \"4 3\\n1 1 2\\n1 1 3\\n2 3 3\\n2 3 4\\n\", \"3 3\\n11 11 2\\n3 4 3\\n8 9 2\\n\", \"4 5\\n1 3 500000000\\n1 2 500000000\\n5 6 500000000\\n1 2 500000000\\n\", \"2 5\\...
rating_1401-1600
{ "id": "822_C. Hacker, pack your bags!", "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": "The employees of the R1 company often spend time tog...
code
{ "ground_truth": "{\"inputs\": [\"2 1\\n1 2\\n\", \"3 3\\n1 2\\n2 3\\n3 1\\n\", \"10 45\\n10 5\\n10 7\\n6 1\\n5 8\\n3 5\\n6 5\\n1 2\\n6 10\\n2 9\\n9 5\\n4 1\\n7 5\\n1 8\\n6 8\\n10 9\\n7 2\\n7 9\\n4 10\\n7 3\\n4 8\\n10 3\\n10 8\\n2 10\\n8 2\\n4 2\\n5 2\\n9 1\\n4 5\\n1 3\\n9 6\\n3 8\\n5 1\\n6 4\\n4 7\\n8 7\\n7 1\\n9 3...
HARD
{ "id": "taco-train-9989", "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": "This problem is different from the easy version. In ...
code
{ "ground_truth": "{\"inputs\": [\"4\\n5\\nsouse\\nhouhe\\n3\\ncat\\ndog\\n2\\naa\\naz\\n3\\nabc\\nbca\\n\", \"4\\n5\\nsouse\\nhouhe\\n3\\ncat\\ndog\\n2\\naa\\naz\\n3\\nabc\\nbca\\n\", \"4\\n5\\nsouse\\nhouhe\\n3\\ncat\\ndog\\n2\\naa\\nza\\n3\\nabc\\nbca\\n\", \"4\\n5\\nsouse\\nhouhf\\n3\\ncat\\ndog\\n2\\naa\\naz\\n3...
MEDIUM_HARD
{ "id": "taco-train-7276", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given an array of N integers a1, a2, ..., aN...
code
{ "ground_truth": "{\"inputs\": [[\"1\", \"4 9\", \"4 4 2 6\"], \"1 \\n4 14\\n4 4 2 6\", \"1 \\n4 14\\n4 1 2 6\", \"1 \\n4 14\\n4 -1 2 11\", \"1 \\n4 14\\n4 -1 0 11\", \"1 \\n4 14\\n4 -1 0 7\", \"1 \\n4 14\\n1 -1 0 7\", \"1 \\n4 26\\n1 -1 0 7\", \"1 \\n4 14\\n4 1 1 0\", \"1 \\n4 17\\n4 0 2 6\", \"1 ...
MEDIUM
{ "id": "taco-train-7893", "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": "Important: All possible tests are in the pretest, so...
code
{ "ground_truth": "{\"inputs\": [\"3 2\\n\", \"5 5\\n\", \"100 100000\\n\", \"5 5\\n\", \"3 2\\n\", \"100 100010\\n\", \"100 100100\\n\", \"100 110100\\n\", \"100 110101\\n\", \"100 100101\\n\", \"100 111101\\n\", \"100 110001\\n\", \"100 101000\\n\", \"100 100110\\n\", \"100 110110\\n\", \"100 010101\\n\", \"100 100...
rating_>1900
{ "id": "329_D. The Evil Temple and the Moving Rocks", "rating": 2500, "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": "Subodh is celebrating its annual Techno-Cultural Fes...
code
{ "ground_truth": "{\"inputs\": [\"1\\n\\n3\\n1 2 3\\n3 1 2\\n\\nSAMPLE\", \"1\\n\\n3\\n1 2 3\\n3 2 1\", \"1\\n\\n3\\n1 2 3\\n3 1 2\\n\\nSALPME\", \"1\\n\\n3\\n2 1 3\\n3 1 2\\n\\nS@MLPF\", \"1\\n\\n3\\n1 2 3\\n3 1 2\\n\\nEMPLAS\", \"1\\n\\n3\\n1 2 3\\n3 1 2\\n\\nEAMPLS\", \"1\\n\\n3\\n1 2 3\\n3 1 2\\n\\nS@MPLE\", \"1...
none
{ "id": "arrange-boxes-1", "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": "On the Berland Dependence Day it was decided to orga...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n1 2 2\\n2 3 1\\n3 1 2\\n1 1 1 1\\n\", \"3 2\\n1 2 1\\n2 3 1\\n1 1 1 1\\n\", \"4 5\\n1 2 2\\n2 3 1\\n3 4 2\\n4 1 2\\n1 3 3\\n1 2 1 1\\n\", \"4 6\\n1 2 17\\n1 3 6\\n2 4 1\\n4 1 14\\n3 2 16\\n3 4 9\\n1 1 1 2\\n\", \"4 4\\n1 2 27\\n2 3 57\\n1 4 83\\n3 1 56\\n2 2 1 1\\n\", \"6 13\\...
rating_>1900
{ "id": "38_H. The Great Marathon", "rating": 2400, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "We will say that two integer sequences of length N, ...
code
{ "ground_truth": "{\"inputs\": [\"10\\n90 52 56 71 44 8 13 30 57 84\", \"2\\n2 3\", \"1\\n100\", \"3\\n3 3 3\", \"10\\n90 101 56 71 44 8 13 30 57 84\", \"2\\n2 4\", \"1\\n000\", \"3\\n3 3 2\", \"10\\n41 101 56 71 44 8 13 30 57 84\", \"2\\n3 6\", \"1\\n011\", \"3\\n3 2 0\", \"10\\n60 101 56 71 44 8 13 30 114 84\", \"...
none
{ "id": "p03568 CODE FESTIVAL 2017 qual C - Similar Arrays", "rating": 0, "split": "confidence_train", "sub_source": "none" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Return a new array consisting of elements which are m...
code
{ "ground_truth": "{\"fn_name\": \"multiple_of_index\", \"inputs\": [[[22, -6, 32, 82, 9, 25]], [[68, -1, 1, -7, 10, 10]], [[11, -11]], [[-56, -85, 72, -26, -14, 76, -27, 72, 35, -21, -67, 87, 0, 21, 59, 27, -92, 68]], [[28, 38, -44, -99, -13, -54, 77, -51]], [[-1, -49, -1, 67, 8, -60, 39, 35]]], \"outputs\": [[[-6, ...
EASY
{ "id": "taco-train-10568", "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": "Write a program that will calculate the number of tra...
code
{ "ground_truth": "{\"fn_name\": \"zeros\", \"inputs\": [[0], [6], [30], [100], [1000], [100000], [1000000000]], \"outputs\": [[0], [1], [7], [24], [249], [24999], [249999998]]}", "style": "rule" }
EASY
{ "id": "taco-train-2156", "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": "Every superhero has been given a power value by the ...
code
{ "ground_truth": "{\"inputs\": [\"2 4 6\\n4 7\\n\", \"4 2 6\\n1 3 2 3\\n\", \"9 99252 6470888\\n74578 2746 96295 86884 21198 28655 22503 7868 47942\\n\", \"9 407 2710197\\n24191 58791 9486 68030 25807 11 88665 32600 12100\\n\", \"9 10770 5887448\\n3054 67926 81667 95184 41139 64840 76118 18577 22469\\n\", \"1 59139 ...
rating_1601-1900
{ "id": "1111_B. Average Superhero Gang Power ", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are n products in the shop. The price of the i...
code
{ "ground_truth": "{\"inputs\": [\"4\\n5 1\\n1 1 2 3 1\\n4 2\\n6 4 8 5\\n2 2\\n1 6\\n3 5\\n5 2 5\\n\", \"1\\n3 100000000\\n100000000 100000000 100000000\\n\", \"1\\n2 1\\n100000000 100000000\\n\", \"5\\n8 19551489\\n31131899 17585660 3913937 14521321 5400652 96097161 58347480 35051437\\n1 55716143\\n15578410\\n7 1956...
rating_<=1200
{ "id": "1183_B. Equalize Prices", "rating": 900, "split": "confidence_train", "sub_source": "rating_<=1200" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Read problems statements in [Mandarin Chinese], [Rus...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2 2 5\\n2 3 7\"], \"outputs\": [\"14\\n5\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-18711", "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 problems statements in [Mandarin Chinese], [Rus...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1\\n2\\n3\\n4\\n5\\n\"], \"outputs\": [\"0\\n1\\n500000005\\n944444453\\n616319451\\n\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-8218", "rating": null, "split": "confidence_train", "sub_source": "VERY_HARD" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Limak is a grizzly bear. He is big and dreadful. You...
code
{ "ground_truth": "{\"inputs\": [\"10 20 1\\n10 10\", \"10 20 3\\n15 10\\n5 0\\n10 5\", \"10 20 2\\n15 3\\n20 10\", \"15 27 2\\n6 4\\n23 5\", \"50 7654 4\\n1273 11\\n6327 38\\n1244 3\\n5208 22\", \"50 7654 4\\n2899 15\\n3848 26\\n2718 12\\n5511 36\", \"50 7654 4\\n4881 20\\n4957 6\\n4764 50\\n944 44\", \"50 6457 1\\n...
rating_>1900
{ "id": "628F", "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": "Ted$Ted$ loves prime numbers. One day he is playing ...
code
{ "ground_truth": "{\"inputs\": [[\"1\", \"3\", \"2 3 5\", \"2 1 2\", \"1 1 1\"]], \"outputs\": [[\"540\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-25390", "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": "For Turbo C++ Users : Read the following document be...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2\", \"1\\n0\", \"1\\n1\", \"1\\n-1\", \"1\\n-2\", \"1\\n4\", \"1\\n8\", \"1\\n5\", \"1\\n10\", \"1\\n9\", \"1\\n6\", \"1\\n12\", \"1\\n21\", \"1\\n34\", \"1\\n59\", \"1\\n81\", \"1\\n36\", \"1\\n18\", \"1\\n15\", \"1\\n30\", \"1\\n-4\", \"1\\n-8\", \"1\\n-14\", \"1\\n-22\", \"1...
none
{ "id": "wolvxr", "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": "Mr. Bond was enjoying his vacations in old palace of...
code
{ "ground_truth": "{\"inputs\": [\"2\\n\\n1 2 3\\n4 5 6\\n7 7 8\\n\\n1 2 3\\n4 5 6\\n9 8 7\", \"2\\n\\n1 2 3\\n4 5 6\\n8 7 9\\n\\n4 3 2\\n6 8 7\\n5 9 1\", \"2\\n\\n1 2 3\\n4 5 6\\n7 8 9\\n\\n9 8 7\\n6 5 4\\n3 2 1\"], \"outputs\": [\"47\\n39\", \"-1\\n-1\", \"0\\n48\"]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-20938", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "After a terrifying forest fire in Berland a forest r...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n1\\n2 2\\n\", \"3 3\\n1\\n1 1\\n\", \"3 3\\n2\\n1 1 3 3\\n\", \"2000 1\\n10\\n1058 1 1779 1 1995 1 1398 1 96 1 1599 1 1496 1 1659 1 385 1 1485 1\\n\", \"100 100\\n4\\n72 12 1 66 57 67 25 67\\n\", \"1 10\\n9\\n1 1 1 2 1 3 1 4 1 6 1 7 1 8 1 9 1 10\\n\", \"100 1\\n10\\n62 1 63 1 ...
rating_1401-1600
{ "id": "35_C. Fire Again", "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 ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "As usual Alice and bob are playing a game. Alice wil...
code
{ "ground_truth": "{\"inputs\": [\"1000\\n25504\\n460200\\n24788\\n22401\\n14077\\n18030\\n25883\\n24073\\n144\\n3193\\n31728\\n27369\\n16663\\n945\\n8482\\n15105\\n28928\\n30108\\n8115\\n13981\\n15230\\n29807\\n17804\\n9810\\n28636\\n22300\\n32624\\n12073\\n7442\\n13964\\n28975\\n23040\\n2966\\n20521\\n24092\\n10796...
UNKNOWN_DIFFICULTY
{ "id": "taco-train-14375", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In the lattice points of the coordinate line there a...
code
{ "ground_truth": "{\"inputs\": [\"3 2\\n1 3 10\\n3 2 5\\n4 10 8\", \"3 3\\n1 3 10\\n3 2 5\\n4 10 8\", \"5 1\\n1 3 2\\n2 2 4\\n3 2 1\\n4 2 1\\n5 3 3\", \"5 1\\n1 5 2\\n2 5 4\\n3 5 1\\n4 5 1\\n5 5 3\", \"1 4\\n6 8 16\"], \"outputs\": [\"1\", \"2\", \"2\", \"5\", \"0\"]}", "style": "rule" }
rating_>1900
{ "id": "762E", "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": "Vasya wrote down two strings s of length n and t of ...
code
{ "ground_truth": "{\"inputs\": [\"5\\nbb?a?\\n1\\n\", \"9\\nab??ab???\\n3\\n\", \"6\\nab??ab\\n4\\n\", \"14\\n?abaa?abb?b?a?\\n3\\n\", \"17\\nb??a?abbbaaababba\\n4\\n\", \"1\\nb\\n1\\n\", \"3\\nb?a\\n1\\n\", \"12\\naba?bbaaabbb\\n1\\n\", \"43\\n????aabaababa?aaaa?abbbabbb?ab??baabbbbbabb\\n5\\n\", \"36\\nbbaa??aab?a...
HARD
{ "id": "taco-train-8853", "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've got a undirected graph G, consisting of n nod...
code
{ "ground_truth": "{\"inputs\": [\"3 3 2\\n1 2\\n2 3\\n3 1\\n\", \"4 6 3\\n4 3\\n1 2\\n1 3\\n1 4\\n2 3\\n2 4\\n\", \"9 9 2\\n5 6\\n6 7\\n7 8\\n8 9\\n9 5\\n1 2\\n2 3\\n3 4\\n4 1\\n\", \"5 10 4\\n1 2\\n2 3\\n1 3\\n1 5\\n4 1\\n2 5\\n2 4\\n5 3\\n5 4\\n3 4\\n\", \"10 15 3\\n9 4\\n4 8\\n4 2\\n2 9\\n9 6\\n6 2\\n6 5\\n1 10\\...
MEDIUM_HARD
{ "id": "taco-train-10151", "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": "The Saratov State University Olympiad Programmers Tr...
code
{ "ground_truth": "{\"inputs\": [\"5 2\\n0 4 5 1 0\\n\", \"6 4\\n0 1 2 3 4 5\\n\", \"6 5\\n0 0 0 0 0 0\\n\", \"3 4\\n0 1 0\\n\", \"3 4\\n0 2 0\\n\", \"6 5\\n0 0 0 0 0 0\\n\", \"12 2\\n0 1 2 3 4 0 1 2 3 4 0 1\\n\", \"15 2\\n0 1 2 3 4 0 1 2 3 4 0 1 2 3 4\\n\", \"13 1\\n5 0 5 0 1 5 0 4 1 1 1 4 1\\n\", \"20 1\\n5 0 4 2 2...
EASY
{ "id": "taco-test-849", "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": "As you know, every birthday party has a cake! This t...
code
{ "ground_truth": "{\"inputs\": [\"2\\n100 30\\n40 10\\n\", \"4\\n1 1\\n9 7\\n1 4\\n10 7\\n\", \"3\\n2 2\\n1 1\\n3 3\\n\", \"3\\n2 2\\n3 3\\n1 1\\n\", \"3\\n3 3\\n1 1\\n2 2\\n\", \"3\\n1 1\\n2 2\\n3 3\\n\", \"3\\n1 1\\n3 3\\n2 2\\n\", \"3\\n3 3\\n2 2\\n1 1\\n\", \"1\\n1 1\\n\", \"2\\n1 1\\n2 2\\n\", \"2\\n2 2\\n1 1\\...
HARD
{ "id": "taco-train-4102", "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": "The city park of IT City contains *n* east to west p...
code
{ "ground_truth": "{\"inputs\": [\"5\", \"6\", \"7\", \"15\", \"17\", \"72\", \"83\", \"95\", \"99\", \"100\"], \"outputs\": [\"120\", \"4320\", \"52920\", \"1082161080\", \"4594961280\", \"23491596420472320\", \"101159538130177920\", \"402852449038723320\", \"613867215317368320\", \"680185280130048000\"]}", "style...
rating_1201-1400
{ "id": "630H", "rating": 1400, "split": "confidence_train", "sub_source": "rating_1201-1400" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Let's introduce the designation <image>, where x is ...
code
{ "ground_truth": "{\"inputs\": [\"10 3\\nabab\\nbab\\n\", \"541 9\\nbxhwcmunbdxcatppdsw\\nshbppncwbnsxxnxunwsbncpdchcbcspdcppdchmbbcuapphpdxbpcswcxpxpdscxpddbcppdxhpxbuxxdbpdpuudb\\n\", \"8058035 2\\nrioqrqetkzfbldjiemsfzbhzfnwywmxxgdpyl\\ngfmhefhyyndzmsbfnefmwmpxfxfhflzplgoxfrrdxilibzlephlezisfztsfitnrzrilzmtipzofk...
rating_>1900
{ "id": "314_B. Sereja and Periods", "rating": 2000, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Alyona has built n towers by putting small cubes som...
code
{ "ground_truth": "{\"inputs\": [\"5\\n5 5 5 5 5\\n3\\n1 3 2\\n2 2 1\\n4 4 1\\n\", \"7\\n10 2 8 8 4 2 4\\n7\\n7 7 20\\n3 4 75\\n5 7 14\\n1 5 10\\n2 4 14\\n5 7 51\\n6 6 67\\n\", \"1\\n1\\n1\\n1 1 1\\n\", \"7\\n10 2 3 9 5 10 4\\n4\\n1 3 75\\n1 4 15\\n3 5 5\\n5 5 88\\n\", \"4\\n1 2 3 1\\n30\\n3 3 1000000000\\n3 3 100000...
rating_>1900
{ "id": "739_C. Alyona and towers", "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": "Read problems statements in Mandarin Chinese and Rus...
code
{ "ground_truth": "{\"inputs\": [\"2\\ns?or?\\nsco??\\nstor?\\nsco??\", \"2\\ns?o?r\\nsco??\\nstor?\\nsco??\", \"2\\nr?o?s\\nsco??\\nstor?\\nsco??\", \"2\\nr?o?s\\nsco??\\n?rots\\nsco??\", \"2\\nr?o?s\\nsco??\\n@rots\\nsco??\", \"2\\nr?o?s\\nsco??\\n@rots\\n??ocs\", \"2\\nr?o?s\\nsco??\\n@rots\\ntco??\", \"2\\nr?o?s\...
EASY
{ "id": "taco-train-914", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are n banks in the city where Vasya lives, the...
code
{ "ground_truth": "{\"inputs\": [\"3\\n5 0 -5\\n\", \"4\\n-1 0 1 0\\n\", \"4\\n1 2 3 -6\\n\", \"1\\n0\\n\", \"50\\n108431864 128274949 -554057370 -384620666 -202862975 -803855410 -482167063 -55139054 -215901009 0 0 0 0 0 94325701 730397219 358214459 -673647271 -131397668 -377892440 0 0 0 0 0 -487994257 -360271553 639...
HARD
{ "id": "taco-train-5642", "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": "All space-time unified dimension sugoroku tournament...
code
{ "ground_truth": "{\"inputs\": [\"11\\n0\\n0\\n-2\\n0\\n-4\\n1\\n-1\\n2\\n0\\n0\\n0\", \"12\\n0\\n0\\n7\\n0\\n2\\n0\\n0\\n3\\n-6\\n-2\\n1\\n0\", \"8\\n0\\n4\\n-1\\n1\\n-2\\n-2\\n0\\n0\", \"11\\n0\\n1\\n-2\\n0\\n-4\\n1\\n-1\\n2\\n0\\n0\\n0\", \"12\\n0\\n0\\n7\\n0\\n2\\n0\\n0\\n3\\n-5\\n-2\\n1\\n0\", \"8\\n0\\n4\\n-1\...
none
{ "id": "p01449 Space-Time Sugoroku Road", "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": "Some programming contest problems are really tricky:...
code
{ "ground_truth": "{\"inputs\": [[\"4\", \"1 4 3 2\", \"5\", \"2 3 4 5 1\", \"1\", \"1\", \"0\"], \"4\\n1 4 3 4\\n5\\n2 3 4 5 1\\n1\\n1\\n0\", \"4\\n1 4 3 2\\n5\\n1 3 4 5 1\\n1\\n1\\n0\", \"4\\n1 4 3 4\\n5\\n0 3 4 5 0\\n0\\n1\\n0\", \"4\\n1 3 3 0\\n0\\n3 3 3 1 1\\n1\\n1\\n0\", \"4\\n1 2 3 4\\n5\\n0 3 4 5 -1\\n0\\n1\\...
EASY
{ "id": "taco-train-19300", "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": "Chef has a strip of length $N$ units and he wants to...
code
{ "ground_truth": "{\"inputs\": [[\"1\", \"2\"]], \"outputs\": [[\"6\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-4855", "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": "You are given a hexagonal grid with $n$ rows, where ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n-1 2 -1\\n2 2\\n1 -1 1\\n\", \"7\\n-1 4 5 1 0 -1 -1\\n-1 3 2 0 0 1\\n-1 4 -1 1 0 -1 -1\\n1 3 4 2 2 4\\n0 2 3 -1 4 4 2\\n-1 4 4 3 3 2\\n1 -1 -1 -1 4 2 -1\\n\", \"3\\n-1 2 -1\\n2 2\\n-1 -1 -1\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"4\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-23827", "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": "It's the end of July – the time when a festive eveni...
code
{ "ground_truth": "{\"inputs\": [\"5 1\\nAABBB\", \"5 1\\nABABB\", \"26 1\\nABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"27 1\\nABCDEFGHIJKLMNOPQRSTUVWXYZA\", \"5 2\\nABACA\", \"6 2\\nABCABC\", \"8 3\\nABCBCDCA\", \"73 2\\nDEBECECBBADAADEAABEAEEEAEBEAEBCDDBABBAEBACCBEEBBAEADEECACEDEEDABACDCDBBBD\", \"44 15\\nHGJIFCGGCDGIJDHBIBGAE...
rating_<=1200
{ "id": "834B", "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": "The BFS algorithm is defined as follows. Consider a...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 2\\n1 3\\n2 4\\n1 2 3 4\\n\", \"4\\n1 2\\n1 3\\n2 4\\n1 2 4 3\\n\", \"6\\n1 2\\n1 5\\n2 3\\n2 4\\n5 6\\n1 2 5 3 4 6\\n\", \"6\\n1 2\\n1 5\\n2 3\\n2 4\\n5 6\\n1 5 2 3 4 6\\n\", \"6\\n1 2\\n1 5\\n2 3\\n2 4\\n5 6\\n1 2 5 3 6 4\\n\", \"7\\n1 2\\n1 5\\n2 3\\n2 4\\n5 6\\n5 7\\n1 2 5...
MEDIUM_HARD
{ "id": "taco-train-14888", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given an array arr[] of size N and an element k. The ...
code
{ "ground_truth": "{\"inputs\": [\"N = 8\\narr[] = {3,1,2,2,1,2,3,3}\\nk = 4\", \"N = 4\\narr[] = {2,3,3,2}\\nk = 3\"], \"outputs\": [\"2\", \"2\"]}", "style": "rule" }
EASY
{ "id": "taco-train-6802", "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": "Permutation p is an ordered set of integers p1, p2, ...
code
{ "ground_truth": "{\"inputs\": [\"2 1\\n\", \"4 1\\n\", \"7 4\\n\", \"1 0\\n\", \"3 2\\n\", \"10 3\\n\", \"7 7\\n\", \"999 300\\n\", \"1000 999\\n\", \"10 0\\n\", \"5 4\\n\", \"1000 900\\n\", \"999 600\\n\", \"1000 998\\n\", \"999 998\\n\", \"999 989\\n\", \"4 2\\n\", \"8 4\\n\", \"3 0\\n\", \"2 2\\n\", \"999 13\\n\...
rating_>1900
{ "id": "285_E. Positions in Permutations", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Your task is to make function, which returns the sum ...
code
{ "ground_truth": "{\"fn_name\": \"sequence_sum\", \"inputs\": [[2, 6, 2], [1, 5, 1], [1, 5, 3], [0, 15, 3], [16, 15, 3], [2, 24, 22], [2, 2, 2], [2, 2, 1], [1, 15, 3], [15, 1, 3]], \"outputs\": [[12], [15], [5], [45], [0], [26], [2], [2], [35], [0]]}", "style": "rule" }
EASY
{ "id": "taco-train-15481", "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 have a set of $n$ weights. You know that their m...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 4 2 2\\n\", \"6\\n1 2 4 4 4 9\\n\", \"7\\n1 2 4 4 4 9 4\\n\", \"10\\n2 1 1 1 2 2 2 1 1 2\\n\", \"50\\n4 10 4 4 4 10 10 10 4 10 4 4 10 10 4 10 10 4 10 10 4 4 10 4 4 10 4 10 4 10 10 4 4 10 10 10 4 4 10 10 10 10 10 4 4 10 10 4 10 4\\n\", \"100\\n50 50 51 50 51 51 51 51 51 50 50 5...
HARD
{ "id": "taco-train-19558", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Alice became interested in periods of integer number...
code
{ "ground_truth": "{\"inputs\": [\"3\\n123456\\n\", \"3\\n12345\\n\", \"3\\n776554554\\n\", \"3\\n145023023\\n\", \"3\\n3021001003\\n\", \"10\\n6277\\n\", \"10\\n9969441321\\n\", \"3\\n352474474\\n\", \"3\\n220330330\\n\", \"3\\n29939939929\\n\", \"4\\n50265026\\n\", \"2\\n7474747474\\n\", \"3\\n999999999\\n\", \"4\\...
MEDIUM_HARD
{ "id": "taco-train-23836", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You know that 1 kg of pulp can be used to make 1000 ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1\\n100\\n50\\n\"], \"outputs\": [\"10\\n1000\\n500\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-21445", "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": "Peter had a cube with non-zero length of a side. He ...
code
{ "ground_truth": "{\"inputs\": [\"0 0 0\\n0 0 1\\n0 0 1\\n0 0 1\\n0 1 1\\n0 1 1\\n0 1 1\\n1 1 1\", \"0 0 0\\n0 0 0\\n0 0 0\\n0 0 0\\n1 1 1\\n1 1 1\\n1 1 1\\n1 1 1\", \"0 0 0\\n1 0 0\\n0 1 0\\n1 1 0\\n0 0 1\\n1 0 1\\n0 1 1\\n1 1 1\", \"6 -2 -2\\n-5 1 -6\\n6 -6 7\\n6 3 4\\n9 -7 8\\n-9 -2 -6\\n-9 1 6\\n-9 -1 0\", \"-5 ...
rating_>1900
{ "id": "464B", "rating": 2000, "split": "confidence_train", "sub_source": "rating_>1900" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "One day Squidward, Spongebob and Patrick decided to ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 3\", \"4\\n2 1 3 2\", \"17\\n1 45 22 39 28 23 23 100 500 778 777 778 1001 1002 1005 1003 1005\", \"101\\n1 50 170 148 214 153 132 234 181 188 180 225 226 200 197 122 181 168 87 220 223 160 235 94 257 145 199 235 102 146 119 60 109 134 209 260 210 191 180 271 236 195 155 169 ...
rating_1401-1600
{ "id": "599C", "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": "Equation\n\nIdentity\n\nEnglish text is not availabl...
code
{ "ground_truth": "{\"inputs\": [\"\"], \"outputs\": [\"\"]}", "style": "rule" }
none
{ "id": "p01515 Equation", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are *n* cities in Westeros. The *i*-th city is...
code
{ "ground_truth": "{\"inputs\": [\"3 1\\n1 2 1\", \"3 1\\n2 2 1\", \"6 3\\n5 20 12 7 14 101\", \"6 3\\n346 118 330 1403 5244 480\", \"7 4\\n11 3532 99 3512 12 8 22\", \"9 4\\n2 6 8 1 2 4 2 8 2\", \"8 2\\n1 3 22 45 21 132 78 901\", \"1 1\\n912959\", \"1 1\\n107540\", \"2 2\\n67427 727097\", \"2 2\\n346010 923112\", \"...
rating_>1900
{ "id": "549C", "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": "Peter got a new snow blower as a New Year present. O...
code
{ "ground_truth": "{\"inputs\": [\"3 0 0\\n0 1\\n-1 2\\n1 2\\n\", \"4 1 -1\\n0 0\\n1 2\\n2 0\\n1 1\\n\", \"3 0 0\\n-1 1\\n0 3\\n1 1\\n\", \"3 -4 2\\n-3 2\\n5 -5\\n5 3\\n\", \"3 -84 8\\n-83 8\\n21 -62\\n3 53\\n\", \"6 -94 -51\\n-93 -51\\n48 -25\\n61 27\\n73 76\\n-10 87\\n-48 38\\n\", \"5 -94 52\\n-93 52\\n-78 -56\\n-5...
HARD
{ "id": "taco-train-11875", "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": "Polycarpus loves convex polygons, especially if all ...
code
{ "ground_truth": "{\"inputs\": [\"8\\n\", \"49\\n\", \"43\\n\", \"41\\n\", \"99\\n\", \"38\\n\", \"83\\n\", \"39\\n\", \"83\\n\", \"4\\n\", \"22\\n\", \"19\\n\", \"89\\n\", \"80\\n\", \"58\\n\", \"72\\n\", \"18\\n\", \"97\\n\", \"78\\n\", \"12\\n\", \"67\\n\", \"69\\n\", \"70\\n\", \"18\\n\", \"16\\n\", \"48\\n\", \...
rating_>1900
{ "id": "306_D. Polygon", "rating": 2300, "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 Berland State University is hosting a ballroom d...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 2 3 4\\n4\\n10 11 12 13\\n\", \"4\\n1 4 6 2\\n5\\n5 1 5 7 9\\n\", \"5\\n1 1 1 1 1\\n3\\n1 2 3\\n\", \"1\\n4\\n3\\n4 4 4\\n\", \"3\\n7 7 7\\n4\\n2 7 2 4\\n\", \"3\\n5 4 5\\n2\\n2 1\\n\", \"100\\n9 90 66 62 60 9 10 97 47 73 26 81 97 60 80 84 19 4 25 77 19 17 91 12 1 27 15 54 18 ...
rating_<=1200
{ "id": "489_B. BerSU Ball", "rating": 1200, "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": "Vasya is pressing the keys on the keyboard reluctant...
code
{ "ground_truth": "{\"inputs\": [\"4\\n2 1 6 4\\n3 4 4 2\", \"4\\n10 5 6 4\\n1 11 4 2\", \"3\\n10 1 10\\n1 10 1 1\", \"4\\n2 1 6 4\\n4 2 3 5\", \"3\\n20 3 20\\n1 20 1 1\", \"2\\n10 1\\n1 3 2 1\", \"20\\n3 1 9 9 6 1 3 4 5 6 7 3 1 9 9 1 9 1 5 7\\n17 7 19 5\", \"20\\n81 90 11 68 23 18 78 75 45 86 58 37 21 15 98 40 53 10...
rating_1401-1600
{ "id": "253C", "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": "Fedya studies in a gymnasium. Fedya's maths hometask...
code
{ "ground_truth": "{\"inputs\": [\"4\", \"124356983594583453458888889\", \"2\", \"7854\", \"584660\", \"464\", \"192329\", \"85447\", \"956\", \"83\", \"33\", \"64\", \"971836\", \"578487\", \"71752\", \"2563\", \"51494\", \"247\", \"52577\", \"13\", \"26232\", \"0\", \"10\", \"12\", \"8\", \"1\"], \"outputs\": [\"4\...
rating_<=1200
{ "id": "456B", "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": "You are given a polynom in form p(x) = (x + a1)·(x +...
code
{ "ground_truth": "{\"inputs\": [\"2\\n-1\\n1\\n\", \"2\\n1\\n1\\n\"], \"outputs\": [\"X^2-1\\n\", \"X^2+2*X+1\\n\"]}", "style": "rule" }
rating_1601-1900
{ "id": "100_F. Polynom", "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": "Tomorrow Peter has a Biology exam. He does not like ...
code
{ "ground_truth": "{\"inputs\": [\"2 5\\n0 1\\n3 5\\n\", \"1 48\\n5 7\\n\", \"30 189\\n0 8\\n3 8\\n5 8\\n2 2\\n7 7\\n2 8\\n7 8\\n2 5\\n1 7\\n0 1\\n3 4\\n1 7\\n1 6\\n5 6\\n3 7\\n4 7\\n4 7\\n4 7\\n5 5\\n0 5\\n4 7\\n3 5\\n0 6\\n4 8\\n2 5\\n5 6\\n5 6\\n2 8\\n0 7\\n7 8\\n\", \"30 71\\n1 3\\n0 6\\n3 5\\n3 6\\n2 4\\n2 8\\n2...
rating_<=1200
{ "id": "4_B. Before an Exam", "rating": 1200, "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": "Little Petya likes arrays that consist of non-negati...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 2 1 1 2\", \"3\\n1 2 7\", \"4\\n4 2 4 8\", \"5\\n1 1 1 1 1\", \"16\\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\", \"20\\n1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10\", \"100\\n28 20 67 103 72 81 82 83 7 109 122 30 50 118 83 89 108 82 92 17 97 3 62 12 9 100 14 11 99 106 10 8 60 101 8...
rating_<=1200
{ "id": "252A", "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": "B: Ebi-chan and Integer Sequences-\n\nproblem\n\nEbi...
code
{ "ground_truth": "{\"inputs\": [\"3 9\", \"3 0\", \"3 -1\", \"3 4\", \"3 1\", \"6 4\", \"2 4\", \"2 3\", \"2 5\", \"1 2\", \"1 5\", \"5 9\", \"2 8\", \"1 3\", \"2 2\", \"9 9\", \"4 8\", \"1 6\", \"1 7\", \"2 7\", \"2 13\", \"2 10\", \"1 10\", \"3 14\", \"3 5\", \"2 6\", \"5 16\", \"4 7\", \"3 10\", \"3 8\", \"1 9\",...
none
{ "id": "p01939 Ebi-chan and Integer Sequences", "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": "Takahashi is solving quizzes. He has easily solved a...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2\", \"3\\n1\", \"3\\n2\", \"1\\n3\", \"3\\n001\", \"3\\n2\", \"1\\n3\", \"3\\n001\"], \"outputs\": [\"3\", \"2\", \"1\\n\", \"2\\n\", \"2\\n\", \"1\\n\", \"2\\n\", \"2\\n\"]}", "style": "rule" }
none
{ "id": "p02829 AtCoder Beginner Contest 148 - Round One", "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 + B is often used as an example of the easiest pro...
code
{ "ground_truth": "{\"inputs\": [\"381 492\\n\", \"5 14\\n\", \"629 657\\n\", \"536 298\\n\", \"441 915\\n\", \"522 92\\n\", \"723 350\\n\", \"339 433\\n\", \"953 553\\n\", \"433 126\\n\", \"399 280\\n\", \"538 261\\n\", \"740 519\\n\", \"242 86\\n\", \"117 399\\n\", \"632 264\\n\", \"143 522\\n\", \"923 488\\n\", \"...
rating_1401-1600
{ "id": "409_H. A + B Strikes Back", "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": "There is a straight line colored in white. n black s...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 3\\n4 5\\n2 4\\n\", \"9\\n10 20\\n50 60\\n30 40\\n70 80\\n90 100\\n60 70\\n10 40\\n40 50\\n80 90\\n\", \"1\\n1 2\\n\", \"4\\n1 3\\n4 5\\n2 3\\n3 4\\n\", \"2\\n4 6\\n4 7\\n\", \"2\\n999999999 1000000000\\n999999998 999999999\\n\", \"1\\n1 1000000000\\n\", \"2\\n4 6\\n4 6\\n\", ...
rating_>1900
{ "id": "926_J. Segments", "rating": 2100, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "A long time ago in some far country lived king Copa....
code
{ "ground_truth": "{\"inputs\": [\"0 0 10\\n\", \"-1 8 3\\n\", \"1 16 5\\n\", \"2 18 2\\n\", \"1 1 4\\n\", \"4 972 4\\n\", \"1 512 9\\n\", \"1 961 2\\n\", \"0 3 6\\n\", \"-3 -768 8\\n\", \"1 625 4\\n\", \"4 972 1\\n\", \"1 1000 1\\n\", \"3 0 4\\n\", \"7 175 1\\n\", \"-4 0 1\\n\", \"-5 3 4\\n\", \"10 0 6\\n\", \"-5 -5...
rating_1201-1400
{ "id": "30_A. Accounting", "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 in [Hindi], [Mandarin Chine...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3\\n101011\\n3\\n100001\"], \"outputs\": [\"4\\n6\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-1096", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You own a disco called the Boogie Always Persists Cl...
code
{ "ground_truth": "{\"inputs\": [\"2 2\\n1 2\\n2 1\\n\", \"3 3\\n1 2\\n2 3\\n3 1\\n\", \"4 5\\n1 2\\n1 3\\n3 2\\n2 4\\n3 4\\n\", \"4 5\\n1 2\\n2 3\\n2 4\\n3 1\\n4 1\\n\", \"4 3\\n1 2\\n2 3\\n3 4\\n\"], \"outputs\": [\"1\\n2\\n\", \"1\\n1\\n\", \"0\\n\", \"2\\n4\\n5\\n\", \"1\\n2\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-21837", "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": "Some scientists are working on protein recombination...
code
{ "ground_truth": "{\"inputs\": [\"5 15\\nAAAAD\\n\"], \"outputs\": [\"DDDDA\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-4393", "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": "Takahashi wants to gain muscle, and decides to work ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3\\n1\\n2\\n\", \"4\\n3\\n4\\n1\\n2\\n\", \"5\\n3\\n3\\n4\\n2\\n4\\n\", \"3\\n3\\n1\\n3\", \"5\\n3\\n3\\n5\\n2\\n4\", \"4\\n4\\n3\\n1\\n2\", \"3\\n2\\n2\\n1\", \"5\\n3\\n0\\n4\\n2\\n4\", \"4\\n3\\n3\\n1\\n2\", \"3\\n3\\n2\\n3\", \"4\\n4\\n3\\n0\\n2\", \"4\\n4\\n4\\n0\\n2\", \"4\...
EASY
{ "id": "taco-train-8827", "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": "Create a function which answers the question \"Are yo...
code
{ "ground_truth": "{\"fn_name\": \"areYouPlayingBanjo\", \"inputs\": [[\"Adam\"], [\"Paul\"], [\"Ringo\"], [\"bravo\"], [\"rolf\"]], \"outputs\": [[\"Adam does not play banjo\"], [\"Paul does not play banjo\"], [\"Ringo plays banjo\"], [\"bravo does not play banjo\"], [\"rolf plays banjo\"]]}", "style": "rule" }
EASY
{ "id": "taco-train-21516", "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": "It's our faculty's 34th anniversary! To celebrate th...
code
{ "ground_truth": "{\"inputs\": [\"5 6\\n1 2\\n2 3\\n3 4\\n4 1\\n1 5\\n5 1\\n\", \"4 5\\n2 1\\n1 2\\n4 3\\n4 1\\n1 3\\n\", \"13 15\\n8 1\\n1 5\\n6 11\\n13 2\\n11 13\\n10 12\\n6 9\\n1 5\\n9 3\\n2 1\\n4 1\\n7 1\\n7 10\\n8 4\\n3 12\\n\", \"7 8\\n2 7\\n5 7\\n6 1\\n1 6\\n5 3\\n2 1\\n1 4\\n3 4\\n\", \"5 6\\n1 5\\n4 2\\n1 4...
rating_>1900
{ "id": "1425_B. Blue and Red of Our Faculty!", "rating": 2600, "split": "confidence_train", "sub_source": "rating_>1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "We have N+M balls, each of which has an integer writ...
code
{ "ground_truth": "{\"inputs\": [\"13 3\", \"1 1\", \"4 3\", \"2 1\", \"0 3\", \"13 5\", \"1 2\", \"4 0\", \"0 5\", \"13 6\", \"1 3\", \"0 0\", \"2 2\", \"4 6\", \"2 3\", \"4 2\", \"2 6\", \"2 11\", \"4 11\", \"5 -1\", \"8 2\", \"4 -2\", \"7 11\", \"3 -4\", \"8 4\", \"4 -3\", \"7 9\", \"6 -4\", \"14 4\", \"7 4\", \"6...
none
{ "id": "p02729 AtCoder Beginner Contest 159 - The Number of Even Pairs", "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 robot is standing at the origin of the infinite tw...
code
{ "ground_truth": "{\"inputs\": [\"2\\n\", \"1\\n\", \"3\\n\", \"128\\n\", \"777\\n\", \"255\\n\", \"6\\n\", \"127\\n\", \"1000\\n\", \"4\\n\", \"256\\n\", \"97\\n\", \"512\\n\", \"999\\n\", \"8\\n\", \"7\\n\", \"998\\n\", \"5\\n\", \"122\\n\", \"186\\n\", \"16\\n\", \"9\\n\", \"498\\n\", \"124\\n\", \"795\\n\", \"10...
rating_1201-1400
{ "id": "1459_B. Move and Turn", "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": "You are competing in a ski slalom, and you need to s...
code
{ "ground_truth": "{\"inputs\": [\"3 2 3\\n1 1\\n5 2\\n1 3\\n3\\n3\\n2\\n1\\n\", \"3 2 3\\n1 1\\n5 2\\n1 3\\n1\\n3\\n\"], \"outputs\": [\"2\\n\", \"IMPOSSIBLE\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-2730", "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": "A Carol number is an integer of the form 4^{n} – 2^{(...
code
{ "ground_truth": "{\"inputs\": [\"N = 2\", \"N = 4\"], \"outputs\": [\"7\", \"223\"]}", "style": "rule" }
EASY
{ "id": "taco-train-16237", "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": "Sasha has an array of integers a1, a2, ..., an. You ...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n1 1 2 1 1\\n2 1 5\\n1 2 4 2\\n2 2 4\\n2 1 5\\n\", \"2 3\\n1 3\\n2 1 1\\n1 1 2 3\\n1 1 2 2\\n\", \"9 4\\n2 1 2 3 3 3 2 1 3\\n2 1 8\\n1 7 7 3\\n1 1 3 1\\n1 3 5 2\\n\", \"7 4\\n2 2 1 1 3 3 2\\n2 1 5\\n2 6 7\\n1 3 4 3\\n2 6 6\\n\", \"1 1\\n1\\n2 1 1\\n\", \"18 19\\n2 2 2 2 1 1 1 1...
rating_>1900
{ "id": "719_E. Sasha and Array", "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": "Amidakuji is a traditional method of lottery in Japa...
code
{ "ground_truth": "{\"inputs\": [\"1 3 2\\n\", \"1 3 1\\n\", \"2 3 3\\n\", \"2 3 1\\n\", \"7 1 1\\n\", \"15 8 5\\n\", \"100 8 8\\n\", \"100 8 3\\n\", \"100 8 1\\n\", \"77 7 7\\n\", \"98 7 6\\n\", \"57 5 1\\n\", \"33 4 2\\n\", \"86 7 4\\n\", \"91 4 3\\n\", \"92 8 6\\n\", \"4 3 1\", \"1 2 2\", \"1 5 1\", \"16 8 5\", \"...
MEDIUM
{ "id": "taco-train-15243", "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 sequence *a*1,<=*a*2,<=...,<=*a**n* ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 10\\n2 9\\n3 9\\n2 3\\n2 9\", \"3\\n1 5\\n2 6\\n6 20\", \"1\\n1 1000000000\", \"2\\n1 1000000000\\n1 1000000000\", \"2\\n1 1000000000\\n500000000 500000000\", \"2\\n1 10\\n2 10\", \"2\\n10 20\\n10 11\", \"3\\n1 10\\n10 20\\n9 11\", \"3\\n1 1\\n2 3\\n2 2\", \"4\\n1 10\\n2 11\\n...
rating_1401-1600
{ "id": "976C", "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 binary tree of size N, your task is to that f...
code
{ "ground_truth": "{\"inputs\": [\" 1\\r\\n / \\\\\\r\\n 2 3\\r\\n / / \\\\\\r\\n 4 2 4\\r\\n / \\\\ / \\\\\\r\\n 4 \"], \"outputs\": [\"2 4\\n 4\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-13097", "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": "Sereja has an array A of N positive integers : A[1],...
code
{ "ground_truth": "{\"inputs\": [[\"2\", \"1\", \"1\", \"3\", \"2 4 6\"]], \"outputs\": [[\"1\", \"6\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-22040", "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": "As a token of his gratitude, Takahashi has decided t...
code
{ "ground_truth": "{\"inputs\": [\"3 20\\n\", \"25 100\\n\", \"314159265 358979323846264338\\n\", \"1 1000000000000000000\\n\", \"2 7\\n\", \"2 8\\n\", \"275278675 992237867823568722\\n\", \"1 576460752303423488\\n\", \"1 576460752303423487\\n\", \"52627 828929983\\n\", \"1000000000000000000 1000000000000000000\\n\",...
MEDIUM_HARD
{ "id": "taco-train-15845", "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": "Alice gives Bob a board composed of $1\\times1$ wood...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2 2\\n2\\n1\\n\", \"1\\n6 4\\n2 1 3 1 4\\n4 1 2\\n\"], \"outputs\": [\"4\\n\", \"42\\n\"]}", "style": "rule" }
MEDIUM_HARD
{ "id": "taco-train-10126", "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": "Iahub and Sorin are the best competitive programmers...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 0 0 -1\\n\", \"2\\n1 -1\\n\", \"100\\n-57 -64 83 76 80 27 60 76 -80 -56 52 72 -17 92 -96 87 41 -88 94 89 12 42 36 34 -100 -43 -42 62 3 87 -69 -6 -27 -59 -7 5 -90 -23 63 -87 -60 -92 -40 54 -16 -47 67 -64 10 33 -19 53 -7 -62 16 -74 -36 4 -75 -55 92 3 -22 43 -30 48 -27 88 -58 41 ...
HARD
{ "id": "taco-train-273", "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 John is new to spreadsheets. He is well awar...
code
{ "ground_truth": "{\"fn_name\": \"spreadsheet\", \"inputs\": [[\"A1\"], [\"R1C1\"], [\"R5C4\"], [\"AA48\"], [\"BK12\"], [\"R12C63\"], [\"R85C26\"], [\"R31C78\"], [\"BZ31\"]], \"outputs\": [[\"R1C1\"], [\"A1\"], [\"D5\"], [\"R48C27\"], [\"R12C63\"], [\"BK12\"], [\"Z85\"], [\"BZ31\"], [\"R31C78\"]]}", "style": "rule...
EASY
{ "id": "taco-train-11231", "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": "Let's call an array consisting of n integer numbers ...
code
{ "ground_truth": "{\"inputs\": [\"100 3\\n1 2\\n2 1\\n3 1\\n\", \"1 2\\n1 1\\n2 100\\n\", \"5 2\\n1 2\\n2 3\\n\", \"58 38\\n6384 48910\\n97759 90589\\n28947 5031\\n45169 32592\\n85656 26360\\n88538 42484\\n44042 88351\\n42837 79021\\n96022 59200\\n485 96735\\n98000 3939\\n3789 64468\\n10894 58484\\n26422 26618\\n255...
rating_>1900
{ "id": "367_C. Sereja and the Arrangement of Numbers", "rating": 2000, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Given a set of $n$ intervals, find the size of its l...
code
{ "ground_truth": "{\"inputs\": [\"4\\n3\\n1 2\\n2 3\\n2 4\\n3\\n1 5\\n1 5\\n1 5\\n4\\n1 10\\n1 3\\n4 6\\n7 10\\n4\\n1 10\\n1 3\\n3 6\\n7 10\\n\"], \"outputs\": [\"2\\n2\\n4\\n3\\n\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-6519", "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": "After a hard-working week Polycarp prefers to have f...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3 3\\n...\\n...\\n...\\n4 4\\n..c.\\nadda\\nbbcb\\n....\\n3 5\\n..b..\\naaaaa\\n..b..\\n\", \"2\\n3 3\\n...\\n.a.\\n...\\n2 2\\nbb\\ncc\\n\", \"1\\n5 6\\n...a..\\n..bbb.\\n...a..\\n.cccc.\\n...a..\\n\", \"2\\n1 1\\na\\n1 1\\nz\\n\", \"3\\n3 3\\n...\\n...\\n...\\n4 4\\n..c.\\nade...
rating_>1900
{ "id": "1185_E. Polycarp and Snakes", "rating": 2000, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "When the first scrollbars appeared on resizable wind...
code
{ "ground_truth": "{\"inputs\": [\"24 5 8 7\\nLorem ipsum dolor sit amet consectetur adipisicing elit sed do\\neiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad\\nminim veniam quis nostrud exercitation ullamco laboris nisi ut\\naliquip ex ea commodo consequat Duis aute irure dolor in\\nreprehender...
HARD
{ "id": "taco-train-12555", "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": "Bwahahahahaha!!! Your nemesis, the dashingly handsom...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 5\\n3 1 5\\n2 1\\n5 0\\n1 3\\n\", \"6\\n1 2 2\\n1 3 5\\n1 4 1\\n2 5 5\\n2 6 1\\n0 0\\n1 0\\n2 1\\n2 1\\n0 1\\n0 1\\n\"], \"outputs\": [\"15\\n\", \"9\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-2896", "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 a Binary Tree of size N, your task is to comple...
code
{ "ground_truth": "{\"fn_name\": \"sumBT\", \"inputs\": [\"2\\r\\n\\r\\n2\\r\\n\\r\\n1 2 L 1 -1 N\\r\\n\\r\\n6\\r\\n\\r\\n1 2 L 1 3 R 2 -1 N 2 -1 N 3 3 L 3 -1 N\"], \"outputs\": [\"3\\n9\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-16870", "rating": null, "split": "confidence_train", "sub_source": "EASY" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Takahashi is distributing N balls to K persons.\n\nI...
code
{ "ground_truth": "{\"inputs\": [\"8 5\", \"3 1\", \"3 2\", \"9 5\", \"4 2\", \"2 2\", \"14 5\", \"2 3\", \"0 3\", \"14 3\", \"1 3\", \"14 6\", \"-1 3\", \"-2 3\", \"4 12\", \"0 9\", \"0 13\", \"0 6\", \"20 2\", \"6 5\", \"9 2\", \"25 6\", \"-1 6\", \"1 11\", \"9 3\", \"-1 13\", \"19 2\", \"5 2\", \"15 2\", \"17 2\",...
none
{ "id": "p03005 diverta 2019 Programming Contest 2 - Ball Distribution", "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": "__Definition:__ According to Wikipedia, a [complete b...
code
{ "ground_truth": "{\"fn_name\": \"complete_binary_tree\", \"inputs\": [[[1]], [[1, 2, 3, 4, 5, 6]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]], \"outputs\": [[[1]], [[4, 2, 6, 1, 3, 5]], [[7, 4, 9, 2, 6, 8, 10, 1, 3, 5]]]}", "style": "rule" }
EASY
{ "id": "taco-train-3264", "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": "Efim just received his grade for the last test. He s...
code
{ "ground_truth": "{\"inputs\": [\"6 1\\n10.245\", \"6 2\\n10.245\", \"3 100\\n9.2\", \"12 5\\n872.04488525\", \"35 8\\n984227318.2031144444444444494637612\", \"320 142\\n2704701300865535.4322233122334341141300111132201024201313230103441442011243031444444444444444444444444444444444444444444444444444444444444444444444...
rating_1601-1900
{ "id": "718A", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Chubby Yang is studying linear equations right now. ...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 4\\n3 2\\n\", \"3\\n1 2 3\\n4 5 6\\n7 8 9\\n\", \"2\\n0 1\\n0 1\\n\", \"2\\n0 0\\n0 0\\n\", \"7\\n926 41 1489 72 749 375 940\\n464 1148 858 1010 285 1469 1506\\n1112 1087 225 917 480 511 1090\\n759 945 627 230 220 1456 529\\n318 83 203 134 1192 1167 6\\n440 1158 1614 683 1358 ...
none
{ "id": "393_B. Three matrices", "rating": 0, "split": "confidence_train", "sub_source": "none" }