data_source
stringclasses
4 values
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Sara and Tara were two young girls who had a really bad handwriting.So they decided to write down a word. Being highly passionate about improving the...
code
{ "ground_truth": "{\"inputs\": [\"Useful\\n\\nSAMPLE\", \"Architecture\", \"Crazylife\", \"Arbhitecture\", \"Crazykife\", \"Tseful\\n\\nSAMPLE\", \"erutcetihbrA\", \"Crazykiff\", \"lufesT\\n\\nSAMPLE\", \"erutcetihbrB\", \"Crazykigf\", \"Brbhitecture\", \"Cra{ykigf\", \"frutcetihbrB\", \"fgiky{arC\", \"fsutcetihbrB\...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Mr. Hahn, our very own DJ, was seeing Chester and Mike fighting over such questions lately. Being a geek himself, he thought of showing off his skill...
code
{ "ground_truth": "{\"inputs\": [\"1\\n\\nSAMPLE\", \"2\", \"1\\n\\nSANPLE\", \"1\\n\\nSANQLE\", \"1\\n\\nSNAQLE\", \"1\\n\\nSEAQLN\", \"1\\n\\nSEAQNL\", \"1\\n\\nSEARNL\", \"1\\n\\nSEARNM\", \"1\\n\\nMNRAES\", \"1\\n\\nSNRAEM\", \"1\\n\\nMEARNS\", \"1\\n\\nLEARNS\", \"1\\n\\nKEARNS\", \"1\\n\\nKEANRS\", \"1\\n\\nSRN...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Your friend has recently learned about coprime numbers. A pair of numbers {a, b} is called coprime if the maximum number that divides both a and b is...
code
{ "ground_truth": "{\n \"inputs\": [\n \"2 4\\n\",\n \"10 11\\n\",\n \"900000000000000009 900000000000000029\\n\",\n \"640097987171091791 640097987171091835\\n\",\n \"19534350415104721 19534350415104725\\n\",\n \"933700505788726243 933700505788726280\\n\",\n \"1 3\\n\",\n \"1 4\\n\",\n \"1...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Write a function that returns a sequence (index begins with 1) of all the even characters from a string. If the string is smaller than two characters...
code
{ "ground_truth": "{\"fn_name\": \"even_chars\", \"inputs\": [[\"a\"], [\"abcdefghijklm\"], [\"aBc_e9g*i-k$m\"], [\"\"], [\"ab\"], [\"aiqbuwbjqwbckjdwbwkqbefhglqhfjbwqejbcadn.bcaw.jbhwefjbwqkvbweevkj.bwvwbhvjk.dsvbajdv.hwuvghwuvfhgw.vjhwncv.wecnaw.ecnvw.kejvhnw.evjkhweqv.kjhwqeev.kjbhdjk.vbaewkjva\"]], \"outputs\": [...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You have two variables a and b. Consider the following sequence of actions performed with these variables:\n\n 1. If a = 0 or b = 0, end the process...
code
{ "ground_truth": "{\"inputs\": [\"12 5\\n\", \"31 12\\n\", \"100000000000000001 10000000000000000\\n\", \"5 100000000000001\\n\", \"1000000000000000000 2\\n\", \"4 8\\n\", \"5 6\\n\", \"7 11\\n\", \"179 100000000000497000\\n\", \"3 6\\n\", \"1000000000000000000 10000001\\n\", \"1 123456789123456\\n\", \"19 46\\n\", ...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Buy One, Get One Free\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nA nearby pie shop is having a speci...
code
{ "ground_truth": "{\"inputs\": [\"6\\n3 4 5 3 4 5\", \"5\\n5 5 5 5 5\", \"4\\n309999 6000 2080 2080\", \"10\\n1 1 1 1 1 2 3 4 5 6\", \"1\\n1\", \"7\\n10 9 5 5 4 3 2\", \"30\\n3 6 3 8 6 4 4 2 4 10 8 5 9 6 7 7 9 4 7 4 10 1 9 10 4 7 7 4 2 3\", \"40\\n2 6 5 5 6 6 7 8 6 5 3 9 9 1 8 3 7 3 7 2 3 1 3 1 5 8 1 3 8 2 3 2 2 1 4...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Megacity\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThe administration of the Tomsk Region firmly be...
code
{ "ground_truth": "{\"inputs\": [\"4 999998\\n1 1 1\\n2 2 1\\n3 3 1\\n2 -2 1\", \"4 999998\\n1 1 2\\n2 2 1\\n3 3 1\\n2 -2 1\", \"2 1\\n1 1 999997\\n2 2 1\", \"4 999998\\n3 3 10\\n-3 3 10\\n3 -3 10\\n-3 -3 10\", \"15 95473\\n-9 6 199715\\n0 -8 110607\\n0 2 6621\\n-3 -2 59894\\n-10 -8 175440\\n-2 0 25814\\n10 -4 68131\...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the olympiad should meet together in Metropolis (the ...
code
{ "ground_truth": "{\n \"inputs\": [\n \"2 6 5\\n1 1 0 5000\\n3 2 0 5500\\n2 2 0 6000\\n15 0 2 9000\\n9 0 1 7000\\n8 0 2 6500\\n\",\n \"2 4 5\\n1 2 0 5000\\n2 1 0 4500\\n2 1 0 3000\\n8 0 1 6000\\n\",\n \"2 5 5\\n1 1 0 1\\n2 2 0 100\\n3 2 0 10\\n9 0 1 1000\\n10 0 2 10000\\n\",\n \"2 4 5\\n1 1 0 1\\n2 2 0 ...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Vasya will fancy any number as long as it is an integer power of two. Petya, on the other hand, is very conservative and only likes a single integer ...
code
{ "ground_truth": "{\"inputs\": [\"24 0\\n\", \"24 1\\n\", \"24 -1\\n\", \"4 -7\\n\", \"1 1\\n\", \"10 7\\n\", \"3 -179\\n\", \"12345678 -123\\n\", \"1000000000 1000\\n\", \"1 0\\n\", \"1 -1\\n\", \"536870912 0\\n\", \"536870911 0\\n\", \"1 -1000\\n\", \"100500 -179\\n\", \"1000000000 -1000\\n\", \"536870812 1\\n\", ...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Hexagonal numbers are figurate numbers which can be calculated using the formula hn = 2n2 - n. You are given n; calculate n-th hexagonal number.\n\nI...
code
{ "ground_truth": "{\"inputs\": [\"2\\n\", \"5\\n\"], \"outputs\": [\"6\\n\", \"45\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You're trying to set the record on your favorite video game. The game consists of N levels, which must be completed sequentially in order to beat the...
code
{ "ground_truth": "{\"inputs\": [\"1 8\\n2 8 81\\n\", \"2 30\\n20 30 80\\n3 9 85\\n\", \"4 319\\n63 79 89\\n79 97 91\\n75 87 88\\n75 90 83\\n\", \"48 1976\\n30 97 84\\n80 81 84\\n41 70 86\\n23 57 80\\n17 60 85\\n36 48 81\\n51 87 81\\n38 85 81\\n31 67 80\\n11 40 96\\n63 100 83\\n4 67 82\\n16 67 90\\n45 97 80\\n60 75 8...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "There are N + 1 squares arranged in a row, numbered 0, 1, ..., N from left to right.\nInitially, you are in Square X.\nYou can freely travel between ...
code
{ "ground_truth": "{\"inputs\": [\"5 3 3\\n1 2 4\\n\", \"7 3 2\\n4 5 6\\n\", \"10 7 5\\n1 2 3 4 6 8 9\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"3\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "There are given n men and n women.\nEach woman ranks all men in order of her preference\n(her first choice, her second choice, and so on).\nSimilarly...
code
{ "ground_truth": "{\"inputs\": [\"2\\n4\\n1 4 3 1 2\\n2 2 1 3 4\\n3 1 3 4 2\\n4 4 3 1 2\\n1 3 2 4 1\\n2 2 3 1 4\\n3 3 1 2 4\\n4 3 2 4 1\\n7\\n1 3 4 2 1 6 7 5\\n2 6 4 2 3 5 1 7\\n3 6 3 5 2 2 4 1\\n4 1 6 3 2 4 7 5\\n5 1 6 5 3 4 7 2\\n6 1 7 3 4 5 6 2\\n7 5 6 2 4 3 7 1\\n1 4 5 3 7 2 6 1\\n2 5 6 4 7 3 2 1\\n3 1 6 5 4 3 7...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Little girl Susie went shopping with her mom and she wondered how to improve service quality. \n\nThere are n people in the queue. For each person we...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5\\n15 2 1 5 3\\n\",\n \"15\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\n\",\n \"10\\n13 2 5 55 21 34 1 8 1 3\\n\",\n \"10\\n8 256 16 1 2 1 64 4 128 32\\n\",\n \"10\\n10000 40000 10000 50000 20000 100000 10000 100 30000 500\\n\",\n \"1\\n1000000000\\n\",\n \"15\\n9 ...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Codehorses T-shirts\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nCodehorses has just hosted the second...
code
{ "ground_truth": "{\"inputs\": [\"3\\nXS\\nXS\\nM\\nXL\\nS\\nXS\", \"2\\nXXXL\\nXXL\\nXXL\\nXXXS\", \"2\\nM\\nXS\\nXS\\nM\", \"1\\nXXXL\\nXXXL\", \"1\\nM\\nM\", \"4\\nS\\nL\\nXXS\\nXXS\\nM\\nL\\nXXS\\nXXL\", \"5\\nXS\\nXXXS\\nL\\nXS\\nM\\nXL\\nS\\nXS\\nM\\nXXXL\", \"1\\nS\\nM\", \"26\\nS\\nL\\nM\\nL\\nS\\nXXXS\\nXXX...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "The girl Taylor has a beautiful calendar for the year y. In the calendar all days are given with their days of week: Monday, Tuesday, Wednesday, Thur...
code
{ "ground_truth": "{\"inputs\": [\"2000\\n\", \"50501\\n\", \"2016\\n\", \"2097\\n\", \"1884\\n\", \"1874\\n\", \"1872\\n\", \"12345\\n\", \"1788\\n\", \"1899\\n\", \"1179\\n\", \"2072\\n\", \"1900\\n\", \"2014\\n\", \"1191\\n\", \"99988\\n\", \"1313\\n\", \"5094\\n\", \"2006\\n\", \"2002\\n\", \"2096\\n\", \"2100\\n...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Chef played an interesting game yesterday. This game is played with two variables $X$ and $Y$; initially, $X = Y = 0$. Chef may make an arbitrary num...
code
{ "ground_truth": "{\"inputs\": [[\"3\", \"3\", \"8\", \"9\"]], \"outputs\": [[\"3\", \"5\", \"6\"]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are required to create a simple calculator that returns the result of addition, subtraction, multiplication or division of two numbers.\n\nYour f...
code
{ "ground_truth": "{\"fn_name\": \"calculator\", \"inputs\": [[6, 2, \"+\"], [4, 3, \"-\"], [5, 5, \"*\"], [5, 4, \"/\"], [6, \"$\", \"+\"], [6, 2, \"&\"], [4, 3, \"\\\\\"], [\"a\", 3, \"+\"], [6, 2, \"=\"], [6, 2, \"\\t\"], [\":\", \",\", \"+\"]], \"outputs\": [[8], [1], [25], [1.25], [\"unknown value\"], [\"unknown...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "It is lunch time for Mole. His friend, Marmot, prepared him a nice game for lunch.\n\nMarmot brought Mole n ordered piles of worms such that i-th pil...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5\\n2 7 3 4 9\\n3\\n1 25 11\\n\"\n ],\n \"outputs\": [\n \"1\\n5\\n3\\n\"\n ]\n}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given two integers a and b.\n\nIn one move, you can choose some integer k from 1 to 10 and add it to a or subtract it from a. In other words,...
code
{ "ground_truth": "{\"inputs\": [\"6\\n5 5\\n13 42\\n18 4\\n1337 420\\n123456789 1000000000\\n100500 9000\\n\", \"5\\n2 3\\n10 10\\n2 4\\n7 4\\n9 3\\n\", \"7\\n2 2\\n2 2\\n2 2\\n2 2\\n2 2\\n2 2\\n2 2\\n\", \"11\\n5 5\\n13 42\\n18 4\\n1337 420\\n123456789 1000000000\\n100500 9000\\n5 5\\n13 42\\n18 4\\n1337 420\\n1234...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Consider a sequence of $N$ integers where each integer between $1$ and $N$ appears exactly once.\n\nA pair of numbers in the sequence is confused if ...
code
{ "ground_truth": "{\"inputs\": [\"10 1\\n\", \"4 3\\n\", \"9 13\\n\"], \"outputs\": [\"9\\n\", \"6\\n\", \"17957\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given two arrays a_0, a_1, …, a_{n - 1} and b_0, b_1, …, b_{m-1}, and an integer c.\n\nCompute the following sum:\n\n$$$∑_{i=0}^{n-1} ∑_{j=0}...
code
{ "ground_truth": "{\"inputs\": [\"100 100 47124\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Given is a lowercase English letter C that is not `z`. Print the letter that follows C in alphabetical order.\n\nConstraints\n\n* C is a lowercase En...
code
{ "ground_truth": "{\"inputs\": [\"y\", \"a\", \"z\", \"b\", \"x\", \"`\", \"w\", \"_\", \"{\", \"^\", \"|\", \"]\", \"v\", \"\\\\\", \"u\", \"[\", \"}\", \"Z\", \"~\", \"Y\", \"X\", \"W\", \"V\", \"U\", \"T\", \"S\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"R\", \"Q\", \"P\", \"O\", \"N\", \"M\", \"L\", \"K\", \"...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Fox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it. The command was represented by string s. Each c...
code
{ "ground_truth": "{\"inputs\": [\"999999999 -999999999\\nRRRRRRRRRRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLUUUUUUUUUUUUUUUUUUUUUUU\\n\", \"0 -3\\nRDDL\\n\", \"0 0\\nUURRDL\\n\", \"100 100\\nRUL\\n\", \"1000000000 1000000000\\nRURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURU...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Dima loves Inna very much. He decided to write a song for her. Dima has a magic guitar with n strings and m frets. Dima makes the guitar produce soun...
code
{ "ground_truth": "{\"inputs\": [\"4 6 5 7\\n3 1 2 2 3 1\\n3 2 2 2 5 5\\n4 2 2 2 5 3\\n3 2 2 1 4 3\\n2 3 1 4 1 5 1\\n\", \"4 4 9 5\\n4 7 9 5\\n1 2 1 7\\n8 3 4 9\\n5 7 7 2\\n7 1 9 2 5\\n\", \"10 1 9 5\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n1\\n1 1 9 2 3\\n\", \"11 11 9 11\\n1 1 1 1 1 1 1 1 1 1 1\\n1 1 1 1 1 1 1 1 2 2 1...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "A greek once sifted some numbers. And it did something wonderful!\n\n-----Input:-----\n- First line will contain an integer $N$\n\n-----Output:-----\...
code
{ "ground_truth": "{\"inputs\": [\"1\\n30\\n\", \"1\\n40\\n\", \"1\\n50\\n\", \"1\\n60\\n\", \"1\\n70\\n\", \"1\\n2\\n\", \"1\\n3\\n\", \"1\\n11\\n\", \"1\\n19\\n\", \"1\\n100000\\n\", \"1\\n10000\\n\"], \"outputs\": [\"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "\"We have a holiday tomorrow, its Ambedkar Jayanti\" says Chotu.\n\"I will sleep and eat whole day!!\" exclaims Motu.\n\"Also we don't have to attend...
code
{ "ground_truth": "{\"inputs\": [\"20\\n100000 30000 9999995\\n99999 29999 9999994\\n99998 29998 9999993\\n99997 29997 9999992\\n99996 29996 9999991\\n99995 29995 9999990\\n99994 29994 9999989\\n99993 29993 9999988\\n99992 29992 9999987\\n99991 29991 9999986\\n99990 29990 9999985\\n99989 29989 9999984\\n99988 29988 9...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "JJ has an array A of size N. He can perform the following operations on the array at most K times:\n\nSet A_{i} := A_{i + 1} where 1 ≤ i ≤ N - 1\nSet...
code
{ "ground_truth": "{\"inputs\": [\"2\\n5 3\\n1 2 3 4 5\\n5 2\\n1 1 3 4 5\\n\", \"2\\n4 2\\n4 3 8 9\\n3 2\\n20 10 30\\n\", \"3\\n3 1\\n10 11 12\\n4 2\\n4 5 6 7\\n6 3\\n2 5 8 11 14 17\\n\", \"3\\n3 2\\n3 6 9\\n4 3\\n4 8 12 16\\n5 4\\n5 10 15 20 25\\n\"], \"outputs\": [\"4\\n3\", \"8\\n30\", \"11\\n6\\n11\", \"9\\n16\\n...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You have an integer sequence of length N: a_1, a_2, ..., a_N.\nYou repeatedly perform the following operation until the length of the sequence become...
code
{ "ground_truth": "{\"inputs\": [\"5\\n1 4 3 7 5\\n\", \"4\\n100 100 -1 100\\n\", \"6\\n-1 -2 -3 1 2 3\\n\", \"9\\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\\n\", \"1000\\n-34252335 -316501188 -567689380 -589581830 -457494304 -758566538 -911361682 -139250063 -1...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Vova plans to go to the conference by train. Initially, the train is at the point $1$ and the destination point of the path is the point $L$. The spe...
code
{ "ground_truth": "{\n \"inputs\": [\n \"4\\n10 2 3 7\\n100 51 51 51\\n1234 1 100 199\\n1000000000 1 1 1000000000\\n\",\n \"3\\n1 1 1 1\\n2 3 1 2\\n4 4 3 4\\n\",\n \"1\\n8 5 1 5\\n\",\n \"1\\n2 5 1 1\\n\",\n \"1\\n100 2 61 62\\n\",\n \"1\\n10 1 9 10\\n\",\n \"1\\n3 4 3 3\\n\",\n \"10\\n10 1 1...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "The Berland Armed Forces System consists of n ranks that are numbered using natural numbers from 1 to n, where 1 is the lowest rank and n is the high...
code
{ "ground_truth": "{\"inputs\": [\"3\\n5 6\\n1 2\\n\", \"3\\n5 6\\n1 3\\n\", \"80\\n65 15 43 6 43 98 100 16 69 98 4 54 25 40 2 35 12 23 38 29 10 89 30 6 4 8 7 96 64 43 11 49 89 38 20 59 54 85 46 16 16 89 60 54 28 37 32 34 67 9 78 30 50 87 58 53 99 48 77 3 5 6 19 99 16 20 31 10 80 76 82 56 56 83 72 81 84 60 28\\n18 24...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Anton and Polyhedrons\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nAnton's favourite geometric figures...
code
{ "ground_truth": "{\"inputs\": [\"4\\nIcosahedron\\nCube\\nTetrahedron\\nDodecahedron\", \"3\\nDodecahedron\\nOctahedron\\nOctahedron\", \"25\\nIcosahedron\\nOctahedron\\nTetrahedron\\nDodecahedron\\nCube\\nIcosahedron\\nOctahedron\\nCube\\nTetrahedron\\nIcosahedron\\nIcosahedron\\nTetrahedron\\nOctahedron\\nDodecah...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given a matrix of size n × n filled with lowercase English letters. You can change no more than k letters in this matrix.\n\nConsider all pat...
code
{ "ground_truth": "{\"inputs\": [\"4 2\\nabcd\\nbcde\\nbcad\\nbcde\\n\", \"7 6\\nypnxnnp\\npnxonpm\\nnxanpou\\nxnnpmud\\nnhtdudu\\nnpmuduh\\npmutsnz\\n\", \"5 3\\nbwwwz\\nhrhdh\\nsepsp\\nsqfaf\\najbvw\\n\", \"1 0\\nz\\n\", \"1 1\\ng\\n\", \"1 0\\na\\n\", \"1 1\\nz\\n\", \"1 0\\ng\\n\", \"4 16\\ndfhs\\nvgca\\ndfgd\\nv...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "After a long time, Chef has finally decided to renovate his house. Chef's house has N rooms in it numbered from 1 to N. Each room is currently painte...
code
{ "ground_truth": "{\"inputs\": [\"3\\n3\\nRGR\\n3\\nRRR\\n3\\nRGB\", \"3\\n3\\nRGR\\n3\\nRRR\\n3\\nGRB\", \"3\\n3\\nGRR\\n3\\nRRR\\n3\\nGRB\", \"3\\n3\\nRGR\\n3\\nRRR\\n3\\nRBG\", \"3\\n3\\nGRR\\n3\\nRRR\\n3\\nBRG\", \"3\\n3\\nRRG\\n3\\nRRR\\n3\\nRGB\", \"3\\n3\\nRGR\\n3\\nRRR\\n3\\nBRG\", \"3\\n3\\nRGR\\n3\\nRRR\\n...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Safe cracking\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nRight now you are to solve a very, very simple ...
code
{ "ground_truth": "{\"inputs\": [\"1 2 4 2\", \"3 3 1 1\", \"2 1 2 4\", \"5 5 1 1\", \"4 4 4 4\", \"1 1 1 2\", \"1 1 1 3\", \"1 2 1 2\", \"657276544 772661397 705084822 888450280\", \"414333101 226069413 997273309 495622139\", \"242246693 78731970 483090981 265550001\", \"688606352 535518276 574101164 397812691\", \"...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "We often have to copy large volumes of information. Such operation can take up many computer resources. Therefore, in this problem you are advised to...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5 10\\n1 2 0 -1 3\\n3 1 5 -2 0\\n2 5\\n1 3 3 3\\n2 5\\n2 4\\n2 1\\n1 2 1 4\\n2 1\\n2 4\\n1 4 2 1\\n2 2\\n\",\n \"1 4\\n-2\\n1\\n1 1 1 1\\n2 1\\n1 1 1 1\\n1 1 1 1\\n\",\n \"2 5\\n-3 2\\n3 -4\\n1 1 1 2\\n2 1\\n2 1\\n1 2 2 1\\n2 1\\n\",\n \"3 6\\n4 -3 0\\n1 3 -5\\n2 ...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "There's a **\"3 for 2\"** (or **\"2+1\"** if you like) offer on mangoes. For a given quantity and price (per mango), calculate the total cost of the ...
code
{ "ground_truth": "{\"fn_name\": \"mango\", \"inputs\": [[3, 3], [9, 5]], \"outputs\": [[6], [30]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given an array $a$ consisting of $n$ positive integers.\n\nInitially, you have an integer $x = 0$. During one move, you can do one of the fol...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5\\n4 3\\n1 2 1 3\\n10 6\\n8 7 1 8 3 7 5 10 8 9\\n5 10\\n20 100 50 20 100500\\n10 25\\n24 24 24 24 24 24 24 24 24 24\\n8 8\\n1 2 3 4 5 6 7 8\\n\",\n \"1\\n1 1000000000\\n99999999\\n\",\n \"1\\n5 3\\n20 100 50 20 1005002\\n\"\n ],\n \"outputs\": [\n \"6\\n18\\n0\...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Alex decided to go on a touristic trip over the country.\n\nFor simplicity let's assume that the country has $n$ cities and $m$ bidirectional roads c...
code
{ "ground_truth": "{\"inputs\": [\"5 7\\n2 2 8 6 9\\n1 2\\n1 3\\n2 4\\n3 2\\n4 5\\n2 5\\n1 5\\n2\\n\", \"10 12\\n1 7 1 9 3 3 6 30 1 10\\n1 2\\n1 3\\n3 5\\n5 7\\n2 3\\n5 4\\n6 9\\n4 6\\n3 7\\n6 8\\n9 4\\n9 10\\n6\\n\", \"1 0\\n1000000000\\n1\\n\", \"2 1\\n999999999 2\\n1 2\\n2\\n\", \"3 2\\n1 1335 2\\n2 1\\n3 2\\n2\\n...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Pasha is a good student and one of MoJaK's best friends. He always have a problem to think about. Today they had a talk about the following problem.\...
code
{ "ground_truth": "{\"inputs\": [\"5 2 3\\n2 4\\n4 3\\n4 2\\n4 1\\n2 5\\n\", \"3 1 2\\n1 3\\n3 1\\n2 3\\n\", \"30 22 21\\n1 21\\n29 12\\n23 7\\n7 30\\n11 10\\n25 2\\n10 8\\n11 26\\n29 13\\n28 24\\n4 5\\n1 20\\n20 9\\n8 16\\n26 14\\n1 19\\n25 27\\n28 22\\n5 6\\n28 15\\n29 18\\n10 3\\n17 15\\n23 23\\n5 29\\n5 16\\n18 8...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Chef is making Window frames for his new office, for this he has n wooden Logs whose lengths are l1, l2, … ln respectively. Chef Doesn’t want to bre...
code
{ "ground_truth": "{\"inputs\": [[\"2\", \"4\", \"1 2 1 2\", \"8\", \"1 2 1 3 4 1 5 6\"]], \"outputs\": [[\"1\", \"0\"]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: I.O.U.\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nImagine that there is a group of three friends: A,...
code
{ "ground_truth": "{\"inputs\": [\"5 3\\n1 2 10\\n2 3 1\\n2 4 1\", \"3 0\", \"4 3\\n1 2 1\\n2 3 1\\n3 1 1\", \"20 28\\n1 5 6\\n1 12 7\\n1 13 4\\n1 15 7\\n1 20 3\\n2 4 1\\n2 15 6\\n3 5 3\\n3 8 10\\n3 13 8\\n3 20 6\\n4 6 10\\n4 12 8\\n4 19 5\\n5 17 8\\n6 9 9\\n6 16 2\\n6 19 9\\n7 14 6\\n8 9 3\\n8 16 10\\n9 11 7\\n9 17 ...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Polycarp is very careful. He even types numeric sequences carefully, unlike his classmates. If he sees a sequence without a space after the comma, wi...
code
{ "ground_truth": "{\"inputs\": [\"1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1\\n\", \",...,,...,,...,,...,,...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "The stardate is 1983, and Princess Heidi is getting better at detecting the Death Stars. This time, two Rebel spies have yet again given Heidi two ma...
code
{ "ground_truth": "{\n \"inputs\": [\n \"10 5\\nsomer\\nandom\\nnoise\\nmayth\\neforc\\nebewi\\nthyou\\nhctwo\\nagain\\nnoise\\nsomermayth\\nandomeforc\\nnoiseebewi\\nagainthyou\\nnoisehctwo\\n\",\n \"1 1\\ng\\ng\\n\"\n ],\n \"outputs\": [\n \"4 6\\n\",\n \"1 1\\n\"\n ]\n}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: \n\nCopy All: You can copy al...
code
{ "ground_truth": "{\"fn_name\": \"minSteps\", \"inputs\": [[3]], \"outputs\": [3]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Devu and his brother love each other a lot. As they are super geeks, they only like to play with arrays. They are given two arrays a and b by their f...
code
{ "ground_truth": "{\n \"inputs\": [\n \"2 2\\n2 3\\n3 5\\n\",\n \"3 2\\n1 2 3\\n3 4\\n\",\n \"3 2\\n4 5 6\\n1 2\\n\",\n \"10 10\\n23 100 38 38 73 54 59 69 44 86\\n100 100 100 100 100 100 100 100 100 100\\n\",\n \"1 1\\n401114\\n998223974\\n\",\n \"1 1\\n100\\n4\\n\",\n \"1 1\\n100\\n183299\\n\"...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Henry and Derek are waiting on a room, eager to join the Snackdown 2016 Qualifier Round. They decide to pass the time by playing a game. \nIn this g...
code
{ "ground_truth": "{\"inputs\": [[\"2\", \"2\", \"3 4\", \"3\", \"1 3 5\"]], \"outputs\": [[\"Henry\", \"Derek\"]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "We all know that passwords are not very secure unless users are disciplined enough to use passwords that are difficult to guess. But most users are n...
code
{ "ground_truth": "{\"inputs\": [\"2\\n123456 0.6666\\nqwerty 0.3334\\n\", \"3\\nqwerty 0.5432\\n123456 0.3334\\npassword 0.1234\\n\"], \"outputs\": [\"1.3334\\n\", \"1.5802\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Lo and Behold! For you may be surprised by what our chief chef Noodle has in mind for this season! Today, Noodle announced one of his most extra-ordi...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2\\n3\", \"2\\n2\\n5\", \"2\\n3\\n4\", \"2\\n3\\n3\", \"2\\n4\\n3\", \"2\\n4\\n4\", \"2\\n2\\n10\", \"2\\n4\\n2\", \"2\\n4\\n8\", \"2\\n3\\n11\", \"2\\n4\\n11\", \"2\\n8\\n9\", \"2\\n2\\n11\", \"2\\n2\\n2\", \"2\\n3\\n2\", \"2\\n4\\n21\", \"2\\n16\\n9\", \"2\\n7\\n3\", \"2\\n9\\...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Takahashi likes the sound when he buys a drink from a vending machine.\nThat sound can be heard by spending A yen (the currency of Japan) each time.\...
code
{ "ground_truth": "{\"inputs\": [\"2 11 4\\n\", \"3 9 5\\n\", \"100 1 10\\n\", \"51 90 3\\n\", \"1 100 99\\n\", \"5 49 10\\n\", \"8 64 9\\n\", \"100 100 100\\n\", \"4 99 23\\n\", \"11 66 5\\n\", \"3 86 28\\n\", \"2 1 100\\n\", \"1 100 100\\n\"], \"outputs\": [\"4\\n\", \"3\\n\", \"0\\n\", \"1\\n\", \"99\\n\", \"9\\n\...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "In this kata you are given an array to sort but you're expected to start sorting from a specific position of the array (in ascending order) and optio...
code
{ "ground_truth": "{\"fn_name\": \"sect_sort\", \"inputs\": [[[1, 2, 5, 7, 4, 6, 3, 9, 8], 2], [[1, 2, 5, 7, 4, 6, 3, 9, 8], 8], [[9, 7, 4, 2, 5, 3, 1, 8, 6], 2, 5], [[1, 2, 5, 7, 4, 6, 3, 9, 8], 8, 3], [[], 0]], \"outputs\": [[[1, 2, 3, 4, 5, 6, 7, 8, 9]], [[1, 2, 5, 7, 4, 6, 3, 9, 8]], [[9, 7, 1, 2, 3, 4, 5, 8, 6]]...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Consider a table of size $n \\times m$, initially fully white. Rows are numbered $1$ through $n$ from top to bottom, columns $1$ through $m$ from lef...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5 6\\nWWBBBW\\nWWBBBW\\nWWBBBW\\nWWWWWW\\nWWWWWW\\n\",\n \"3 3\\nWWW\\nBWW\\nWWW\\n\",\n \"5 5\\nWWWWW\\nWBBBW\\nWBBBW\\nWBBBW\\nWWWWW\\n\",\n \"3 3\\nBBB\\nBBB\\nBBB\\n\",\n \"3 3\\nWBW\\nWWW\\nWWW\\n\",\n \"3 3\\nWWB\\nWWW\\nWWW\\n\",\n \"3 3\\nWWW\\nWB...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "A prisoner wants to escape from a prison. The prison is represented by the interior of the convex polygon with vertices P_1, P_2, P_3, …, P_{n+1}, P_...
code
{ "ground_truth": "{\"inputs\": [\"3\\n0 0\\n2 2\\n2 4\\n0 6\\n\", \"7\\n0 0\\n412 36\\n745 180\\n747 184\\n746 268\\n611 359\\n213 441\\n0 450\\n\", \"4\\n0 0\\n7 3\\n7 4\\n5 7\\n0 8\\n\", \"5\\n0 0\\n562 248\\n460 610\\n281 702\\n206 723\\n0 746\\n\", \"2\\n0 0\\n223 464\\n0 749\\n\", \"9\\n0 0\\n934 1\\n934 501\\n...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Petya and Spiders\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nLittle Petya loves training spiders. Petya ...
code
{ "ground_truth": "{\"inputs\": [\"1 1\", \"2 3\", \"4 1\", \"4 2\", \"4 3\", \"4 4\", \"1 40\", \"1 1\", \"1 2\", \"1 3\", \"1 4\", \"1 5\", \"1 6\", \"1 7\", \"1 8\", \"1 9\", \"1 10\", \"1 11\", \"1 12\", \"1 13\", \"1 14\", \"1 15\", \"1 16\", \"1 17\", \"1 18\", \"1 19\", \"1 20\", \"1 21\", \"1 22\", \"1 23\", ...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Yaroslav and Sequence\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYaroslav has an array, consisting o...
code
{ "ground_truth": "{\"inputs\": [\"2\\n50 50 50\", \"2\\n-1 -100 -1\", \"3\\n-959 -542 -669 -513 160\", \"4\\n717 473 344 -51 -548 703 -869\", \"5\\n270 -181 957 -509 -6 937 -175 434 -625\", \"6\\n-403 901 -847 -708 -624 413 -293 709 886 445 716\", \"7\\n-236 533 869 903 655 -714 27 890 -311 800 307 -682 665\", \"8\\...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Your friend recently gave you some slimes for your birthday. You have n slimes all initially with value 1.\n\nYou are going to play a game with these...
code
{ "ground_truth": "{\n \"inputs\": [\n \"1\\n\",\n \"2\\n\",\n \"3\\n\",\n \"8\\n\",\n \"100000\\n\",\n \"12345\\n\",\n \"32\\n\",\n \"70958\\n\",\n \"97593\\n\",\n \"91706\\n\",\n \"85371\\n\",\n \"97205\\n\",\n \"34768\\n\",\n \"12705\\n\",\n \"30151\\n\",\n \"4974\\...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Bear and Three Balls\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nLimak is a little polar bear. He has...
code
{ "ground_truth": "{\"inputs\": [\"4\\n18 55 16 17\", \"6\\n40 41 43 44 44 44\", \"8\\n5 972 3 4 1 4 970 971\", \"3\\n959 747 656\", \"4\\n1 2 2 3\", \"50\\n998 30 384 289 505 340 872 223 663 31 929 625 864 699 735 589 676 399 745 635 963 381 75 97 324 612 597 797 103 382 25 894 219 458 337 572 201 355 294 275 278 31...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "There are 3N participants in AtCoder Group Contest. The strength of the i-th participant is represented by an integer a_i. They will form N teams, ea...
code
{ "ground_truth": "{\"inputs\": [\"2\\n5 2 8 5 1 5\", \"10\\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given a positive integer n. Let's build a graph on vertices 1, 2, ..., n in such a way that there is an edge between vertices u and v if and ...
code
{ "ground_truth": "{\"inputs\": [\"6\\n\", \"10\\n\", \"999\\n\", \"7725098\\n\", \"3\\n\", \"9140218\\n\", \"9999999\\n\", \"1\\n\", \"2\\n\", \"7003584\\n\", \"7\\n\", \"9\\n\", \"8884001\\n\", \"9670442\\n\", \"9999\\n\", \"100\\n\", \"7767750\\n\", \"8\\n\", \"5\\n\", \"99999\\n\", \"100000\\n\", \"999999\\n\", \...
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Testing Pants for Sadness\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nThe average miner Vaganych took ref...
code
{ "ground_truth": "{\"inputs\": [\"2\\n1 1\", \"2\\n2 2\", \"1\\n10\", \"3\\n2 4 1\", \"4\\n5 5 3 1\", \"2\\n1000000000 1000000000\", \"10\\n5 7 8 1 10 3 6 4 10 6\", \"100\\n5 7 5 3 5 4 6 5 3 6 4 6 6 2 1 9 6 5 3 8 4 10 1 9 1 3 7 6 5 5 8 8 7 7 8 9 2 10 3 5 4 2 6 10 2 6 9 6 1 9 3 7 7 8 3 9 9 5 10 10 3 10 7 8 3 9 8 3 2 ...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Seryozha conducts a course dedicated to building a map of heights of Stepanovo recreation center. He laid a rectangle grid of size $n \\times m$ cell...
code
{ "ground_truth": "{\"inputs\": [\"3 4 2 1\\n1 2 3 59\\n\", \"3 4 3 3\\n4 4 0 5\\n\", \"1 1 1 1\\n1 3 4 7\\n\", \"1 10 1 4\\n11 12 17 29\\n\", \"3 3 1 2\\n23 8 4 37\\n\", \"10 10 5 5\\n478741118 470168785 859734009 999999937\\n\", \"10 15 7 3\\n680853366 753941356 522057812 999999937\\n\", \"3000 10 1 6\\n709202316 2...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given two strings $a$ and $b$ consisting of lowercase English letters, both of length $n$. The characters of both strings have indices from $...
code
{ "ground_truth": "{\"inputs\": [\"7\\nabacaba\\nbacabaa\\n\", \"5\\nzcabd\\ndbacz\\n\", \"1\\na\\nb\\n\", \"5\\nahmad\\nyogaa\\n\", \"1\\na\\nb\\n\", \"5\\nahmad\\nyogaa\\n\", \"5\\nahmad\\nyngaa\\n\", \"7\\nabacaba\\naabacab\\n\", \"5\\nzcabd\\nebacz\\n\", \"7\\nabacaaa\\naabacab\\n\", \"5\\nzcabd\\neaacz\\n\", \"5...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "In this kata, your task is to create a function that takes a single list as an argument and returns a flattened list. The input list will have a maxi...
code
{ "ground_truth": "{\"fn_name\": \"flatten_me\", \"inputs\": [[[1, [2, 3], 4]], [[[\"a\", \"b\"], \"c\", [\"d\"]]], [[\"!\", \"?\"]]], \"outputs\": [[[1, 2, 3, 4]], [[\"a\", \"b\", \"c\", \"d\"]], [[\"!\", \"?\"]]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "You are given a string of lower case characters. You have to find the character with the most frequency. In case there are 2 such characters, conside...
code
{ "ground_truth": "{\"inputs\": [\"1\\naba\", \"1\\nabb\", \"1\\nbbb\", \"1\\nbbc\", \"1\\nbbd\", \"1\\ncbd\", \"1\\nbcd\", \"1\\ndcb\", \"1\\ncdb\", \"1\\nceb\", \"1\\nbec\", \"1\\ncbe\", \"1\\ndbc\", \"1\\ncbc\", \"1\\ndcc\", \"1\\nadc\", \"1\\ndda\", \"1\\ndc`\", \"1\\n`cd\", \"1\\n`cc\", \"1\\ncba\", \"1\\nabc\",...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of Mysterious Light.\n\nThree mirrors of length N are set so...
code
{ "ground_truth": "{\"inputs\": [\"5 2\", \"5 4\", \"7 4\", \"6 1\", \"9 4\", \"6 3\", \"14 4\", \"8 1\", \"28 4\", \"15 2\", \"28 3\", \"19 2\", \"32 2\", \"29 5\", \"26 3\", \"46 1\", \"46 2\", \"81 3\", \"85 3\", \"10 3\", \"14 1\", \"2 1\", \"11 4\", \"4 2\", \"18 4\", \"28 6\", \"28 7\", \"33 2\", \"60 2\", \"16...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "A Martian boy is named s — he has got this name quite recently from his parents for his coming of age birthday. Now he enjoys looking for his name ev...
code
{ "ground_truth": "{\"inputs\": [\"aba\\nbaobababbah\\n\", \"mars\\nsunvenusearthmarsjupitersaturnuranusneptune\\n\", \"rry\\nsorrymercuryismissedabove\\n\", \"a\\naaaaaaaaaaaaaa\\n\", \"abcaba\\nabcabaabcabaabcabaabcaba\\n\", \"lol\\nlol\\n\", \"aaaaaaaaaaaa\\naaaaaa\\n\", \"a\\na\\n\", \"a\\na\\n\", \"a\\naaaaaaaaa...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Vova had a pretty weird sleeping schedule. There are h hours in a day. Vova will sleep exactly n times. The i-th time he will sleep exactly after a_i...
code
{ "ground_truth": "{\"inputs\": [\"7 24 21 23\\n16 17 14 20 20 11 22\\n\", \"62 51 43 50\\n40 36 14 6 44 12 23 23 50 37 15 14 21 16 6 9 40 21 20 11 21 6 34 50 40 43 44 30 12 41 28 39 31 34 12 32 9 33 45 9 13 22 48 24 11 5 24 21 46 26 14 47 10 18 42 2 40 30 46 47 22 3\\n\", \"39 14 6 10\\n1 10 13 7 6 11 1 2 2 11 6 3 1...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "IIIT Hyderabad is planning to install Wifi Routers in the campus to make it fully Wifi-enabled. \nNow each Wifi Router can only transmit data to a us...
code
{ "ground_truth": "{\"inputs\": [\"8\\n1 2\\n1 1\\n0 0\\n0 2\\n5 5\\n1 1\\n1 3\\n2 2\\n3 1\\n3 3\\n0 0\\n0 1\\n0 2\\n0 3\\n0 4\\n1 11\\n3 1\\n0 0\\n0 1\\n0 2\\n0 3\\n0 4\\n1 4\\n2 4\\n3 4\\n4 4\\n5 0\\n5 4\\n9 11\\n0 0\\n0 5\\n0 10\\n3 3\\n4 8\\n5 7\\n7 7\\n9 0\\n9 9\\n0 1\\n0 4\\n2 4\\n4 1\\n4 6\\n4 7\\n5 0\\n6 7\\n...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Alice, Bob, and Clara are eating at a new restaurant today. They’re having trouble deciding what to order, so Alice proposes that they each pick some...
code
{ "ground_truth": "{\"inputs\": [\"6 2 2 2\\n\", \"1 1 1 1\\n\"], \"outputs\": [\"possible\\n\", \"impossible\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Furik and Rubik love playing computer games. Furik has recently found a new game that greatly interested Rubik. The game consists of n parts and to c...
code
{ "ground_truth": "{\"inputs\": [\"1\\n1\\n0\\n\", \"5\\n2 2 1 1 3\\n1 5\\n2 5 1\\n2 5 4\\n1 5\\n0\\n\", \"25\\n3 3 1 1 1 2 2 2 3 1 2 3 2 1 2 2 2 3 2 1 2 3 2 1 1\\n0\\n0\\n0\\n0\\n0\\n0\\n1 12\\n0\\n1 19\\n0\\n2 12 21\\n2 3 10\\n0\\n1 21\\n0\\n1 9\\n1 3\\n0\\n0\\n2 3 2\\n0\\n1 12\\n0\\n1 3\\n2 21 9\\n\", \"21\\n1 2 1...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "This is an interactive problem. You have to use flush operation right after printing each line. For example, in C++ you should use function fflush(st...
code
{ "ground_truth": "{\"inputs\": [\"2\\n2\\n\\u00a0\\n>\\n\\u00a0\\n3\\n\\u00a0\\n=\\n\\u00a0\\n=\\n\\u00a0\", \"1\\n1\\n1000000000\\n\", \"1\\n1\\n1\\n\", \"1\\n10\\n1 2 1 2 1 3 1 3 1 2\\n\", \"1\\n4\\n1 1 2 2\\n\", \"2\\n2\\n1 2\\n2\\n2 1\\n\", \"6\\n3\\n1 2 3\\n3\\n1 3 2\\n3\\n2 1 3\\n3\\n2 3 1\\n3\\n3 1 2\\n3\\...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Pentagonal numbers are figurate numbers which can be calculated using the formula pn = (3n2 - n) / 2 (always integer). You are given n; calculate n-t...
code
{ "ground_truth": "{\"inputs\": [\"2\\n\", \"5\\n\", \"3\\n\", \"6\\n\"], \"outputs\": [\"5\\n\", \"35\\n\", \"15\\n\", \"66\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Let's assume that we are given a matrix b of size x × y, let's determine the operation of mirroring matrix b. The mirroring of matrix b is a 2x × y m...
code
{ "ground_truth": "{\"inputs\": [\"3 3\\n0 0 0\\n0 0 0\\n0 0 0\\n\", \"4 3\\n0 0 1\\n1 1 0\\n1 1 0\\n0 0 1\\n\", \"8 1\\n0\\n1\\n1\\n0\\n0\\n1\\n1\\n0\\n\", \"6 3\\n1 1 1\\n0 0 0\\n1 1 1\\n1 1 1\\n0 0 0\\n1 1 1\\n\", \"1 100\\n0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "The chef was busy in solving algebra, he found some interesting results, that there are many numbers which can be formed by the sum of the factorial ...
code
{ "ground_truth": "{\"inputs\": [\"1\\n0\\n\"], \"outputs\": [\"0\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "We need to write some code to return the original price of a product, the return type must be of type decimal and the number must be rounded to two d...
code
{ "ground_truth": "{\"fn_name\": \"discover_original_price\", \"inputs\": [[75, 25], [25, 75], [75.75, 25], [373.85, 11.2], [458.2, 17.13]], \"outputs\": [[100], [100], [101], [421], [552.91]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codeforces
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Title: Aramic script\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nIn Aramic language words can only represent...
code
{ "ground_truth": "{\"inputs\": [\"5\\na aa aaa ab abb\", \"3\\namer arem mrea\", \"10\\nbda bbb cda dca dda dcb bcd dcb ada ddd\", \"2\\nfhjlqs aceginpr\", \"2\\nbcdfghimn efghijlmo\"], \"outputs\": [\"2\", \"1\", \"6\", \"2\", \"2\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "For Turbo C++ Users : Read the following document before attempting the question : \n\nProblem Description\n\nN-Boy is very eccentric when it comes ...
code
{ "ground_truth": "{\"inputs\": [\"3\\nabba\\nabcdefghijklmnopqrstuvwxyz\\nqwerty\", \"3\\nabba\\nfbcdeaghijklmnopqrstuvwxyz\\nqwerty\", \"3\\nabba\\ngbcdeaghijklmnopqrstuvwxyz\\nqwerty\", \"3\\naaba\\ngbcdeaghijklmnopqrstuvwxyz\\nqwerty\", \"3\\nabab\\nfbcdeaynijklmhopqrstuvwxgz\\newqrty\", \"3\\naaba\\ngbcdeaghijkl...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Saurabh and Pranav play the popular game of Hungry Birds on windows and android phones respectively.\n\nThe game goal is to destroy birds in the Hung...
code
{ "ground_truth": "{\"inputs\": [\"9\\n60129 6\\n44235 10\\n13131 8\\n2012 2\\n27536 4\\n38950 6\\n39080 2\\n13892 3\\n48709 0\\n1\\n23853\\n\", \"10\\n3466127 4\\n3477072 1\\n9690039 9\\n9885165 6\\n2559197 4\\n3448456 3\\n9169542 1\\n6915866 2\\n1702896 10\\n8934261 5\\n6\\n3041416 5811699 5920083 8250213 8694306 8...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Given an infix expression in the form of string str. Convert this infix expression to postfix expression.\n\tInfix expression: The expression of the ...
code
{ "ground_truth": "{\"fn_name\": \"InfixtoPostfix\", \"inputs\": [[\"a+b\"], [\"a^b+c\"], [\"a+b/c\"], [\"a\"], [\"a+b+c+d+e\"], [\"a^b^c^d\"], [\"(a)\"], [\"a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z\"]], \"outputs\": [[\"ab+\"], [\"ab^c+\"], [\"abc/+\"], [\"a\"], [\"ab+c+d+e+\"], [\"ab^c^d^\"], [\"a\"], [\...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Astronaut Natasha arrived on Mars. She knows that the Martians are very poor aliens. To ensure a better life for the Mars citizens, their emperor dec...
code
{ "ground_truth": "{\"inputs\": [\"3 10\\n10 20 30\\n\", \"2 8\\n12 20\\n\", \"2 300\\n3 10\\n\", \"60 30\\n10 30 45 15 25 60 10 40 35 25 5 40 35 40 15 5 15 35 10 60 25 15 60 10 30 10 5 25 10 15 60 20 30 5 50 50 40 20 55 40 35 15 15 10 60 40 50 50 30 15 25 45 35 40 15 5 5 20 60 45\\n\", \"1 8\\n6\\n\", \"30 30\\n11 2...
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Polycarp has built his own web service. Being a modern web service it includes login feature. And that always implies password security problems.\n\n...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5\\nabacaba\\nzyxaabcaabkjh\\nonetwothree\\nthreetwoone\\none\\nzzonneyy\\none\\nnone\\ntwenty\\nten\\n\",\n \"2\\nabacaba\\nzyxaabcaabkjh\\nonetwothree\\nthreetwoone\\n\",\n \"1\\na\\nabcd\\n\",\n \"1\\ndaaaaaaaa\\nbbbbbbbbb\\n\"\n ],\n \"outputs\": [\n \"YE...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Samu's Birthday is near so she had started planning a party for all of her friends. Being a kind and caring girl she calls each of her friend and ask...
code
{ "ground_truth": "{\"inputs\": [\"1\\n2 2\\n10 \\n01\\n\\nSAMPLE\", \"1\\n2 2\\n10 \\n01\\n\\nELPMAS\", \"1\\n1 2\\n10 \\n01\\n\\nTAMPME\", \"1\\n2 2\\n10 \\n01\\n\\nELQMAS\", \"1\\n2 2\\n10 \\n01\\n\\nTAMPLE\", \"1\\n2 2\\n10 \\n01\\n\\nELAMPS\", \"1\\n2 2\\n10 \\n01\\n\\nTAMPME\", \"1\\n2 2\\n10 \\n01\\n\\nELBMPS\...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "We need a function (for commercial purposes) that may perform integer partitions with some constraints.\nThe function should select how many elements...
code
{ "ground_truth": "{\"fn_name\": \"part_const\", \"inputs\": [[10, 3, 2], [10, 3, 0], [10, 4, 1], [10, 5, 3], [15, 5, 3], [15, 5, 4], [15, 3, 3]], \"outputs\": [[4], [8], [2], [4], [15], [19], [13]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "*This kata is inspired by [Project Euler Problem #387](https://projecteuler.net/problem=387)*\n\n---\n\nA [Harshad number](https://en.wikipedia.org/w...
code
{ "ground_truth": "{\"fn_name\": \"rthn_between\", \"inputs\": [[0, 20], [30, 100], [90, 200], [200, 210], [1000, 2000], [2200, 2300], [9000002182976, 9000195371842]], \"outputs\": [[[10, 12, 18, 20]], [[30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 100]], [[90, 100, 102, 108, 120, 126, 180, 200]], ...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Alien Mr.X left a message for Earthlings to commemorate the arrival of the planet on Earth. Mr.X chose \"Tronco Ruins\", which is famous as an ancien...
code
{ "ground_truth": "{\"inputs\": [\"5 4\\n0 0 0 0 0\\n0 1 1 0 0\\n0 0 1 0 1\\n1 0 0 0 1\\n5 4\\n0 0 0 0 0\\n0 1 1 0 0\\n0 0 0 0 1\\n1 0 0 0 1\\n0 0\", \"5 4\\n0 0 0 0 0\\n0 1 1 0 0\\n0 0 1 0 1\\n1 0 0 0 1\\n5 4\\n0 0 0 0 0\\n0 1 0 0 0\\n0 0 0 0 1\\n1 0 0 0 1\\n0 0\", \"5 4\\n0 0 0 0 0\\n0 1 1 0 0\\n0 0 1 0 0\\n1 0 0 0...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "> \"Even a broken clock is right twice a day\"\n\nFor those unfamiliar with the above proverb, the statement refers to a stopped 12 hour clock. The t...
code
{ "ground_truth": "{\"inputs\": [\"2\\n-1 1 1\\n1 2 3\\n\", \"5\\n0 1 10\\n-1 1 3\\n2 1 10\\n-50 1 4\\n5 2 3\\n\", \"1\\n-2 1 1000000\\n\", \"10\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n1 2 1000000\\n\", \"4\\n2 1 1000000\\n2 1 100...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "*Recreation of [Project Euler problem #6](https://projecteuler.net/problem=6)*\n\nFind the difference between the sum of the squares of the first `n`...
code
{ "ground_truth": "{\"fn_name\": \"difference_of_squares\", \"inputs\": [[5], [10], [100]], \"outputs\": [[170], [2640], [25164150]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
apps
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Consider all binary strings of length $m$ ($1 \\le m \\le 60$). A binary string is a string that consists of the characters 0 and 1 only. For example...
code
{ "ground_truth": "{\n \"inputs\": [\n \"5\\n3 3\\n010\\n001\\n111\\n4 3\\n000\\n111\\n100\\n011\\n1 1\\n1\\n1 1\\n0\\n3 2\\n00\\n01\\n10\\n\"\n ],\n \"outputs\": [\n \"100\\n010\\n0\\n1\\n11\\n\"\n ]\n}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "An artist who wanted to create an installation where his works appeared to be floating in midair has cast a large cube of clear acrylic to serve as a...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1.0 0.0 1.4\\n-1.0 0.0 -1.4\\n0.0 1.0 -0.2\\n\", \"5\\n1.4 1.0 0.0\\n-0.4 -1.0 0.0\\n-0.1 -0.25 -0.5\\n-1.2 0.0 0.9\\n0.2 0.5 0.5\\n\", \"8\\n435.249 -494.71 -539.356\\n455.823 -507.454 -539.257\\n423.394 -520.682 -538.858\\n446.507 -501.953 -539.37\\n434.266 -503.664 -560.631\\...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Kuldeep and his girlfriend Cristie are both huge math nerds, so for their first anniversary he decides to take her out on a romantic getaway to Mathl...
code
{ "ground_truth": "{\"inputs\": [\"100\\n384 10384\\n887 10887\\n778 10778\\n916 10916\\n794 10794\\n336 10336\\n387 10387\\n493 10493\\n650 10650\\n422 10422\\n363 10363\\n28 10028\\n691 10691\\n60 10060\\n764 10764\\n927 10927\\n541 10541\\n427 10427\\n173 10173\\n737 10737\\n212 10212\\n369 10369\\n568 10568\\n430...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "I love Fibonacci numbers in general, but I must admit I love some more than others. \n\nI would like for you to write me a function that when given a...
code
{ "ground_truth": "{\"fn_name\": \"nth_fib\", \"inputs\": [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], [25]], \"outputs\": [[0], [1], [1], [2], [3], [5], [8], [13], [21], [34], [55], [89], [144], [233], [377], [610], [987], [15...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Alice and Brown loves games. Today, they will play the following game.\n\nIn this game, there are two piles initially consisting of X and Y stones, r...
code
{ "ground_truth": "{\"inputs\": [\"0 0\", \"5 0\", \"2 1\", \"4 8\", \"1 0\", \"6 0\", \"2 0\", \"1 8\", \"6 -1\", \"4 0\", \"1 5\", \"7 -1\", \"3 0\", \"1 10\", \"7 -2\", \"3 -1\", \"0 10\", \"13 -1\", \"4 -1\", \"-1 10\", \"18 -1\", \"-1 14\", \"9 -1\", \"-1 7\", \"14 -1\", \"0 7\", \"14 0\", \"-1 12\", \"22 0\", \...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Everybody know that you passed to much time awake during night time...\n\nYour task here is to define how much coffee you need to stay awake after yo...
code
{ "ground_truth": "{\"fn_name\": \"how_much_coffee\", \"inputs\": [[[]], [[\"cw\"]], [[\"CW\"]], [[\"cw\", \"CAT\"]], [[\"cw\", \"CAT\", \"DOG\"]], [[\"cw\", \"CAT\", \"cw=others\"]]], \"outputs\": [[0], [1], [2], [3], [\"You need extra sleep\"], [3]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "John Doe wants to transport his possessions from one bank of Lake Michigan to the other. His possessions consist of $W$ wolves, $S$ sheep, and $C$ ca...
code
{ "ground_truth": "{\"inputs\": [\"1 1 1 1\\n\", \"2 2 0 1\\n\", \"1 1 1 2\\n\", \"10 11 12 10\\n\", \"10 11 12 11\\n\"], \"outputs\": [\"YES\\n\", \"NO\\n\", \"YES\\n\", \"NO\\n\", \"YES\\n\"]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Given an integer n, return the number of trailing zeroes in n!.\n\nExample 1:\n\n\nInput: 3\nOutput: 0\nExplanation: 3! = 6, no trailing zero.\n\nExa...
code
{ "ground_truth": "{\"fn_name\": \"trailingZeroes\", \"inputs\": [[10], [20], [25], [50], [100], [1], [5], [0], [4], [14], [10000], [50000]], \"outputs\": [[2], [4], [6], [12], [24], [0], [1], [0], [0], [2], [2499], [12499]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "# Task\n\nChristmas is coming, and your task is to build a custom Christmas tree with the specified characters and the specified height.\n\n# Inputs:...
code
{ "ground_truth": "{\"fn_name\": \"custom_christmas_tree\", \"inputs\": [[\"*@o\", 3], [\"*@o\", 6], [\"1234\", 6], [\"123456789\", 3]], \"outputs\": [[\" *\\n @ o\\n* @ o\\n |\"], [\" *\\n @ o\\n * @ o\\n * @ o *\\n @ o * @ o\\n* @ o * @ o\\n |\\n |\"], [\" 1\\n 2 3\\n 4 1 2\\n 3 4 1 2\...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Imagine there's a big cube consisting of n^3 small cubes. Calculate, how many small cubes are not visible from outside.\n\nFor example, if we have a ...
code
{ "ground_truth": "{\"fn_name\": \"not_visible_cubes\", \"inputs\": [[0], [1], [2], [3], [4], [5], [7], [12], [18], [10002]], \"outputs\": [[0], [0], [0], [1], [8], [27], [125], [1000], [4096], [1000000000000]]}", "style": "rule" }
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Sereja showed an interesting game to his friends. The game goes like that. Initially, there is a table with an empty cup and n water mugs on it. Then...
code
{ "ground_truth": "{\"inputs\": [\"3 4\\n1 1 1\\n\", \"3 4\\n3 1 3\\n\", \"3 4\\n4 4 4\\n\", \"8 15\\n8 10 4 2 10 9 7 6\\n\", \"2 1\\n1 10\\n\", \"4 10\\n6 3 8 7\\n\", \"97 65\\n3 10 2 6 1 4 7 5 10 3 10 4 5 5 1 6 10 7 4 5 3 9 9 8 6 9 2 3 6 8 5 5 5 5 5 3 10 4 1 8 8 9 8 4 1 4 9 3 6 3 1 4 8 3 10 8 6 4 5 4 3 2 2 4 3 6 4 ...
{ "index": 0, "split": "dummy" }
taco
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "Given a string, your task is to reverse the string keeping the spaces intact to their positions.\nExample 1:\nInput:\nS = \"Help others\"\nOutput: sr...
code
{ "ground_truth": "{\"fn_name\": \"reverseWithSpacesIntact\", \"inputs\": [[\"Hello World\"], [\"Test Case\"], [\"123 456\"], [\"Python Code\"], [\"Input String\"], [\" \"], [\"a\"], [\"\"], [\" a\"], [\"a \"]], \"outputs\": [[\"dlroW olleH\"], [\"esaC tseT\"], [\"654 321\"], [\"edoCno htyP\"], [\"gnirt StupnI\"], [\...
{ "index": 0, "split": "dummy" }
codecontests
[ { "content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.", "role": "system" }, { "content": "The main walking trail in Geraldion is absolutely straight, and it passes strictly from the north to the south, it is so long that no one has ever re...
code
{ "ground_truth": "{\"inputs\": [\"3\\n1 1\\n2 2\\n3 3\\n\", \"4\\n1 2\\n3 3\\n4 3\\n6 2\\n\", \"5\\n3 3\\n4 3\\n6 4\\n2 3\\n1 5\\n\", \"5\\n7 2\\n3 5\\n2 4\\n8 1\\n9 5\\n\", \"4\\n66 61\\n715 254\\n610 297\\n665 41\\n\", \"10\\n228 4\\n833 58\\n27 169\\n775 658\\n981 491\\n979 310\\n859 61\\n740 324\\n747 126\\n785 ...
{ "index": 0, "split": "dummy" }