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": "Problem description.\n\nThis problem is simple and will introduce you to the Dynamic Programming.\n\nYou will be given an array and a key value.\n\nY... | code | {
"ground_truth": "{\"inputs\": [\"1\\n5\\n1 1 1 1 1\\n1\\n2\\n3\\n4\\n5\\n\"], \"outputs\": [\"2 2 3\\n1 1 1\"]}",
"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": "Bananistan is a beautiful banana republic. Beautiful women in beautiful dresses. Beautiful statues of beautiful warlords. Beautiful stars in beautifu... | code | {
"ground_truth": "{\"inputs\": [\"5 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n\", \"5 5\\n1 5\\n3 7\\n5 9\\n7 11\\n1000000000 1000000000\\n\", \"5 5\\n1 1\\n2 2\\n3 3\\n4 4\\n5 5\\n\", \"5 5\\n1 5\\n3 7\\n5 9\\n7 11\\n1000000000 1000010000\\n\", \"5 4\\n2 7\\n9 16\\n6 10\\n9 17\\n1 6\\n\", \"5 5\\n1 2\\n2 7\\n5 12\\n1 11\\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": "It's not the rivers that you might be thinking about. The question revolves around the concept of digital rivers.\nA digital river is a sequence of n... | code | {
"ground_truth": "{\"inputs\": [\"86\\n 12345\\n 0\", \"86\\n 12444\\n 0\", \"86\\n 5862\\n 0\", \"86\\n 9079\\n 0\", \"86\\n 7745\\n 0\", \"86\\n 9113\\n 0\", \"86\\n 9885\\n 0\", \"86\\n 4733\\n 0\", \"86\\n 18793\\n 0\", \"86\\n 6477\\n 0\", \"86\\n 18588\\n 0\", \"86\\n 4494\\n 0\", \"86\... | {
"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 polar bears are going fishing. They plan to sail from (sx, sy) to (ex, ey). However, the boat can only sail by wind. At each second, the wind blo... | code | {
"ground_truth": "{\"inputs\": [\"10 5 3 3 6\\nNENSWESNEE\\n\", \"5 0 0 1 1\\nSESNW\\n\", \"15 1 1 1 2\\nNNNNNNNNNNNNNNN\\n\", \"11 1 1 1 2\\nNNNNNNNNNNN\\n\", \"1 0 0 0 -1\\nS\\n\", \"41 -264908123 -86993764 -264908123 -86993723\\nNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\\n\", \"19 -172106364 -468680119 -172106365... | {
"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": "Median of K numbers is defined as the (K/2)th smallest number, if K is even; and the ((K+1)/2)th smallest number if K is odd. For example, \n\nmedian... | code | {
"ground_truth": "{\"inputs\": [\"5\\n10\\n5\\n1\\n2\\n15\\n\\nSAMPLE\", \"5\\n11\\n5\\n1\\n2\\n15\\n\\nSAMPLE\", \"5\\n11\\n5\\n1\\n4\\n15\\n\\nSAMPLE\", \"5\\n11\\n10\\n1\\n4\\n15\\n\\nSALPLE\", \"5\\n11\\n19\\n1\\n4\\n15\\n\\nSALOLE\", \"5\\n11\\n19\\n1\\n4\\n1\\n\\nSALOLE\", \"5\\n11\\n8\\n1\\n4\\n1\\n\\nSALOLE\... | {
"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": "# Problem\n\nIn China,there is an ancient mathematical book, called \"The Mathematical Classic of Sun Zi\"(《孙子算经》). In the book, there is a classic m... | code | {
"ground_truth": "{\"fn_name\": \"find_unknown_number\", \"inputs\": [[2, 3, 2], [1, 2, 3], [1, 3, 5], [0, 0, 0], [1, 1, 1]], \"outputs\": [[23], [52], [103], [105], [1]]}",
"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": "Consider a sequence $A$ of integers, containing $N$ integers between $1$ and $N$. Each integer appears exactly once in the sequence.\n\nA subsequence... | code | {
"ground_truth": "{\"inputs\": [\"5 4\\n1 2 3 4 5\\n\", \"6 3\\n1 2 4 5 6 3\\n\", \"7 4\\n5 7 2 4 3 1 6\\n\"], \"outputs\": [\"2\\n\", \"1\\n\", \"4\\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": "As Valentines Day was approaching, some couples on the campus are upto some mischief and are sneaking around in the Campus Building. But the building... | code | {
"ground_truth": "{\"inputs\": [\"20\\n1 6\\nS...G<\\n40 63\\nv.........##v^.#...#...#............#...........#...v..<.......\\n.^....>........#..#..#...##.............<#..#...........<##..#.\\n...>#....#.<......v#.#..........>.>.......#..........<#.....#..\\nv#........................#.##..#.#.........<.v..#....>#.... | {
"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 call a string \"s-palindrome\" if it is symmetric about the middle of the string. For example, the string \"oHo\" is \"s-palindrome\", but the ... | code | {
"ground_truth": "{\"inputs\": [\"oXoxoXo\\n\", \"bod\\n\", \"ER\\n\", \"oiio\\n\", \"uuuu\\n\", \"iOi\\n\", \"VxrV\\n\", \"A\\n\", \"lxl\\n\", \"o\\n\", \"iii\\n\", \"ipOqi\\n\", \"uu\\n\", \"uuu\\n\", \"O\\n\", \"AAWW\\n\", \"Db\\n\", \"OuO\\n\", \"JL\\n\", \"tt\\n\", \"ii\\n\", \"NNNN\\n\", \"iIcamjTRFH\\n\", \"T... | {
"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": "A tree is an undirected connected graph without cycles. The distance between two vertices is the number of edges in a simple path between them.\n\nLi... | code | {
"ground_truth": "{\n \"inputs\": [\n \"6 2\\n1 2\\n1 3\\n2 4\\n2 5\\n4 6\\n\",\n \"13 3\\n1 2\\n3 2\\n4 2\\n5 2\\n3 6\\n10 6\\n6 7\\n6 13\\n5 8\\n5 9\\n9 11\\n11 12\\n\",\n \"3 5\\n2 1\\n3 1\\n\",\n \"2 1\\n1 2\\n\",\n \"2 5\\n2 1\\n\",\n \"15 1\\n12 9\\n13 7\\n1 3\\n10 4\\n9 2\\n2 15\\n11 4\\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": "Okabe needs to renovate the Future Gadget Laboratory after he tried doing some crazy experiments! The lab is represented as an n by n square grid of ... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 1 2\\n2 3 1\\n6 4 1\\n\", \"3\\n1 5 2\\n1 1 1\\n1 2 3\\n\", \"4\\n1 1 1 1\\n1 12 1 2\\n4 4 1 3\\n5 10 6 1\\n\", \"1\\n2\\n\", \"1\\n60000\\n\", \"3\\n1 1 4\\n1 1 2\\n1 1 2\\n\", \"4\\n1 1 1 1\\n1 14 1 6\\n4 5 1 5\\n3 8 2 1\\n\", \"4\\n1 1 1 1\\n1 13 1 2\\n4 5 1 3\\n5 11 6 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": "Pasha has recently bought a new phone jPager and started adding his friends' phone numbers there. Each phone number consists of exactly n digits.\n\n... | code | {
"ground_truth": "{\n \"inputs\": [\n \"6 2\\n38 56 49\\n7 3 4\\n\",\n \"8 2\\n1 22 3 44\\n5 4 3 2\\n\",\n \"2 1\\n9 9\\n9 9\\n\",\n \"2 1\\n9 9\\n0 9\\n\",\n \"4 1\\n4 3 2 1\\n1 2 3 4\\n\",\n \"18 9\\n2 3\\n0 4\\n\",\n \"4 4\\n1122\\n2\\n\",\n \"10 5\\n8378 11089\\n7 5\\n\",\n \"10 5\\n5... | {
"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 is a hotel with the following accommodation fee:\n - X yen (the currency of Japan) per night, for the first K nights\n - Y yen per night, for t... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3\\n10000\\n9000\\n\", \"2\\n3\\n10000\\n9000\\n\"], \"outputs\": [\"48000\\n\", \"20000\\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": "A boy Petya loves chess very much. He even came up with a chess piece of his own, a semiknight. The semiknight can move in any of these four directio... | code | {
"ground_truth": "{\"inputs\": [\"2\\n........\\n........\\n......#.\\nK..##..#\\n.......#\\n...##..#\\n......#.\\nK.......\\n\\n........\\n........\\n..#.....\\n..#..#..\\n..####..\\n...##...\\n........\\n....K#K#\\n\", \"3\\n........\\n........\\n..#.....\\n..#..#..\\n..####..\\n...##...\\n........\\n####K#K#\\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": "Chef wants to store some important numerical data on his personal computer. He is using a new data type that can store values only from 0 till N both... | code | {
"ground_truth": "{\"inputs\": [\"5\\n25 23\\n30 0\\n15 10\\n20 20\\n35 34\\n\", \"1\\n11 11\\n\", \"4\\n12 12\\n30 15\\n18 17\\n20 21\\n\", \"1\\n1 1\\n\", \"1\\n50 50\\n\", \"1\\n50 51\\n\", \"1\\n2 3\\n\"], \"outputs\": [\"23\\n0\\n10\\n20\\n34\", \"11\", \"12\\n15\\n17\\n0\", \"1\", \"50\", \"0\", \"0\"]}",
"s... | {
"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 morning Tolik has understood that while he was sleeping he had invented an incredible problem which will be a perfect fit for Codeforces! But, a... | code | {
"ground_truth": "{\"inputs\": [\"782 19\\n\", \"1 2892\\n\", \"61 389\\n\", \"4830 1\\n\", \"6354 1\\n\", \"8 8\\n\", \"6 8\\n\", \"1249 19\\n\", \"1 3575\\n\", \"61 407\\n\", \"5803 1\\n\", \"6354 2\\n\", \"8 4\\n\", \"3 3\\n\", \"1122 19\\n\", \"1 6589\\n\", \"5803 2\\n\", \"6925 2\\n\", \"8 5\\n\", \"4 3\\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": "Ani and Borna are playing a short game on a two-variable polynomial. It's a special kind of a polynomial: the monomials are fixed, but all of its coe... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2 0\\n0 0\\n\", \"10\\n2 0\\n5 0\\n6 0\\n8 0\\n4 6\\n5 5\\n6 6\\n2 4\\n8 4\\n3 3\\n\", \"2\\n1 0\\n0 0\\n\", \"2\\n1 0\\n2 0\\n\", \"2\\n2 0\\n3 0\\n\", \"5\\n0 0\\n500000000 2\\n999999998 6\\n499999999 2\\n0 1000000000\\n\", \"8\\n8 8\\n7 6\\n10 2\\n10 6\\n9 6\\n4 10\\n8 6\\n10... | {
"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": "Artem has an array of n positive integers. Artem decided to play with it. The game consists of n moves. Each move goes like this. Artem chooses some ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3 1 5 2 6\\n\", \"5\\n1 2 3 4 5\\n\", \"5\\n1 100 101 100 1\\n\", \"10\\n96 66 8 18 30 48 34 11 37 42\\n\", \"1\\n87\\n\", \"2\\n93 51\\n\", \"3\\n31 19 5\\n\", \"4\\n86 21 58 60\\n\", \"5\\n21 6 54 69 32\\n\", \"6\\n46 30 38 9 65 23\\n\", \"7\\n82 60 92 4 2 13 15\\n\", \"8\\n77... | {
"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": "Amr has got a large array of size n. Amr doesn't like large arrays so he intends to make it smaller.\n\nAmr doesn't care about anything in the array ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 1 2 2 1\\n\", \"5\\n1 2 2 3 1\\n\", \"6\\n1 2 2 1 1 2\\n\", \"10\\n1 1000000 2 1000000 3 2 1000000 1 2 1\\n\", \"10\\n1 2 3 4 5 5 1 2 3 4\\n\", \"10\\n1 1 2 1 1 2 2 1 2 3\\n\", \"10\\n5 4 3 2 1 1 2 3 4 5\\n\", \"10\\n1 10 100 1000 10000 1 10 100 1000 10000\\n\", \"10\\n9 9 9 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": "Given an unsorted array arr[] of size N, the task is to check whether the array consists of consecutive numbers or not.\nExample 1:\nInput: N = 5, ar... | code | {
"ground_truth": "{\"inputs\": [\"N = 5, arr[] = {5, 4, 2, 1, 3}\", \"N = 6, arr[] = {2, 1, 0, -3, -1, -2}\"], \"outputs\": [\"Yes\", \"Yes\"]}",
"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": "\"This problem is rubbish! There is not statement, and there are only 5 test cases. The problemsetter took liberties with this problem!\" — people co... | code | {
"ground_truth": "{\"inputs\": [\"5\\n\", \"4\\n\", \"2\\n\", \"3\\n\", \"1\\n\"], \"outputs\": [\"1\", \"2\", \"3\", \"1\", \"2\"]}",
"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": "Chef is the leader of Chef's Earth Defense Organization, and his mission is to counter aliens which are threatening the earth. According to informati... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3 5\\n1 3 5\\n4 8\\n2 4 6 8\\n\", \"1\\n4 6\\n3 6 9 12\\n\", \"2\\n2 1\\n1 3\\n2 5\\n1 3\\n\", \"1\\n5 7\\n6 12 18 24 30\\n\", \"1\\n5 8\\n11 22 33 44 55\\n\", \"1\\n2 1\\n1 1000000000\\n\", \"1\\n5 1\\n1 2 3 4 5\\n\", \"1\\n3 3\\n1 5 9\\n\", \"1\\n3 1\\n1 2 3\\n\", \"1\\n3 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": "There is a stack of N cards, each of which has a non-negative integer written on it. The integer written on the i-th card from the top is A_i.\n\nSnu... | code | {
"ground_truth": "{\"inputs\": [\"10\\n3 1 4 1 5 9 2 6 5 3\", \"6\\n5 2 4 1 6 9\", \"4\\n3 1 4 2\", \"10\\n3 1 4 1 5 9 2 11 5 3\", \"6\\n5 2 4 1 1 9\", \"4\\n1 1 4 2\", \"10\\n3 1 4 1 5 2 2 11 5 3\", \"6\\n5 2 4 1 1 15\", \"4\\n1 0 4 2\", \"10\\n3 1 4 1 5 2 2 11 5 4\", \"6\\n5 2 4 1 0 15\", \"4\\n1 0 2 2\", \"10\\n3... | {
"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": "Jem is famous for his laziness at school. He always leaves things to last minute. Now Jem has N problems in the assignment of \"Advanced topics in al... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 1 1\\n2 2 2\\n3 3 3\\n4 4 4\\n5 5 5\\n\", \"1\\n10 1 1\\n\", \"1\\n7 3 2\\n\", \"3\\n8 4 2\\n10 5 3\\n1 5 10\\n\", \"2\\n11 2 3\\n15 3 4\\n\", \"1\\n1 1 100000000\\n\", \"2\\n100000000 100000000 100000000\\n100000000 100000000 100000000\\n\", \"1\\n108 100000000 1\\n\", \"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. Arbok has cut out some part of the grid so that, for each i = 1, 2, \\ldots, N, the bott... | code | {
"ground_truth": "{\"inputs\": [\"10\\n4 7 4 8 4 6 8 2 3 6\", \"3\\n2 1 2\", \"2\\n2 2\", \"4\\n1 2 4 1\", \"10\\n4 7 4 9 4 6 8 2 3 6\", \"3\\n3 1 2\", \"4\\n2 2 4 1\", \"4\\n2 2 1 1\", \"10\\n4 7 4 9 4 6 8 2 3 2\", \"4\\n2 3 4 1\", \"4\\n2 2 1 2\", \"10\\n4 7 4 9 4 6 8 1 3 2\", \"4\\n2 2 2 2\", \"10\\n4 7 4 8 4 6 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": "You are playing a new famous fighting game: Kortal Mombat XII. You have to perform a brutality on your opponent's character.\n\nYou are playing the g... | code | {
"ground_truth": "{\n \"inputs\": [\n \"7 3\\n1 5 16 18 7 2 10\\nbaaaaca\\n\",\n \"5 5\\n2 4 1 3 1000\\naaaaa\\n\",\n \"5 4\\n2 4 1 3 1000\\naaaaa\\n\",\n \"8 1\\n10 15 2 1 4 8 15 16\\nqqwweerr\\n\",\n \"6 3\\n14 18 9 19 2 15\\ncccccc\\n\",\n \"2 1\\n10 10\\nqq\\n\",\n \"1 1\\n10\\nz\\n\",\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": "To AmShZ, all arrays are equal, but some arrays are more-equal than others. Specifically, the arrays consisting of n elements from 1 to n that can be... | code | {
"ground_truth": "{\"inputs\": [\"2 2\\n\", \"10000000 10000\\n\", \"1 1\\n\", \"20 100\\n\", \"5 4\\n\", \"724648 77777\\n\", \"193486257 99999\\n\", \"10000 10000\\n\", \"987654321 54321\\n\", \"100000000 100000\\n\", \"852585258 33333\\n\", \"1000000000 10000\\n\", \"100000 100000\\n\", \"999999999 100000\\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": "Colonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has a coolness factor, which shows how much it's owner reache... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4\\n1 3 1 4\\n\",\n \"5\\n1 2 3 2 5\\n\",\n \"5\\n1 5 3 2 4\\n\",\n \"10\\n1 1 2 3 4 5 6 7 8 9\\n\",\n \"11\\n9 2 10 3 1 5 7 1 4 8 6\\n\",\n \"4\\n4 3 2 2\\n\",\n \"1\\n1\\n\",\n \"50\\n49 37 30 2 18 48 14 48 50 27 1 43 46 5 21 28 44 2 24 17 41 38 25 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": "Internet search engines, such as Google, automatically sort and categorize web pages around the world to create a huge database. It also parses the s... | code | {
"ground_truth": "{\"inputs\": [\"Win today's preliminary contest and be qualified to visit University of Aizu.\", \"Rain, rain, go to Spain.\", \"Win today's preliminary contest and be qualified to visit University fo Aizu.\", \"Rain, rain, go ot Spain.\", \"Rain, iarn, og ot Spain.\", \"Win todax's premiminary con... | {
"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 call a number k-good if it contains all digits not exceeding k (0, ..., k). You've got a number k and an array a containing n numbers. Find out... | code | {
"ground_truth": "{\"inputs\": [\"2 1\\n1\\n10\\n\", \"10 6\\n1234560\\n1234560\\n1234560\\n1234560\\n1234560\\n1234560\\n1234560\\n1234560\\n1234560\\n1234560\\n\", \"1 0\\n1000000000\\n\", \"1 3\\n1\\n\", \"2 8\\n12345678\\n1230\\n\", \"6 1\\n10\\n102\\n120\\n1032\\n1212103\\n1999999\\n\", \"6 0\\n10\\n102\\n120\\... | {
"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 the dangerous wild west, robbers are attacking a long train with many coaches. Chaos erupts, and the robbers realize that the amount of chaos equa... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3 5 10 2 5\\n2 4 5 1 3\\n\", \"4\\n32 3 3 3\\n1 3 2 4\\n\"], \"outputs\": [\"90\\n\", \"50\\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": "This time minions are celebrating Diwali Festival. There are N minions in total. Each of them owns a house. On this Festival, Each of them wants to d... | code | {
"ground_truth": "{\"inputs\": [[\"2\", \"4 9\", \"5 2 2 4\", \"4 9\", \"5 2 18 3\"]], \"outputs\": [[\"YES\", \"NO\"]]}",
"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": "Consider sequences \\{A_1,...,A_N\\} of length N consisting of integers between 1 and K (inclusive).\nThere are K^N such sequences. Find the sum of \... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n\", \"3 200\\n\", \"100000 100000\\n\", \"2 1000\\n\", \"2 100000\\n\", \"2 1\\n\", \"100000 1\\n\", \"100000 2\\n\", \"99991 99989\\n\", \"36 99291\\n\", \"37 99737\\n\", \"59 64993\\n\", \"26 92227\\n\", \"8 56588\\n\", \"7775 25\\n\", \"63982 84\\n\", \"68417 56\\n\", \"319... | {
"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": "For Diwali, Chef arranges all $K$ laddus in a row in his sweet shop. Whenever a customer comes to buy laddus, chef follows a rule that each customer ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n123456789\\n\", \"1\\n1000000000\\n\", \"4\\n1000000000\\n999999999\\n999999998\\n999999997\\n\"], \"outputs\": [\"67108864\", \"536870912\", \"536870912\\n536870912\\n536870912\\n536870912\"]}",
"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": "**DESCRIPTION:**\n\n Your strict math teacher is teaching you about right triangles, and the Pythagorean Theorem --> a^2 + b^2 = c^2 whereas a and b... | code | {
"ground_truth": "{\"fn_name\": \"side_len\", \"inputs\": [[1, 1], [3, 4], [4, 6], [5, 12], [8, 10]], \"outputs\": [[[1]], [[2, 3, 4, 6]], [[3, 4, 5, 6, 7, 8, 9]], [[8, 9, 10, 11, 12, 14, 15, 16]], [[3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]]]}",
"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": "Buses run between the cities A and B, the first one is at 05:00 AM and the last one departs not later than at 11:59 PM. A bus from the city A departs... | code | {
"ground_truth": "{\"inputs\": [\"10 30\\n10 35\\n05:20\\n\", \"60 120\\n24 100\\n13:00\\n\", \"15 14\\n32 65\\n05:45\\n\", \"1 1\\n3 2\\n08:44\\n\", \"1 3\\n1 2\\n21:43\\n\", \"30 19\\n21 4\\n10:30\\n\", \"65 49\\n24 90\\n07:10\\n\", \"1 1\\n1 1\\n23:59\\n\", \"40 74\\n100 42\\n05:40\\n\", \"1 120\\n1 100\\n23:59\\... | {
"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 that the only differences between easy and hard versions are the constraints on n and the time limit. You can make hacks only if all versions ar... | code | {
"ground_truth": "{\"inputs\": [\"2664\\n\", \"2868\\n\", \"1725\\n\", \"6726\\n\", \"286\\n\", \"34\\n\", \"2416\\n\", \"1649\\n\", \"32\\n\", \"80\\n\", \"701\\n\", \"2264\\n\", \"5000\\n\", \"5150\\n\", \"78\\n\", \"5\\n\", \"287\\n\", \"2512\\n\", \"463\\n\", \"4240\\n\", \"335\\n\", \"6\\n\", \"4996\\n\", \"777... | {
"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, return its base 7 string representation.\n\nExample 1:\n\nInput: 100\nOutput: \"202\"\n\n\n\nExample 2:\n\nInput: -7\nOutput: \"-10... | code | {
"ground_truth": "{\"fn_name\": \"convertToBase7\", \"inputs\": [[50], [10], [0], [-14], [123456], [10000000], [-10000000], [1], [-1], [7], [9876543], [-8742307]], \"outputs\": [[\"101\"], [\"13\"], [\"0\"], [\"-20\"], [\"1022634\"], [\"150666343\"], [\"-150666343\"], [\"1\"], [\"-1\"], [\"10\"], [\"146643405\"], [\... | {
"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 of 2n distinct integers. You want to arrange the elements of the array in a circle such that no element is equal to the the ... | code | {
"ground_truth": "{\"inputs\": [\"3\\n3\\n1 2 3 4 5 6\\n2\\n123 456 789 10\\n1\\n6 9\\n\", \"1\\n1\\n420 69\\n\", \"3\\n3\\n1 2 3 4 5 6\\n2\\n123 456 789 10\\n1\\n6 9\\n\", \"1\\n1\\n692 69\\n\", \"3\\n3\\n1 2 3 4 5 6\\n2\\n123 456 789 6\\n1\\n6 9\\n\", \"3\\n3\\n1 2 3 4 5 6\\n2\\n123 456 962 10\\n1\\n6 9\\n\", \"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 easier version of the problem. In this version, n ≤ 6.\n\nMarek is working hard on creating strong testcases to his new algorithmic proble... | code | {
"ground_truth": "{\"inputs\": [\"3\\n3 1 4\\n1 5 9\\n2 6 5\\n\", \"2\\n50 50\\n50 50\\n\", \"6\\n87 56 53 27 22 24\\n29 66 60 37 61 94\\n79 32 85 64 36 95\\n58 52 42 99 62 21\\n41 83 88 73 6 8\\n33 20 28 25 92 5\\n\", \"6\\n87 48 67 31 76 91\\n56 97 66 54 79 61\\n99 59 85 81 50 92\\n89 72 64 96 14 88\\n90 71 75 78 ... | {
"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 problem was inspired by Pied Piper story. After a challenge from Hooli's compression competitor Nucleus, Richard pulled an all-nighter to invent ... | code | {
"ground_truth": "{\"inputs\": [\"3\\n9\\niredppipe\\npiedpiper\\n4\\nestt\\ntest\\n4\\ntste\\ntest\\n\", \"4\\n1\\na\\nz\\n5\\nadhas\\ndasha\\n5\\naashd\\ndasha\\n5\\naahsd\\ndasha\\n\", \"5\\n2\\nab\\naa\\n2\\naa\\naa\\n2\\nab\\nba\\n2\\nbb\\nba\\n3\\naab\\nabb\\n\", \"6\\n7\\ncontest\\nntecost\\n7\\ncontest\\nnst... | {
"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 Chelyabinsk lives a much respected businessman Nikita with a strange nickname \"Boss\". Once Nikita decided to go with his friend Alex to the Summ... | code | {
"ground_truth": "{\"inputs\": [\"8 4\\n1 5 24 10\\n2 4 6 15\\n4 6 30 50\\n6 7 4 20\\n\", \"4 4\\n1 4 20 5\\n1 3 21 10\\n3 3 4 30\\n3 4 4 20\\n\", \"20 30\\n5 10 38 50\\n17 18 86 42\\n4 13 91 90\\n20 20 45 31\\n3 3 16 11\\n16 16 80 66\\n19 19 96 26\\n15 20 7 84\\n9 18 45 36\\n5 19 89 6\\n9 9 4 58\\n9 14 97 31\\n6 12... | {
"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 is a bus route as shown in Figure 1. There are 10 stops, each numbered 0-9. The bus turns back at stop 0, but the other side is a circulation r... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2 4\\n4 2\", \"2\\n2 5\\n4 2\", \"2\\n2 1\\n4 2\", \"2\\n2 0\\n4 2\", \"2\\n1 4\\n4 2\", \"2\\n2 0\\n4 0\", \"2\\n2 0\\n4 1\", \"2\\n1 8\\n4 2\", \"2\\n2 0\\n3 0\", \"2\\n2 0\\n1 1\", \"2\\n1 8\\n4 0\", \"2\\n4 0\\n1 1\", \"2\\n1 8\\n8 0\", \"2\\n2 0\\n2 1\", \"2\\n1 2\\n8 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 students in a class in Akabe high-school define the relation “acquaintance” as:\n\n* If A and B are friends, then A is acquainted with B.\n* If A... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n1 1\\n1 2\", \"7 3\\n0 1\\n1 2\\n1 3\\n2 3\\n0 4\\n4 5\\n4 6\\n5 6\", \"4 3\\n0 1\\n1 2\\n1 3\\n2 3\\n0 3\\n4 5\\n4 6\\n5 6\", \"5 2\\n1 1\\n1 2\", \"7 8\\n0 1\\n1 2\\n1 3\\n3 3\\n0 4\\n4 5\\n4 6\\n5 6\", \"7 5\\n0 1\\n1 2\\n1 3\\n2 3\\n0 3\\n4 5\\n2 6\\n5 11\", \"10 0\\n2 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": "Due to the frantical usage of the racket to kill flies, Marin has sustained a serious bodily injury known to the medical community as epicondylitis l... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 3 5 7\\n3\\n2 2\\n2 5\\n1 5\\n\", \"5\\n3 3 4 3 2\\n4\\n1 2\\n1 3\\n5 6\\n7 9\\n\"], \"outputs\": [\"3\\n1\\n0\\n\", \"0\\n4\\n7\\n4\\n\"]}",
"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": "A tennis tournament with n participants is running. The participants are playing by an olympic system, so the winners move on and the losers drop out... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5 2 3\\n\",\n \"8 2 4\\n\",\n \"10 1 500\\n\",\n \"20 500 1\\n\",\n \"100 123 99\\n\",\n \"500 1 1\\n\",\n \"500 500 500\\n\",\n \"500 237 474\\n\",\n \"1 2 3\\n\",\n \"1 2 133\\n\",\n \"1 2 100\\n\",\n \"1 3 4\\n\",\n \"1 10 15\\n\",\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": "Chef discovered that his secret recipe has been stolen. He immediately informs the police of the theft.\n\nIt is known that the policeman and thief m... | code | {
"ground_truth": "{\"inputs\": [\"3\\n7 1\\n2 0\\n9 4\\n\", \"1\\n3 10\\n\", \"2\\n1 2\\n1 -1\\n\", \"1\\n-1 -3\\n\", \"1\\n100000 -100000\\n\", \"1\\n3000 5000\\n\", \"1\\n-50000 50000\\n\", \"1\\n-100000 100000\\n\", \"1\\n100000 -100000\\n\"], \"outputs\": [\"6\\n2\\n5\", \"7\", \"1\\n2\", \"2\", \"200000\", \"20... | {
"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": "Alisha has a string of length n. Each character is either 'a', 'b' or 'c'. She has to select two characters s[i] and s[j] such that s[i] != s[j] and ... | code | {
"ground_truth": "{\"inputs\": [\"bbbcbbbb\\n\", \"ccbcccb\\n\", \"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\\n\", \"bbbbbabbbbbabbbbabbbaabbbabbbbabbbaabbbabbbbabbbaabbbabbbbabbbaabbbabbbbabbbaabbbabbbbabbbaabbb\\n\"], \"outputs\": [\"4\", \"6\", \"95\", \"91\"... | {
"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 is a grid with R rows and C columns. We call the cell in the r-th row and c-th column (r,c).\n\nMr. Takahashi wrote non-negative integers into ... | code | {
"ground_truth": "{\"inputs\": [\"2 4\\n4\\n1 1 0\\n1 2 10\\n2 1 30\\n2 2 20\", \"2 2\\n3\\n1 1 0\\n1 2 10\\n2 1 22\", \"3 3\\n4\\n1 2 0\\n1 3 10\\n3 1 10\\n3 3 20\", \"2 2\\n3\\n2 1 20\\n1 2 10\\n2 1 0\", \"2 4\\n4\\n1 1 0\\n2 2 10\\n2 1 30\\n2 2 20\", \"3 3\\n4\\n1 2 1\\n1 3 10\\n3 1 10\\n3 3 20\", \"3 3\\n4\\n1 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": "Burenka and Tonya are playing an old Buryat game with a chip on a board of $n \\times m$ cells.\n\nAt the beginning of the game, the chip is located ... | code | {
"ground_truth": "{\"inputs\": [\"6\\n1 1\\n1 4\\n5 6\\n2 2\\n6 3\\n999999999 1000000000\\n\"], \"outputs\": [\"Tonya\\nBurenka\\nBurenka\\nTonya\\nBurenka\\nBurenka\\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 given an array of N integer numbers. \nThe maximal sum of the array is the maximal sum of the elements of a nonempty consecutive subarray of t... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5\\n1 -2 3 -2 5\\n2\\n-1 -2\", \"2\\n5\\n2 -2 3 -2 5\\n2\\n-1 -2\", \"2\\n5\\n2 0 3 -2 5\\n2\\n-1 -2\", \"2\\n5\\n1 0 3 -2 5\\n2\\n-1 -2\", \"2\\n5\\n1 0 3 -2 5\\n2\\n0 -2\", \"2\\n5\\n1 -1 3 -4 3\\n2\\n-1 -2\", \"2\\n5\\n1 -1 3 -4 3\\n2\\n-2 -2\", \"2\\n5\\n2 0 3 -2 5\\n2\\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": "n children are standing in a circle and playing the counting-out game. Children are numbered clockwise from 1 to n. In the beginning, the first child... | code | {
"ground_truth": "{\"inputs\": [\"7 5\\n10 4 11 4 1\\n\", \"3 2\\n2 5\\n\", \"2 1\\n1\\n\", \"2 1\\n2\\n\", \"2 1\\n3\\n\", \"10 7\\n5 10 4 3 8 10 6\\n\", \"10 8\\n12 6 12 15 20 8 17 12\\n\", \"12 10\\n76 58 82 54 97 46 17 40 36 15\\n\", \"12 6\\n76 61 94 15 66 26\\n\", \"90 10\\n1045 8705 6077 3282 1459 9809 383 62... | {
"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 square matrix of size n (it will be an odd integer). Rows are\nindexed 0 to n-1 from top to bottom and columns are indexed 0 to n-1\n... | code | {
"ground_truth": "{\"inputs\": [\"1\\n7\\n.......\\n.*.....\\n.......\\n.......\\n.......\\n.......\\n.......\\n\\nSAMPLE\", \"1\\n7\\n.......\\n.*.....\\n.......\\n.......\\n.......\\n.......\\n.......\\n\\nSAMQLE\", \"1\\n5\\n.......\\n.*.....\\n.......\\n..-..-.\\n.......\\n.......\\n....../\\n\\nSALPLE\", \"1\\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 given two integers, $a$ and $b$. You want to transform $a$ to $b$ by performing a sequence of operations. You can only perform the following ... | code | {
"ground_truth": "{\"inputs\": [\"103 27\\n\", \"3 8\\n\"], \"outputs\": [\"4\\n\", \"5\\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": "A student, Kita_masa, is taking an English examination. In this examination, he has to write a sentence of length m.\n\nSince he completely forgot th... | code | {
"ground_truth": "{\"inputs\": [\"3 3 4\\na\\naa\\nb\", \"3 3 4\\nb\\naa\\nb\", \"3 3 1\\na\\naa\\nb\", \"2 10 0\\nhello\\nworld\", \"2 67 1000000000000000000\\na\\nb\", \"3 3 4\\nc\\naa\\nb\", \"2 12 0\\nhello\\nworld\", \"2 132 1000000000000000000\\na\\nb\", \"3 5 4\\nc\\naa\\nb\", \"2 12 1\\nhello\\nworld\", \"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": "Petya and Vasya are brothers. Today is a special day for them as their parents left them home alone and commissioned them to do n chores. Each chore ... | code | {
"ground_truth": "{\"inputs\": [\"5 2 3\\n6 2 3 100 1\\n\", \"7 3 4\\n1 1 9 1 1 1 1\\n\", \"4 1 3\\n10 402 402 10\\n\", \"102 101 1\\n1 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 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... | {
"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": "Grapes of Coderpur are very famous. Devu went to the market and saw that there were N people selling grapes. He didn’t like it because things were no... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2 2\\n3 5\\n3 7\\n10 16 18\", \"2\\n2 2\\n3 5\\n3 7\\n8 16 18\", \"2\\n2 2\\n3 8\\n3 7\\n8 16 18\", \"2\\n2 2\\n3 8\\n3 7\\n8 16 7\", \"2\\n2 1\\n5 8\\n3 7\\n8 16 7\", \"2\\n2 2\\n5 8\\n2 7\\n7 16 7\", \"2\\n2 2\\n3 5\\n3 7\\n10 1 18\", \"2\\n2 2\\n5 8\\n3 7\\n8 11 7\", \"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": "Polycarpus adores TV series. Right now he is ready to finish watching a season of a popular sitcom \"Graph Theory\". In total, the season has n episo... | code | {
"ground_truth": "{\"inputs\": [\"10\\n3 8 10 1 7 9 6 5 2\\n\", \"5\\n5 2 4 3\\n\", \"2\\n1\\n\", \"5\\n5 4 3 2\\n\", \"3\\n2 3\\n\", \"3\\n2 1\\n\", \"5\\n1 5 3 4\\n\", \"3\\n3 2\\n\", \"3\\n1 3\\n\", \"5\\n4 3 2 1\\n\", \"5\\n1 4 5 2\\n\", \"3\\n3 1\\n\", \"2\\n2\\n\", \"3\\n1 2\\n\", \"5\\n1 2 3 4\\n\", \"5\\n2 3... | {
"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 art shows, it is very common to have booths where children can create their very own sand art. This art is typically made by taking a jar or bottl... | code | {
"ground_truth": "{\"inputs\": [\"2 2 5 5\\n2.0 2.0\\n4.0\\n1.0 0.0\\n0.0 1.0\\n1.0 0.0\\n0.0 2.0\\n\", \"2 2 5 5\\n2.0 2.0\\n4.0\\n1.0 0.0\\n0.0 1.0\\n1.5 0.0\\n0.0 2.0\\n\", \"2 5 11 10\\n3.0 4.0 4.0 9.0 2.0\\n4.0\\n2.0 2.0 1.0 0.5 0.25\\n0.0 2.0 0.0 4.0 1.0\\n2.0 2.0 3.0 4.0 0.75\\n0.0 2.1 0.0 5.1 1.1\\n\"], \"ou... | {
"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: LRU\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nWhile creating high loaded systems one should pay a s... | code | {
"ground_truth": "{\"inputs\": [\"3 1\\n0.3 0.2 0.5\", \"2 1\\n0.0 1.0\", \"3 2\\n0.3 0.2 0.5\", \"3 3\\n0.2 0.3 0.5\", \"1 1\\n1.0\", \"10 1\\n0.12 0.14 0.13 0.08 0.15 0.10 0.15 0.04 0.02 0.07\", \"10 5\\n0.02 0.17 0.04 0.07 0.21 0.06 0.09 0.11 0.17 0.06\", \"10 10\\n0.02 0.03 0.12 0.21 0.07 0.15 0.21 0.14 0.01 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 are N integers A_1,\\ldots,A_N.\n\nWe will choose exactly K of these elements. Find the maximum possible product of the chosen elements.\n\nThe... | code | {
"ground_truth": "{\"inputs\": [\"4 2\\n1 2 -3 -4\", \"10 10\\n1000000000 100000000 10000000 1000000 100000 10000 1000 100 10 1\", \"4 3\\n-1 -2 -3 -4\", \"2 1\\n-1 1000000000\", \"4 2\\n1 2 -3 0\", \"10 2\\n1000000000 100000000 10000000 1000000 100000 10000 1000 100 10 1\", \"4 3\\n-1 -3 -3 -4\", \"3 1\\n-1 1000000... | {
"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 array arr[] of size N,the task is to arrange the array such that odd elements occupy the odd positions and even elements occupy the even pos... | code | {
"ground_truth": "{\"inputs\": [\"N = 6\\r\\narr[] = {1, 2, 3, 4, 5, 6}\", \"N = 4, arr[] = {3, 2, 4, 1}\"], \"outputs\": [\"2 1 4 3 6 5\", \" 2 3 4 1\"]}",
"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": "Dreamoon likes sequences very much. So he created a problem about the sequence that you can't find in OEIS: \n\nYou are given two integers $d, m$, fi... | code | {
"ground_truth": "{\"inputs\": [\"10\\n1 1000000000\\n2 999999999\\n3 99999998\\n4 9999997\\n5 999996\\n6 99995\\n7 9994\\n8 993\\n9 92\\n10 1\\n\", \"10\\n1 1000000000\\n2 999999999\\n3 170267273\\n4 9999997\\n5 999996\\n6 99995\\n7 9994\\n8 993\\n9 92\\n10 1\\n\", \"10\\n1 1000000000\\n2 999999999\\n3 170267273\\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": "Takahashi is meeting up with Aoki.\nThey have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.\nTakahas... | code | {
"ground_truth": "{\"inputs\": [\"1000 15 80\\n\", \"2000 20 100\\n\", \"10000 1 1\\n\", \"1050 10 100\\n\", \"1001 10 100\\n\", \"1000 10 100\\n\", \"999 10 100\\n\", \"950 10 100\\n\", \"1 1 1\\n\", \"1 10000 10000\\n\", \"522 4575 6426\\n\", \"9445 8772 81\\n\", \"3447 629 3497\\n\", \"7202 7775 4325\\n\", \"3982... | {
"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 simple recommendation system would recommend a user things liked by a certain number of their friends. In this problem you will implement part of s... | code | {
"ground_truth": "{\"inputs\": [\"4 4 1\\nNNNY\\nNNYN\\nNYNN\\nYNNN\\n\", \"3 3 2\\nYYY\\nNNN\\nYNY\\n\", \"1 10 1\\nYYYNYNNYNN\\n\", \"8 4 1\\nYYYN\\nNNNN\\nNYNY\\nYNNY\\nYNYY\\nYNYN\\nYNNY\\nNNYN\\n\", \"9 8 7\\nNYYNNNYY\\nYYYNYNNN\\nYNYNYNNY\\nNYYYNNNY\\nNYYYYNYN\\nNNNNYYNN\\nYNYYYYYY\\nNNYNYNYY\\nNYYNNYYY\\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: Tower of Hanoi\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThe Tower of Hanoi is a well-known mathema... | code | {
"ground_truth": "{\"inputs\": [\"0 1 1\\n1 0 1\\n1 1 0\\n3\", \"0 2 2\\n1 0 100\\n1 2 0\\n3\", \"0 2 1\\n1 0 100\\n1 2 0\\n5\", \"0 5835 1487\\n6637 0 9543\\n6961 6820 0\\n7\", \"0 3287 5433\\n6796 0 5787\\n1445 6158 0\\n26\", \"0 4449 3122\\n6816 0 8986\\n1048 1468 0\\n4\", \"0 913 8129\\n8352 0 4408\\n9073 7625 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": "You are given an array a_1, a_2, …, a_n.\n\nIn one operation you can choose two elements a_i and a_j (i ≠ j) and decrease each of them by one.\n\nYou... | code | {
"ground_truth": "{\"inputs\": [\"6\\n1 2 3 4 5 6\\n\", \"4\\n1 1 2 2\\n\", \"3\\n10407 5987 4237\\n\", \"8\\n3343 33870 9537 1563 709 8515 5451 4713\\n\", \"3\\n319728747 773363571 580543238\\n\", \"3\\n772674020 797853944 81685387\\n\", \"3\\n10225 4237 5987\\n\", \"2\\n1 2\\n\", \"2\\n999999954 999999992\\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: Physical Education Lessons\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThis year Alex has finished sc... | code | {
"ground_truth": "{\"inputs\": [\"4\\n6\\n1 2 1\\n3 4 1\\n2 3 2\\n1 3 2\\n2 4 1\\n1 4 2\", \"3\\n8\\n2 2 1\\n3 3 2\\n1 1 1\\n1 3 2\\n2 3 2\\n3 3 1\\n1 2 1\\n2 2 2\", \"7\\n10\\n5 7 1\\n5 6 2\\n7 7 2\\n6 7 2\\n5 5 1\\n3 6 2\\n1 3 2\\n5 6 1\\n1 3 1\\n6 7 1\"], \"outputs\": [\"2\\n0\\n2\\n3\\n1\\n4\", \"2\\n2\\n1\\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": "In the speed skating badge test, grades are awarded when the time specified for two distances is exceeded. For example, to reach Class A, 500 M requi... | code | {
"ground_truth": "{\"inputs\": [\"40.0 70.0\\n72.5 140.51\", \"40.0 70.15273874709118\\n72.5 140.51\", \"43.236780306897465 72.47791800727414\\n76.48007184592961 143.3245253779178\", \"50.825010742906116 75.69989732783311\\n82.26479437960049 146.33206365267094\", \"55.48794721361476 79.14473639758064\\n86.5307454979... | {
"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": "When they are bored, Federico and Giada often play the following card game with a deck containing 6n cards.\n\nEach card contains one number between ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 3 4 5 6 7 8 11 12 13 17 24 26 27 28\\n\", \"10\\n1 2 6 7 8 9 13 14 15 16 17 18 19 21 22 23 29 30 31 34 35 36 42 43 47 50 51 52 53 54\\n\", \"10\\n2 3 4 7 32 33 34 35 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60\\n\", \"10\\n1 3 4 5 6 7 8 9 10 11 12 13 14 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're at the last mission in one very old and very popular strategy game Dune II: Battle For Arrakis. The map of the mission can be represented as a... | code | {
"ground_truth": "{\"inputs\": [\"3 3 1\\n1 2 3\\n2 1 2\\n1 1 2\\n2 3 100\\n\", \"4 4 3\\n2 5 6 3\\n4 8 10 5\\n2 6 7 1\\n8 4 2 1\\n1 1 8\\n2 3 4\\n4 4 5\\n\"], \"outputs\": [\"\\n21 22 \\n\", \"\\n123 135 129 145 \\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": "On Unix system type files can be identified with the ls -l command which displays the type of the file in the first alphabetic letter of the file sys... | code | {
"ground_truth": "{\"fn_name\": \"linux_type\", \"inputs\": [[\"-rwxrwxrwx\"], [\"Drwxr-xr-x\"], [\"lrwxrw-rw-\"], [\"srwxrwxrwx\"]], \"outputs\": [[\"file\"], [\"door\"], [\"symlink\"], [\"socket\"]]}",
"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 the gym teacher in the school.\n\nThere are $n$ students in the row. And there are two rivalling students among them. The first one is in pos... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n5 1 3 2\\n100 33 100 1\\n6 0 2 3\\n\",\n \"22\\n100 100 100 1\\n100 100 1 100\\n100 0 100 1\\n100 0 1 100\\n2 0 1 2\\n2 100 1 2\\n2 0 2 1\\n2 100 2 1\\n100 0 1 2\\n100 98 1 2\\n100 97 1 2\\n100 0 2 1\\n100 98 2 1\\n100 97 2 1\\n100 0 99 100\\n100 98 99 100\\n100 97 ... | {
"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": "Chefina is always interested to play with string. But due to exam pressure she has no time to solve a string problem. She wants your help. Can you ... | code | {
"ground_truth": "{\"inputs\": [\"5\\nabc\\nbcd\\nxyz\\nyzx\\nabcde\\n\", \"1\\nsmile\\n\", \"1\\ndaisy\\n\", \"1\\ndream\\n\", \"5\\na\\nz\\nd\\ne\\nf\\n\", \"1\\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz... | {
"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": "Petr is a detective in Braginsk. Somebody stole a huge amount of money from a bank and Petr is to catch him. Somebody told Petr that some luxurious c... | code | {
"ground_truth": "{\"inputs\": [\"5 6\\n1 2\\n2 3\\n3 1\\n3 4\\n4 5\\n5 3\\n\", \"3 3\\n1 2\\n2 3\\n3 1\\n\", \"4 6\\n3 4\\n4 3\\n3 1\\n1 2\\n2 1\\n4 2\\n\", \"5 7\\n1 2\\n2 3\\n3 1\\n1 4\\n4 3\\n1 5\\n5 4\\n\", \"7 9\\n1 2\\n2 3\\n3 4\\n4 5\\n5 1\\n1 6\\n6 4\\n4 7\\n7 1\\n\", \"2 2\\n1 2\\n2 1\\n\", \"5 8\\n1 2\\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": "Given a number N. Check whether it is a magic number or not.\nNote:- A number is said to be a magic number, if the sum of its digits are calculated t... | code | {
"ground_truth": "{\"fn_name\": \"isMagic\", \"inputs\": [[1237], [12], [16], [19], [999], [1], [7], [99], [11], [10], [1000000000], [999999999]], \"outputs\": [[0], [0], [0], [1], [0], [1], [0], [0], [0], [1], [1], [0]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.