data_source stringclasses 4
values | prompt listlengths 2 2 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
taco | [
{
"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 define a function, $\\mbox{f}$, on a string, $\\boldsymbol{p}$, of length $\\boldsymbol{l}$ as follows:\n\n$f(p)=(p_1\\cdot a^{l-1}+p_2\\cdot a... | code | {
"ground_truth": "{\"inputs\": [\"5 5\\napple\\n1\\n2\\n3\\n4\\n5\\n\", \"6 3\\nabcabc\\n1000\\n2000\\n9500\\n\", \"10 1\\naabbccddaa\\n10000\\n\"], \"outputs\": [\"97\\n101\\n108\\n112\\n112\", \"-1\\n-1\\n-1\", \"-1\"]}",
"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": "Write a program which reads two integers x and y, and prints them in ascending order.\n\nConstraints\n\n* 0 ≤ x, y ≤ 10000\n* the number of datasets ... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n2 2\\n5 3\\n0 0\", \"3 1\\n2 2\\n5 3\\n0 0\", \"3 1\\n2 2\\n9 3\\n0 0\", \"3 1\\n0 2\\n9 3\\n0 0\", \"3 0\\n0 2\\n9 3\\n0 0\", \"3 0\\n0 2\\n15 3\\n0 0\", \"3 0\\n-1 2\\n15 3\\n0 0\", \"3 0\\n-1 2\\n0 3\\n0 0\", \"3 2\\n2 2\\n5 6\\n0 0\", \"3 1\\n2 3\\n9 3\\n0 0\", \"3 0\\n0 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": "You are given string S and T consisting of lowercase English letters.\nDetermine if S equals T after rotation.\nThat is, determine if S equals T afte... | code | {
"ground_truth": "{\"inputs\": [\"kyoto\\ntokyo\\n\", \"abc\\narc\\n\", \"aaaaaaaaaaaaaaab\\naaaaaaaaaaaaaaab\\n\", \"az\\nza\\n\", \"gxgpuamkx\\nkszhkbpph\\n\", \"kinkezplvf\\ninkezplvfk\\n\", \"qmopodotk\\nodotkqmpo\\n\", \"mlvumuarenexcfycebeurgvjyospdhvuyfvtvnrdyluacvrayggwnpnzijdifyervjaoalcg\\nxovldqfzaorahdig... | {
"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": "Consider a set of points A, initially it is empty. There are three types of queries: \n\n 1. Insert a point (x_i, y_i) to A. It is guaranteed that t... | code | {
"ground_truth": "{\"inputs\": [\"6\\n1 1 2\\n3 1 1\\n1 1 1\\n3 2 2\\n2 1 1\\n3 2 4\\n\", \"12\\n1 1 6\\n1 6 1\\n1 5 5\\n1 2 3\\n3 4 4\\n1 3 2\\n3 7 7\\n2 2 3\\n2 6 1\\n3 8 8\\n2 5 5\\n3 1 1\\n\", \"1\\n3 100 99\\n\", \"1\\n3 000 99\\n\", \"12\\n1 1 2\\n1 6 1\\n1 5 5\\n1 2 3\\n3 4 4\\n1 3 2\\n3 7 7\\n2 2 3\\n2 6 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": "During the \"Russian Code Cup\" programming competition, the testing system stores all sent solutions for each participant. We know that many partici... | code | {
"ground_truth": "{\"inputs\": [\"2\\n0 1\\n1 1\\n\", \"4\\n0 1\\n1 2\\n1 1\\n0 2\\n\", \"4\\n0 1\\n1 1\\n0 1\\n0 2\\n\", \"5\\n0 1\\n1 1\\n2 1\\n0 1\\n4 1\\n\", \"3\\n0 1\\n0 1\\n2 1\\n\", \"4\\n0 1\\n0 2\\n1 1\\n1 2\\n\", \"6\\n0 1\\n1 1\\n2 1\\n3 1\\n4 1\\n2 1\\n\", \"7\\n0 2\\n0 3\\n0 2\\n0 1\\n0 10\\n1 10\\n0 5... | {
"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 n cows playing poker at a table. For the current betting phase, each player's status is either \"ALLIN\", \"IN\", or \"FOLDED\", and does n... | code | {
"ground_truth": "{\"inputs\": [\"3\\nAFI\\n\", \"6\\nAFFAAA\\n\", \"2\\nFF\\n\", \"5\\nIIIIF\\n\", \"5\\nFAFFF\\n\", \"2\\nFA\\n\", \"3\\nAAA\\n\", \"5\\nFAIAF\\n\", \"5\\nAIFFF\\n\", \"3\\nFFF\\n\", \"3\\nFIF\\n\", \"3\\nIII\\n\", \"5\\nFAAII\\n\", \"2\\nIF\\n\", \"8\\nAFFFFIAF\\n\", \"5\\nIIIII\\n\", \"3\\nIAA\\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": "Old MacDonald has a farm and a large potato field, (1010 + 1) × (1010 + 1) square meters in size. The field is divided into square garden beds, each ... | code | {
"ground_truth": "{\"inputs\": [\"7\\nR 10\\nD 2\\nL 7\\nU 9\\nD 2\\nR 3\\nD 10\\n\", \"5\\nR 8\\nU 9\\nL 9\\nD 8\\nL 2\\n\", \"12\\nL 3\\nD 4\\nR 4\\nU 3\\nD 2\\nR 3\\nU 3\\nL 2\\nR 5\\nU 4\\nL 6\\nD 3\\n\", \"1\\nL 100500\\n\", \"10\\nU 369960\\nR 298468\\nL 963241\\nD 948752\\nR 912514\\nD 3082\\nL 111173\\nD 658... | {
"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: What is for dinner?\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nIn one little known, but very beautiful c... | code | {
"ground_truth": "{\"inputs\": [\"4 3 18\\n2 3\\n1 2\\n3 6\\n2 3\", \"2 2 13\\n1 13\\n2 12\", \"5 4 8\\n4 6\\n4 5\\n1 3\\n2 0\\n3 3\", \"1 1 0\\n1 3\", \"7 1 30\\n1 8\\n1 15\\n1 5\\n1 17\\n1 9\\n1 16\\n1 16\", \"4 2 8\\n1 9\\n1 10\\n1 4\\n2 6\", \"10 4 14\\n2 6\\n1 5\\n2 8\\n2 6\\n2 5\\n4 1\\n4 0\\n2 4\\n3 4\\n1 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": "Polycarp's workday lasts exactly $n$ minutes. He loves chocolate bars and can eat one bar in one minute. Today Polycarp has $k$ bars at the beginning... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n010\\n\", \"8 3\\n01010110\\n\", \"9 5\\n001100110\\n\", \"2 2\\n00\\n\", \"3 2\\n010\\n\", \"3 2\\n000\\n\", \"3 3\\n000\\n\", \"4 2\\n0000\\n\", \"4 2\\n0100\\n\", \"4 2\\n0010\\n\", \"4 2\\n0110\\n\", \"4 3\\n0000\\n\", \"4 3\\n0010\\n\", \"4 3\\n0100\\n\", \"4 3\\n0110\\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": "You are planning to build housing on a street. There are n spots available on the street on which you can build a house. The spots are labeled from 1... | code | {
"ground_truth": "{\"inputs\": [\"20 50 20\\n1 11 24 44\\n14 14 33 24\\n5 14 20 23\\n1 11 19 33\\n4 9 37 7\\n4 18 7 10\\n4 12 20 58\\n6 18 48 36\\n1 17 49 13\\n15 17 49 3\\n9 20 3 47\\n16 20 34 4\\n1 11 19 26\\n4 17 15 23\\n5 9 35 58\\n4 4 47 33\\n8 20 13 22\\n3 9 11 27\\n2 11 14 8\\n3 10 18 15\\n\", \"50 20 20\\n17... | {
"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 define a grid to be a set of tiles with 2 rows and 13 columns. Each tile has an English letter written in it. The letters don't have to be uniq... | code | {
"ground_truth": "{\"inputs\": [\"BUVTYZFQSNRIWOXXGJLKACPEMDH\\n\", \"ABCDEFGHIJKLMNOPQRSGTUVWXYZ\\n\", \"MKBGVNDJRAWUEHFSYLIZCOPTXKQ\\n\", \"ABACDEFGHIJKLMNOPQRSTUVWXYZ\\n\", \"BACDEFGHIJKLMNOPQRSTUVWXYZA\\n\", \"BADSLHIYGMZJQKTCOPRVUXFWENN\\n\", \"HVDEBKMJTLKQORNWCZSGXYIPUAF\\n\", \"UNGHFQRCIPBZTEOAYJXLDMSKNWV\\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: Borya's Diagnosis\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nIt seems that Borya is seriously sick. ... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2 2\\n1 2\\n2 2\", \"2\\n10 1\\n6 5\", \"3\\n6 10\\n3 3\\n8 2\", \"4\\n4 8\\n10 10\\n4 2\\n8 2\", \"5\\n7 1\\n5 1\\n6 1\\n1 6\\n6 8\", \"6\\n1 3\\n2 5\\n4 7\\n7 5\\n6 8\\n8 8\", \"10\\n4 10\\n8 7\\n6 5\\n2 1\\n2 3\\n8 8\\n2 4\\n2 2\\n6 7\\n7 9\", \"1\\n1 1\", \"1\\n1000 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": "Let's define a function f(x) (x is a positive integer) as follows: write all digits of the decimal representation of x backwards, then get rid of the... | code | {
"ground_truth": "{\"inputs\": [\"5\\n4\\n37\\n998244353\\n1000000007\\n12345678901337426966631415\\n\", \"1\\n10000000\\n\", \"1\\n1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\n\", \"1\\n999999999999999999999999999999999999999999999999999999999999999999999999... | {
"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 chocolate bar has a rectangular shape and consists of n × m slices. In other words, a bar consists of n rows with m slices of chocolate in each row... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3 3 4\\n4 4 7\\n\"], \"outputs\": [\"Yes\\nNo\\n\"]}",
"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: Marvolo Gaunt's Ring\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nProfessor Dumbledore is helping Harr... | code | {
"ground_truth": "{\"inputs\": [\"5 1 2 3\\n1 2 3 4 5\", \"5 1 2 -3\\n-1 -2 -3 -4 -5\", \"5 886327859 82309257 -68295239\\n-731225382 354766539 -48222231 -474691998 360965777\", \"4 -96405765 -495906217 625385006\\n-509961652 392159235 -577128498 -744548876\", \"43 959134961 -868367850 142426380\\n921743429 63959718... | {
"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 dragon's curve is a self-similar fractal which can be obtained by a recursive method. \n\nStarting with the string `D0 = 'Fa'`, at each step simu... | code | {
"ground_truth": "{\"fn_name\": \"Dragon\", \"inputs\": [[\"a\"], [1.1], [-1]], \"outputs\": [[\"\"], [\"\"], [\"\"]]}",
"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": "Chef is going to participate in a new quiz show: \"Who dares to be a millionaire?\"\nAccording to the rules of the game, contestants must answer N qu... | code | {
"ground_truth": "{\"inputs\": [\"3\\n5\\nABCDE\\nEBCDA\\n0 10 20 30 40 50\\n4\\nCHEF\\nQUIZ\\n4 3 2 1 0\\n8\\nABBABAAB\\nABABABAB\\n100 100 100 100 100 100 100 100 100\", \"3\\n5\\nABCDE\\nEBCDA\\n0 8 20 30 40 50\\n4\\nCHEF\\nQUIZ\\n4 3 2 1 0\\n8\\nABBABAAB\\nABABABAB\\n100 100 100 100 100 100 100 100 100\", \"3\\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": "Let us consider a grid of squares with N rows and N columns. You want to put some domino pieces on this grid. Each domino piece covers two squares th... | code | {
"ground_truth": "{\"inputs\": [\"2\", \"6\", \"0\", \"3\", \"5\", \"4\", \"10\", \"13\", \"14\", \"11\", \"15\", \"7\", \"9\", \"8\", \"28\", \"36\", \"12\", \"17\", \"20\", \"26\", \"18\", \"30\", \"16\", \"47\", \"83\", \"111\", \"101\", \"100\", \"34\", \"110\", \"24\", \"59\", \"38\", \"25\", \"27\", \"29\", \"... | {
"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": "Eli- 1 started a part-time job handing out leaflets for N seconds. Eli- 1 wants to hand out as many leaflets as possible with her special ability, Cl... | code | {
"ground_truth": "{\"inputs\": [\"1\\n20 3\", \"1\\n200 1\", \"2\\n20 8\\n20 12\"], \"outputs\": [\"67\", \"148322100\", \"24\\n20\"]}",
"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": "Given a string s of length n and integer k (1 ≤ k ≤ n). The string s has a level x, if x is largest non-negative integer, such that it's possible to ... | code | {
"ground_truth": "{\"inputs\": [\"4 2\\nabab\\n\", \"8 2\\naaacaabb\\n\", \"2 1\\nab\\n\", \"3 2\\nzzz\\n\", \"13 3\\nzzzzzzzzzoosd\\n\", \"4 4\\nzzzz\\n\", \"13 2\\nabbacadaeafag\\n\", \"5 1\\naaaaa\\n\", \"5 1\\nzzzzz\\n\", \"5 1\\naaabb\\n\", \"5 1\\naaaab\\n\", \"38 2\\nsssssssssssgggggggggzzsssaagttttttkdys\\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": "Alice and Bob have decided to play the game \"Rock, Paper, Scissors\". \n\nThe game consists of several rounds, each round is independent of each oth... | code | {
"ground_truth": "{\n \"inputs\": [\n \"2\\n0 1 1\\n1 1 0\\n\",\n \"15\\n5 5 5\\n5 5 5\\n\",\n \"3\\n0 0 3\\n3 0 0\\n\",\n \"686\\n479 178 29\\n11 145 530\\n\",\n \"319\\n10 53 256\\n182 103 34\\n\",\n \"47\\n14 21 12\\n30 9 8\\n\",\n \"94317\\n66277 24448 3592\\n3499 24653 66165\\n\",\n \"3... | {
"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": "AquaMoon has n friends. They stand in a row from left to right, and the i-th friend from the left wears a T-shirt with a number a_i written on it. Ea... | code | {
"ground_truth": "{\"inputs\": [\"3\\n4\\n4 3 2 5\\n4\\n3 3 2 2\\n5\\n1 2 3 5 4\\n\", \"1\\n64\\n8 7 7 2 4 9 3 7 9 4 7 10 6 7 6 4 9 9 10 2 2 2 10 3 8 9 3 1 5 10 6 5 7 4 3 5 7 10 7 5 8 4 5 7 10 7 10 8 2 3 8 10 1 3 8 3 9 2 9 2 5 10 5 5\\n\", \"1\\n2\\n4 3\\n\", \"1\\n5\\n1 1 1 3 2\\n\", \"2\\n6\\n3 2 3 2 3 2\\n6\\n1 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": "You are given n × m table. Each cell of the table is colored white or black. Find the number of non-empty sets of cells such that:\n\n All cells in ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"1 1\\n0\\n\",\n \"2 3\\n1 0 1\\n0 1 0\\n\",\n \"2 2\\n1 1\\n1 1\\n\",\n \"1 10\\n0 0 0 0 0 0 0 0 0 0\\n\",\n \"11 1\\n1\\n1\\n1\\n1\\n1\\n1\\n1\\n1\\n1\\n1\\n1\\n\",\n \"10 11\\n1 1 0 1 1 0 0 0 1 0 0\\n1 0 0 1 1 1 0 0 1 1 0\\n0 0 1 0 1 1 0 1 0 1 1\\n0 1 1 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": "Vectors have their directions and two vectors make an angle between them. Given a set of three-dimensional vectors, your task is to find the pair amo... | code | {
"ground_truth": "{\"inputs\": [\"4 0 2013 1124\\n1 1 1\\n2 2 2\\n2 1 1\\n1 2 1\\n2 100 131832453 129800231\\n42 0 46\\n42 40 46\\n0 100000 7004674 484521438\\n0 0 0 0\", \"4 0 2013 1124\\n1 1 1\\n2 2 2\\n3 1 1\\n1 2 1\\n2 100 131832453 129800231\\n42 0 46\\n42 40 48\\n0 100000 7004674 484521438\\n0 0 0 0\", \"4 0 2... | {
"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: Second-Price Auction\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nIn this problem we consider a specia... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5 7\", \"3\\n10 2 8\", \"6\\n3 8 2 9 4 14\", \"4\\n4707 7586 4221 5842\", \"5\\n3304 4227 4869 6937 6002\", \"6\\n5083 3289 7708 5362 9031 7458\", \"7\\n9038 6222 3392 1706 3778 1807 2657\", \"8\\n7062 2194 4481 3864 7470 1814 8091 733\", \"9\\n2678 5659 9199 2628 7906 7496 4524... | {
"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: Four Divisors\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nIf an integer *a* is divisible by another i... | code | {
"ground_truth": "{\"inputs\": [\"10\", \"20\", \"1\", \"27\", \"100\", \"1000\", \"10000\", \"100000\", \"1000000\", \"100000000\", \"1000000000\", \"10000000000\", \"100000000000\", \"353964\", \"437388\", \"553516\", \"636940\", \"753068\", \"803788\", \"24403439\", \"907519567\", \"790635695\", \"968719119\", \"... | {
"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": "Description\nBlithchron is the annual cultural festival of IIT Gandhinagar. A popular event in Blithchron is Adrenaline - a treasure hunt. At a parti... | code | {
"ground_truth": "{\"inputs\": [\"fcuk\\nffccuukk\", \"120\\n110022002200002200\", \"COW\\nCCOOWW\", \"a\\nbcd\", \"asdf\\naaaassssaaaassssddddffff\", \"a\\naaaaaaaaaa\"], \"outputs\": [\"8\", \"768\", \"16\", \"0\", \"64\", \"10\"]}",
"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": "Shichi-Go-San (literally \"Seven-Five-Three\") is a traditional event in a certain country to celebrate the growth of seven-, five- and three-year-ol... | code | {
"ground_truth": "{\"inputs\": [\"5\\n\", \"6\\n\", \"1\\n\", \"2\\n\", \"3\\n\", \"4\\n\", \"7\\n\", \"8\\n\", \"9\\n\"], \"outputs\": [\"YES\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"YES\\n\", \"NO\\n\", \"YES\\n\", \"NO\\n\", \"NO\\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": "Sherlock is given an array of $N$ integers ($A_0,A_1...A_{N-1}$ by Watson. Now Watson asks Sherlock how many different pairs of indices $\\boldsymbol... | code | {
"ground_truth": "{\"inputs\": [\"1\\n6\\n1 2 2 3 3 3\\n\"], \"outputs\": [\"8\"]}",
"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": "In this problem your goal is to sort an array consisting of n integers in at most n swaps. For the given array find the sequence of swaps that makes ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5\\n5 2 5 1 4\\n\",\n \"6\\n10 20 20 40 60 60\\n\",\n \"2\\n101 100\\n\",\n \"1\\n1000\\n\",\n \"2\\n1000000000 -1000000000\\n\",\n \"8\\n5 2 6 8 3 1 6 8\\n\",\n \"2\\n200000000 199999999\\n\",\n \"3\\n100000000 100000002 100000001\\n\",\n \"5\\n100... | {
"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": "Dreamoon is a big fan of the Codeforces contests.\n\nOne day, he claimed that he will collect all the places from 1 to 54 after two more rated contes... | code | {
"ground_truth": "{\"inputs\": [\"5\\n6 2\\n3 1 1 5 7 10\\n1 100\\n100\\n11 1\\n1 1 1 1 1 1 1 1 1 1 1\\n1 1\\n1\\n4 57\\n80 60 40 20\\n\", \"1\\n5 2\\n3 4 5 6 7\\n\", \"1\\n6 1\\n1 3 4 5 6 7\\n\", \"1\\n4 3\\n4 5 6 7\\n\", \"1\\n4 1\\n1 3 4 5\\n\", \"1\\n1 1\\n2\\n\", \"1\\n5 1\\n1 3 4 6 6\\n\", \"1\\n3 3\\n4 5 6\\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: Sereja and Brackets\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nSereja has a bracket sequence *s*1,<=... | code | {
"ground_truth": "{\"inputs\": [\"())(())(())(\\n7\\n1 1\\n2 3\\n1 2\\n1 12\\n8 12\\n5 11\\n2 10\", \"(((((()((((((((((()((()(((((\\n1\\n8 15\", \"((()((())(((((((((()(()(()(((((((((((((((()(()((((((((((((((()(((((((((((((((((((()(((\\n39\\n28 56\\n39 46\\n57 63\\n29 48\\n51 75\\n14 72\\n5 70\\n51 73\\n10 64\\n31 56... | {
"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": "Two semifinals have just been in the running tournament. Each semifinal had n participants. There are n participants advancing to the finals, they ar... | code | {
"ground_truth": "{\"inputs\": [\"4\\n9840 9920\\n9860 9980\\n9930 10020\\n10040 10090\\n\", \"4\\n9900 9850\\n9940 9930\\n10000 10020\\n10060 10110\\n\", \"3\\n1 3\\n2 4\\n6 5\\n\", \"3\\n1 3\\n2 5\\n4 6\\n\", \"4\\n1 3\\n2 4\\n7 5\\n8 6\\n\", \"4\\n5 1\\n6 2\\n7 3\\n8 4\\n\", \"3\\n1 2\\n4 3\\n6 5\\n\", \"4\\n2 1\... | {
"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: Guess the Array\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThis is an interactive problem. You shoul... | code | {
"ground_truth": "{\"inputs\": [\"5\\n4 6 1 5 5\", \"3\\n1 1 1\", \"4\\n100 1 100 1\", \"10\\n9 5 10 7 4 4 8 5 10 5\", \"3\\n1 1 1\", \"3\\n100000 100000 100000\", \"3\\n91906 50782 19777\", \"15\\n5 10 10 7 7 6 4 6 8 10 8 4 10 9 4\", \"30\\n2 3 3 4 3 2 4 4 4 3 3 2 4 2 3 4 4 2 4 3 4 2 2 4 3 3 4 4 4 4\", \"35\\n4 2 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 $\\mbox{Q}$ queries. Each query consists of a single number $N$. You can perform any of the $2$ operations on $N$ in each move:\n\n1: I... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3\\n4\\n\"], \"outputs\": [\"3\\n3\\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": "Ann has recently started commuting by subway. We know that a one ride subway ticket costs a rubles. Besides, Ann found out that she can buy a special... | code | {
"ground_truth": "{\"inputs\": [\"5 2 2 3\\n\", \"6 2 1 2\\n\", \"6 4 1 3\\n\", \"1 1000 1 2\\n\", \"101 110 1 100\\n\", \"1000 3 1000 1000\\n\", \"100 8 10 1\\n\", \"477 2 16 14\\n\", \"9 3 3 10\\n\", \"1000 1 1000 1000\\n\", \"10 2 1 1\\n\", \"1000 2 1 1000\\n\", \"995 1 2 1\\n\", \"556 2 16 15\\n\", \"10 3 5 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": "You are given N positive integers a_1, a_2, ..., a_N.\n\nFor a non-negative integer m, let f(m) = (m\\ mod\\ a_1) + (m\\ mod\\ a_2) + ... + (m\\ mod\... | code | {
"ground_truth": "{\"inputs\": [\"5\\n7 46 11 20 11\", \"7\\n994 518 941 851 647 2 581\", \"3\\n3 4 6\", \"5\\n7 46 11 17 11\", \"7\\n994 518 941 851 647 2 568\", \"3\\n3 1 6\", \"5\\n7 46 11 17 13\", \"7\\n994 518 941 523 647 2 568\", \"3\\n3 2 6\", \"5\\n7 13 11 17 13\", \"7\\n994 518 941 523 647 1 568\", \"3\\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": "Count the pairs of length-N sequences consisting of integers between 1 and M (inclusive), A_1, A_2, \\cdots, A_{N} and B_1, B_2, \\cdots, B_{N}, that... | code | {
"ground_truth": "{\"inputs\": [\"141421 356237\", \"2 2\", \"2 3\", \"1 2\", \"2 6\", \"0 2\", \"2 4\", \"1 4\", \"3 4\", \"141421 225813\", \"1 1\", \"1 6\", \"2 7\", \"82963 225813\", \"1 3\", \"1 8\", \"1 7\", \"61759 225813\", \"2 8\", \"85920 225813\", \"2 14\", \"3299 225813\", \"3 14\", \"3299 39455\", \"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": "Given a positive integer n, find and return the longest distance between any two adjacent 1's in the binary representation of n. If there are no two ... | code | {
"ground_truth": "{\"fn_name\": \"binaryGap\", \"inputs\": [[22]], \"outputs\": [2]}",
"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: Gabriel and Caterpillar\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThe 9-th grade student Gabriel no... | code | {
"ground_truth": "{\"inputs\": [\"10 30\\n2 1\", \"10 13\\n1 1\", \"10 19\\n1 2\", \"1 50\\n5 4\", \"1 1000\\n2 1\", \"999 1000\\n1 1\", \"999 1000\\n1 1000\", \"1 1000\\n999 1\", \"1 1000\\n100 99\", \"500 509\\n1 1\", \"500 555\\n6 1\", \"1 100000\\n2 1\", \"99990 100000\\n1 1\", \"90000 100000\\n2 1\", \"10 10000... | {
"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 a very easy warm-up problem.\nYou are given a string. Your task is to determine whether number of occurrences of some character in the string... | code | {
"ground_truth": "{\"inputs\": [\"4\\nacab\\nzzqzqq\\nabc\\nkklkwwww\", \"4\\nacab\\nzzqzqq\\ncba\\nkklkwwww\", \"4\\nacbb\\nzzqzqq\\ncba\\nkkmkwvww\", \"4\\ncbba\\nqrzqyz\\nbab\\nkllkxwvw\", \"4\\naccc\\nqrzqyz\\nbab\\nkklkxwvw\", \"4\\nabbb\\nzzqzqq\\ncba\\nkkmkwwww\", \"4\\ncbbb\\nqqzqyz\\nbab\\nkllkxwvw\", \"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": "-----Input-----\n\nThe input consists of a single string of uppercase letters A-Z. The length of the string is between 1 and 10 characters, inclusive... | code | {
"ground_truth": "{\"inputs\": [\"NEAT\\n\", \"WORD\\n\", \"CODER\\n\", \"APRILFOOL\\n\", \"AI\\n\", \"JUROR\\n\", \"YES\\n\", \"Q\\n\", \"PUG\\n\", \"SOURPUSS\\n\", \"CROUP\\n\", \"BURG\\n\", \"DODO\\n\", \"WET\\n\", \"MAYFLY\\n\", \"VITALIZE\\n\", \"KHAKI\\n\", \"WAXY\\n\", \"WEEVIL\\n\", \"THIAMINE\\n\", \"ALKALI... | {
"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": "Imagine that you are in a building that has exactly n floors. You can move between the floors in a lift. Let's number the floors from bottom to top w... | code | {
"ground_truth": "{\"inputs\": [\"5 2 4 1\\n\", \"5 2 4 2\\n\", \"5 3 4 1\\n\", \"5000 2314 1234 5000\\n\", \"3 2 3 1\\n\", \"4988 3629 4106 4488\\n\", \"300 1 300 300\\n\", \"2 1 2 1\\n\", \"4999 1 2 4999\\n\", \"3999 2 10 5000\\n\", \"10 1 4 4999\\n\", \"22 9 18 3\\n\", \"10 1 10 2\\n\", \"5 3 2 2\\n\", \"50 5 2 5... | {
"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": "As Kevin is in BigMan's house, suddenly a trap sends him onto a grid with n rows and m columns.\n\nBigMan's trap is configured by two arrays: an arra... | code | {
"ground_truth": "{\"inputs\": [\"5 5 1\\n1 3 2 3 1\\n1 3 2 3 1\\n5\\n\", \"3 3 2\\n1 2 2\\n2 1 2\\n3\\n4\\n\", \"5 5 2\\n2 1 11 1 2\\n2 1 11 1 2\\n12\\n13\\n\", \"1 1 1\\n1\\n2\\n3\\n\", \"10 10 10\\n2 8 6 1 2 7 6 9 2 8\\n4 9 4 3 5 2 9 3 7 3\\n8\\n8\\n8\\n20\\n1\\n14\\n13\\n20\\n2\\n1\\n\", \"5 5 2\\n2 1 11 1 2\\n2... | {
"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": "In this problem we consider a special type of an auction, which is called the second-price auction. As in regular auction n bidders place a bid which... | code | {
"ground_truth": "{\"inputs\": [\"6\\n3 8 2 9 4 14\\n\", \"2\\n5 7\\n\", \"3\\n10 2 8\\n\", \"3\\n30 20 10\\n\", \"3\\n3 4 1\\n\", \"3\\n30 10 20\\n\", \"100\\n2515 3324 7975 6171 4240 1217 4829 5203 8603 6900 3031 4699 4732 6070 4221 3228 6497 7359 9130 4346 4619 1109 3945 5442 3271 16 9711 2045 6410 2301 3406 8125... | {
"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 5 integers - N,A,B,C,D.\nLet us say all the integers of length N, having only A or B in their decimal representation are good integers.... | code | {
"ground_truth": "{\"inputs\": [\"N = 2, A = 1, B = 2, C = 3, D = 5\", \"N = 1, A = 1, B = 1, C = 2, D = 3\", \"N = 4, A = 6, B = 7, C = 5, D = 3\"], \"outputs\": [\"2\", \"0\", \"4\"]}",
"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": "At ACME Corp, the seller Robin is selling software like hotcakes. To sell the software, he arranges meetings all over the country. Of course, he alwa... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 -2 3\\n\", \"5\\n129 44 394 253 147\\n\", \"10\\n-100 40000 -6500 -230 -18 34500 -450 13000 -100 5000\\n\"], \"outputs\": [\"2\\n\", \"0\\n\", \"7398\\n\"]}",
"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: Sleep in Class\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThe academic year has just begun, but less... | code | {
"ground_truth": "{\"inputs\": [\"3\\nUUD\", \"10\\nUUDUDUUDDU\", \"10\\nDUDDUUDUDD\", \"1\\nD\", \"2\\nDU\", \"3\\nDUU\", \"4\\nDDDU\", \"5\\nDDDUD\", \"50\\nDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUU\", \"50\\nUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDD\", \"1\\nD\", \"1\\nU\"], \"outputs\": [\"5 6 ... | {
"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": "Chef has recently been playing a lot of chess in preparation for the ICCT (International Chef Chess Tournament).\nSince putting in long hours is not ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1\\n2\\n3\\n4\\n5\\n\", \"1\\n6\\n\", \"1\\n7\\n\", \"5\\n8\\n9\\n10\\n11\\n12\\n\", \"1\\n13\\n\", \"1\\n2\\n\", \"1\\n999\\n\", \"5\\n1\\n2\\n3\\n4\\n5\\n\", \"1\\n10\\n\", \"1\\n1000\\n\", \"1\\n999\\n\"], \"outputs\": [\"1\\n4\\n10\\n20\\n35\", \"56\", \"84\", \"120\\n165\\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 are given an array a consisting of n positive integers. You pick two integer numbers l and r from 1 to n, inclusive (numbers are picked randomly,... | code | {
"ground_truth": "{\n \"inputs\": [\n \"2\\n1 2\\n\",\n \"2\\n2 2\\n\",\n \"10\\n9 6 8 5 5 2 8 9 2 2\\n\",\n \"20\\n49 33 9 8 50 21 12 44 23 39 24 10 17 4 17 40 24 19 27 21\\n\",\n \"1\\n1000000\\n\"\n ],\n \"outputs\": [\n \"1.500000\\n\",\n \"1.000000\\n\",\n \"3.100000\\n\",\n \"7.01... | {
"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": "Consider a 32-bit real type with 7 bits from the right as the decimal part, the following 24 bits as the integer part, and the leftmost 1 bit as the ... | code | {
"ground_truth": "{\"inputs\": [\"8\\n00000000\\n80000000\\n00000080\\n00000040\\n000000c0\\n00000100\\n80000780\\n80000f70\", \"8\\n00000000\\n80000000\\n00000080\\n00000040\\n000000c0\\n00000100\\n15330257\\n80000f70\", \"8\\n00000000\\n80000000\\n00000080\\n00000040\\n000000c0\\n00000100\\n21251916\\n80000f70\", ... | {
"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": "An elementary school student Takahashi has come to a variety store.\n\nHe has two coins, A-yen and B-yen coins (yen is the currency of Japan), and wa... | code | {
"ground_truth": "{\"inputs\": [\"500 100 1000\", \"19 123 143\", \"19 123 142\", \"50 100 120\", \"500 000 1000\", \"31 123 143\", \"19 123 141\", \"50 100 127\", \"500 101 1000\", \"55 123 143\", \"1 123 141\", \"50 000 127\", \"500 001 1000\", \"64 123 143\", \"1 123 281\", \"50 001 127\", \"726 101 1000\", \"64 ... | {
"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": "Dinesh is very fond of sweets recently his aunt Riya gifted him an array $a$ of sweets of size $N$. The ith sweet is of the type $a[i]$. His mother t... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 2 2 2\\n\", \"4\\n1 1 2 2\\n\", \"10000\\n1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 ... | {
"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": "Description\nYou are given two strings S and T, such that length of S is greater than the length of T.\nThen a substring of S is defined as a sequenc... | code | {
"ground_truth": "{\"inputs\": [\"aaaa a\", \"abcd cb\", \"a abab\", \"aaaa b\", \"dcba cb\", \"aa`a a\", \"dcac dc\", \"a``a a\", \"b abab\", \"aaaa c\", \"dcba bc\", \"b baba\", \"aaa` c\", \"dcab bc\", \"b aaba\", \"aa`a c\", \"dcab bd\", \"b aaaa\", \"aa`a b\", \"dbac bd\", \"b abaa\", \"a`aa b\", \"dcac bd\", \... | {
"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 flea is sitting at one of the n hassocks, arranged in a circle, at the moment. After minute number k the flea jumps through k - 1 hassoсks (clockwi... | code | {
"ground_truth": "{\"inputs\": [\"37\\n\", \"7\\n\", \"24\\n\", \"688\\n\", \"39\\n\", \"170\\n\", \"580\\n\", \"35\\n\", \"728\\n\", \"44\\n\", \"19\\n\", \"22\\n\", \"64\\n\", \"25\\n\", \"30\\n\", \"871\\n\", \"10\\n\", \"580\\n\", \"17\\n\", \"518\\n\", \"200\\n\", \"613\\n\", \"50\\n\", \"14\\n\", \"49\\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": "You are given a sequence of N integers, a[1], a[2], , , , a[N]. \nFind out the maximum possible average value of sub-sequences of array a.\n\n\nInpu... | code | {
"ground_truth": "{\"inputs\": [\"1\\n5\\n1 3 2 1 3\", \"1\\n5\\n1 6 2 1 3\", \"1\\n5\\n1 3 2 1 1\", \"1\\n5\\n0 4 2 1 3\", \"1\\n5\\n1 7 2 1 2\", \"1\\n5\\n2 5 4 1 1\", \"1\\n5\\n2 1 0 1 1\", \"1\\n5\\n1 9 2 1 2\", \"1\\n5\\n-2 8 2 2 3\", \"1\\n5\\n1 14 4 1 4\", \"1\\n5\\n0 13 2 2 2\", \"1\\n5\\n-2 16 0 4 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": "Kancha wants to participate in a new event of Technobyte. Event says that you have to write a number in seven segment display using matchsticks. Plea... | code | {
"ground_truth": "{\"inputs\": [\"10\\n4523521178603692869044796170148349853679689223589819975621633677282235231443204731632537466129523854\\n1302325049960398304982582357280685122562102438321157305518841538649586388982800700181595650321563194\\n251295733278683052230861115062849399250309766152058993361514855777201148... | {
"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": "Iahub likes trees very much. Recently he discovered an interesting tree named propagating tree. The tree consists of n nodes numbered from 1 to n, ea... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5 5\\n1 2 1 1 2\\n1 2\\n1 3\\n2 4\\n2 5\\n1 2 3\\n1 1 2\\n2 1\\n2 2\\n2 4\\n\",\n \"10 10\\n137 197 856 768 825 894 86 174 218 326\\n7 8\\n4 7\\n8 9\\n7 10\\n1 2\\n2 4\\n3 6\\n3 5\\n2 3\\n1 9 624\\n2 1\\n2 4\\n1 6 505\\n1 8 467\\n1 3 643\\n2 1\\n1 8 631\\n2 4\\n1 7 244\... | {
"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": "Vasya plays the sleuth with his friends. The rules of the game are as follows: those who play for the first time, that is Vasya is the sleuth, he sho... | code | {
"ground_truth": "{\"inputs\": [\"Is it an apple?\\n\", \"Is it a banana ?\\n\", \"Is it an apple and a banana simultaneouSLY?\\n\", \"Is it a melon?\\n\", \"iehvZNQXDGCuVmJPOEysLyUryTdfaIxIuTzTadDbqRQGoCLXkxnyfWSGoLXebNnQQNTqAQJebbyYvHOfpUnXeWdjx?\\n\", \"hh?\\n\", \"j ... | {
"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": "Limak is a little polar bear, who isn't afraid of geometry.\nHe has n 2-dimensional non-zero vectors \\vec{a_1}, \\vec{a_2}, \\ldots, \\vec{a_n}, eac... | code | {
"ground_truth": "{\"inputs\": [\"200\\n-4 -2\\n-1 8\\n-4 -4\\n3 -1\\n4 6\\n2 3\\n-6 -5\\n3 2\\n-10 -4\\n-1 6\\n1 -7\\n-4 7\\n-6 -3\\n-10 -3\\n4 3\\n9 3\\n-9 7\\n9 -1\\n-3 3\\n5 3\\n-6 1\\n-8 -3\\n-1 10\\n1 4\\n-10 -10\\n-4 6\\n-8 -7\\n5 5\\n10 9\\n3 -10\\n-1 4\\n0 4\\n10 8\\n-3 -9\\n-6 2\\n0 -3\\n8 10\\n-7 7\\n6 7\... | {
"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": "Alfred wants to buy a toy moose that costs c dollars. The store doesn’t give change, so he must give the store exactly c dollars, no more and no less... | code | {
"ground_truth": "{\"inputs\": [\"200000\\n10\\n31506\\n28490\\n134366\\n5638\\n19457\\n2007\\n14856\\n103670\\n24455\\n68460\\n\", \"200000\\n11\\n38\\n2612\\n128255\\n56198\\n1\\n1\\n258\\n31\\n8785\\n3565\\n256\\n\", \"13\\n4\\n1\\n4\\n4\\n4\\n\", \"200000\\n59\\n1177\\n120041\\n43628\\n160804\\n114044\\n65881\\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": "Milly loves chocolates very much. She is at the land of chocolates. This land has N rooms such that there are some chocolates of different brands in ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n3 2\\n1 KITKAT\\n2 FIVESTAR KITKAT\\n2 KITKAT PERK\\n\\nSAMPLE\", \"3\\n10 40\\n10 ggl fhklnkh addejhpo igkknigiq c egfhh egfhh edhdhholl fhklnkh ahg\\n10 chj di bhfmgmj edgjhoo djkdgh chj heek djkdgh ggl ahg\\n10 gjkegonh hbgjlk edhdhholl chj chj ecgielp c edhdhholl fjkghilnj 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": "Given the time shown by a wall clock, you have to output the internal angle between the minute and hour hand of the clock.\n(Wall Clock displays a 12... | code | {
"ground_truth": "{\"inputs\": [\"04:00\\n\\nSAMPLE\", \"05:55\", \"01:01\", \"06:55\", \"05:56\", \"04:00\\n\\nSAMELP\", \"01:10\", \"00:10\", \"04:01\\n\\nEAMRMP\", \"00:04\\n\\nOLSMAE\", \"04:10\\n\\nNLSMAE\", \"01:00\", \"02:00\", \"12:00\", \"10:40\\n\\nMAMRQE\", \"10:41\\n\\nMAMRQE\", \"00:05\\n\\nOLEMAS\", \"... | {
"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 $n$ words, each of which consists of lowercase alphabet letters. Each word contains at least one vowel. You are going to choose some of... | code | {
"ground_truth": "{\"inputs\": [\"14\\nwow\\nthis\\nis\\nthe\\nfirst\\nmcdics\\ncodeforces\\nround\\nhooray\\ni\\nam\\nproud\\nabout\\nthat\\n\", \"7\\narsijo\\nsuggested\\nthe\\nidea\\nfor\\nthis\\nproblem\\n\", \"4\\nsame\\nsame\\nsame\\ndiffer\\n\", \"1\\nimpossible\\n\", \"1\\nimpossible\\n\", \"4\\naaaa\\naaaa\... | {
"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: Amusing Joke\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nSo, the New Year holidays are over. Santa Cl... | code | {
"ground_truth": "{\"inputs\": [\"SANTACLAUS\\nDEDMOROZ\\nSANTAMOROZDEDCLAUS\", \"PAPAINOEL\\nJOULUPUKKI\\nJOULNAPAOILELUPUKKI\", \"BABBONATALE\\nFATHERCHRISTMAS\\nBABCHRISTMASBONATALLEFATHER\", \"B\\nA\\nAB\", \"ONDOL\\nJNPB\\nONLNJBODP\", \"Y\\nW\\nYW\", \"OI\\nM\\nIMO\", \"VFQRWWWACX\\nGHZJPOQUSXRAQDGOGMR\\nOPAWD... | {
"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 new semester at Hogwarts has just started, but something is not quite right – the staircases are not cooperating with the school administrators! ... | code | {
"ground_truth": "{\"inputs\": [\"5 4\\n0 1\\n0 3\\n1 2\\n2 4\\n0 2\\n0 4\\n2 3\\n2 4\\n\", \"3 3\\n0 1\\n0 2\\n1 2\\n0 1\\n1 2\\n0 2\\n\"], \"outputs\": [\"2\\nR 0\\nG 2\\n\", \"0\\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're given an ancient book that unfortunately has a few pages in the wrong position, fortunately your computer has a list of every page number in o... | code | {
"ground_truth": "{\"fn_name\": \"find_page_number\", \"inputs\": [[[1, 2, 10, 3, 4, 5, 8, 6, 7]], [[1, 2, 3, 4, 50, 5, 6, 7, 51, 8, 40, 9]], [[1, 2, 3000, 3, 4, 5, 8, 6, 7, 8, 100, 9, 40, 10, 11, 13]], [[1, 2, 3, 4, 50, 5, 6, 7, 51, 8, 9]], [[4, 1, 2, 3, 3, 4, 26, 5, 6, 2, 7]]], \"outputs\": [[[10, 8]], [[50, 51, 4... | {
"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": "zscoder loves simple strings! A string t is called simple if every pair of adjacent characters are distinct. For example ab, aba, zscoder are simple ... | code | {
"ground_truth": "{\"inputs\": [\"zscoder\\n\", \"aab\\n\", \"caaab\\n\", \"zza\\n\", \"aa\\n\", \"dtottttotd\\n\", \"ab\\n\", \"nnop\\n\", \"qasdasd\\n\", \"gg\\n\", \"rxxxrrxrxxxxxrrrrrxxxxrrrrxrxxrxxrxrxrrrxrrxrrxrxxxrxrrxrrxrxrxxxxxrxxxxrrrxrxxrxxrxxxrrrrrxrrxrrxrr\\n\", \"h\\n\", \"xx\\n\", \"zz\\n\", \"u\\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": "Nuske has a grid with N rows and M columns of squares. The rows are numbered 1 through N from top to bottom, and the columns are numbered 1 through M... | code | {
"ground_truth": "{\"inputs\": [\"3 4 4\\n1101\\n0110\\n1101\\n1 1 3 4\\n1 1 3 1\\n2 2 3 4\\n1 2 2 4\", \"5 5 6\\n11010\\n01110\\n10101\\n11101\\n01010\\n1 1 5 5\\n1 2 4 5\\n2 3 3 4\\n3 3 3 3\\n3 1 3 5\\n1 1 3 4\", \"3 4 4\\n1101\\n0110\\n1101\\n1 1 3 4\\n1 1 3 1\\n2 2 3 4\\n1 2 3 4\", \"5 5 6\\n11010\\n01110\\n1010... | {
"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": "Chef has recently learnt some new facts about the famous number π. For example, he was surprised that ordinary fractions are sometimes used to repres... | code | {
"ground_truth": "{\"inputs\": [\"3\\n0\\n6\\n20\", \"3\\n1\\n6\\n20\", \"3\\n2\\n6\\n20\", \"3\\n0\\n8\\n20\", \"3\\n0\\n9\\n20\", \"3\\n1\\n9\\n20\", \"3\\n0\\n13\\n20\", \"3\\n0\\n13\\n1\", \"3\\n1\\n13\\n1\", \"3\\n1\\n13\\n0\", \"3\\n1\\n0\\n0\", \"3\\n1\\n1\\n0\", \"3\\n2\\n1\\n0\", \"3\\n2\\n1\\n1\", \"3\\n0\... | {
"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: The Contest\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nPasha is participating in a contest on one we... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3 4\\n2\\n1 4\\n7 9\", \"1\\n5\\n1\\n1 4\", \"1\\n5\\n1\\n1 5\", \"5\\n100000 100000 100000 100000 100000\\n0\", \"5\\n886 524 128 4068 298\\n3\\n416 3755\\n4496 11945\\n17198 18039\", \"10\\n575 3526 1144 1161 889 1038 790 19 765 357\\n2\\n4475 10787\\n16364 21678\", \"1\\n4\\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": "Once, during a lesson, Sasha got bored and decided to talk with his friends. Suddenly, he saw Kefa. Since we can talk endlessly about Kefa, we won't ... | code | {
"ground_truth": "{\"inputs\": [\"3 1 1 2\\n\", \"5 15 1 5\\n\", \"3 2 1 3\\n\", \"1000000 1000000 709877 145493\\n\", \"999811 995909 552335 962586\\n\", \"995002 10711 668009 431573\\n\", \"1000000 2 1000000 1\\n\", \"999828 991491 117039 307131\\n\", \"999885 995557 206421 701734\\n\", \"2 999947 2 1\\n\", \"9999... | {
"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: They Are Everywhere\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nSergei B., the young coach of Pokemon... | code | {
"ground_truth": "{\"inputs\": [\"3\\nAaA\", \"7\\nbcAAcbc\", \"6\\naaBCCe\", \"1\\nA\", \"1\\ng\", \"52\\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"2\\nAA\", \"4\\nqqqE\", \"10\\nrrrrroooro\", \"15\\nOCOCCCCiCOCCCOi\", \"20\\nVEVnVVnWnVEVVnEVBEWn\", \"25\\ncpcyPPjPPcPPPPcppPcPpppcP\", \"30\\nsssssAs... | {
"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": "Tsumugi brought $n$ delicious sweets to the Light Music Club. They are numbered from $1$ to $n$, where the $i$-th sweet has a sugar concentration des... | code | {
"ground_truth": "{\n \"inputs\": [\n \"9 2\\n6 19 3 4 4 2 6 7 8\\n\",\n \"1 1\\n7\\n\",\n \"2 1\\n135072 38422\\n\",\n \"2 2\\n51200 19970\\n\",\n \"37 13\\n164823 8992 21818 77521 130870 83201 174985 168799 9565 84443 105083 54131 130813 42829 98759 60103 198520 125068 59611 45609 124003 106143 541... | {
"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": "Gildong recently learned how to find the longest increasing subsequence (LIS) in $O(n\\log{n})$ time for a sequence of length $n$. He wants to test h... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n3 <<\\n7 >><>><\\n5 >>><\\n\"\n ],\n \"outputs\": [\n \"1 2 3\\n1 2 3\\n5 4 3 7 2 1 6\\n4 3 1 7 5 2 6\\n4 3 2 1 5\\n5 4 2 1 3\\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": "Note: This kata is inspired by [Convert a Number to a String!](http://www.codewars.com/kata/convert-a-number-to-a-string/). Try that one too.\n\n## D... | code | {
"ground_truth": "{\"fn_name\": \"string_to_number\", \"inputs\": [[\"4\"]], \"outputs\": [[4]]}",
"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": "After being invaded by the Kingdom of AlDebaran, bombs are planted throughout our country, AtCoder Kingdom.\nFortunately, our military team called AB... | code | {
"ground_truth": "{\"inputs\": [\"3 4\\n5 1\\n10 1\\n8 0\\n1 10\\n4 5\\n6 7\\n8 9\\n\", \"4 2\\n2 0\\n3 1\\n5 1\\n7 0\\n1 4\\n4 7\\n\", \"3 2\\n5 0\\n10 0\\n8 0\\n6 9\\n66 99\\n\", \"12 20\\n536130100 1\\n150049660 1\\n79245447 1\\n132551741 0\\n89484841 1\\n328129089 0\\n623467741 0\\n248785745 0\\n421631475 0\\n49... | {
"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 chain letter is a kind of a message which urges the recipient to forward it to as many contacts as possible, usually with some kind of mystic expla... | code | {
"ground_truth": "{\"inputs\": [\"4\\n0111\\n1011\\n1101\\n1110\\n\", \"4\\n0110\\n1010\\n1100\\n0000\\n\", \"4\\n0101\\n1001\\n0001\\n1110\\n\"], \"outputs\": [\"3\\n\", \"0\\n\", \"2\\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 an array a consisting of n integers a_1, a_2, ..., a_n. You want to split it into exactly k non-empty non-intersecting subsegments such... | code | {
"ground_truth": "{\"inputs\": [\"3\\n5 3\\n7 18 3 14 1\\n5 4\\n1 2 3 4 5\\n6 2\\n1 2 8 4 10 2\\n\", \"1\\n1 1\\n2\\n\", \"3\\n5 3\\n7 18 3 14 1\\n5 4\\n1 2 3 4 5\\n6 2\\n2 2 8 4 10 2\\n\", \"3\\n5 3\\n7 18 3 14 1\\n5 4\\n1 2 3 4 5\\n6 2\\n3 1 8 4 10 2\\n\", \"3\\n5 3\\n7 26 2 14 1\\n4 4\\n1 2 4 4 1\\n6 3\\n3 2 8 4 ... | {
"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": "Given are a sequence of N positive integers A_1, A_2, \\ldots, A_N, and a positive integer K.\nFind the number of non-empty contiguous subsequences i... | code | {
"ground_truth": "{\"inputs\": [\"5 4\\n1 4 2 3 5\\n\", \"8 4\\n4 2 4 2 4 2 4 2\\n\", \"10 7\\n14 15 92 65 35 89 79 32 38 46\\n\"], \"outputs\": [\"4\\n\", \"7\\n\", \"8\\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": "We have an array A of non-negative integers.\nFor every (contiguous) subarray B = [A[i], A[i+1], ..., A[j]] (with i <= j), we take the bitwise OR of ... | code | {
"ground_truth": "{\"fn_name\": \"subarrayBitwiseORs\", \"inputs\": [[[0, 1, 2]], [[5, 6, 7]], [[1, 2, 3, 4]], [[1, 1, 1]], [[2, 3, 4, 5, 6]], [[0]], [[1]], [[9, 10, 11, 12, 13]], [[0, 0, 0, 0, 0]], [[123456789]], [[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, 26, 27, 28... | {
"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 an n by m grid. Each grid square has a certain value associated with it. This is given by the numbers vi,j.\n\nYou can capture grid squares ... | code | {
"ground_truth": "{\"inputs\": [\"3 5\\n9 0 3 2 4\\n0 2 8 6 2\\n5 3 4 1 3\\n5 1 7 9 5\\n2 4 1 2 4\\n9 1 2 2 0\\n9 1 8 9 7\\n2 7 3 2 9\\n9 1 9 8 2\\n\\nSAMPLE\", \"2 1\\n20\\n24293\\n173\\n1180\\n51947\\n76994\", \"6 6\\n71859 43509 78307 37710 68651 11715\\n91820 39108 37781 14649 95399 38262\\n254 16744 35985 32112... | {
"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": "Tourists in the numerous Welsh valleys are in need of an IT solution to their transportation troubles. They want to see all the local Points of inter... | code | {
"ground_truth": "{\"inputs\": [\"4 4\\n100 30000\\n200 20000\\n300 10000\\n400 0\\n50 10000\\n75 20000\\n400 -40000\\n\", \"1 3\\n20 50000\\n100 10000\\n10 -60000\\n\"], \"outputs\": [\"2\\n\", \"IMPOSSIBLE\\n\"]}",
"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: Hobbits' Party\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nEveryone knows that hobbits love to organi... | code | {
"ground_truth": "{\"inputs\": [\"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"14\", \"15\", \"16\", \"20\", \"21\", \"44\", \"45\", \"189\", \"190\", \"191\", \"209\", \"210\", \"230\", \"231\", \"251\", \"252\", \"253\", \"254\", \"255\", \"3\", \"9000\", \"9100\", \"9200\", \"9300\", \"9400\", \"9500... | {
"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 Tom has become health conscious and is now lifting weights at the gym. But its his first time so the trainer gives him a simple job to do.\n\nHe ... | code | {
"ground_truth": "{\"inputs\": [\"4\\n2\\n5\\n4\\n7\\n\\nSAMPLE\", \"8\\n6\\n8\\n3\\n2\\n11\\n13\\n15\\n17\", \"8\\n6\\n8\\n3\\n2\\n11\\n13\\n15\\n2\", \"4\\n2\\n5\\n4\\n3\\n\\nSAMPLE\", \"8\\n6\\n8\\n3\\n2\\n8\\n13\\n15\\n2\", \"4\\n2\\n5\\n4\\n5\\n\\nSAMPLE\", \"8\\n12\\n8\\n3\\n2\\n8\\n13\\n15\\n2\", \"4\\n2\\n5\... | {
"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 the following recurrences, \n\nF(n) = a * F(n - 1) * G(n - 2) + b * G(n - 1) * F(n - 2) for n ≥ 2\n\nG(n) = c * G(n - 1) * F(n - 2) + d... | code | {
"ground_truth": "{\"inputs\": [\"1 2 3 4 5 6\\n2\\n2 \\n3\\n\\nSAMPLE\"], \"outputs\": [\"30\\n54\"]}",
"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": "T is a complete binary tree consisting of n vertices. It means that exactly one vertex is a root, and each vertex is either a leaf (and doesn't have ... | code | {
"ground_truth": "{\"inputs\": [\"15 2\\n4\\nUURL\\n8\\nLRLLLLLLLL\\n\", \"1 1\\n1\\nU\\n\", \"7 10\\n3\\nLLULULLLR\\n4\\nLUUURLLLUURRU\\n1\\nULURR\\n6\\nLURLLLLRLR\\n2\\nULULURU\\n7\\nRRUUUURLRLR\\n7\\nUUURRULRRLUL\\n7\\nULLLRUULULR\\n6\\nUURRLL\\n6\\nRULUUULLRLLLUULL\\n\", \"1 1\\n1\\nL\\n\", \"4503599627370495 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": "You are given three strings s, t and p consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strings... | code | {
"ground_truth": "{\"inputs\": [\"4\\nab\\nacxb\\ncax\\na\\naaaa\\naaabbcc\\na\\naaaa\\naabbcc\\nab\\nbaaa\\naaaaa\\n\", \"1\\naaaaaabbbbbbbbcccccccccccdddd\\naaaaabbbbbbccccccccddddddddd\\naaaaabbbbbbbbbcccccccccddddd\\n\", \"1\\naaaaaabbbbbbbbcccccccccccdddd\\naaaaabbbbbbccccccccddddddddd\\ndddddcccccccccbbbbbbbbb... | {
"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": "Our code monk, high on excitement after solving the rest of the problems , goes on a trek in the mountains .\n On his way, he encounters Janemba, the... | code | {
"ground_truth": "{\"inputs\": [\"4\\n2 1\\n1 3\\n2 4\\n2 2\\n1 3\\n2 4\\n2 3\\n1 3\\n2 4\\n2 4\\n1 3\\n2 4\\n\\nSAMPLE\", \"2\\n2 3\\n4 10\\n2 9\\n2 1\\n4 5\\n5 2\", \"4\\n2 1\\n1 3\\n2 4\\n2 2\\n1 3\\n2 4\\n2 3\\n1 6\\n2 4\\n2 4\\n1 3\\n2 4\\n\\nSAMPLE\", \"4\\n2 1\\n1 3\\n2 4\\n2 2\\n1 3\\n2 4\\n2 3\\n1 6\\n4 4\\... | {
"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": "Solve The Mystery\n\nInput:\nFirst line contains T - number of test cases.\nFollowing T lines each contains a string of characters in the range [a-z]... | code | {
"ground_truth": "{\"inputs\": [\"10\\nkey\\nto\\ncontrol\\nnine\\ntails\\nis\\nin\\nyour\\nhand\\nphone\\n\\nSAMPLE\", \"10\\nyxreuzmhd\\nvcpgzn\\nfdz\\nh\\npng\\ngo\\nvmhgmhmuy\\ngmwfkpf\\nblheu\\nspuuxwa\", \"10\\nkey\\nto\\ncontrol\\nnine\\ntails\\nis\\nin\\nyour\\nhand\\nepiphany\", \"10\\nyxreuzmhd\\nvcpgzn\\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": "Dr. Hedro is astonished. According to his theory, we can make sludge that can dissolve almost everything on the earth. Now he's trying to produce the... | code | {
"ground_truth": "{\"inputs\": [\"2\\n4\\n0\", \"2\\n8\\n0\", \"2\\n6\\n0\", \"2\\n2\\n0\", \"2\\n0\\n0\", \"2\\n14\\n0\", \"2\\n12\\n0\", \"2\\n10\\n0\", \"2\\n18\\n0\", \"2\\n24\\n0\", \"2\\n0\\n1\", \"2\\n0\\n-1\", \"2\\n0\\n-2\", \"2\\n0\\n2\", \"2\\n0\\n4\", \"2\\n0\\n-4\", \"2\\n0\\n0\", \"2\\n0\\n-1\", \"2\\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": "John Smith knows that his son, Thomas Smith, is among the best students in his class and even in his school. After the students of the school took th... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5\\n100 98 100 100\\n100 100 100 100\\n100 100 99 99\\n90 99 90 100\\n100 98 60 99\\n\",\n \"6\\n100 80 90 99\\n60 60 60 60\\n90 60 100 60\\n60 100 60 80\\n100 100 0 100\\n0 0 0 0\\n\",\n \"1\\n0 0 0 0\\n\",\n \"1\\n15 71 57 86\\n\",\n \"5\\n4 8 2 6\\n8 3 5 2\\... | {
"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 arranged N colorful balls in a row. The i-th ball from the left has color c_i and weight w_i.\n\nHe can rearrange the balls by performing the f... | code | {
"ground_truth": "{\"inputs\": [\"1 1 1\\n1 1\", \"4 7 3\\n3 2\\n4 3\\n2 1\\n4 4\", \"21 77 68\\n16 73\\n16 99\\n19 66\\n2 87\\n2 16\\n7 17\\n10 36\\n10 68\\n2 38\\n10 74\\n13 55\\n21 21\\n3 7\\n12 41\\n13 88\\n18 6\\n2 12\\n13 87\\n1 9\\n2 27\\n13 15\", \"4 7 3\\n3 1\\n4 3\\n2 1\\n4 4\", \"21 77 68\\n16 73\\n16 99\... | {
"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 league games and tournament games in sports competitions. In soccer league games, points are given to each of the wins, losses, and draws, ... | code | {
"ground_truth": "{\"inputs\": [\"4\\nJapan 1 0 2\\nEgypt 1 2 0\\nCanada 0 2 1\\nSpain 2 0 1\\n3\\nIndia 0 2 0\\nPoland 1 0 1\\nItaly 1 0 1\\n0\", \"4\\nJapan 1 0 2\\nEgypt 1 2 0\\nCanada 0 2 1\\nSpain 2 0 1\\n3\\nIndia 0 2 0\\nPoland 1 0 1\\nItaly 1 -1 1\\n0\", \"4\\nJapan 1 0 2\\nEgypt 1 2 0\\nCanada 0 2 1\\nSpain... | {
"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": "Rachel has some candies and she decided to distribute them among $N$ kids. The ith kid receives $A_i$ candies. The kids are happy iff the difference ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n5 5\\n2 3 4 5 6\\n5 6\\n6 7 8 9 10\\n4 4\\n1 2 3 4\\n2 3\\n1 8\\n1 1\\n1\\n\", \"2\\n2 0\\n1 1\\n2 1\\n1 2\\n\", \"2\\n2 0\\n1 1\\n2 1\\n1 1\\n\", \"4\\n4 0\\n1 1 1 1\\n5 5\\n5 5 5 5 5\\n2 0\\n2 2\\n3 1\\n3 3 3\\n\", \"1\\n2 40000\\n50000 100000\\n\", \"1\\n2 100000\\n1 100000\\... | {
"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": "D --Invisible\n\nProblem Statement\n\nYou are trying to play a card game called \"Invisible\" with your friends. This card game uses two types of car... | code | {
"ground_truth": "{\"inputs\": [\"2 2\\n100 -1\\n200 300\", \"2 2\\n100 -1\\n200 62\", \"2 2\\n110 -1\\n200 62\", \"2 2\\n111 -1\\n200 62\", \"2 2\\n100 -1\\n200 398\", \"2 2\\n100 -1\\n200 37\", \"2 2\\n110 -1\\n200 85\", \"2 2\\n111 -1\\n42 62\", \"2 1\\n100 -1\\n200 37\", \"2 2\\n100 -1\\n200 85\", \"2 1\\n101 -1... | {
"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: Tanya and Stairways\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nLittle girl Tanya climbs the stairs i... | code | {
"ground_truth": "{\"inputs\": [\"7\\n1 2 3 1 2 3 4\", \"4\\n1 1 1 1\", \"5\\n1 2 3 4 5\", \"5\\n1 2 1 2 1\", \"1\\n1\", \"48\\n1 2 3 4 1 2 3 1 1 2 3 1 2 3 4 1 1 2 3 4 1 2 3 4 1 2 3 4 1 1 2 1 2 1 2 1 1 2 1 2 1 2 3 1 2 1 2 1\", \"2\\n1 2\", \"3\\n1 1 2\", \"4\\n1 1 2 3\", \"8\\n1 2 3 1 2 3 4 5\", \"5\\n1 1 1 2 3\"], ... | {
"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": "problem\n\nCreate a program that counts the number of consecutive JOI or IOI characters in a given character string. The character string consists on... | code | {
"ground_truth": "{\"inputs\": [\"JOIJOI\\nJOIOIOIOI\\nJOIOIJOINXNXJIOIOIOJ\", \"None\", \"JOIJOI\\nJOIOIOIOI\\nJOIOIOIJXNXNIOJIOIOJ\", \"eonN\", \"JOIJOI\\nJOIOINIOI\\nJOIOIOIJXNXNIOJIOIOJ\", \"JOIJOI\\nJOIOINIOI\\nJOIOIJOINXNXJIOIOIOJ\", \"JOIJOI\\nJOIOINIOI\\nJOIPIJOINXNXJIOIOIOJ\", \"JOIJOH\\nJOIOINIOI\\nJOIPIJO... | {
"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 S. The task is to print all unique permutations of the given string in lexicographically sorted order.\nExample 1:\nInput: ABC\nOutput... | code | {
"ground_truth": "{\"fn_name\": \"find_permutation\", \"inputs\": [[\"DOG\"], [\"CAT\"], [\"ABCD\"], [\"FED\"], [\"SING\"], [\"A\"], [\"B\"], [\"BA\"], [\"AAA\"], [\"BBBB\"], [\"ABCDE\"], [\"AAAAB\"]], \"outputs\": [[[\"DGO\", \"DOG\", \"GDO\", \"GOD\", \"ODG\", \"OGD\"]], [[\"ACT\", \"ATC\", \"CAT\", \"CTA\", \"TAC... | {
"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 dial lock is a kind of lock which has some dials with printed numbers. It has a special sequence of numbers, namely an unlocking sequence, to be op... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1357 4680\\n6\\n777777 003330\\n0\", \"4\\n1433 4680\\n6\\n777777 003330\\n0\", \"4\\n1357 4680\\n6\\n509138 003330\\n0\", \"4\\n1357 4680\\n6\\n297443 003330\\n0\", \"4\\n1357 5363\\n6\\n777777 003330\\n0\", \"4\\n1357 1908\\n6\\n509138 003330\\n0\", \"4\\n2443 5385\\n6\\n56874... | {
"index": 0,
"split": "dummy"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.