data_source stringclasses 4
values | prompt listlengths 2 2 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
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 sportsman starts from point x_{start} = 0 and runs to point with coordinate x_{finish} = m (on a straight line). Also, the sportsman can jump — to ... | code | {
"ground_truth": "{\"inputs\": [\"3 10 1 3\\n3 4 7\\n\", \"2 9 2 3\\n6 4\\n\", \"10 100 2 8\\n93 35 24 87 39 46 86 37 73 33\\n\", \"10 1000000000 8905990 20319560\\n233244997 997992814 242452779 497363176 572234096 126615858 886769539 662035052 989086824 716655858\\n\", \"100 1000 1 4\\n228 420 360 642 442 551 940 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": "Arithmancy is Draco Malfoy's favorite subject, but what spoils it for him is that Hermione Granger is in his class, and she is better than him at it.... | code | {
"ground_truth": "{\"inputs\": [\"2\\n1\\n2\\n\\nSAMPLE\", \"2\\n1\\n2\", \"20\\n551\\n147\\n704\\n1\\n209\\n479\\n15\\n155\\n130\\n671\\n254\\n548\\n96\\n255\\n534\\n180\\n456\\n131\\n844\\n20\", \"20\\n551\\n147\\n704\\n1\\n209\\n479\\n15\\n74\\n130\\n671\\n254\\n548\\n96\\n255\\n534\\n180\\n456\\n131\\n844\\n20\"... | {
"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 the following game with Joisino.\n - Initially, you have a blank sheet of paper.\n - Joisino announces a number. If that number is wr... | code | {
"ground_truth": "{\"inputs\": [\"3\\n6\\n2\\n6\\n\", \"4\\n2\\n5\\n5\\n2\\n\", \"6\\n12\\n22\\n16\\n22\\n18\\n12\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"2\\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: Median on Segments (General Case Edition)\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYou are given a... | code | {
"ground_truth": "{\"inputs\": [\"5 4\\n1 4 5 60 4\", \"3 1\\n1 1 1\", \"15 2\\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\", \"1 1\\n1\", \"2 1\\n1 2\", \"2 1\\n2 1\", \"2 2\\n1 2\", \"2 2\\n2 1\", \"3 1\\n1 2 3\", \"3 1\\n1 3 2\", \"3 1\\n2 1 3\", \"3 1\\n2 3 1\", \"3 1\\n3 1 2\", \"3 1\\n3 2 1\", \"2 2\\n1 1\", \"3 2\\n1 1 2\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You have $N$ objects, each with $M$ copies. How many ways are there to take exactly $K$ of them?\n\n-----Input-----\nThe first line of input contains... | code | {
"ground_truth": "{\"inputs\": [\"10 1 2\\n\", \"3 3 3\\n\", \"3 2 7\\n\"], \"outputs\": [\"45\\n\", \"10\\n\", \"0\\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 a positive integer X. Find the largest perfect power that is at most X. Here, a perfect power is an integer that can be represented as ... | code | {
"ground_truth": "{\"inputs\": [\"10\", \"1\", \"999\", \"20\", \"610\", \"38\", \"159\", \"107\", \"72\", \"136\", \"217\", \"261\", \"011\", \"001\", \"7\", \"689\", \"747\", \"52\", \"83\", \"8\", \"124\", \"34\", \"235\", \"27\", \"197\", \"25\", \"1074\", \"324\", \"186\", \"309\", \"390\", \"126\", \"485\", \"... | {
"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": "Example\n\nInput\n\n2 1\n1 2\n1 2 1 1\n\n\nOutput\n\n1/2\n\nWrite Python code to solve the problem. Present the code in \n```python\nYour code\n```\n... | code | {
"ground_truth": "{\"inputs\": [\"2 1\\n1 2\\n1 2 1 2\", \"2 0\\n1 2\\n1 2 1 1\", \"4 1\\n1 2\\n1 2 1 1\", \"4 1\\n1 2\\n1 2 2 2\", \"2 1\\n1 2\\n1 2 1 3\", \"3 0\\n1 2\\n1 2 1 1\", \"5 0\\n1 2\\n1 2 1 1\", \"5 0\\n1 2\\n0 2 1 1\", \"5 0\\n1 2\\n0 2 1 0\", \"3 0\\n1 2\\n0 2 1 0\", \"2 0\\n1 2\\n1 2 1 2\", \"3 -1\\n1... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Alex and Lee continue their games with piles of stones. There are a number of piles arranged in a row, and each pile has a positive integer number o... | code | {
"ground_truth": "{\"fn_name\": \"stoneGameII\", \"inputs\": [[[2, 7, 9, 4, 4]], [[3, 8, 5, 1, 5]], [[15, 5, 7, 8, 9, 6, 10]], [[11, 9, 8, 7, 6, 5, 1]], [[10, 10, 10, 10, 10, 10, 10, 10]], [[1]], [[1, 1]], [[1, 1, 1, 1]], [[1, 2, 3, 4]], [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]],... | {
"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 to write a function to transpose a guitar tab up or down a number of semitones. The amount to transpose is a number, positive or negative. Th... | code | {
"ground_truth": "{\"fn_name\": \"transpose\", \"inputs\": [[2, [\"e|-------5-7-----7-|-8-----8-2-----2-|-0---------0-----|-----------------|\", \"B|-----5-----5-----|---5-------3-----|---1---1-----1---|-0-1-1-----------|\", \"G|---5---------5---|-----5-------2---|-----2---------2-|-0-2-2-----------|\", \"D|-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": "Luke is daydreaming in Math class. He has a sheet of graph paper with $n$ rows and $m$ columns, and he imagines that there is an army base in each ce... | code | {
"ground_truth": "{\"inputs\": [\"3 5\", \"5 2\", \"2 5\"], \"outputs\": [\"6\", \"3\", \"3\"]}",
"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: Ivan and Powers of Two\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nIvan has got an array of *n* non-n... | code | {
"ground_truth": "{\"inputs\": [\"4\\n0 1 1 1\", \"1\\n3\", \"1\\n0\", \"1\\n2000000000\", \"1\\n1\", \"26\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2\"], \"outputs\": [\"0\", \"3\", \"0\", \"2000000000\", \"1\", \"5\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a string, sort it in decreasing order based on the frequency of characters.\n\nExample 1:\n\nInput:\n\"tree\"\n\nOutput:\n\"eert\"\n\nExplanati... | code | {
"ground_truth": "{\"fn_name\": \"frequencySort\", \"inputs\": [[\"testcase\"], [\"frequency\"], [\"aabbbccc\"], [\"fooobar\"], [\"Programming\"], [\"\"], [\"a\"], [\"aaaaaaaaaaa\"], [\"ab\"], [\"aab\"]], \"outputs\": [[\"tteessca\"], [\"eefrquncy\"], [\"bbbcccaa\"], [\"ooofbar\"], [\"rrggmmPoain\"], [\"\"], [\"a\"]... | {
"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": "Omkar is building a waterslide in his water park, and he needs your help to ensure that he does it as efficiently as possible.\n\nOmkar currently has... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n4\\n5 3 2 5\\n5\\n1 2 3 5 3\\n3\\n1 1 1\\n\",\n \"1\\n1\\n1\\n\",\n \"1\\n1\\n943795198\\n\",\n \"2\\n2\\n1 3\\n2\\n3 1\\n\",\n \"1\\n4\\n6 5 5 6\\n\",\n \"1\\n5\\n4 4 1 1 1\\n\"\n ],\n \"outputs\": [\n \"3\\n2\\n0\\n\",\n \"0\\n\",\n \"0\\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": "A binary matrix is called good if every even length square sub-matrix has an odd number of ones. \n\nGiven a binary matrix a consisting of n rows and... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n101\\n001\\n110\\n\", \"7 15\\n000100001010010\\n100111010110001\\n101101111100100\\n010000111111010\\n111010010100001\\n000011001111101\\n111111011010011\\n\", \"2 58\\n1100001110010010100001000000000110110001101001100010101110\\n1110110010101111001110010001100010001010100011... | {
"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 currency system in the Kingdom of Yoax-Musty is strange and fairly inefficient. Like other countries, the kingdom has its own currencty unit deno... | code | {
"ground_truth": "{\"inputs\": [\"\"], \"outputs\": [\"\"]}",
"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": "Sereja and his friends went to a picnic. The guys had n soda bottles just for it. Sereja forgot the bottle opener as usual, so the guys had to come u... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4\\n1 1\\n2 2\\n3 3\\n4 4\\n\",\n \"4\\n1 2\\n2 3\\n3 4\\n4 1\\n\",\n \"3\\n2 828\\n4 392\\n4 903\\n\",\n \"4\\n2 3\\n1 772\\n3 870\\n3 668\\n\",\n \"5\\n1 4\\n6 6\\n4 3\\n3 4\\n4 758\\n\",\n \"6\\n4 843\\n2 107\\n10 943\\n9 649\\n7 806\\n6 730\\n\",\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: Gosha is hunting\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nGosha is hunting. His goal is to catch a... | code | {
"ground_truth": "{\"inputs\": [\"3 2 2\\n1.000 0.000 0.500\\n0.000 1.000 0.500\", \"4 1 3\\n0.100 0.500 0.500 0.600\\n0.100 0.500 0.900 0.400\", \"3 2 0\\n0.412 0.198 0.599\\n0.612 0.987 0.443\", \"8 4 1\\n0.425 0.709 0.507 0.932 0.085 0.389 0.215 0.508\\n0.471 0.825 0.240 0.981 0.184 0.241 0.810 0.711\", \"7 4 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": "Ehab loves number theory, but for some reason he hates the number x. Given an array a, find the length of its longest subarray such that the sum of i... | code | {
"ground_truth": "{\"inputs\": [\"3\\n3 3\\n1 2 3\\n3 4\\n1 2 3\\n2 2\\n0 6\\n\", \"2\\n2\\n1 1\\n1\\n1\\n\", \"2\\n4\\n1 3 3 3\\n3\\n1 2 3\\n\", \"1\\n5\\n1 3 4 5 2\\n\", \"2\\n5\\n1 2 3 4 5\\n4\\n2 3 4 5\\n\", \"2\\n3\\n3 2 1\\n6\\n3 1 4 1 5 9\\n\", \"1\\n3\\n1 1 274005660\\n\", \"2\\n5\\n5 5 5 5 5\\n3\\n1 2 5\\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": "Every college has a stud−max$stud-max$ buoy. JGEC$JGEC$ has its own Atul$Atul$ who loves to impress everyone with his smile. A presentation is going ... | code | {
"ground_truth": "{\"inputs\": [[\"1\", \"4 4 3\", \"1 4 5 7\", \"2 3 8 6\", \"1 4 8 9\", \"5 1 5 6\"]], \"outputs\": [[\"22\"]]}",
"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: Another Problem on Strings\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nA string is binary, if it cons... | code | {
"ground_truth": "{\"inputs\": [\"1\\n1010\", \"2\\n01010\", \"100\\n01010\", \"0\\n01010\", \"0\\n0010100011\", \"0\\n10000\", \"988205\\n000110001001000\", \"10\\n1011110011111001100\", \"0\\n000\", \"16\\n1111011111110110111111111\", \"0\\n0\", \"0\\n1\", \"1\\n0\", \"1\\n1\", \"2\\n0\", \"2\\n1\", \"1000000\\n0\... | {
"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\nAizu decided to play a game using a prime number $ P $, a set of natural numbers $ G $, and a natural number $ A $.\n\nFirst, Aizu writes ... | code | {
"ground_truth": "{\"inputs\": [\"1000000007 8\\n3 2 9 7 5\\n3 2 9 5 1000001\\n3 39 1002 65537 12\\n2 1000000006 518012930 793649232\\n10 459268180 313723762 835892239 612038995 90424474 366392946 38051435 854115735 5132833 320534710 421820264\\n1 1 1\\n1 1 1000000006\\n1 1000000006 1\", \"7 3\\n1 1 2\\n1 2 1\\n3 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 playing a computer card game called Splay the Sire. Currently you are struggling to defeat the final boss of the game.\n\nThe boss battle con... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5\\n3\\n1 6\\n1 7\\n1 5\\n2\\n1 4\\n1 3\\n3\\n1 10\\n3 5\\n2 3\\n3\\n1 15\\n2 4\\n1 10\\n1\\n1 100\\n\",\n \"5\\n3\\n1 1\\n1 1\\n1 1\\n3\\n1 1\\n1 1\\n1 1\\n3\\n1 1\\n1 1\\n1 1\\n3\\n1 1\\n1 1\\n1 1\\n3\\n1 100\\n1 1\\n1 1\\n\",\n \"1\\n4\\n1 1\\n1 1\\n2 2\\n3 4\\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": "E869120's and square1001's 16-th birthday is coming soon.\nTakahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan-shaped pieces.... | code | {
"ground_truth": "{\"inputs\": [\"11 4\", \"8 8\", \"5 4\", \"11 6\", \"0 8\", \"5 1\", \"11 5\", \"0 9\", \"8 1\", \"13 5\", \"0 18\", \"8 0\", \"18 5\", \"0 17\", \"14 1\", \"18 8\", \"0 31\", \"14 2\", \"18 4\", \"-1 31\", \"10 2\", \"18 1\", \"-1 54\", \"10 4\", \"25 1\", \"-2 54\", \"5 5\", \"15 1\", \"-2 40\",... | {
"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 employees working in company \"X\" (let's number them from 1 to n for convenience). Initially the employees didn't have any relationships... | code | {
"ground_truth": "{\"inputs\": [\"4 9\\n1 4 3\\n2 4\\n3 3 1\\n1 2 3\\n2 2\\n3 1 2\\n1 3 1\\n2 2\\n3 1 3\\n\", \"5 10\\n1 2 1\\n1 3 2\\n2 3\\n1 4 3\\n1 5 4\\n2 5\\n3 1 2\\n2 5\\n2 5\\n2 5\\n\", \"10 10\\n2 9\\n1 2 1\\n1 3 2\\n3 1 1\\n3 1 1\\n2 3\\n3 1 1\\n3 1 1\\n3 1 2\\n3 1 1\\n\", \"5 10\\n2 1\\n1 1 2\\n1 2 3\\n2 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": "Little Mirko spends his free time painting. For this hobby, he likes to use brushes and a palette containing $K$ colors overall. His friend Slavko de... | code | {
"ground_truth": "{\"inputs\": [\"2 3\\n2 1\\n\", \"3 4\\n2 3 1\\n\", \"3 4\\n2 1 1\\n\"], \"outputs\": [\"6\\n\", \"24\\n\", \"36\\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": "Reminder: the median of the array $[a_1, a_2, \\dots, a_{2k+1}]$ of odd number of elements is defined as follows: let $[b_1, b_2, \\dots, b_{2k+1}]$ ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n1\\n1 1\\n3\\n6 5 4 1 2 3\\n5\\n13 4 20 13 2 5 8 3 17 16\\n\"\n ],\n \"outputs\": [\n \"0\\n1\\n5\\n\"\n ]\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: Minimization\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYou've got array *A*, consisting of *n* inte... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n1 2 4\", \"5 2\\n3 -5 3 -5 3\", \"6 3\\n4 3 4 3 2 5\", \"2 1\\n1 100\", \"4 3\\n1 2 4 8\", \"5 2\\n1 2 8 8 16\", \"10 3\\n-999999914 -999999976 -999999966 -999999952 29 54 -999999963 -999999959 -999999974 48\", \"30 2\\n-999999924 -499999902 500000091 -999999998 500000030 -999... | {
"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: An impassioned circulation of affection\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nNadeko's birthday... | code | {
"ground_truth": "{\"inputs\": [\"6\\nkoyomi\\n3\\n1 o\\n4 o\\n4 m\", \"15\\nyamatonadeshiko\\n10\\n1 a\\n2 a\\n3 a\\n4 a\\n5 a\\n1 b\\n2 b\\n3 b\\n4 b\\n5 b\", \"10\\naaaaaaaaaa\\n2\\n10 b\\n10 z\", \"1\\nc\\n4\\n1 x\\n1 a\\n1 e\\n1 t\", \"20\\naaaaaaaaaaaaaaaaaaaa\\n1\\n11 a\", \"4\\ncbcc\\n12\\n4 b\\n4 c\\n1 b\\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": "# Introduction \n\nA grille cipher was a technique for encrypting a plaintext by writing it onto a sheet of paper through a pierced sheet (of paper o... | code | {
"ground_truth": "{\"fn_name\": \"grille\", \"inputs\": [[\"abcdef\", 5], [\"\", 5], [\"abcd\", 1], [\"0abc\", 2], [\"ab\", 255], [\"ab\", 256], [\"abcde\", 32], [\"tcddoadepwweasresd\", 77098]], \"outputs\": [[\"df\"], [\"\"], [\"d\"], [\"b\"], [\"ab\"], [\"\"], [\"\"], [\"codewars\"]]}",
"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: Vulnerable Kerbals\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYou are given an integer *m*, and a li... | code | {
"ground_truth": "{\"inputs\": [\"0 5\", \"3 10\\n2 9 1\", \"0 1\", \"0 720\", \"0 9997\", \"0 200000\", \"10 200000\\n7853 79004 71155 23846 63333 31964 47634 15792 39758 55551\", \"3 19997\\n4524 13719 9073\", \"3 19997\\n2024 4058 6143\", \"3 19997\\n6068 18563 12338\"], \"outputs\": [\"5\\n1 2 4 3 0\", \"6\\n3 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": "You are given a sequence of integers $a_1, a_2, \\dots, a_n$. You need to paint elements in colors, so that: If we consider any color, all elements... | code | {
"ground_truth": "{\"inputs\": [\"6\\n10 2 3 5 4 2\\n\", \"4\\n100 100 100 100\\n\", \"8\\n7 6 5 4 3 2 2 3\\n\", \"1\\n1\\n\", \"1\\n100\\n\", \"100\\n2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 2 3 5 7 11 13 17 19 23 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": "There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n particles will be launched inside it... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4\\nRLRL\\n2 4 6 10\\n\",\n \"3\\nLLR\\n40 50 60\\n\",\n \"4\\nRLLR\\n46 230 264 470\\n\",\n \"6\\nLLRLLL\\n446 492 650 844 930 970\\n\",\n \"8\\nRRLLLLLL\\n338 478 512 574 594 622 834 922\\n\",\n \"10\\nLRLRLLRRLR\\n82 268 430 598 604 658 670 788 838 1000\\... | {
"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: A Leapfrog in the Array\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nDima is a beginner programmer. Du... | code | {
"ground_truth": "{\"inputs\": [\"4 3\\n2\\n3\\n4\", \"13 4\\n10\\n5\\n4\\n8\", \"2 2\\n1\\n2\", \"1 1\\n1\", \"3 3\\n3\\n2\\n1\", \"12 12\\n9\\n11\\n5\\n3\\n7\\n2\\n8\\n6\\n4\\n10\\n12\\n1\"], \"outputs\": [\"3\\n2\\n4\", \"13\\n3\\n8\\n9\", \"1\\n2\", \"1\", \"2\\n3\\n1\", \"5\\n6\\n3\\n2\\n4\\n7\\n12\\n8\\n10\\n9... | {
"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": "Sorting \n\nOne common task for computers is to sort data. For example, people might want to see all their files on a computer sorted by size. Since ... | code | {
"ground_truth": "{\"inputs\": [\"4\\n9 8 7 1\\n \", \"3\\n3 2 1\\n\", \"1\\n-10000\\n\", \"2\\n-10000 -9999\\n\", \"5\\n10000 9999 9998 9997 9996\\n\", \"2\\n-10000 10000\\n\"], \"outputs\": [\"9 8 7 7\\n9 8 8 7\\n9 9 8 7\\n1 9 8 7\", \"3 2 2\\n3 3 2\\n1 3 2\", \"-10000\", \"-10000 -9999\", \"10000 9999 9998 9997 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": "We define a magic square to be an $n\\times n$ matrix of distinct positive integers from $\\mbox{1}$ to $n^2$ where the sum of any row, column, or di... | code | {
"ground_truth": "{\"inputs\": [\"8 1 6\\n3 5 7\\n4 9 2\\n\", \"8 3 6\\n1 5 7\\n4 9 2\\n\", \"1 1 1\\n1 1 1\\n1 1 1\\n\", \"9 9 9\\n9 9 9\\n9 9 9\\n\", \"8 1 6\\n3 5 7\\n4 9 2\\n\", \"4 9 2\\n3 5 7\\n8 1 6\\n\"], \"outputs\": [\"0\", \"4\", \"36\", \"36\", \"0\", \"0\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given an integer sequence $a_1, a_2, \\dots, a_n$.\n\nFind the number of pairs of indices $(l, r)$ ($1 \\le l \\le r \\le n$) such that the v... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5 4\\n1 4 5 60 4\\n\",\n \"3 1\\n1 1 1\\n\",\n \"15 2\\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\\n\",\n \"1 1\\n1\\n\",\n \"2 1\\n1 2\\n\",\n \"2 1\\n2 1\\n\",\n \"2 2\\n1 2\\n\",\n \"2 2\\n2 1\\n\",\n \"3 1\\n1 2 3\\n\",\n \"3 1\\n1 3 2\\n\",\n \"3 1\\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given N-1 subsets of \\\\{1,2,...,N\\\\}. Let the i-th set be E_i.\n\nLet us choose two distinct elements u_i and v_i from each set E_i, and ... | code | {
"ground_truth": "{\"inputs\": [\"6\\n3 1 2 4\\n3 2 3 4\\n3 1 3 4\\n3 1 2 4\\n3 4 5 6\", \"5\\n2 1 2\\n3 1 2 3\\n3 1 4 5\\n2 4 5\", \"5\\n2 1 2\\n3 2 2 3\\n3 1 4 5\\n2 4 5\", \"10\\n5 1 0 3 4 5\\n5 2 3 4 5 6\\n5 3 4 5 6 7\\n5 4 5 6 7 8\\n5 5 6 7 8 9\\n5 6 7 8 9 10\\n5 7 8 9 10 1\\n5 8 9 10 1 2\\n5 9 10 1 2 3\", \"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": "Takahashi loves takoyaki - a ball-shaped snack.\n\nWith a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes rega... | code | {
"ground_truth": "{\"inputs\": [\"1000 1 1000\", \"20 12 6\", \"20 22 6\", \"37 22 6\", \"37 22 8\", \"37 22 1\", \"26 22 0\", \"26 22 -1\", \"26 11 -1\", \"26 2 -1\", \"26 4 -1\", \"26 3 -1\", \"1000 1 1100\", \"37 17 6\", \"36 11 -1\", \"26 2 -2\", \"47 4 -1\", \"1010 1 1100\", \"20 12 5\", \"20 5 6\", \"37 17 11\... | {
"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": "Mole decided to live in an abandoned mine. The structure of the mine is represented by a simple connected undirected graph which consists of N vertic... | code | {
"ground_truth": "{\"inputs\": [\"15 22\\n8 13 33418\\n14 15 55849\\n7 10 15207\\n4 6 64328\\n6 9 86902\\n15 7 46978\\n8 14 53526\\n1 2 8720\\n14 12 37748\\n8 3 61543\\n6 5 32425\\n4 11 20932\\n3 12 55123\\n8 2 45333\\n9 12 77796\\n3 9 71922\\n12 15 70793\\n2 4 25485\\n11 6 1436\\n2 7 81563\\n7 11 97843\\n3 1 40491\... | {
"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": "Cardbluff is popular sport game in Telegram. Each Cardbluff player has ever dreamed about entrance in the professional layer. There are n judges now ... | code | {
"ground_truth": "{\"inputs\": [\"10 51\\n32605763190 147537390 42638305710 8678670 112822710 510510 1917986070 6636630 724851197070 2508135630\\n394516844 383503249 203530152 475692951 350488191 499734095 270024475 199123878 389775998 689909187\\n\", \"10 21\\n8474257470 10290 504210 1470 172944030 210 1210608210 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": "Each floating-point number should be formatted that only the first two decimal places are returned. You don't need to check whether the input is a va... | code | {
"ground_truth": "{\"fn_name\": \"two_decimal_places\", \"inputs\": [[10.1289767789], [-7488.83485834983], [4.653725356]], \"outputs\": [[10.12], [-7488.83], [4.65]]}",
"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 will be given the prime factors of a number as an array.\nE.g: ```[2,2,2,3,3,5,5,13]```\n\nYou need to find the number, n, to which that prime fa... | code | {
"ground_truth": "{\"fn_name\": \"get_num\", \"inputs\": [[[2, 3, 5, 5]], [[2, 3, 3, 3, 7]], [[3, 3, 3, 11]], [[2, 13, 2, 5, 2, 5, 3, 3]]], \"outputs\": [[[150, 11, 2, 75]], [[378, 15, 2, 189]], [[297, 7, 3, 99]], [[23400, 71, 2, 11700]]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a tree with N vertices. The vertices are numbered 0 through N-1, and the edges are numbered 1 through N-1. Edge i connects Vertex x_i a... | code | {
"ground_truth": "{\"inputs\": [\"5\\n0 1 1\\n0 2 3\\n0 3 6\\n3 4 4\", \"2\\n1 0 0\", \"5\\n0 1 1\\n0 2 3\\n0 3 6\\n3 4 1\", \"2\\n1 1 0\", \"5\\n0 1 1\\n0 3 3\\n0 3 5\\n4 4 1\", \"2\\n0 1 2\", \"5\\n0 1 1\\n0 2 3\\n0 3 6\\n4 4 1\", \"2\\n1 1 1\", \"5\\n0 1 1\\n0 2 3\\n0 3 5\\n4 4 1\", \"2\\n1 1 2\", \"5\\n0 1 1\\n0... | {
"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 k-multiple free set is a set of integers where there is no pair of integers where one is equal to another integer multiplied by k. That is, there a... | code | {
"ground_truth": "{\"inputs\": [\"6 2\\n2 3 6 5 4 10\\n\", \"2 2\\n500000000 1000000000\\n\", \"2 2\\n4 2\\n\", \"2 1\\n2 1\\n\", \"2 1000000000\\n276447232 100000\\n\", \"3 1\\n1 2 3\\n\", \"1 1\\n1000000000\\n\", \"8 65538\\n65535 65536 65537 65538 65539 131072 262144 196608\\n\", \"2 2\\n16 8\\n\", \"2 2\\n1 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": "Given a string S and two integers L and R. Print the characters in the range L to R of the string.\nNOTE: Assume zero based indexing.\nExample 1:\nIn... | code | {
"ground_truth": "{\"fn_name\": \"javaSub\", \"inputs\": [[\"vborldt\", 2, 5], [\"jhgfedc\", 0, 6], [\"programming\", 0, 10], [\"tacbzoyczlb\", 2, 7], [\"pacman\", 1, 4], [\"t\", 0, 0], [\"boundary\", 0, 7], [\"lowercase\", 1, 8], [\"edge\", 1, 1], [\"midspace\", 1, 2]], \"outputs\": [[\"orld\"], [\"jhgfedc\"], [\"p... | {
"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": "We have a set S of N points in a two-dimensional plane. The coordinates of the i-th point are (x_i, y_i). The N points have distinct x-coordinates an... | code | {
"ground_truth": "{\"inputs\": [\"3\\n-1 3\\n2 1\\n3 -2\", \"10\\n19 -11\\n-3 -12\\n5 3\\n3 -15\\n8 -14\\n-9 -20\\n10 -9\\n0 2\\n-7 17\\n6 -6\", \"4\\n1 4\\n2 1\\n3 3\\n4 2\", \"3\\n-1 3\\n2 2\\n3 -2\", \"4\\n1 4\\n2 1\\n3 0\\n4 2\", \"4\\n1 4\\n2 1\\n3 0\\n4 0\", \"3\\n-2 5\\n2 -1\\n1 -2\", \"10\\n19 -11\\n-3 -12\\... | {
"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": "Kabir Singh is playing a game on the non-negative side of x-axis. It takes him $1 second$ to reach from Pth position to (P−1)th position or (P+1)th ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n0 1\\n1 1\\n1 3\\n4 6\\n2 4\\n\", \"1\\n1 5\\n\", \"1\\n3 3\\n\", \"2\\n2 2\\n2 2\\n\", \"5\\n3 3\\n3 3\\n3 3\\n3 3\\n3 3\\n\", \"1\\n0 1000000000\\n\", \"1\\n999999999 1\\n\", \"1\\n1000000000 1\\n\", \"1\\n999999999 2\\n\", \"1\\n1000000000 2\\n\", \"3\\n1000000000 1000000000\... | {
"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 has n burles. One bottle of Ber-Cola costs a burles and one Bars bar costs b burles. He can buy any non-negative integer number of bottles of B... | code | {
"ground_truth": "{\"inputs\": [\"7\\n2\\n3\\n\", \"9960594\\n2551\\n2557\\n\", \"100\\n25\\n10\\n\", \"15\\n4\\n8\\n\", \"4\\n3\\n1\\n\", \"10000000\\n3\\n7\\n\", \"10000000\\n5000000\\n5000000\\n\", \"4608528\\n9059\\n977\\n\", \"1\\n1\\n1\\n\", \"4\\n1\\n2\\n\", \"121\\n11\\n11\\n\", \"4\\n2\\n2\\n\", \"1000000\\... | {
"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": "Soumika has a string S and its starting index is 1. The string S consists of characters from 1-9. As she is very intelligent, she wants to test his b... | code | {
"ground_truth": "{\"inputs\": [\"574674546476\\n\\nSAMPLE\", \"4645557347476\", \"574674546476\\n\\nELPMAS\", \"574674546476\\n\\nASMPLE\", \"574674546476\\n\\nELPMSA\", \"574674546476\\n\\nELPMS@\", \"574674546476\\n\\n@SMPLE\", \"574674546476\\n\\nPLEMS@\", \"574674546476\\n\\nPMEMS@\", \"574674546476\\n\\nPMSME@... | {
"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": "Ksenia has ordinary pan scales and several weights of an equal mass. Ksenia has already put some weights on the scales, while other weights are untou... | code | {
"ground_truth": "{\"inputs\": [\"W|T\\nF\\n\", \"AC|T\\nL\\n\", \"ABC|\\nD\\n\", \"|ABC\\nXYZ\\n\", \"CKQHRUZMISGE|FBVWPXDLTJYN\\nOA\\n\", \"V|CMOEUTAXBFWSK\\nDLRZJGIYNQHP\\n\", \"|ABC\\nD\\n\", \"|C\\nA\\n\", \"|\\nA\\n\", \"|FGRT\\nAC\\n\", \"A|BCDEF\\nGH\\n\", \"QWHNMALDGKTJ|\\nPBRYVXZUESCOIF\\n\", \"EQJWDOHKZRB... | {
"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": "While dad was at work, a little girl Tanya decided to play with dad's password to his secret database. Dad's password is a string consisting of n + 2... | code | {
"ground_truth": "{\"inputs\": [\"1\\nabc\\n\", \"5\\n123\\n234\\n345\\n456\\n567\\n\", \"8\\nzHW\\ncwx\\nxmo\\nWcw\\nox1\\nwxm\\nmox\\nHWc\\n\", \"2\\nbba\\nabb\\n\", \"99\\naaJ\\nJx9\\naLL\\nrCx\\nllJ\\naja\\nxxr\\nLal\\nv9C\\njrL\\nLvL\\nJLl\\nxlJ\\nLja\\nLLC\\njvL\\n9CJ\\nvrJ\\nlJJ\\nlCC\\nlxC\\njxl\\nLaJ\\nLxJ\... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There are N temples in a straight line and K monks who want to spread their enlightening power to the entire road of temples. All the monks have an ... | code | {
"ground_truth": "{\"inputs\": [\"100000 18\\n3613051 6968776 8617651 5250945 2605599 4947993 6694873 2683281 1357358 5004417 4382640 7891512 7072189 6155695 8139750 8956961 6020969 2570586 8586683 3051843 3804421 6223742 857575 6081732 6800031 3601841 7021065 4549376 9668771 7611655 8030181 8775517 632210 6585213 8... | {
"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 found a useless array a of 2n positive integers. You have realized that you actually don't need this array, so you decided to throw out all eleme... | code | {
"ground_truth": "{\"inputs\": [\"4\\n2\\n3 5 1 2\\n3\\n1 1 8 8 64 64\\n2\\n1 1 2 4\\n5\\n1 2 3 4 5 6 7 14 3 11\\n\", \"6\\n4\\n5 6 9 13 36 42 47 60\\n3\\n1 2 3 4 5 6\\n3\\n1 2 3 3 5 6\\n4\\n5 22 42 47 49 54 69 123\\n2\\n1 1 2 2\\n3\\n1000000 1000000 990000 10000 900000 90000\\n\", \"4\\n2\\n3 5 1 2\\n3\\n1 1 8 8 64... | {
"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 undirected unweighted graph with N vertices and M edges that contains neither self-loops nor double edges.\n\nHere, a self-loop is a... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 2\\n1 3\\n2 3\\n\", \"7 7\\n1 3\\n2 7\\n3 4\\n4 5\\n4 6\\n5 6\\n6 7\\n\", \"8 7\\n3 7\\n2 7\\n1 2\\n1 6\\n5 6\\n4 5\\n4 8\\n\", \"8 8\\n6 8\\n4 8\\n3 4\\n2 3\\n2 7\\n5 7\\n1 5\\n1 6\\n\", \"8 7\\n1 5\\n2 5\\n3 5\\n4 5\\n5 6\\n5 7\\n5 8\\n\", \"8 28\\n1 2\\n1 3\\n1 4\\n1 5\\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": "\"Teishi-zushi\", a Japanese restaurant, is a plain restaurant with only one round counter. The outer circumference of the counter is C meters. Custo... | code | {
"ground_truth": "{\"inputs\": [\"15 10000000000\\n400000000 1000000000\\n800000000 1000000000\\n1900000000 1000000000\\n2400000000 1000000000\\n2900000000 1000000000\\n3300000000 1000000000\\n3700000000 1000000000\\n3800000000 1000000000\\n4000000000 1000000000\\n4100000000 1000000000\\n5200000000 1000000000\\n6600... | {
"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 array a that contains all integers from 1 to n twice. You can arbitrary permute any numbers in a.\n\nLet number i be in positions xi, yi (xi... | code | {
"ground_truth": "{\"inputs\": [\"1\\n\", \"2\\n\", \"10\\n\", \"100\\n\", \"1232\\n\", \"1134\\n\", \"4\\n\", \"1234\\n\", \"1233\\n\", \"3\\n\", \"8\\n\", \"110\\n\", \"847\\n\", \"13\\n\", \"795\\n\", \"18\\n\", \"767\\n\", \"23\\n\", \"17\\n\", \"32\\n\", \"27\\n\", \"34\\n\", \"58\\n\", \"37\\n\", \"61\\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: Bicycle Race\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nMaria participates in a bicycle race.\n\nThe... | code | {
"ground_truth": "{\"inputs\": [\"6\\n0 0\\n0 1\\n1 1\\n1 2\\n2 2\\n2 0\\n0 0\", \"16\\n1 1\\n1 5\\n3 5\\n3 7\\n2 7\\n2 9\\n6 9\\n6 7\\n5 7\\n5 3\\n4 3\\n4 4\\n3 4\\n3 2\\n5 2\\n5 1\\n1 1\", \"4\\n-10000 -10000\\n-10000 10000\\n10000 10000\\n10000 -10000\\n-10000 -10000\", \"4\\n6 8\\n6 9\\n7 9\\n7 8\\n6 8\", \"8\\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 all know the Dirichlet principle, the point of which is that if n boxes have no less than n + 1 items, that leads to the existence of a box in wh... | code | {
"ground_truth": "{\"inputs\": [\"2 2 5\\n\", \"9 9 1000000000\\n\", \"3 17 999999997\\n\", \"3 3 64\\n\", \"5 1 64\\n\", \"29 2 1000000000\\n\", \"1010 1 1000000000\\n\", \"3 2 27\\n\", \"1 1 60\\n\", \"2 4 64\\n\", \"2 2 64\\n\", \"3 4 1000\\n\", \"2 3 64\\n\", \"2 1 536870912\\n\", \"2 2 17\\n\", \"117 1 13689\\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": "After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n1\\n2 2\\n\", \"3 3\\n1\\n1 1\\n\", \"3 3\\n2\\n1 1 3 3\\n\", \"2000 1\\n10\\n1058 1 1779 1 1995 1 1398 1 96 1 1599 1 1496 1 1659 1 385 1 1485 1\\n\", \"100 100\\n4\\n72 12 1 66 57 67 25 67\\n\", \"1 10\\n9\\n1 1 1 2 1 3 1 4 1 6 1 7 1 8 1 9 1 10\\n\", \"100 1\\n10\\n62 1 63 1 ... | {
"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": "We have N locked treasure boxes, numbered 1 to N.\n\nA shop sells M keys. The i-th key is sold for a_i yen (the currency of Japan), and it can unlock... | code | {
"ground_truth": "{\"inputs\": [\"4 6\\n67786 3\\n1 3 4\\n3497 1\\n2\\n44908 3\\n2 3 4\\n2156 3\\n2 3 4\\n26230 1\\n2\\n86918 1\\n3\", \"12 1\\n100000 1\\n2\", \"2 3\\n10 1\\n1\\n15 1\\n2\\n30 2\\n1 2\", \"4 0\\n67786 3\\n1 3 4\\n3497 1\\n2\\n44908 3\\n2 3 4\\n2156 3\\n2 3 4\\n26230 1\\n2\\n86918 1\\n3\", \"2 3\\n10... | {
"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 thief sneaked into a museum with a lot of treasures with only one large furoshiki. There are many things I want to steal, but the weight that the f... | code | {
"ground_truth": "{\"inputs\": [\"50\\n5\\n60,10\\n100,20\\n120,30\\n210,45\\n10,4\\n50\\n5\\n60,10\\n100,20\\n120,30\\n210,45\\n10,4\\n0\", \"50\\n5\\n60,10\\n100,20\\n120,30\\n310,45\\n10,4\\n50\\n5\\n60,10\\n100,20\\n120,30\\n210,45\\n10,4\\n0\", \"50\\n5\\n60,10\\n100,20\\n110,30\\n310,45\\n10,4\\n50\\n5\\n60,10... | {
"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": "While Patrick was gone shopping, Spongebob decided to play a little trick on his friend. The naughty Sponge browsed through Patrick's personal stuff ... | code | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 1 1\\n1 1 1\\n\", \"3 3\\n3 2 1\\n1 2 3\\n\", \"3 3\\n1 2 1\\n3 3 3\\n\", \"2 2\\n1 1\\n1 2\\n\", \"3 3\\n1 1 1\\n1 2 2\\n\", \"4 10\\n1 2 3 3\\n1 2 1 2 1 2 1 2 3 3\\n\", \"10 1\\n1 2 3 4 5 6 1 8 9 10\\n7\\n\", \"3 3\\n2 2 2\\n2 3 3\\n\", \"3 3\\n1 1 2\\n1 1 3\\n\", \"5 5\\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": "A rare article in the Internet is posted without a possibility to comment it. On a Polycarp's website each article has comments feed.\n\nEach comment... | code | {
"ground_truth": "{\"inputs\": [\"A,3,B,2,C,0,D,1,E,0,F,1,G,0,H,1,I,1,J,0,K,1,L,0,M,2,N,0,O,1,P,0\\n\", \"a,5,A,0,a,0,A,0,a,0,A,0\\n\", \"hello,2,ok,0,bye,0,test,0,one,1,two,2,a,0,b,0\\n\", \"b,2,b,0,b,0,b,1,b,0,ba,1,b,0\\n\", \"BA,0\\n\", \"nwEwA,2,C,1,aG,0,xgv,0\\n\", \"ab,0,ba,0\\n\", \"aa,0\\n\", \"a,3,aa,0,b,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": "Sergey Semyonovich is a mayor of a county city N and he used to spend his days and nights in thoughts of further improvements of Nkers' lives. Unfort... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 2\\n1 3\\n1 4\\n\", \"4\\n1 2\\n2 3\\n3 4\\n\", \"2\\n2 1\\n\", \"3\\n2 1\\n3 2\\n\", \"10\\n2 3\\n3 9\\n6 3\\n9 8\\n9 10\\n4 8\\n3 1\\n3 5\\n7 1\\n\", \"10\\n2 3\\n3 9\\n6 3\\n9 8\\n9 10\\n4 8\\n3 1\\n3 5\\n7 1\\n\", \"3\\n2 1\\n3 2\\n\", \"2\\n2 1\\n\", \"4\\n1 2\\n1 3\\n3 4... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Dividing Orange\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nOne day Ms Swan bought an orange in a sho... | code | {
"ground_truth": "{\"inputs\": [\"2 2\\n4 1\", \"3 1\\n2\", \"5 5\\n25 24 23 22 21\", \"1 30\\n8 22 13 25 10 30 12 27 6 4 7 2 20 16 26 14 15 17 23 3 24 9 5 11 29 1 19 28 21 18\", \"30 1\\n29\", \"10 10\\n13 39 6 75 84 94 96 21 85 71\", \"10 15\\n106 109 94 50 3 143 147 10 89 145 29 28 87 126 110\", \"15 10\\n126 111... | {
"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 defines a group of three friends as a *perfect* group if the age of one person is equal to the sum of the age of remaining two people.\n\nGiven ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n10 30 20\\n8 3 5\\n2 2 2\\n11 21 10\\n40 20 20\\n\", \"5\\n25 5 20\\n15 6 9\\n7 1 8\\n3 7 4\\n20 10 10\\n\", \"5\\n13 9 4\\n20 20 40\\n10 30 40\\n55 5 60\\n7 5 2\\n\", \"4\\n35 35 70\\n85 15 100\\n111 11 100\\n18 82 100\\n\", \"1\\n60 30 90\\n\", \"1\\n1 1 2\\n\", \"5\\n1 2 1\\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: Bertown roads\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nBertown has *n* junctions and *m* bidirecti... | code | {
"ground_truth": "{\"inputs\": [\"6 8\\n1 2\\n2 3\\n1 3\\n4 5\\n4 6\\n5 6\\n2 4\\n3 5\", \"6 7\\n1 2\\n2 3\\n1 3\\n4 5\\n4 6\\n5 6\\n2 4\", \"10 19\\n6 8\\n5 8\\n8 3\\n1 9\\n3 6\\n4 8\\n10 8\\n8 7\\n5 3\\n10 1\\n5 10\\n4 10\\n2 1\\n3 2\\n7 6\\n8 2\\n1 6\\n10 7\\n2 10\", \"5 9\\n5 4\\n2 1\\n3 4\\n4 1\\n5 2\\n2 3\\n4 ... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There are n blocks arranged in a row and numbered from left to right, starting from one. Each block is either black or white. \n\nYou may perform the... | code | {
"ground_truth": "{\"inputs\": [\"195\\nWWWWWWWWBWWWWWWWWWWWWBBBWWWBBWWWWWWWWBWWWWWWWWWWWWWWWWWWWWBWWWWWWWBWWWWWWWWWWWWWWWWBWWWWWWWWWBBBWWWWWWWWWWBWWWWWWWBBWWBWBBWWWWWWWWWWBWWWBWWWWWWWWWBBWBWWWBWWBWBWWWWBBWWWWWWWWWWWWWWWWWWWWWWWWWWBWWW\\n\", \"10\\nWWBBBWBBWB\\n\", \"174\\nWWWWWBWWBWWWWBWWWWBWWWWWWWWWWWWWWWWBBWWBWWW... | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "The weather in Takahashi's town changes day by day, in the following cycle: Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...\nGiven is a string S repr... | code | {
"ground_truth": "{\"inputs\": [\"Sunny\\n\", \"Rainy\\n\", \"Cloudy\\n\"], \"outputs\": [\"Cloudy\\n\", \"Sunny\\n\", \"Rainy\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given an integer $n$ from $1$ to $10^{18}$ without leading zeroes.\n\nIn one move you can swap any two adjacent digits in the given number in... | code | {
"ground_truth": "{\"inputs\": [\"5071\\n\", \"705\\n\", \"1241367\\n\", \"7501\\n\", \"507\\n\", \"17010\\n\", \"52231\\n\", \"50267\\n\", \"574196831896431419\\n\", \"1\\n\", \"10\\n\", \"123456123450\\n\", \"1000000000000000000\\n\", \"100000000000762582\\n\", \"123456789987654321\\n\", \"213716413141380147\\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": "A daily train consists of N cars. Let's consider one particular car. It has 54 places numbered consecutively from 1 to 54, some of which are already ... | code | {
"ground_truth": "{\"inputs\": [\"2 3\\n100101110000001011000001111110010011110010010111000101\\n001010000000101111100000000000000111101010101111111010\\n011110011110000001010100101110001011111010001001111010\\n\", \"4 3\\n100101110000001011000001111110010011110010010111000101\\n0010100000001011111000000000000001111... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Alice has an $n\\! \\times \\! m$ grid and a $2\\! \\times \\! 2$ block. She would like to place her block in the grid. She must place it so that the... | code | {
"ground_truth": "{\"inputs\": [\"4 4 999999937\\n\", \"5 5 100000037\\n\"], \"outputs\": [\"79\\n\", \"1\\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": "Chef and Paja are bored, so they are playing an infinite game of ping pong. The rules of the game are as follows:\n- The players play an infinite num... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 3 3\\n5 7 2\\n10 10 10\\n3 7 2\\n8 1 4\\n\"], \"outputs\": [\"Paja\\nChef\\nChef\\nPaja\\nChef\"]}",
"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": "Little Syed loves brute force. He thinks that brute force can be the solution to any problem in the world. You give him any question, and he'll have ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n100\\n4150\\n\\nSAMPLE\", \"2\\n101\\n4150\\n\\nSAMPLE\", \"2\\n000\\n3041\\n\\nRAMPLE\", \"2\\n010\\n1570\\n\\nRAMPME\", \"2\\n101\\n17713\\n\\nRAMPME\", \"2\\n101\\n4150\\n\\nELPMAS\", \"2\\n111\\n4150\\n\\nELPMAS\", \"2\\n111\\n4150\\n\\nELPMAR\", \"2\\n111\\n6697\\n\\nELPMAR... | {
"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": "Mirko and Slavko bought a few liters of orange, apple and pineapple juice. They are now whipping up a non alcoholic cocktail following a recipe they ... | code | {
"ground_truth": "{\"inputs\": [\"10 10 10\\n3 3 3\\n\", \"9 9 9\\n3 2 1\\n\", \"10 15 18\\n3 4 1\\n\"], \"outputs\": [\"0.000000 0.000000 0.000000\\n\", \"0.000000 3.000000 6.000000\\n\", \"0.000000 1.666667 14.666667\\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": "The Hedgehog recently remembered one of his favorite childhood activities, — solving puzzles, and got into it with new vigor. He would sit day in, da... | code | {
"ground_truth": "{\"inputs\": [\"12 18\\nCBBCAACABACCACABBC\\nABCAACABAABCBCBCCC\\nBCAACCCBBBABBACBBA\\nACCBCBBBAABACCACCC\\nCAABCCCACACCBACACC\\nBBBCBCACCABCCBCBBB\\nBAABBCACAAAAACCBCB\\nBAABAABACBCABACBCA\\nAABCBCCBCCABACCCAC\\nCCBBBAACCCBCACCCBB\\nCBABACBBBABCBACCCB\\nAABACCCBCCACBCACCB\\n\", \"10 11\\nABBBAABAB... | {
"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 the decimal presentation of an integer. Let's call a number d-magic if digit d appears in decimal presentation of the number on even positio... | code | {
"ground_truth": "{\"inputs\": [\"2 6\\n10\\n99\\n\", \"2 0\\n1\\n9\\n\", \"19 7\\n1000\\n9999\\n\", \"6 2\\n22\\n95\\n\", \"2 2\\n12\\n14\\n\", \"2 0\\n1000\\n9999\\n\", \"2 2\\n2934\\n4323\\n\", \"43 3\\n587\\n850\\n\", \"3 9\\n10\\n99\\n\", \"1 0\\n10\\n20\\n\", \"2 6\\n46\\n46\\n\", \"3 9\\n10\\n69\\n\", \"2 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": "You are given a string S. Your task is to determine if the sum of ASCII values of all character results in a perfect square or not. If it is a perfec... | code | {
"ground_truth": "{\"fn_name\": \"isSquare\", \"inputs\": [[\"a\"], [\"Aa\"], [\"abc\"], [\"aa\"], [\"abcd\"], [\"\"], [\" \"], [\"$\"], [\"\\\\<\"], [\"aba\"]], \"outputs\": [[0], [0], [0], [0], [0], [1], [0], [1], [0], [0]]}",
"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": "Petya loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits other than 4 and 7... | code | {
"ground_truth": "{\"inputs\": [\"47\\n\", \"4500\\n\", \"73\\n\", \"444000000\\n\", \"447777\\n\", \"3696\\n\", \"12\\n\", \"100\\n\", \"1024\\n\", \"123\\n\", \"74777443\\n\", \"1007\\n\", \"4\\n\", \"7748\\n\", \"474\\n\", \"74710000\\n\", \"19\\n\", \"70070077\\n\", \"888999577\\n\", \"2145226\\n\", \"7474747\\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": "# Task\n Given array of integers, for each position i, search among the previous positions for the last (from the left) position that contains a smal... | code | {
"ground_truth": "{\"fn_name\": \"array_previous_less\", \"inputs\": [[[3, 5, 2, 4, 5]], [[2, 2, 1, 3, 4, 5, 5, 3]], [[3, 2, 1]]], \"outputs\": [[[-1, 3, -1, 2, 4]], [[-1, -1, -1, 1, 3, 4, 4, 1]], [[-1, -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": "Sam has opened a new sushi train restaurant - a restaurant where sushi is served on plates that travel around the bar on a conveyor belt and customer... | code | {
"ground_truth": "{\"fn_name\": \"total_bill\", \"inputs\": [[\"rr\"], [\"rr rrr\"], [\"rr rrr rrr rr\"], [\"rrrrrrrrrrrrrrrrrr rr r\"], [\"\"]], \"outputs\": [[4], [8], [16], [34], [0]]}",
"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": "[Image] \n\n\n-----Input-----\n\nThe first line of the input is a string (between 1 and 50 characters long, inclusive). Each character will be a lett... | code | {
"ground_truth": "{\n \"inputs\": [\n \"AprilFool\\n14\\n\",\n \"abcdefabc\\n3\\n\",\n \"fgWjSAlPOvcAbCdDEFjz\\n7\\n\",\n \"sm\\n26\\n\",\n \"GnlFOqPeZtPiBkvvLhaDvGPgFqBTnLgMT\\n12\\n\",\n \"sPWSFWWqZBPon\\n3\\n\",\n \"fQHHXCdeaintxHWcFcaSGWFvqnYMEByMlSNKumiFgnJB\\n0\\n\",\n \"RtsUOGkraqKyjT... | {
"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": "One day Chef was playing with numbers. He loves Lowest Common Multiple (LCM) too much and he is a very curious guy. He always try to do new things. N... | code | {
"ground_truth": "{\"inputs\": [[\"2\", \"9\", \"7\"]], \"outputs\": [[\"504\", \"210\"]]}",
"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": "There are n sharks who grow flowers for Wet Shark. They are all sitting around the table, such that sharks i and i + 1 are neighbours for all i from ... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3 2\\n1 2\\n420 421\\n420420 420421\\n\",\n \"3 5\\n1 4\\n2 3\\n11 14\\n\",\n \"3 3\\n3 3\\n2 4\\n1 1\\n\",\n \"5 5\\n5 204\\n420 469\\n417 480\\n442 443\\n44 46\\n\",\n \"3 2\\n2 2\\n3 3\\n4 4\\n\",\n \"6 7\\n8 13\\n14 14\\n8 13\\n14 14\\n8 13\\n14 14\\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 rectangle grid. That grid's size is n × m. Let's denote the coordinate system on the grid. So, each point on the grid will have coord... | code | {
"ground_truth": "{\"inputs\": [\"100 100 52 50 46 56\\n\", \"9 9 5 5 2 1\\n\", \"71265727 62692710 12444778 3479306 21442685 5463351\\n\", \"81460 7041354 53032 1297536 41496 5748697\\n\", \"99373741 10548319 82293354 9865357 58059929 5328757\\n\", \"1000000000 1000000000 839898171 196274842 131921537 865789406\\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 rectangular grid with n rows and m columns. The cell located on the i-th row from the top and the j-th column from the left has a val... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2 2\\n-1 1\\n1 1\\n3 4\\n0 -1 -2 -3\\n-1 -2 -3 -4\\n-2 -3 -4 -5\\n\", \"1\\n3 3\\n-3 -2 -1\\n-3 -2 -1\\n-3 -2 -1\\n\", \"2\\n2 2\\n-1 1\\n1 1\\n3 4\\n0 -2 -2 -3\\n-1 -2 -3 -4\\n-2 -3 -4 -5\\n\", \"1\\n3 3\\n-3 -2 -2\\n-3 -2 -1\\n-3 -2 -1\\n\", \"2\\n2 2\\n-1 1\\n1 1\\n3 4\\n0 -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": "Crossing all the hurdles, Gudi now reaches the roof of the castle and she finds Puchi, the Lord of Azkahar and the Protector of the castle, waiting ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n7 19 3\\n5 7 4\\n6 7 6\\n6 7 10\\n1 3 10\\n3 6 9\\n3 6 9\\n6 7 1\\n6 7 8\\n4 7 7\\n1 3 10\\n3 6 5\\n6 7 7\\n3 7 6\\n5 7 6\\n6 7 7\\n2 6 9\\n5 6 9\\n1 6 1\\n1 5 6\", \"10\\n24 231 7\\n4 13 312\\n18 19 515\\n23 24 819\\n21 22 141\\n9 20 215\\n10 14 300\\n19 21 790\\n14 15 641\\n15... | {
"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": "<image>\n\nYou have one chip and one chance to play roulette. Are you feeling lucky?\n\nOutput\n\nPrint your bet. Your chip must be placed entirely w... | code | {
"ground_truth": "{\"inputs\": [\"1\\n\", \"2\\n\", \"0\\n\", \"-2\\n\", \"-4\\n\", \"8\\n\", \"5\\n\", \"7\\n\", \"-5\\n\", \"11\\n\", \"20\\n\", \"-7\\n\", \"-17\\n\", \"-14\\n\", \"10\\n\", \"-18\\n\", \"-21\\n\", \"29\\n\", \"-28\\n\", \"27\\n\", \"23\\n\", \"34\\n\", \"-45\\n\", \"-29\\n\", \"77\\n\", \"54\\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 have recently made a grid traversing robot that can find its way from the top left corner of a grid to the bottom right corner. However, you had ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n.....\\n#..#.\\n#..#.\\n...#.\\n.....\\n\", \"7\\n......#\\n####...\\n.#.....\\n.#...#.\\n.#.....\\n.#..###\\n.#.....\\n\"], \"outputs\": [\"6\\n\", \"THE GAME IS A LIE\\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": "Little Sofia is in fourth grade. Today in the geometry lesson she learned about segments and squares. On the way home, she decided to draw n squares ... | code | {
"ground_truth": "{\"inputs\": [\"4\\n\", \"1\\n\", \"2\\n\", \"10\\n\", \"87341\\n\", \"204575811\\n\", \"605551861\\n\", \"8\\n\", \"776\\n\", \"864918\\n\", \"377684528\\n\", \"15\\n\", \"972\\n\", \"1000000000\\n\", \"8795795\\n\", \"423353776\\n\", \"16\\n\", \"9\\n\", \"772168\\n\", \"11\\n\", \"306495050\\n\"... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "In your class, you have started lessons about [arithmetic progression](https://en.wikipedia.org/wiki/Arithmetic_progression). Since you are also a pr... | code | {
"ground_truth": "{\"fn_name\": \"arithmetic_sequence_elements\", \"inputs\": [[1, 2, 5], [1, 0, 5], [1, -3, 10], [100, -10, 10]], \"outputs\": [[\"1, 3, 5, 7, 9\"], [\"1, 1, 1, 1, 1\"], [\"1, -2, -5, -8, -11, -14, -17, -20, -23, -26\"], [\"100, 90, 80, 70, 60, 50, 40, 30, 20, 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": "In a far away land, there are two cities near a river. One day, the cities decide that they have too little space and would like to reclaim some of t... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3 1\\n1 1\\n\",\n \"12 2\\n4 1\\n8 1\\n\",\n \"1 1\\n1 2\\n\",\n \"4 0\\n\",\n \"100 44\\n41 1\\n13 1\\n52 1\\n83 1\\n64 2\\n86 2\\n12 1\\n77 1\\n100 2\\n97 2\\n58 1\\n33 2\\n8 1\\n72 2\\n2 1\\n88 1\\n50 2\\n4 1\\n18 1\\n36 2\\n46 2\\n57 1\\n29 2\\n22 1\\n75 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": "Complete the function to determine the number of bits required to convert integer `A` to integer `B` (where `A` and `B` >= 0)\n\nThe upper limit for ... | code | {
"ground_truth": "{\"fn_name\": \"convert_bits\", \"inputs\": [[31, 14], [7, 17], [31, 0], [0, 0], [127681, 127681], [312312312, 5645657], [43, 2009989843]], \"outputs\": [[2], [3], [5], [0], [0], [13], [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": "You are enthusiastic about the popular web game \"Moonlight Ranch\". The purpose of this game is to grow crops in the fields, sell them to earn incom... | code | {
"ground_truth": "{\"inputs\": [\"5\\napple 1 1 1 1 1 1 1 10 1\\nbanana 1 2 2 2 2 2 1 10 1\\ncarrot 1 2 2 2 2 2 1 10 2\\ndurian 1 3 3 3 3 3 1 10 1\\neggplant 1 3 3 3 3 3 1 100 1\\n4\\nenoki 1 3 3 3 3 3 1 10 1\\ntomato 1 3 3 3 3 3 1 10 1\\npotato 1 3 3 3 3 3 1 10 1\\nonion 1 3 3 3 3 3 1 10 1\\n3\\na 10 1 1 1 1 1 1 10... | {
"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: Polycarp's phone book\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThere are *n* phone numbers in Poly... | code | {
"ground_truth": "{\"inputs\": [\"3\\n123456789\\n100000000\\n100123456\", \"4\\n123456789\\n193456789\\n134567819\\n934567891\", \"1\\n167038488\", \"5\\n115830748\\n403459907\\n556271610\\n430358099\\n413961410\", \"5\\n139127034\\n452751056\\n193432721\\n894001929\\n426470953\", \"5\\n343216531\\n914073407\\n4202... | {
"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 National Egg Co-ordination Committee (NECC) has been able to come up with a few variants of chicken egg that is stronger than the naturally avail... | code | {
"ground_truth": "{\"inputs\": [\"1000\\n67 394\\n416 179\\n60 192\\n245 444\\n327 495\\n280 174\\n253 201\\n58 41\\n204 395\\n51 401\\n319 113\\n8 443\\n211 97\\n5 214\\n411 293\\n383 342\\n367 448\\n217 237\\n195 55\\n287 493\\n219 499\\n491 23\\n98 380\\n215 332\\n412 490\\n251 454\\n493 299\\n174 54\\n56 356\\n1... | {
"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": "Little penguin Polo has got a tree — a non-directed connected acyclic graph, containing n nodes and n - 1 edges. We will consider the tree nodes numb... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 2\\n2 3\\n3 4\\n\", \"5\\n1 2\\n2 3\\n3 4\\n2 5\\n\", \"2\\n1 2\\n\", \"20\\n17 12\\n6 17\\n1 18\\n12 16\\n1 6\\n12 10\\n1 4\\n1 9\\n1 5\\n18 8\\n2 20\\n3 19\\n1 2\\n6 3\\n13 11\\n6 15\\n1 7\\n6 13\\n17 14\\n\", \"50\\n40 49\\n45 2\\n28 23\\n45 47\\n32 45\\n43 50\\n9 17\\n29 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": "Rookie Bunny is helping the motor vehicle department to renew licenses for its customers. She works at the ticket machine and gives tickets to custom... | code | {
"ground_truth": "{\"inputs\": [\"5 20 20\\n7 11 9 12 2\\n\", \"5 100 100\\n101 1 1 1 1\\n\"], \"outputs\": [\"4\\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": "A palidrome craftsperson starts to work in the early morning, with the clear air allowing him to polish up his palindromes.\n\nOn this morning, he is... | code | {
"ground_truth": "{\"inputs\": [\"2 2\\nac\\nba\\n1 1\\n2 2\", \"2 2\\nba\\na\\n1 1\\n1 2\", \"2 2\\nba\\nb\\n1 1\\n1 2\", \"2 2\\n`b\\nb`\\n1 2\\n1 2\", \"4 2\\n`c\\nbb\\n-2 -4\\n2 4\", \"2 2\\nab\\na\\n1 2\\n1 2\", \"2 2\\nba\\nba\\n1 1\\n2 2\", \"2 2\\nac\\nba\\n1 2\\n2 2\", \"2 2\\n`b\\nba\\n1 1\\n1 2\", \"2 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: Jzzhu and Sequences\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nJzzhu has invented a kind of sequence... | code | {
"ground_truth": "{\"inputs\": [\"2 3\\n3\", \"0 -1\\n2\", \"-9 -11\\n12345\", \"0 0\\n1000000000\", \"-1000000000 1000000000\\n2000000000\", \"-12345678 12345678\\n1912345678\", \"728374857 678374857\\n1928374839\", \"278374837 992837483\\n1000000000\", \"-693849384 502938493\\n982838498\", \"-783928374 983738273\\... | {
"index": 0,
"split": "dummy"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.