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": "Micro's midsem exams are finally over. When they wer...
code
{ "ground_truth": "{\"inputs\": [\"3\\n12 2 3\\n\\nSAMPLE\", \"4143\\n51035125 240619434 584739315 130431134 329410676 19380864 975583407 331039417 484984951 9306710 638970381 28132283 676254043 130126912 802274549 489214157 876426956 14712589 535582466 505199383 632507603 183629028 336319721 13041996 51518547 209268...
none
{ "id": "micro-and-block-game-3", "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": "Anfisa the monkey learns to type. She is yet unfamil...
code
{ "ground_truth": "{\"inputs\": [\"3 2 5\\nabrakadabra\", \"4 1 2\\nabrakadabra\", \"3 1 2\\nvgnfpo\", \"5 3 4\\nvrrdnhazvexzjfv\", \"10 12 15\\nctxgddcfdtllmpuxsjkubuqpldznulsilueakbwwlzgeyudyrjachmitfdcgyzszoejphrubpxzpdtgexaqpxgnoxwfjoikljudnoucirussumyhetfwgaoxfbugfiyjmp\", \"10 20 30\\nbvdqvlxiyogiyimdlwdyxsummj...
rating_1201-1400
{ "id": "44E", "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": "n hobbits are planning to spend the night at Frodo's...
code
{ "ground_truth": "{\"inputs\": [\"4 6 2\\n\", \"3 10 3\\n\", \"3 6 1\\n\", \"3 3 3\\n\", \"1 1 1\\n\", \"1 1000000000 1\\n\", \"100 1000000000 20\\n\", \"1000 1000 994\\n\", \"100000000 200000000 54345\\n\", \"1000000000 1000000000 1\\n\", \"1000000000 1000000000 1000000000\\n\", \"1000000000 1000000000 500000000\\n...
MEDIUM
{ "id": "taco-train-14498", "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": "Today Sonya learned about long integers and invited ...
code
{ "ground_truth": "{\"inputs\": [\"12\\n+ 1\\n+ 241\\n? 1\\n+ 361\\n- 241\\n? 0101\\n+ 101\\n? 101\\n- 101\\n? 101\\n+ 4000\\n? 0\\n\", \"4\\n+ 200\\n+ 200\\n- 200\\n? 0\\n\", \"20\\n+ 8\\n+ 39532\\n+ 813\\n- 39532\\n? 00011\\n? 00000\\n? 00011\\n+ 70424\\n- 8\\n? 00011\\n- 70424\\n? 00011\\n+ 29\\n? 00001\\n+ 6632\\...
rating_1201-1400
{ "id": "714_C. Sonya and Queries", "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": "Write a program that reads numbers until -1 is not g...
code
{ "ground_truth": "{\"inputs\": [[\"1\", \"33 100 77 42 12 -1\"]], \"outputs\": [[\"4 38.91\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-10559", "rating": null, "split": "confidence_train", "sub_source": "UNKNOWN_DIFFICULTY" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given 3 strings A, B and C, the task is to find the l...
code
{ "ground_truth": "{\"inputs\": [\"A = \\\"geeks\\\", B = \\\"geeksfor\\\", \\nC = \\\"geeksforgeeks\\\"\", \"A = \\\"abcd\\\", B = \\\"efgh\\\", C = \\\"ijkl\\\"\"], \"outputs\": [\"5\", \"0\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-6297", "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": "Having learned (not without some help from the Codef...
code
{ "ground_truth": "{\"inputs\": [\"2 5 2\\n-G-R-\\n-R-G-\\n\", \"2 3 1\\n-R-\\n-G-\\n\", \"3 3 2\\nG-R\\nR-G\\nG-R\\n\", \"2 3 1\\nR-G\\nRG-\\n\", \"8 53 4\\n------------------------------------G-------------R--\\n-----------G--R--------------------------------------\\n----------------------------------GR------------...
rating_>1900
{ "id": "142_D. Help Shrek and Donkey 2", "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": "Zonal Computing Olympiad 2012, 26 Nov 2011\n\nIt's d...
code
{ "ground_truth": "{\"inputs\": [[\"5\", \"1 2 1 2 2\"]], \"outputs\": [[\"4\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-695", "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": "Circular land is an $2n \\times 2n$ grid. Rows of th...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1\\n0 8\\n1 99\\n2\\n0 0 0 0\\n0 0 0 0\\n9 9 2 2\\n9 9 9 9\\n2\\n0 0 4 2\\n0 0 2 4\\n4 2 4 2\\n2 4 2 4\\n4\\n0 0 0 0 0 0 0 2\\n0 0 0 0 0 0 2 0\\n0 0 0 0 0 2 0 0\\n0 0 0 0 2 0 0 0\\n0 0 0 2 2 0 2 2\\n0 0 2 0 1 6 2 1\\n0 2 0 0 2 4 7 4\\n2 0 0 0 2 0 1 6\\n\"], \"outputs\": [\"100\\...
HARD
{ "id": "taco-train-20288", "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": "Kyoya Ootori is selling photobooks of the Ouran High...
code
{ "ground_truth": "{\"inputs\": [\"a\\n\", \"hi\\n\", \"y\\n\", \"kgan\\n\", \"zoabkyuvus\\n\", \"spyemhyznjieyhhbk\\n\", \"xulsyfkuizjauadjjopu\\n\", \"e\\n\", \"zv\\n\", \"jgv\\n\", \"zsfo\\n\", \"jselr\\n\", \"dwemig\\n\", \"mddoxsf\\n\", \"jgirkrmi\\n\", \"spkxurcum\\n\", \"fykkiubdkt\\n\", \"fznbcxsxygs\\n\", \"...
EASY
{ "id": "taco-train-12685", "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": "Dr. Kay Em, a genius scientist, developed a new miss...
code
{ "ground_truth": "{\"inputs\": [\"1\\n1 1\\n10 -480\\n2\\n6 7\\n5 5\\n4 1\\n3\\n10 5\\n4 4\\n8 4\\n2 0\\n0\", \"1\\n1 1\\n10 -480\\n2\\n6 7\\n5 3\\n4 1\\n3\\n10 5\\n4 4\\n8 4\\n2 0\\n0\", \"1\\n1 2\\n10 -480\\n2\\n6 7\\n5 2\\n4 1\\n3\\n10 5\\n4 4\\n8 4\\n2 0\\n0\", \"1\\n1 1\\n10 -480\\n2\\n6 7\\n5 5\\n4 1\\n3\\n10 ...
none
{ "id": "p01444 Sky Jump", "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": "Mishka received a gift of multicolored pencils for h...
code
{ "ground_truth": "{\"inputs\": [\"6 3 10\\n7 2 7 7 4 2\\n\", \"3 2 5\\n10 16 22\\n\", \"6 2 3\\n4 5 3 13 4 10\\n\", \"4 2 12\\n10 16 22 28\\n\", \"10 3 1\\n5 5 5 6 6 7 8 8 8 9\\n\", \"8 7 13\\n52 85 14 52 92 33 80 85\\n\", \"10 5 293149357\\n79072863 760382815 358896034 663269192 233367425 32795628 837363300 4693246...
rating_>1900
{ "id": "985_E. Pencils and Boxes", "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": "We have a 3×3 square grid, where each square contain...
code
{ "ground_truth": "{\"inputs\": [\"ant\\nobe\\nrec\", \"edu\\ncat\\nion\", \"ant\\nobe\\nrfc\", \"ddu\\ncat\\nion\", \"ant\\nobe\\nrcf\", \"ddu\\ncat\\nioo\", \"ddu\\ncat\\nooi\", \"una\\nobe\\nrcf\", \"edu\\nbau\\nooi\", \"una\\npbe\\nfdr\", \"una\\nbep\\ndfr\", \"ued\\nbau\\noni\", \"ceu\\nbau\\noni\", \"ceu\\nbau\...
none
{ "id": "p03415 AtCoder Beginner Contest 090 - Diagonal String", "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": "Once Max found an electronic calculator from his gra...
code
{ "ground_truth": "{\"inputs\": [\"1 3\\n\", \"10 15\\n\", \"1 100\\n\", \"100 10000\\n\", \"213 221442\\n\", \"1 1000000\\n\", \"1000000 1000000\\n\", \"222145 353252\\n\", \"2 1000000\\n\", \"1 999999\\n\", \"192 200\\n\", \"222145 353252\\n\", \"1 100\\n\", \"192 200\\n\", \"213 221442\\n\", \"100 10000\\n\", \"10...
EASY
{ "id": "taco-train-8812", "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": "Bob has a simple undirected connected graph (without...
code
{ "ground_truth": "{\"inputs\": [\"4\\n4\\n0\\n1\\n1\\n1\\n0\", \"4\\n4\\n3\", \"3 3\\n1 2\\n2 3\\n3 1\\n\", \"20 61\\n17 19\\n18 1\\n17 11\\n8 1\\n18 3\\n18 5\\n2 3\\n2 14\\n6 10\\n7 19\\n8 10\\n12 11\\n20 19\\n12 19\\n20 15\\n13 11\\n13 14\\n12 1\\n7 1\\n6 3\\n7 5\\n17 1\\n8 19\\n18 19\\n7 11\\n6 9\\n7 10\\n4 1\\n2...
rating_>1900
{ "id": "1033_E. Hidden Bipartite Graph", "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": "One day Alice was cleaning up her basement when she ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n#.#\\n...\\n#.#\\n\", \"4\\n##.#\\n#...\\n####\\n##.#\\n\", \"5\\n#.###\\n....#\\n#....\\n###.#\\n#####\\n\", \"5\\n#.###\\n....#\\n#....\\n....#\\n#..##\\n\", \"6\\n#.##.#\\n......\\n#.##.#\\n......\\n##.###\\n#...##\\n\", \"3\\n###\\n#.#\\n###\\n\", \"21\\n#########.###.#####....
EASY
{ "id": "taco-train-18360", "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": "Blake is a CEO of a large company called \"Blake Tec...
code
{ "ground_truth": "{\"inputs\": [\"10\\n13 2 7 11 8 4 9 8 5 1\\n5 7 18 9 2 3 0 11 8 6\\n\", \"5\\n1 2 4 3 2\\n2 3 3 12 1\\n\", \"25\\n12 30 38 109 81 124 80 33 38 48 29 78 96 48 96 27 80 77 102 65 80 113 31 118 35\\n25 64 95 13 12 6 111 80 85 16 61 119 23 65 73 65 20 95 124 18 28 79 125 106 116\\n\", \"1\\n0\\n0\\n\"...
rating_<=1200
{ "id": "631_A. Interview", "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": "There are N participants in the CODE FESTIVAL 2016 Q...
code
{ "ground_truth": "{\"inputs\": [\"12 5 2\\ncabbabaacaba\", \"5 2 2\\nccccc\", \"10 2 3\\nabccabaabb\", \"12 5 0\\ncabbabaacaba\", \"12 5 1\\ncacbabaacaba\", \"12 5 1\\ncaababaccaba\", \"12 7 1\\ncaababaccaba\", \"12 7 2\\ncaababaccaba\", \"12 14 0\\ncaababaccaba\", \"12 6 2\\ncabbabaacaba\", \"10 2 0\\nabccabaabb\",...
none
{ "id": "p03971 CODE FESTIVAL 2016 qual B - Qualification simulator", "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": "The Bad Luck Island is inhabited by three kinds of s...
code
{ "ground_truth": "{\"inputs\": [\"2 2 2\\n\", \"2 1 2\\n\", \"1 1 3\\n\", \"3 2 1\\n\", \"100 100 100\\n\", \"1 100 100\\n\", \"100 1 100\\n\", \"100 100 1\\n\", \"1 100 99\\n\", \"99 1 100\\n\", \"100 99 1\\n\", \"100 1 99\\n\", \"1 99 100\\n\", \"99 100 1\\n\", \"1 1 1\\n\", \"100 100 2\\n\", \"100 2 100\\n\", \"2...
HARD
{ "id": "taco-test-805", "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": "Sherlock has intercepted some encrypted messages, wh...
code
{ "ground_truth": "{\"inputs\": [\"69\\ncdgncnzzrskvj silcsllxxsox hvulsrgmdfahuvlowfynqdaqix wpmpvxjhky\\nbuwrdbyip p nifqhqn qyncwxwysvvluqneppjhrjyttfiokyibfggntmtdvjoonfvuphcnhlceeovvstzblmorwwuvdcbaxeqppricsgrwrqwbgmtemfjn veeoykgfywbyxkbbicyclxrzbg jvttoywyfbitygflcqwlp\\nfoytvkeosfkzueistfswbdegzkrxekayhoomaaf...
UNKNOWN_DIFFICULTY
{ "id": "taco-train-8568", "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": "A programming coach has *n* students to teach. We kn...
code
{ "ground_truth": "{\"inputs\": [\"3 0\", \"6 4\\n1 2\\n2 3\\n3 4\\n5 6\", \"3 3\\n1 2\\n2 3\\n1 3\", \"6 3\\n1 2\\n3 4\\n5 6\", \"15 9\\n1 4\\n1 6\\n2 7\\n2 11\\n4 6\\n5 12\\n7 11\\n9 14\\n13 15\", \"3 1\\n1 3\", \"15 13\\n1 9\\n1 11\\n2 7\\n2 12\\n3 8\\n3 15\\n4 10\\n5 6\\n5 14\\n6 14\\n7 12\\n8 15\\n9 11\", \"36 2...
rating_1401-1600
{ "id": "300B", "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": "Given 2 integers u and v, find the shortest array su...
code
{ "ground_truth": "{\"inputs\": [\"2 4\\n\", \"1 3\\n\", \"0 0\\n\", \"8 5\\n\", \"289719432793352230 735866345619386710\\n\", \"0 1\\n\", \"55168310369541854 865861741843885420\\n\", \"1 1\\n\", \"217282410437604880 460155962367260448\\n\", \"288230376151711744 864691128455135232\\n\", \"740993906271323148 967511581...
rating_1601-1900
{ "id": "1325_D. Ehab the Xorcist", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Long ago, you thought of two finite arithmetic progr...
code
{ "ground_truth": "{\"inputs\": [\"8\\n-3 1 7\\n-1 2 4\\n-9 3 11\\n0 6 3\\n2 5 5\\n7 5 4\\n2 2 11\\n10 5 3\\n0 2 9\\n2 4 3\\n-11 4 12\\n1 12 2\\n-27 4 7\\n-17 8 2\\n-8400 420 1000000000\\n0 4620 10\\n\"], \"outputs\": [\"0\\n10\\n-1\\n0\\n-1\\n21\\n0\\n273000\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-12863", "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": "Alex enjoys performing magic tricks. He has a trick ...
code
{ "ground_truth": "{\"inputs\": [\"2 2\", \"4 4\", \"1 2\", \"2 1\", \"10 10\", \"1000 1000\", \"1 1\", \"987 123\", \"999 999\", \"1 999\", \"998 1\", \"2 987\", \"555 543\", \"321 123\", \"2 3\", \"461 1000\", \"678 231\"], \"outputs\": [\"0.6666666666666666\", \"0.4000000000000000\", \"1.0000000000000000\", \"0.50...
rating_>1900
{ "id": "452C", "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 bacteria lifespan is represented as follows:-\n\n0...
code
{ "ground_truth": "{\"inputs\": [\"40\", \"66\", \"9\", \"28\", \"76\", \"17\", \"15\", \"117\", \"14\", \"5\", \"107\", \"25\", \"187\", \"29\", \"140\", \"180\", \"324\", \"77\", \"47\", \"30\", \"54\", \"6\", \"65\", \"12\", \"11\", \"10\", \"13\", \"16\", \"138\", \"4\", \"50\", \"7\", \"37\", \"232\", \"193\", \...
none
{ "id": "icl-3-bacteria-population", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There are cubes of the same size and a simple robot ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 3\\n2 0\\n0 0\\n4\\n4 1\\n3 1\\n1 2\\n0 0\\n5\\n2 1\\n3 1\\n4 1\\n3 2\\n1 1\\n0 0\\n0\", \"3\\n1 3\\n2 0\\n0 0\\n4\\n4 1\\n3 1\\n1 0\\n0 0\\n5\\n2 1\\n3 1\\n4 1\\n3 2\\n1 1\\n0 0\\n0\", \"3\\n1 3\\n2 0\\n0 0\\n4\\n4 1\\n3 1\\n1 2\\n0 0\\n5\\n2 2\\n3 1\\n4 1\\n3 2\\n1 1\\n0 0\\...
none
{ "id": "p00701 Pile Up!", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codeforces
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "The king is left alone on the chessboard. In spite o...
code
{ "ground_truth": "{\"inputs\": [\"a8\\nh1\", \"b2\\nb4\", \"a5\\na5\", \"h1\\nb2\", \"c5\\nh2\", \"e1\\nf2\", \"g4\\nd2\", \"a8\\nb2\", \"d4\\nh2\", \"c5\\na2\", \"h5\\nf8\", \"e6\\nb6\", \"a6\\ng4\", \"f7\\nc2\", \"b7\\nh8\", \"g7\\nd6\", \"c8\\na3\", \"h8\\nf1\", \"d1\\nb7\", \"a7\\ne5\", \"d6\\nb1\", \"f5\\ng5\",...
rating_<=1200
{ "id": "3A", "rating": 1000, "split": "confidence_train", "sub_source": "rating_<=1200" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given positive integers N and M.\n\nHow many...
code
{ "ground_truth": "{\"inputs\": [\"3 12\", \"2 6\", \"100000 1000000000\", \"3 4\", \"3 6\", \"5 4\", \"3 1\", \"6 4\", \"4 12\", \"4 6\", \"100000 1000010000\", \"5 6\", \"3 2\", \"2 5\", \"8 2\", \"7 12\", \"4 2\", \"10 2\", \"8 12\", \"12 2\", \"4 8\", \"15 4\", \"9 4\", \"6 22\", \"5 2\", \"11 5\", \"100000 10010...
none
{ "id": "p03253 AtCoder Beginner Contest 110 - Factorization", "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 $a$ consisting of $n$ integer...
code
{ "ground_truth": "{\"inputs\": [\"2\\n5\\n3 1 2 3 1\\n7\\n1 1 1 1 1 2 2\\n\", \"1\\n5\\n3 3 3 3 3\\n\", \"1\\n5\\n3 3 3 3 3\\n\", \"1\\n5\\n3 3 0 3 3\\n\", \"2\\n5\\n3 1 2 3 1\\n7\\n1 1 1 1 0 2 2\\n\", \"1\\n5\\n3 3 1 3 3\\n\", \"2\\n5\\n1 1 2 3 1\\n7\\n1 1 1 1 1 2 2\\n\", \"2\\n5\\n1 1 2 3 1\\n7\\n1 1 1 1 1 4 2\\n\...
EASY
{ "id": "taco-train-14226", "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": "\"Sometimes the thing that brings us together also p...
code
{ "ground_truth": "{\"inputs\": [\"85\\n1334 1874 1372 1159 1833 1070 1487 1297 1518 1177 1773 1270 1763 1668 1192 1985 1102 1480 1213 1627 1802 1099 1527 1625 1543 1924 1023 1972 1061 1181 1003 1432 1505 1593 1725 1031 1492 1142 1222 1286 1064 1900 1187 1360 1413 1974 1270 1170 1235 1833 1711 1760 1896 1667 1285 155...
MEDIUM
{ "id": "taco-train-24172", "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": "We have a 2 \\times N grid. We will denote the squar...
code
{ "ground_truth": "{\"inputs\": [\"7\\n3 3 4 5 4 5 3\\n5 3 4 4 2 3 2\", \"1\\n2\\n3\", \"5\\n3 2 2 4 1\\n1 2 2 2 1\", \"4\\n1 1 1 1\\n1 1 1 1\", \"7\\n3 3 4 5 4 5 3\\n5 3 8 4 2 3 2\", \"1\\n2\\n6\", \"5\\n3 2 2 4 1\\n0 2 2 2 1\", \"4\\n1 1 0 1\\n1 1 1 1\", \"7\\n3 3 4 5 4 5 3\\n5 3 8 4 2 5 2\", \"4\\n1 1 0 1\\n1 1 0 ...
none
{ "id": "p03449 AtCoder Beginner Contest 087 - Candies", "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 New Year is coming! That's why many people today...
code
{ "ground_truth": "{\"inputs\": [\"4\\n0 2 0 2\\n\", \"2\\n1 2\\n\", \"10\\n2 3 4 0 0 1 1 3 4 2\\n\", \"2\\n6 0\\n\", \"10\\n0 0 0 0 0 0 0 0 1 0\\n\", \"5\\n2 2 2 2 2\\n\", \"10\\n2 3 4 0 0 1 1 3 4 3\\n\", \"2\\n6 1\\n\", \"5\\n2 2 2 1 2\\n\", \"2\\n1 0\\n\", \"10\\n2 1 4 0 0 1 1 3 4 3\\n\", \"2\\n6 2\\n\", \"5\\n2 1...
rating_<=1200
{ "id": "379_B. New Year Present", "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 binary array nums, you should delete one elem...
code
{ "ground_truth": "{\"fn_name\": \"longestSubarray\", \"inputs\": [[[1, 1, 0, 1]]], \"outputs\": [3]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-877", "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": "A witch named Marie lived deep in a remote forest. S...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n1 2\\n2 3\\n3 4\\n4 5\\n4 6\\n1 2\\n1 3\\n1 4\\n2 3\\n2 4\\n3 4\\n5 0\\n0 0\", \"5 4\\n1 2\\n2 3\\n3 4\\n4 5\\n4 6\\n1 2\\n1 3\\n1 4\\n2 4\\n2 4\\n3 4\\n5 0\\n0 0\", \"5 4\\n1 2\\n2 3\\n3 4\\n5 5\\n4 6\\n1 2\\n1 3\\n1 4\\n2 4\\n2 4\\n3 4\\n5 0\\n0 0\", \"5 4\\n2 2\\n2 3\\n3 4\...
none
{ "id": "p00248 Magic Square", "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": "This version of the problem differs from the next on...
code
{ "ground_truth": "{\"inputs\": [\"5 998244353\\n\", \"42 998244353\\n\", \"3 998244353\\n\", \"6 732284177\\n\", \"634 982032773\\n\", \"199862 999999937\\n\", \"2 554714911\\n\", \"124953 922406879\\n\", \"8045 992942057\\n\", \"200000 665880409\\n\", \"158032 121694641\\n\", \"199568 100000007\\n\", \"48 166017469...
rating_1601-1900
{ "id": "1561_D1. Up the Strip (simplified version)", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "All of us have read about factorials and Fibonacci n...
code
{ "ground_truth": "{\"inputs\": [\"1000\\n2 1 1\\n2 1 2\\n2 1 3\\n2 2 2\\n3 1 1\\n3 3 3\\n4 1 2\\n4 2 3\\n6 2 2\\n6 2 3\\n2 0 0\\n2 0 100000000\\n12 10000 100000000\\n12 10000000 10000001\\n15 28 28\\n15 29 30\\n15 28 31\\n7 0 0\\n11 0 0\\n103 0 0\\n96854213 96854214 96854214\\n72974677 72974678 72974678\\n88433753 8...
UNKNOWN_DIFFICULTY
{ "id": "taco-train-12411", "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": "There are three sticks with integer lengths $l_1, l_...
code
{ "ground_truth": "{\"inputs\": [\"4\\n6 1 5\\n2 5 2\\n2 4 2\\n5 5 4\\n\", \"4\\n6 1 5\\n2 5 2\\n2 4 2\\n7 101 108\\n\", \"2\\n1 2 3\\n4 5 6\\n\", \"2\\n1 2 3\\n2 2 4\\n\", \"1\\n1 98 99\\n\", \"68\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\\n1 1 2\...
EASY
{ "id": "taco-train-10538", "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 supposed to play the rock-paper-scissors gam...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2\\n1 40 40 20\", \"4\\n4\\n1 34 33 33\\n2 33 34 33\\n3 33 33 34\", \"2\\n1\\n2 50 50 0\", \"3\\n2\\n1 50 0 50\\n3 0 0 100\", \"3\\n2\\n3 40 40 20\\n1 30 10 60\", \"2\\n2\\n0 40 40 20\", \"2\\n1\\n2 50 50 1\", \"3\\n2\\n3 40 40 8\\n1 30 10 60\", \"2\\n1\\n2 94 50 1\", \"3\\n2\\n...
none
{ "id": "p01948 Janken Master", "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": "Joisino is planning to open a shop in a shopping str...
code
{ "ground_truth": "{\"inputs\": [\"1\\n1 1 0 1 0 0 0 1 0 1\\n3 4 5 6 7 8 9 -2 -3 4 -2\\n\", \"2\\n1 1 1 1 1 0 0 0 0 0\\n0 0 0 0 0 1 1 1 1 1\\n0 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1\\n0 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1\\n\", \"3\\n1 1 1 1 1 1 0 0 1 1\\n0 1 0 1 1 1 1 0 1 0\\n1 0 1 1 0 1 0 1 0 1\\n-8 6 -2 -8 -8 4 8 7 -6 2 2\\n-9 ...
EASY
{ "id": "taco-train-5633", "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": "You are given a rooted tree consisting of *n* vertic...
code
{ "ground_truth": "{\"inputs\": [\"5 2\\n1 3 2 3 5\\n2 3\\n5 1\\n3 4\\n4 1\\n2\\n1 2\\n2 3\", \"3 3\\n1 3 2\\n1 2\\n1 3\\n2\\n2 3\\n1 1\", \"1 1\\n1\\n1\\n1 1\"], \"outputs\": [\"2\\n5\", \"2\\n1\", \"1\"]}", "style": "rule" }
rating_>1900
{ "id": "893F", "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 time on the planet Lapituletti goes the same way...
code
{ "ground_truth": "{\"inputs\": [\"5\\n24 60\\n12:21\\n24 60\\n23:59\\n90 80\\n52:26\\n1 100\\n00:01\\n10 10\\n04:04\\n\", \"15\\n1 1\\n00:00\\n1 100\\n00:01\\n100 100\\n02:82\\n10 10\\n04:04\\n100 100\\n99:00\\n100 2\\n30:00\\n50 3\\n30:00\\n51 3\\n30:01\\n52 16\\n21:12\\n100 20\\n20:07\\n23 100\\n21:45\\n11 11\\n02...
rating_1201-1400
{ "id": "1493_B. Planet Lapituletti", "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": "There will be two arrays of integers. Determine all...
code
{ "ground_truth": "{\"inputs\": [\"2 3\\n2 4\\n16 32 96\\n\"], \"outputs\": [\"3\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-3069", "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 and Ira are two best friends. But they aren’t ...
code
{ "ground_truth": "{\"inputs\": [\"2\\n\", \"3\\n\", \"1\\n\", \"9999\\n\", \"5\\n\", \"999999\\n\", \"524287\\n\", \"178481\\n\", \"9\\n\", \"524288\\n\", \"10\\n\", \"131071\\n\", \"4\\n\", \"99999\\n\", \"1000000\\n\", \"99\\n\", \"8\\n\", \"6\\n\", \"7\\n\", \"999\\n\", \"14926\\n\", \"816471\\n\", \"170062\\n\",...
rating_1601-1900
{ "id": "575_H. Bots", "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": "Write a function that accepts two square matrices (`N...
code
{ "ground_truth": "{\"fn_name\": \"matrix_addition\", \"inputs\": [[[[1, 2, 3], [3, 2, 1], [1, 1, 1]], [[2, 2, 1], [3, 2, 3], [1, 1, 3]]], [[[1, 2], [1, 2]], [[2, 3], [2, 3]]], [[[1]], [[2]]]], \"outputs\": [[[[3, 4, 4], [6, 4, 4], [2, 2, 4]]], [[[3, 5], [3, 5]]], [[[3]]]]}", "style": "rule" }
EASY
{ "id": "taco-train-10935", "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 this problem we assume the Earth to be a complete...
code
{ "ground_truth": "{\"inputs\": [\"2\\n15000 South\\n4000 East\\n\", \"5\\n7500 South\\n10000 East\\n3500 North\\n4444 West\\n4000 North\\n\", \"4\\n50 South\\n50 North\\n15000 South\\n15000 North\\n\", \"2\\n1000 North\\n1000 South\\n\", \"5\\n20000 South\\n1000 North\\n1000000 West\\n9000 North\\n10000 North\\n\", ...
rating_1201-1400
{ "id": "750_B. New Year and North Pole", "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": "For a non-negative integer N, define S(N) as the sum...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 8\\n28 138\\n314159 314159\", \"3\\n1 6\\n28 138\\n314159 314159\", \"3\\n1 6\\n28 138\\n314159 559966\", \"3\\n1 5\\n28 138\\n314159 559966\", \"3\\n1 5\\n28 181\\n314159 559966\", \"3\\n2 5\\n28 181\\n314159 559966\", \"3\\n1 8\\n28 102\\n314159 314159\", \"3\\n1 5\\n28 181\...
none
{ "id": "lastdig", "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": "After fixing the mercury leak, Kim has arrived in th...
code
{ "ground_truth": "{\"inputs\": [[\"2\", \"2\", \"10\", \"01\", \"4\", \"1000\", \"0010\", \"0100\", \"0001\"]], \"outputs\": [[\"3\", \"8\"]]}", "style": "rule" }
UNKNOWN_DIFFICULTY
{ "id": "taco-train-14636", "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": "Having learned the multiplication table, Takahashi c...
code
{ "ground_truth": "{\"inputs\": [\"2 5\\n\", \"5 10\\n\", \"9 9\\n\", \"1 1\\n\", \"3 1\\n\", \"2 2\\n\", \"2 4\\n\", \"3 3\\n\", \"1 11\\n\", \"3 4\\n\", \"3 5\\n\", \"2 8\\n\", \"20 1\\n\", \"5 5\\n\", \"4 8\\n\", \"11 3\\n\", \"9 4\\n\", \"3 14\\n\", \"7 7\\n\", \"16 4\\n\", \"10 8\\n\", \"20 5\\n\", \"20 20\\n\",...
EASY
{ "id": "taco-train-6439", "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": "In a distributed system, data is never where you nee...
code
{ "ground_truth": "{\"inputs\": [\"1 2 3\\n0\\n0\\n1\\n\", \"3 4 8\\n0\\n1\\n2\\n3\\n3\\n2\\n1\\n0\\n\"], \"outputs\": [\"2\\n\", \"5\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-516", "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": "Suppose we have an n-dimensional supercomputer with ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n2 0\\n2 1\\n2 2\\n3 1\\n1 10\\n\"], \"outputs\": [\"1\\n5\\n13\\n7\\n21\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-4050", "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": "Polycarp is wondering about buying a new computer, w...
code
{ "ground_truth": "{\"inputs\": [\"3\\n4 15\\n1 3 10 11\\n1 2 7\\n4 100\\n1 5 10 50\\n3 14 12\\n2 1000000000\\n1 1\\n1\\n\", \"3\\n4 15\\n1 3 10 11\\n1 2 7\\n4 100\\n1 5 10 42\\n3 14 12\\n2 1000000000\\n1 1\\n1\\n\", \"3\\n4 15\\n1 3 10 11\\n1 2 7\\n4 111\\n2 5 10 39\\n3 14 12\\n2 1000000000\\n1 1\\n1\\n\", \"3\\n4 1...
rating_1601-1900
{ "id": "1512_F. Education", "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": "Bitoholic is an inhabitant of the planet Neo in a ga...
code
{ "ground_truth": "{\"inputs\": [\"2 \\n1 6 10 11 5 \\n2 2 4 2 1\\n\\nSAMPLE\", \"2 \\n1 6 14 11 5 \\n2 2 4 2 1\\n\\nSAMPLE\", \"2 \\n1 6 14 11 5 \\n3 2 4 2 1\\n\\nSAMPLE\", \"2 \\n1 6 11 11 1 \\n3 2 4 2 1\\n\\nSAMPLE\", \"2 \\n1 6 14 11 10 \\n3 2 4 0 1\\n\\nSAMPLE\", \"2 \\n1 4 8 19 5 \\n3 2 4 2 1\\n\\nSAMPLE\", \"2...
none
{ "id": "integration-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": "There are 2000001 stones placed on a number line. Th...
code
{ "ground_truth": "{\"inputs\": [\"4 0\", \"1 100\", \"3 7\", \"4 -1\", \"2 100\", \"3 14\", \"2 -1\", \"4 100\", \"5 14\", \"4 110\", \"5 20\", \"4 010\", \"5 21\", \"4 011\", \"5 35\", \"2 011\", \"10 35\", \"2 010\", \"9 35\", \"2 000\", \"9 61\", \"9 7\", \"9 10\", \"2 18\", \"1 18\", \"1 34\", \"2 34\", \"1 11\"...
none
{ "id": "p02946 AtCoder Beginner Contest 137 - One Clue", "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": "You're a mikemon breeder currently in the middle of ...
code
{ "ground_truth": "{\"inputs\": [\"5 7\\n000E0T3\\nT0TT0T0\\n010T0T0\\n2T0T0T0\\n0T0S000\", \"1 4\\nSE23\", \"3 3\\n000\\nS0E\\n000\", \"5 5\\nS9999\\nTTTT9\\n99999\\n9TTTT\\n9999E\", \"1 10\\n9T9TSET9T9\", \"10 1\\nS\\n9\\n9\\n9\\n9\\nE\\n9\\n9\\n9\\n9\", \"4 3\\nS01\\n234\\n567\\n89E\", \"2 2\\nE9\\nS4\", \"3 3\\n9...
rating_1401-1600
{ "id": "329B", "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": "Example\n\nInput\n\n3\ny 7\ny 6\nn 5\n\n\nOutput\n\n...
code
{ "ground_truth": "{\"inputs\": [\"3\\ny 7\\ny 6\\nn 5\", \"3\\ny 7\\ny 2\\nn 5\", \"3\\ny 7\\ny 3\\nn 5\", \"3\\ny 7\\ny 3\\nn 10\", \"3\\ny 2\\ny 3\\nn 10\", \"3\\ny 2\\ny 6\\nn 10\", \"3\\nx 2\\ny 6\\nn 10\", \"3\\ny 7\\ny 11\\nn 5\", \"3\\ny 8\\ny 2\\nn 5\", \"3\\ny 7\\ny 6\\nn 2\", \"3\\ny 0\\ny 3\\nn 10\", \"3\...
none
{ "id": "p01830 Delete Files", "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": "Little Vasya has received a young builder’s kit. The...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n\", \"4\\n6 5 6 7\\n\", \"83\\n246 535 994 33 390 927 321 97 223 922 812 705 79 80 977 457 476 636 511 137 6 360 815 319 717 674 368 551 714 628 278 713 761 553 184 414 623 753 428 214 581 115 439 61 677 216 772 592 187 603 658 310 439 559 870 376 109 321 189 337 277 26 ...
rating_<=1200
{ "id": "37_A. Towers", "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 ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given a matrix(2D array) M of size N*N consisting of ...
code
{ "ground_truth": "{\"inputs\": [\"N = 3\\r\\nM[][] = {{1, 1, 0},\\r\\n {1, 1, 0},\\r\\n {1, 1, 0}}\"], \"outputs\": [\"2\"]}", "style": "rule" }
EASY
{ "id": "taco-train-10343", "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 got a box with a combination lock. The lock has ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n579\\n\", \"4\\n2014\\n\", \"1\\n1\\n\", \"3\\n039\\n\", \"4\\n4444\\n\", \"5\\n46802\\n\", \"10\\n4447444444\\n\", \"10\\n5810438174\\n\", \"30\\n027027027027027027027027027027\\n\", \"50\\n41012516454101251645410125164541012516454101251645\\n\", \"72\\n464553044645330446455304...
MEDIUM
{ "id": "taco-train-23737", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "This kata is part of the collection [Mary's Puzzle Bo...
code
{ "ground_truth": "{\"fn_name\": \"largest_sum\", \"inputs\": [[\"72102450111111090\"], [\"123004560\"], [\"0\"], [\"4755843230\"], [\"3388049750\"], [\"3902864190\"], [\"4098611970\"], [\"5628206860\"], [\"5891002970\"], [\"0702175070\"]], \"outputs\": [[11], [15], [0], [41], [25], [30], [41], [23], [23], [15]]}", ...
EASY
{ "id": "taco-train-18026", "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": "Byteburg Senate elections are coming. Usually \"Unit...
code
{ "ground_truth": "{\"inputs\": [\"2 1\\n1 1\\n\", \"3 3\\n2 3 8\\n4 2 9\\n3 1 7\\n\", \"5 3\\n6 3 4 2 8\\n3 7 5 6 7\\n5 2 4 7 9\\n\", \"2 1\\n1000 1000\\n\", \"2 1\\n0 0\\n\", \"9 12\\n2 2 13 1 17 3 14 15 17\\n14 6 15 0 20 5 19 9 13\\n18 3 7 2 8 8 10 10 13\\n6 4 14 0 11 1 4 2 12\\n7 9 14 1 5 2 13 10 13\\n18 8 14 17 ...
rating_1601-1900
{ "id": "1267_E. Elections", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Polycarp has a checkered sheet of paper of size n × ...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\nWWWW\\nWWWB\\nWWWB\\nWWBB\\nWWWW\\n\", \"1 2\\nBB\\n\", \"3 3\\nWWW\\nWWW\\nWWW\\n\", \"100 1\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nB\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW\\nW...
EASY
{ "id": "taco-train-25395", "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": "Marcin is a coach in his university. There are n stu...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n1 2 3\\n\", \"1\\n0\\n1\\n\", \"4\\n3 2 3 6\\n2 8 5 10\\n\", \"10\\n206158430208 206162624513 68719476737 137506062337 206162624513 4194305 68719476737 206225539072 137443147777 68719476736\\n202243898 470292528 170057449 290025540 127995253 514454151 607963029 768676450...
rating_1601-1900
{ "id": "1230_D. Marcin and Training Camp", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You have three stacks of cylinders where each cylind...
code
{ "ground_truth": "{\"inputs\": [\"5 3 4\\n3 2 1 1 1\\n4 3 2\\n1 1 4 1\\n\"], \"outputs\": [\"5\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-9519", "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 Parker wants to play a game with Dr. Octopus. ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 2 3\", \"5\\n1 1 5 1 1\", \"1\\n167959139\", \"10\\n802030518 598196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754\", \"1\\n1\", \"1\\n1000000000\", \"2\\n2 4\", \"2\\n1 1\", \"2\\n1 2\", \"2\\n2 1\", \"3\\n1 3 1\", \"3\\n1 2 1\", \"3\\n2 1 1...
rating_<=1200
{ "id": "705B", "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": "Petya's been bored at work and he is killing the tim...
code
{ "ground_truth": "{\"inputs\": [\"7 8 4\\n........\\nX.....X.\\n........\\n........\\n.X......\\n........\\n........\\n1 5\\n6 4\\n3 5\\n4 6\\n\", \"10 10 15\\n.X.X......\\n..........\\n..........\\n..........\\n..X..X....\\n..........\\n..........\\n....X.....\\n..........\\n.....X....\\n6 2\\n7 3\\n2 8\\n4 6\\n3 2...
rating_>1900
{ "id": "480_E. Parking Lot", "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": "Once Vasya and Petya assembled a figure of m cubes, ...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2 1\\n1 0\\n0 1\\n\", \"5\\n0 0\\n0 1\\n0 2\\n0 3\\n0 4\\n\", \"10\\n-1 2\\n-3 0\\n5 5\\n4 4\\n-2 1\\n1 1\\n3 3\\n2 2\\n0 0\\n-1000000000 0\\n\", \"10\\n-678318184 2\\n-678318182 3\\n580731357 2\\n-678318182 1\\n-678318184 1\\n-678318183 0\\n-678318181 2\\n580731357 1\\n58073135...
HARD
{ "id": "taco-train-5547", "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 a binary string (i. e. a string consis...
code
{ "ground_truth": "{\"inputs\": [\"7 2\\n1100110\\n\", \"5 0\\n10010\\n\", \"8 1\\n10001000\\n\", \"10 8\\n0010011000\\n\", \"52 11\\n0110011111001000010000100010010001010100000100110100\\n\", \"459 15\\n101010101010101010101010101010101010101010101111111111111111111111010101010101010101010101011111111111111111111101...
HARD
{ "id": "taco-test-286", "rating": null, "split": "confidence_train", "sub_source": "HARD" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "In the country there are exactly n cities numbered w...
code
{ "ground_truth": "{\"inputs\": [\"3 2\\n1 2 0\\n2 3 1\\n\", \"2 1\\n1 2 100500\\n\", \"3 3\\n2 1 0\\n2 3 6\\n1 2 0\\n\", \"70 11\\n1 3 4\\n1 32 2\\n1 49 0\\n3 1 5\\n20 32 10\\n20 70 49999998\\n32 1 3\\n32 20 9\\n49 1 1\\n49 59 61\\n59 49 62\\n\", \"3 4\\n2 1 0\\n3 3 1\\n1 2 0\\n1 3 3\\n\", \"150 1\\n1 150 0\\n\", \"...
rating_>1900
{ "id": "576_D. Flights for Regular Customers", "rating": 2700, "split": "confidence_train", "sub_source": "rating_>1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Consider a square grid with lamps in fixed locations...
code
{ "ground_truth": "{\"inputs\": [\"3 2 5\\n1 1\\n1 3\\n3 1\\n3 3\\n2 2\\n\", \"3 2 6\\n1 1\\n1 2\\n1 3\\n3 1\\n3 2\\n3 3\\n\"], \"outputs\": [\"1\\n\", \"0\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-22114", "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": "Petya recieved a gift of a string *s* with length up...
code
{ "ground_truth": "{\"inputs\": [\"cab\", \"acdb\", \"a\", \"ab\", \"ba\", \"dijee\", \"bhrmc\", \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"bababaaababaabbbbbabbbbbbaaabbabaaaaabbbbbaaaabbbbabaabaabababbbabbabbabaaababbabbababaaaaabaaaabbba\", \"bccbbcc...
rating_1601-1900
{ "id": "797C", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Mad scientist Mike is building a time machine in his...
code
{ "ground_truth": "{\"inputs\": [\"1 1\\n\", \"3 2\\n\", \"199 200\\n\", \"1 1000000000000000000\\n\", \"3 1\\n\", \"21 8\\n\", \"18 55\\n\", \"1 2\\n\", \"2 1\\n\", \"1 3\\n\", \"2 3\\n\", \"1 4\\n\", \"5 2\\n\", \"2 5\\n\", \"4 5\\n\", \"3 5\\n\", \"13 4\\n\", \"21 17\\n\", \"5 8\\n\", \"13 21\\n\", \"74 99\\n\", \...
MEDIUM_HARD
{ "id": "taco-train-12048", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM_HARD" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given an array of n positive integers. Find the sum o...
code
{ "ground_truth": "{\"inputs\": [\"N = 5, arr[] = {1, 101, 2, 3, 100}\", \"N = 3, arr[] = {1, 2, 3}\"], \"outputs\": [\"106\", \"6\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-24910", "rating": null, "split": "confidence_train", "sub_source": "MEDIUM" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). Implement the required function(s) as specified; do not read from standard input.", "role": "system" }, { "content": "Given a non-negative integer S represented as a strin...
code
{ "ground_truth": "{\"inputs\": [\"S = \\\"149811\\\", K = 3\", \"S = \\\"1002991\\\", K = 3\"], \"outputs\": [\"111\", \"21\"]}", "style": "rule" }
MEDIUM
{ "id": "taco-train-11462", "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": "Mobile phones are equipped with a function that disp...
code
{ "ground_truth": "{\"inputs\": [\"1\\nben likes bananas the best among many fruits because bananas are sweet and cheap\\nb\\n1\\nwinners get to visit aizu and the university of aizu and make many friends as well\\na\\n3\\nask alex about\\nthe answer for the\\nassignment on android apps\\na\\n2\\nprogramming is both\...
none
{ "id": "p00242 Input Candidates", "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": "Vika has n jars with paints of distinct colors. All ...
code
{ "ground_truth": "{\"inputs\": [\"5\\n2 4 2 3 3\\n\", \"3\\n5 5 5\\n\", \"6\\n10 10 10 1 10 10\\n\", \"1\\n167959139\\n\", \"10\\n896619242 805194919 844752453 848347723 816995848 856813612 805194919 833406689 816255448 805194919\\n\", \"2\\n2 3\\n\", \"2\\n10 10\\n\", \"2\\n1111 1110\\n\", \"3\\n100 101 100\\n\", \...
EASY
{ "id": "taco-train-21314", "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": "A Professor conducts a Computer Science paper for N s...
code
{ "ground_truth": "{\"inputs\": [\"N = 5 \\r\\navg = 68\\r\\nroll[] = {3, 2, 4, 1, 5}\\r\\nmarks[] = {50, 67, 89, 79, 58}\", \"N = 6 \\r\\navg = 67.5\\r\\nroll[] = {5, 4, 1, 3, 2, 6}\\r\\nmarks[] = {78, 98, 86, 67, 78, 79}\"], \"outputs\": [\"0\", \"1\"]}", "style": "rule" }
EASY
{ "id": "taco-train-13452", "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 Mandarin Chinese, Russia...
code
{ "ground_truth": "{\"inputs\": [\"3\\n2\\n1 2\\n2\\n1 1\\n3\\n1 2 3\", \"3\\n2\\n1 2\\n2\\n1 1\\n3\\n1 4 3\", \"3\\n2\\n0 2\\n2\\n1 0\\n3\\n1 4 3\", \"3\\n2\\n1 1\\n2\\n1 1\\n3\\n1 2 -1\", \"3\\n2\\n1 1\\n2\\n1 2\\n3\\n1 2 -1\", \"3\\n2\\n1 2\\n2\\n1 1\\n3\\n0 0 0\", \"3\\n2\\n1 4\\n2\\n0 1\\n3\\n0 0 0\", \"3\\n2\\n...
HARD
{ "id": "taco-train-10171", "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": "Rock-Scissors-Paper is a game played with hands and ...
code
{ "ground_truth": "{\"inputs\": [\"8\\nLightning\\nGun\\nPaper\\nSponge\\nWater\\nDragon\\nDevil\\nAir\\n3\\nRock\\nScissors\\nPaper\\n0\", \"8\\nLightning\\nGun\\nPaper\\nSponge\\nWater\\nDragon\\nDevil\\nAir\\n0\\nRock\\nScsisors\\nPaper\\n0\", \"8\\nLightning\\nGun\\nPaper\\nSponge\\nWater\\nDragon\\nDevil\\nAir\\...
none
{ "id": "p01156 Hyper Rock-Scissors-Paper", "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 bracket sequence is a string, containing only char...
code
{ "ground_truth": "{\"inputs\": [\"(((\\n\", \"([])\\n\", \"(][)\\n\", \"[(()[])]()[()[]]\\n\", \"[[]\\n\", \"(()[))()[]\\n\", \"([]\\n\", \")[)][)))((([[)]((]][)[)((]([)[)(([)[)]][([\\n\", \"][([))][[))[[((]][([(([[)]]])([)][([([[[[([))]])][[[[[([)]]([[(((]([(](([([[)[(]])(][(((][)[[)][)(][[)[[)])))[)]))]])[([[))(([...
rating_1601-1900
{ "id": "223_A. Bracket Sequence", "rating": 1700, "split": "confidence_train", "sub_source": "rating_1601-1900" }
taco
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "Carrots are good for you! First of all, they give yo...
code
{ "ground_truth": "{\"inputs\": [\"2 1\\ncarrots?\\nbunnies\\n\", \"1 5\\nsovl problmz\\n\"], \"outputs\": [\"1\\n\", \"5\\n\"]}", "style": "rule" }
EASY
{ "id": "taco-train-790", "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": "Given is a directed graph G with N vertices and M ed...
code
{ "ground_truth": "{\"inputs\": [\"4 5\\n1 2\\n2 3\\n2 4\\n4 1\\n4 3\\n\", \"4 5\\n1 2\\n2 3\\n2 4\\n1 4\\n4 3\\n\", \"6 9\\n1 2\\n2 3\\n3 4\\n4 5\\n5 6\\n5 1\\n5 2\\n6 1\\n6 2\\n\", \"1000 2000\\n481 745\\n778 511\\n230 295\\n942 119\\n923 422\\n83 539\\n647 587\\n681 574\\n111 129\\n38 17\\n540 73\\n12 350\\n122 40...
MEDIUM_HARD
{ "id": "taco-train-20751", "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": "We have a string X, which has an even number of char...
code
{ "ground_truth": "{\"inputs\": [\"TSTTSS\", \"SSTTST\", \"TSSTTTSS\", \"SSTTTSST\", \"STTTSS\", \"SSSTTT\", \"TTTSSS\", \"TTTTSSSS\", \"TSTSST\", \"SSTTTS\", \"TSSTST\", \"STTSST\", \"TSSSTT\", \"TTSSST\", \"TSSTTS\", \"STSTST\", \"TSTSTS\", \"TSSTTSST\", \"STSTTS\", \"TTSTSSST\", \"STTSTS\", \"TTSSTS\", \"STSSTT\",...
none
{ "id": "p03986 AtCoder Grand Contest 005 - STring", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "There is a data which provides heights (in meter) of...
code
{ "ground_truth": "{\"inputs\": [\"1819\\n2003\\n876\\n2840\\n1723\\n1673\\n3776\\n2848\\n1592\\n922\", \"100\\n200\\n300\\n400\\n500\\n600\\n700\\n800\\n900\\n900\", \"1819\\n2003\\n876\\n2840\\n1723\\n1799\\n3776\\n2848\\n1592\\n922\", \"100\\n200\\n300\\n568\\n500\\n600\\n700\\n800\\n900\\n900\", \"1819\\n2003\\n8...
none
{ "id": "p00001 List of Top 3 Hills", "rating": 0, "split": "confidence_train", "sub_source": "none" }
codecontests
[ { "content": "Please reason step by step, then provide your complete solution as a single Python code block (```python ... ```). The program must read from standard input and write the answer to standard output.", "role": "system" }, { "content": "You are given a graph with 3 ⋅ n vertices and m edge...
code
{ "ground_truth": "{\"inputs\": [\"4\\n1 2\\n1 3\\n1 2\\n1 2\\n1 3\\n1 2\\n2 5\\n1 2\\n3 1\\n1 4\\n5 1\\n1 6\\n2 15\\n1 2\\n1 3\\n1 4\\n1 5\\n1 6\\n2 3\\n2 4\\n2 5\\n2 6\\n3 4\\n3 5\\n3 6\\n4 5\\n4 6\\n5 6\\n\", \"1\\n5 39\\n1 2\\n3 4\\n5 6\\n7 8\\n1 9\\n3 10\\n3 11\\n5 12\\n5 13\\n7 14\\n7 15\\n9 2\\n10 2\\n11 2\\n1...
rating_>1900
{ "id": "1199_E. Matching vs Independent Set", "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": "In the snake exhibition, there are $n$ rooms (number...
code
{ "ground_truth": "{\"inputs\": [\"4\\n4\\n-><-\\n5\\n>>>>>\\n3\\n<--\\n2\\n<>\\n\", \"36\\n2\\n--\\n2\\n>-\\n2\\n<-\\n2\\n->\\n2\\n>>\\n2\\n<>\\n2\\n-<\\n2\\n><\\n2\\n<<\\n3\\n---\\n3\\n>--\\n3\\n<--\\n3\\n->-\\n3\\n>>-\\n3\\n<>-\\n3\\n-<-\\n3\\n><-\\n3\\n<<-\\n3\\n-->\\n3\\n>->\\n3\\n<->\\n3\\n->>\\n3\\n>>>\\n3\\n<...
EASY
{ "id": "taco-train-2907", "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": "You are given a sequence *a*1,<=*a*2,<=...,<=*a**n* ...
code
{ "ground_truth": "{\"inputs\": [\"6\\n3 2 1 6 5 4\", \"6\\n83 -75 -49 11 37 62\", \"1\\n1\", \"2\\n1 2\", \"2\\n2 1\", \"3\\n1 2 3\", \"3\\n3 2 1\", \"3\\n3 1 2\", \"10\\n3 7 10 1 9 5 4 8 6 2\", \"20\\n363756450 -204491568 95834122 -840249197 -49687658 470958158 -445130206 189801569 802780784 -790013317 -192321079 5...
rating_1201-1400
{ "id": "843A", "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": "Vasya has recently learned to type and log on to the...
code
{ "ground_truth": "{\"inputs\": [\"ahhellllloou\", \"hlelo\", \"helhcludoo\", \"hehwelloho\", \"pnnepelqomhhheollvlo\", \"tymbzjyqhymedasloqbq\", \"yehluhlkwo\", \"hatlevhhalrohairnolsvocafgueelrqmlqlleello\", \"hhhtehdbllnhwmbyhvelqqyoulretpbfokflhlhreeflxeftelziclrwllrpflflbdtotvlqgoaoqldlroovbfsq\", \"rzlvihhghnel...
rating_<=1200
{ "id": "58A", "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": "Consider an infinite chessboard and a special knight...
code
{ "ground_truth": "{\"inputs\": [\"2\\n3 3 2 2 100\\n1 1 1 1 500\\n\", \"2\\n2 0 2 1 100\\n6 0 8 1 1\\n\", \"3\\n1 0 100 50 100\\n1 50 50 25 100\\n26 0 20 30 123\\n\"], \"outputs\": [\"600\\n\", \"100\\n\", \"-1\\n\"]}", "style": "rule" }
HARD
{ "id": "taco-train-18244", "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": "AtCoDeer the deer found two positive integers, a and...
code
{ "ground_truth": "{\"inputs\": [\"3 4\\n\", \"1 21\\n\", \"4 4\", \"1 15\", \"2 4\", \"2 15\", \"3 0\", \"2 26\", \"3 -1\", \"2 32\", \"0 -1\", \"1 32\", \"0 -2\", \"1 17\", \"-1 -2\", \"0 17\", \"-2 -2\", \"0 15\", \"-2 -1\", \"0 0\", \"-4 -1\", \"0 1\", \"-6 -1\", \"0 2\", \"-6 0\", \"1 2\", \"-1 0\", \"1 1\", \"-...
EASY
{ "id": "taco-train-22516", "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 [Mandarin] , [Bengali] , [H...
code
{ "ground_truth": "{\"inputs\": [\"2\\n8 3\\n1 2 2 1 3 3 2 1\\n5 3\\n1 1 2 2 3\"], \"outputs\": [\"3\\n-1\"]}", "style": "rule" }
VERY_HARD
{ "id": "taco-train-21949", "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": "Mad scientist Mike entertains himself by arranging r...
code
{ "ground_truth": "{\"inputs\": [\"4\\n01\\n01\\n10\\n10\\n\", \"6\\n10\\n10\\n10\\n01\\n10\\n10\\n\", \"1\\n10\\n\", \"3\\n10\\n01\\n10\\n\", \"3\\n10\\n10\\n01\\n\", \"115\\n10\\n10\\n10\\n10\\n01\\n01\\n10\\n10\\n10\\n01\\n01\\n10\\n01\\n01\\n10\\n10\\n10\\n01\\n10\\n01\\n10\\n10\\n01\\n01\\n10\\n10\\n10\\n10\\n01...
rating_<=1200
{ "id": "344_A. Magnets", "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": "# The Invitation\n\nMost of us played with toy blocks...
code
{ "ground_truth": "{\"fn_name\": \"build_square\", \"inputs\": [[[1, 1, 1, 1, 1, 1, 1, 2, 3, 4]], [[1, 3, 2, 2, 4, 1, 1, 3, 1, 4, 2]], [[1, 3, 2, 4, 3, 3, 2]], [[2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]], [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], [[3, 1, 3, 1, 3, 1, 3, 2]], [[1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1]], [...
EASY
{ "id": "taco-train-602", "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": "Bees Alice and Alesya gave beekeeper Polina famous c...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\nSET\\nETS\\nTSE\\n\", \"3 4\\nSETE\\nETSE\\nTSES\\n\", \"5 4\\nSETT\\nTEST\\nEEET\\nESTE\\nSTES\\n\", \"2 2\\nES\\nTE\\n\", \"1 1\\nT\\n\", \"3 1\\nE\\nS\\nT\\n\", \"10 3\\nTSS\\nSEE\\nESS\\nSES\\nSTS\\nTET\\nTEE\\nSSE\\nETS\\nTSE\\n\", \"10 3\\nTSS\\nSEE\\nESS\\nSES\\nSTS\\nT...
MEDIUM
{ "id": "taco-train-21960", "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": "Don't put up with what you're sick of! The Smart Bea...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n0 0 0 1\\n0 2 2 2\\n3 3 2 3\\n12\\n0 0 L 0\\n0 0 L 1\\n0 0 L 2\\n0 0 L 3\\n0 0 L 4\\n0 0 L 5\\n0 0 L 6\\n2 0 U 2\\n2 0 U 3\\n3 0 U 5\\n1 3 D 2\\n1 3 R 2\\n\", \"3 8\\n2 4 4 4\\n7 2 5 2\\n6 5 6 3\\n20\\n3 2 U 1000000\\n3 2 U 1\\n3 2 U 2\\n3 2 U 3\\n3 2 U 4\\n3 2 U 5\\n3 2 U 6\\...
rating_>1900
{ "id": "331_D2. Escaping on Beaveractor", "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": "Johnny has a younger sister Anne, who is very clever...
code
{ "ground_truth": "{\"inputs\": [\"4 2 1 3\", \"7 2 2 4\", \"3 5 9 1\", \"3 1 5 1\", \"10 10 10 10\", \"11 5 6 11\", \"1 1 1 1\", \"10 20 30 40\", \"45 25 5 15\", \"20 5 8 13\", \"10 30 7 20\", \"3 2 3 2\", \"70 10 100 30\", \"4 8 16 2\", \"3 3 3 10\", \"1 5 5 5\", \"13 25 12 1\", \"10 100 7 3\", \"50 1 50 100\", \"5...
rating_<=1200
{ "id": "6A", "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": "Petya has a simple graph (that is, a graph without l...
code
{ "ground_truth": "{\"inputs\": [\"4 5\\n1 5 2 2\\n1 3 4\\n1 4 4\\n3 4 5\\n3 2 2\\n4 2 2\\n\", \"3 3\\n9 7 8\\n1 2 1\\n2 3 2\\n1 3 3\\n\", \"20 10\\n487490574 766859182 860731945 956220596 584871933 815478522 698429627 781975977 485357256 396825095 566947997 680691964 834523631 323163346 665972495 5503804 738797202 4...
VERY_HARD
{ "id": "taco-train-19651", "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": "One day, the Grasshopper was jumping on the lawn and...
code
{ "ground_truth": "{\"inputs\": [\"ABABBBACFEYUKOTT\\n\", \"AAA\\n\", \"A\\n\", \"B\\n\", \"AEYUIOAEIYAEOUIYOEIUYEAOIUEOEAYOEIUYAEOUIYEOIKLMJNHGTRWSDZXCVBNMHGFDSXVWRTPPPLKMNBXIUOIUOIUOIUOOIU\\n\", \"AEYUIOAEIYAEOUIYOEIUYEAOIUEOEAYOEIUYAEOUIYEOIAEYUIOAEIYAEOUIYOEIUYEAOIUEOEAYOEIUYAEOUIYEOI\\n\", \"KMLPTGFHNBVCDRFGHNMB...
EASY
{ "id": "taco-train-1726", "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 description of a depot. It is a rect...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n..*\\n.*.\\n*..\\n\", \"6 5\\n..*..\\n..*..\\n*****\\n..*..\\n..*..\\n..*..\\n\", \"3 4\\n.*..\\n....\\n.*..\\n\", \"3 3\\n*..\\n**.\\n...\\n\", \"3 3\\n*..\\n*..\\n***\\n\", \"10 10\\n........*.\\n*.........\\n........*.\\n........*.\\n..........\\n..........\\n..........\\n....
rating_1201-1400
{ "id": "699_B. One Bomb", "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": "You have a sequence of n distinct integers a1, a2, ....
code
{ "ground_truth": "{\"inputs\": [\"3 5\\n1 2 3\\n\", \"3 3\\n1 2 3\\n\", \"11 2\\n7 8 10 1 5 11 3 9 2 4 6\\n\", \"11 5\\n5 7 4 11 9 2 8 3 1 6 10\\n\", \"11 2\\n7 8 10 1 5 11 3 9 2 4 6\\n\", \"23 101\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23\\n\", \"27 5\\n10 23 27 18 8 20 1 7 21 11 17 22 12 2 3 9 ...
rating_>1900
{ "id": "241_D. Numbers", "rating": 2900, "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": "Jack loved his house very much, because his lovely c...
code
{ "ground_truth": "{\"inputs\": [\"4 6\\ns 0 2\\ns 1 3\\ns 2 1\\nw 0\\ns 3 3\\ns 4 2\\n3 3\\ns 0 1\\ns 1 1\\ns 2 1\\n0 0\", \"4 6\\ns 0 2\\ns 1 2\\ns 2 1\\nw 0\\ns 3 3\\ns 4 2\\n3 3\\ns 0 1\\ns 1 1\\ns 2 1\\n0 0\", \"4 6\\ns 0 2\\ns 1 3\\ns 2 1\\nw 0\\ns 3 3\\ns 4 2\\n3 3\\ns 0 1\\ns 0 1\\ns 2 1\\n0 0\", \"4 6\\ns 0 ...
none
{ "id": "p00621 Sleeping Cats", "rating": 0, "split": "confidence_train", "sub_source": "none" }