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": "You are given an undirected tree of $n$ vertices. \n\nSome vertices are colored blue, some are colored red and some are uncolored. It is guaranteed t... | code | {
"ground_truth": "{\n \"inputs\": [\n \"5\\n2 0 0 1 2\\n1 2\\n2 3\\n2 4\\n2 5\\n\",\n \"5\\n1 0 0 0 2\\n1 2\\n2 3\\n3 4\\n4 5\\n\",\n \"3\\n1 1 2\\n2 3\\n1 3\\n\",\n \"2\\n2 1\\n1 2\\n\",\n \"2\\n1 2\\n1 2\\n\",\n \"3\\n1 2 1\\n1 3\\n2 3\\n\",\n \"5\\n1 2 2 0 2\\n1 2\\n1 5\\n3 5\\n4 5\\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": "Chandu is a big fan of primes. He defines another kind of primes alpha-primes. Alpha-primes are defined as primes for which there exists some suffix ... | code | {
"ground_truth": "{\"inputs\": [\"10\\n1 2\\n1 6\\n8 10\\n5 6\\n1 7\\n4 6\\n2 6\\n7 8\\n5 7\\n1 2\\n\", \"1000\\n15 327\\n401 884\\n97 955\\n817 828\\n116 179\\n500 849\\n152 764\\n669 688\\n523 777\\n429 539\\n344 661\\n123 732\\n297 636\\n264 774\\n550 614\\n129 940\\n564 881\\n176 660\\n187 344\\n303 839\\n522 69... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "For given a circle $c$ and a line $l$, print the coordinates of the cross points of them.\n\nConstraints\n\n* $p1$ and $p2$ are different\n* The circ... | code | {
"ground_truth": "{\"inputs\": [\"2 1 1\\n2\\n0 1 4 1\\n3 0 3 3\", \"2 0 1\\n2\\n0 1 4 1\\n3 0 3 3\", \"2 0 2\\n2\\n0 1 4 1\\n3 0 3 3\", \"2 0 2\\n2\\n0 1 4 2\\n3 0 3 3\", \"2 0 2\\n2\\n0 1 4 2\\n3 0 5 3\", \"2 0 2\\n1\\n0 1 4 2\\n3 0 5 3\", \"2 0 2\\n1\\n0 1 4 0\\n3 0 5 3\", \"2 0 2\\n1\\n0 1 8 0\\n1 0 5 3\", \"2 0... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "# Task\n\nYour task is to sort the characters in a string according to the following rules:\n```\n- Rule1: English alphabets are arranged from A to Z... | code | {
"ground_truth": "{\"fn_name\": \"sort_string\", \"inputs\": [[\"a\"], [\"cba\"], [\"Cba\"], [\"cCBbAa\"], [\"!\"], [\"c b a\"], [\"-c--b--a-\"], [\"cbaCcC\"], [\"Codewars\"], [\" MkWD{RB=//k-^ J@,xH Vfi uAz+$ kV _[ }a!}%pSBwn !kKB (b q PQF +}wS .kfU r wFNEs#NsR UVMdG\"]], \"outputs\": [[\"a\"], [\"abc\"], [\"abC\... | {
"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": "Lot of museum allow you to be a member, for a certain amount `amount_by_year` you can have unlimitted acces to the museum. \n\nIn this kata you shoul... | code | {
"ground_truth": "{\"fn_name\": \"how_many_times\", \"inputs\": [[40, 15], [30, 10], [80, 15]], \"outputs\": [[3], [3], [6]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "A group of friends (n >= 2) have reunited for a get-together after \na very long time. \n\nThey agree that they will make presentations on holiday de... | code | {
"ground_truth": "{\"fn_name\": \"presentation_agenda\", \"inputs\": [[[{\"person\": \"Abe\", \"dest\": [\"London\", \"Dubai\"]}, {\"person\": \"Bond\", \"dest\": [\"Melbourne\", \"Dubai\"]}]], [[{\"person\": \"Abe\", \"dest\": [\"Dubai\"]}, {\"person\": \"Brad\", \"dest\": [\"Dubai\"]}]], [[{\"person\": \"Abe\", \"... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Let's assume that we are given an n × m table filled by integers. We'll mark a cell in the i-th row and j-th column as (i, j). Thus, (1, 1) is the up... | code | {
"ground_truth": "{\"inputs\": [\"5 6 1\\n4 2 1 3 2 6\\n2 3 2 4 7 2\\n5 2 2 1 1 3\\n1 4 3 3 6 4\\n5 1 4 2 3 2\\n\", \"3 3 1\\n1 2 3\\n4 5 6\\n7 8 9\\n\", \"2 2 0\\n1 2\\n2 4\\n\", \"8 7 0\\n6 4 7 4 2 3 5\\n3 5 6 3 10 9 1\\n1 9 3 5 2 1 2\\n9 1 5 10 5 8 8\\n1 7 1 7 9 8 8\\n1 3 9 1 10 3 9\\n8 4 3 3 5 6 5\\n6 10 7 6 3 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've got a robot, its task is destroying bombs on a square plane. Specifically, the square plane contains n bombs, the i-th bomb is at point with c... | code | {
"ground_truth": "{\"inputs\": [\"2\\n1 1\\n-1 -1\\n\", \"3\\n5 0\\n0 5\\n1 0\\n\", \"1\\n-277226476 314722425\\n\", \"24\\n-2 -2\\n-1 1\\n0 1\\n1 1\\n0 2\\n1 -1\\n2 -2\\n1 -2\\n-1 0\\n0 -2\\n0 -1\\n-2 0\\n-2 -1\\n2 -1\\n2 2\\n-1 -2\\n-2 1\\n2 0\\n-1 2\\n1 2\\n-1 -1\\n1 0\\n2 1\\n-2 2\\n\", \"24\\n-2 -2\\n-1 1\\n0 1... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "You are given a set of n points on the plane. A line containing the origin is called good, if projection of the given set to this line forms a symmet... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 2\\n2 1\\n3 3\\n\", \"2\\n4 3\\n1 2\\n\", \"20\\n12 -3\\n-18 -24\\n-13 7\\n17 -23\\n15 11\\n-17 5\\n0 -26\\n18 10\\n12 -18\\n-14 -26\\n-20 -24\\n16 4\\n-19 -21\\n-14 -11\\n-15 -19\\n-18 12\\n16 10\\n-2 12\\n11 9\\n13 -25\\n\", \"8\\n-10000 4285\\n-7143 -10000\\n-4286 -1429\\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": "Isaac H. Ives is attending an international student party (maybe for girl-hunting). Students there enjoy talking in groups with excellent foods and d... | code | {
"ground_truth": "{\"inputs\": [\"3 4\\nEnglish\\nFrench\\nJapanese\\n1 English\\n2 French English\\n2 Japanese English\\n1 Japanese\\n2 2\\nEnglish\\nJapanese\\n1 hsilgnE\\n1 Japanese\\n6 7\\nEnglish\\nDutch\\nGerman\\nFrench\\nItalian\\nSpanish\\n1 English\\n2 English Dutch\\n2 Dutch German\\n2 German French\\n2 F... | {
"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 chef is trying to solve some pattern problems, Chef wants your help to code it. Chef has one number K to form new pattern. Help the chef to code ... | code | {
"ground_truth": "{\"inputs\": [[\"2\", \"2\", \"4\"]], \"outputs\": [[\"2\", \"12\", \"012\", \"12\", \"2\", \"4\", \"34\", \"234\", \"1234\", \"01234\", \"1234\", \"234\", \"34\", \"4\"]]}",
"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": "On a random day, Neko found n treasure chests and m keys. The i-th chest has an integer a_i written on it and the j-th key has an integer b_j on it. ... | code | {
"ground_truth": "{\"inputs\": [\"5 1\\n2 4 6 8 10\\n5\\n\", \"1 4\\n10\\n20 30 40 50\\n\", \"5 4\\n9 14 6 2 11\\n8 4 7 20\\n\", \"4 1\\n3 5 7 8\\n2\\n\", \"5 1\\n2 2 2 3 3\\n3\\n\", \"4 1\\n1 1 2 2\\n2\\n\", \"10 10\\n522312461 931001459 598654597 488228616 544064902 21923894 329635457 980089248 988262691 654502493... | {
"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: Voltage Keepsake\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYou have *n* devices that you want to us... | code | {
"ground_truth": "{\"inputs\": [\"2 1\\n2 2\\n2 1000\", \"1 100\\n1 1\", \"3 5\\n4 3\\n5 2\\n6 1\", \"1 1\\n1 87\", \"1 1\\n100 77\", \"5 10\\n3 81\\n3 49\\n1 20\\n1 12\\n1 30\", \"5 10\\n4 3\\n1 54\\n2 57\\n2 31\\n1 99\", \"5 10\\n2 81\\n3 31\\n4 49\\n1 35\\n1 67\", \"10 1\\n1 92\\n1 92\\n1 92\\n1 92\\n1 92\\n1 92\... | {
"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": "Remember the busy boards for toddlers that have an array of holes into which to hammer pegs of various shapes? There’s a new, electronic version. The... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4 2\\nXO\\nOX\\nXO\\nOX\\nOX\\nOO\\nXO\\nOO\\n\",\n \"2 4\\nXXXX\\nXXXX\\nXOOO\\nOOOO\\n\"\n ],\n \"outputs\": [\n \"1\\n\",\n \"0\\n\"\n ]\n}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Polygons are the most fundamental objects in geometric processing. Complex figures are often represented and handled as polygons with many short side... | code | {
"ground_truth": "{\"inputs\": [\"3\\n1 1\\n3 4\\n6 0\\n\\n7\\n0 0\\n10 10\\n0 20\\n10 30\\n0 40\\n100 40\\n100 0\\n\\n0\", \"3\\n1 1\\n3 4\\n6 0\\n\\n7\\n0 0\\n10 10\\n0 20\\n10 33\\n0 40\\n100 40\\n100 0\\n\\n0\", \"3\\n1 1\\n3 4\\n6 0\\n\\n7\\n0 0\\n10 10\\n0 20\\n10 33\\n0 40\\n110 40\\n100 0\\n\\n0\", \"3\\n1 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": "Dima loves Inna very much. He decided to write a song for her. Dima has a magic guitar with n strings and m frets. Dima makes the guitar produce soun... | code | {
"ground_truth": "{\"inputs\": [\"4 6 5 7\\n3 1 2 2 3 1\\n3 2 2 2 5 5\\n4 2 2 2 5 3\\n3 2 2 1 4 3\\n2 3 1 4 1 5 1\\n\", \"4 4 9 5\\n4 7 9 5\\n1 2 1 7\\n8 3 4 9\\n5 7 7 2\\n7 1 9 2 5\\n\", \"5 5 2 2\\n2 2 2 1 2\\n2 1 2 2 2\\n2 2 2 2 2\\n1 2 2 2 2\\n2 2 2 2 1\\n1 1\\n\", \"5 5 2 2\\n2 1 2 2 2\\n2 2 2 2 2\\n2 2 2 2 1\\... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Problem statement\n\nA lazy guy in UVCE is designing a robot that could collect all useful things from different places and put them in one place. In... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5\\n1 2 3 4 5\\n6\\n1 2 3 4 5 6\"], \"outputs\": [\"6\\n9\"]}",
"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": "Snuke has N sticks. The length of the i-th stick is l_i.\n\nSnuke is making a snake toy by joining K of the sticks together.\n\nThe length of the toy... | code | {
"ground_truth": "{\"inputs\": [\"15 14\\n50 26 27 21 41 7 42 35 7 5 5 36 39 1 45\", \"5 3\\n1 2 3 4 5\", \"15 14\\n49 26 27 21 41 7 42 35 7 5 5 36 39 1 45\", \"5 5\\n1 2 3 4 5\", \"15 14\\n49 26 27 21 33 7 42 35 7 5 5 36 39 1 45\", \"5 5\\n2 2 3 4 5\", \"15 14\\n49 26 27 26 33 7 42 35 7 5 5 36 39 1 45\", \"5 3\\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": "You are given a sequence of positive integers a1, a2, ..., an. Find all such indices i, that the i-th element equals the arithmetic mean of all other... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 2 3 4 5\\n\", \"4\\n50 50 50 50\\n\", \"4\\n1 2 3 7\\n\", \"3\\n3 4 4\\n\", \"3\\n1 1 3\\n\", \"2\\n1 2\\n\", \"4\\n6 6 6 7\\n\", \"3\\n4 3 6\\n\", \"3\\n99 100 99\\n\", \"10\\n3 3 3 3 3 4 3 3 3 2\\n\", \"2\\n1 1\\n\", \"4\\n1 1 1 2\\n\", \"4\\n4 5 5 4\\n\", \"2\\n4 5\\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": "Goo is working in a well-known Slovak antivirus company which unfortunately cannot be named. In addition to antivirus software, they are developing a... | code | {
"ground_truth": "{\"inputs\": [\"1\\n01\\n\", \"4\\n0110011\\n\"], \"outputs\": [\"2 1\\n\", \"2 6\\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": "Consider a new order of english alphabets (a to z), that we are not aware of.\nWhat we have though, dictionary of words, ordered according to the new... | code | {
"ground_truth": "{\"inputs\": [\"6\\naaabc\\naaade\\nbacd\\ncda\\ncde\\ncca\", \"11\\neiee\\necag\\ndgj\\nidhajc\\ngga\\ncejgkf\\ncddf\\naab\\nakch\\nkgb\\nkchg\", \"12\\nbffkci\\ncehk\\ncic\\nggkb\\nhdbeag\\nack\\njacif\\nfbj\\nfjhff\\nkdlg\\nkke\\niebdjb\", \"24\\nmdee\\nmlakg\\nkflllhjigoe\\naaemalie\\njgahgjbdm... | {
"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: Compote\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nNikolay has *a* lemons, *b* apples and *c* pears.... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5\\n7\", \"4\\n7\\n13\", \"2\\n3\\n2\", \"1\\n1\\n1\", \"1\\n2\\n4\", \"1000\\n1000\\n1000\", \"1\\n1\\n4\", \"1\\n2\\n3\", \"1\\n1000\\n1000\", \"1000\\n1\\n1000\", \"1000\\n2\\n1000\", \"1000\\n500\\n1000\", \"1000\\n1000\\n4\", \"1000\\n1000\\n3\", \"4\\n8\\n12\", \"10\\n20\\... | {
"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 the string S . Compress the string when lower and upper cases are the same. In compressed string characters should be in lowercase.\nEx... | code | {
"ground_truth": "{\"fn_name\": \"transform\", \"inputs\": [[\"aabccccCaaa\"], [\"BBbbHHShaAAA\"], [\"xyzZZZbb\"], [\"QqQ\"], [\"aAAaAAaaAAaaAAaAaAaAA\"], [\"a\"], [\"A\"], [\"AaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAa\"], [\"ZzZzZzZzZzZzZzZzZzZzZzZzZzZz\"], [\"BbZZZZzzzzzz\"]], \"outputs\": [[\"2a1b5c3a\"], [\"4b2h1s1h4a... | {
"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: k-rounding\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nFor a given positive integer *n* denote its *k... | code | {
"ground_truth": "{\"inputs\": [\"375 4\", \"10000 1\", \"38101 0\", \"123456789 8\", \"1 0\", \"2 0\", \"100 0\", \"1000000000 0\", \"160 2\", \"3 0\", \"10 0\", \"1 1\", \"2 1\", \"3 1\", \"4 1\", \"5 1\", \"6 1\", \"7 1\", \"8 1\", \"9 1\", \"10 1\", \"11 1\", \"12 1\", \"16 2\", \"2 2\", \"1 2\", \"5 2\", \"15 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": "problem\n\nAOR Ika-chan visited AOR Co., Ltd. AOR Co., Ltd. is a $ N $ building with no basement floor. AOR Ika started the tour from the $ 1 $ floor... | code | {
"ground_truth": "{\"inputs\": [\"3 4\", \"3 1\", \"2 1\", \"3 6\", \"4 6\", \"6 9\", \"5 7\", \"7 9\", \"4 9\", \"3 9\", \"3 11\", \"5 11\", \"10 11\", \"5 8\", \"8 12\", \"3 20\", \"3 34\", \"4 8\", \"9 15\", \"9 20\", \"11 14\", \"5 15\", \"11 24\", \"8 15\", \"19 24\", \"7 15\", \"7 11\", \"17 31\", \"3 13\", \"... | {
"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 table $a$ of size $n \\times m$. We will consider the table rows numbered from top to bottom from $1$ to $n$, and the columns numbere... | code | {
"ground_truth": "{\"inputs\": [\"7\\n1 1\\n2 3\\n3 2\\n7 1\\n1 10\\n5 5\\n10000 10000\\n\"], \"outputs\": [\"1\\n12\\n13\\n28\\n55\\n85\\n500099995000\\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 is given a sequence of prime numbers $A_1, A_2, \\ldots, A_N$. This sequence has exactly $2^N$ subsequences. A subsequence of $A$ is good if it ... | code | {
"ground_truth": "{\"inputs\": [\"3 2\\n2 2 2\\n\", \"6 3\\n2 2 3 3 5 5\\n\", \"7 5\\n2 7 3 5 11 13 17\\n\", \"2 1\\n2 2\\n\", \"3 2\\n2 2 2\\n\", \"5 4\\n2 11 7 3 5\\n\", \"5 5\\n2 7 3 5 11\\n\", \"10 5\\n2 3 5 7 11 13 17 19 23 29\\n\"], \"outputs\": [\"4\", \"27\", \"120\", \"3\", \"4\", \"31\", \"32\", \"638\"]}"... | {
"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 Directed Acyclic Graph (DAG) with $n$ vertices and $m$ edges. Each vertex $v$ has an integer, $a_v$, associated with it and the initi... | code | {
"ground_truth": "{\"inputs\": [\"2 1 4\\n1 2\\n1 1 1\\n3 1\\n3 2\\n2 1 2\\n3 2\\n\", \"2 1 3\\n1 2\\n1 2 6\\n3 1\\n2 1 566\\n3 1\\n\"], \"outputs\": [\"1\\n1\", \"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": "DZY loves Fast Fourier Transformation, and he enjoys using it.\n\nFast Fourier Transformation is an algorithm used to calculate convolution. Specific... | code | {
"ground_truth": "{\"inputs\": [\"5 4 2\\n\", \"5 4 3\\n\", \"3 1 1\\n\", \"10 2 5\\n\", \"1 1 8\\n\", \"10 4 7\\n\", \"10 2 4\\n\", \"10 1 6\\n\", \"30000 276 13\\n\", \"10000 3048 10\\n\", \"20000 15167 12\\n\", \"24578 10020 53129589\\n\", \"1 2 5\\n\", \"2 1 8\\n\", \"16 4 7\\n\", \"4 2 4\\n\", \"15 1 6\\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": "Takahashi is taking exams on N subjects. The score on each subject will be an integer between 0 and K (inclusive).\nHe has already taken exams on N-1... | code | {
"ground_truth": "{\"inputs\": [\"5 10 7\\n8 10 3 6\\n\", \"4 100 60\\n100 100 100\\n\", \"4 100 60\\n0 0 0\\n\", \"5 20 10\\n12 12 12 13\\n\", \"5 20 10\\n12 12 13 13\\n\", \"5 20 10\\n7 7 8 8\\n\", \"5 20 10\\n7 7 7 8\\n\", \"100 100 100\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Mirko and Slavko are playing a new game, “Trojke” (Triplets, in English). First they use a chalk to draw an $N \\times N$ square grid on the road. Th... | code | {
"ground_truth": "{\"inputs\": [\"4\\n...D\\n..C.\\n.B..\\nA...\\n\", \"5\\n..T..\\nA....\\n.FE.R\\n....X\\nS....\\n\", \"10\\n....AB....\\n..C....D..\\n.E......F.\\n...G..H...\\nI........J\\nK........L\\n...M..N...\\n.O......P.\\n..Q....R..\\n....ST....\\n\"], \"outputs\": [\"4\\n\", \"3\\n\", \"0\\n\"]}",
"style... | {
"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 Egor is a huge movie fan. He likes watching different kinds of movies: from drama movies to comedy movies, from teen movies to horror movies. ... | code | {
"ground_truth": "{\"inputs\": [\"2\\n2\\n1 2\\n2 1\\n4\\n2 1 4 1\\n2 4 1 4\", \"2\\n2\\n1 2\\n2 1\\n4\\n2 1 4 1\\n2 5 1 4\", \"2\\n2\\n2 2\\n2 1\\n4\\n2 1 4 1\\n4 4 1 4\", \"2\\n2\\n1 2\\n2 1\\n4\\n1 1 4 1\\n2 5 1 4\", \"2\\n2\\n2 2\\n2 1\\n4\\n2 1 4 1\\n2 4 1 4\", \"2\\n2\\n2 2\\n2 1\\n4\\n2 1 4 1\\n1 4 1 4\", \"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": "Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 ty... | code | {
"ground_truth": "{\"inputs\": [\"3 6 9\\n\", \"4 4 4\\n\", \"0 0 0\\n\", \"0 1 0\\n\", \"2 2 0\\n\", \"7 8 9\\n\", \"666806767 385540591 357848286\\n\", \"3 3 5\\n\", \"494914467 356982656 757942689\\n\", \"242854896 442432924 180395753\\n\", \"32 62 92\\n\", \"8 8 9\\n\", \"139978911 5123031 935395222\\n\", \"9379... | {
"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": "Let's call a string good if and only if it consists of only two types of letters — 'a' and 'b' and every two consecutive letters are distinct. For ex... | code | {
"ground_truth": "{\"inputs\": [\"1 1 1\\n\", \"2 1 2\\n\", \"3 5 2\\n\", \"2 2 1\\n\", \"1000000000 1000000000 1000000000\\n\", \"3 1 3\\n\", \"2 2 3\\n\", \"1 1 4\\n\", \"1 1 2\\n\", \"1 2 1\\n\", \"3 6 3\\n\", \"5 5 4\\n\", \"41764 97259 54586\\n\", \"3698483 6798912 18096063\\n\", \"13350712 76770926 61331309\\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 collection of integers that might contain duplicates, nums, return all possible subsets (the power set).\n\nNote: The solution set must not c... | code | {
"ground_truth": "{\"fn_name\": \"subsetsWithDup\", \"inputs\": [[[1, 2, 2]], [[0]]], \"outputs\": [[[], [1], [1, 2], [1, 2, 2], [2], [2, 2]], [[], [0]]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Kitty and Katty have $N$ plastic blocks. They label the blocks with sequential numbers from $\\mbox{1}$ to $N$ and begin playing a game in turns, wit... | code | {
"ground_truth": "{\"inputs\": [\"1\\n5\\n\", \"2\\n1\\n100\\n\", \"5\\n99\\n100\\n101\\n102\\n103\\n\", \"7\\n10000\\n20000\\n30000\\n40000\\n50000\\n60000\\n70000\\n\", \"4\\n100000\\n90000\\n80000\\n70000\\n\"], \"outputs\": [\"Katty\", \"Kitty\\nKitty\", \"Katty\\nKitty\\nKatty\\nKitty\\nKatty\", \"Kitty\\nKitty... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue list... | code | {
"ground_truth": "{\"inputs\": [\"2\\n3\\n911\\n97625999\\n91125426\\n5\\n113\\n12340\\n123440\\n12345\\n98346\\n\\nSAMPLE\"], \"outputs\": [\"NO\\nYES\"]}",
"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": "Vova is playing a computer game. There are in total n turns in the game and Vova really wants to play all of them. The initial charge of his laptop b... | code | {
"ground_truth": "{\"inputs\": [\"6\\n15 5 3 2\\n15 5 4 3\\n15 5 2 1\\n15 5 5 1\\n16 7 5 2\\n20 5 7 3\\n\", \"1\\n1000000000 499999999 3 2\\n\", \"11\\n1000000000 500000000 2 1\\n1000000000 500000000 2 1\\n1000000000 500000000 2 1\\n1000000000 500000000 2 1\\n1000000000 500000000 2 1\\n1000000000 500000000 2 1\\n100... | {
"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": "Read problems statements in Mandarin Chinese, Russian and Vietnamese as well. \nRead problems statements in Mandarin Chinese, Russian and Vietnamese ... | code | {
"ground_truth": "{\"inputs\": [\"3 5 15 9\\n\", \"2 7 14 2\\n\", \"2 1000 500 4\\n\"], \"outputs\": [\"Possible\", \"Impossible\", \"Possible\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
apps | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "After overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n which sa... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3 4\\n1**2\\na3*0\\nc4**\\n\",\n \"5 5\\n#*&#*\\n*a1c&\\n&q2w*\\n#a3c#\\n*&#*&\\n\",\n \"5 2\\n&l\\n*0\\n*9\\n*#\\n#o\\n\",\n \"25 16\\nvza**ooxkmd#*ywa\\ndip#*#&ef&z&&&pv\\nwggob&&72#*&&nku\\nrsb##*&jm&#u**te\\nzif#lu#t&2w#jbqb\\nwfo&#&***0xp#&hp\\njbw##h*###nkmk... | {
"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 Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and... | code | {
"ground_truth": "{\"inputs\": [\"0001\\n1011\\n\", \"000\\n111\\n\", \"1010101011111110111111001111111111111111111111101101110111111111111110110110101011111110110111111101\\n0101111111000100010100001100010101000000011000000000011011000001100100001110111011111000001110011111\\n\", \"000000000100000000000010000010000... | {
"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 string is called bracket sequence if it does not contain any characters other than \"(\" and \")\". A bracket sequence is called regular if it it i... | code | {
"ground_truth": "{\"inputs\": [\"1\\n2\\n3\\n4\\n\", \"3\\n1\\n4\\n3\\n\", \"0\\n0\\n0\\n0\\n\", \"0\\n10\\n2\\n0\\n\", \"0\\n0\\n3\\n0\\n\", \"0\\n1\\n5\\n0\\n\", \"1\\n2\\n5\\n1\\n\", \"2\\n6\\n6\\n2\\n\", \"0\\n1\\n10\\n0\\n\", \"0\\n2\\n3\\n0\\n\", \"2\\n1\\n5\\n2\\n\", \"2\\n0\\n1\\n2\\n\", \"1\\n0\\n500\\n1\\... | {
"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: Password\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nAsterix, Obelix and their temporary buddies Suff... | code | {
"ground_truth": "{\"inputs\": [\"fixprefixsuffix\", \"abcdabc\", \"qwertyqwertyqwerty\", \"papapapap\", \"aaaaaaaaaa\", \"ghbdtn\", \"a\", \"aa\", \"ab\", \"aaa\", \"aba\", \"aab\", \"abb\", \"abc\", \"aaabaabaaaaab\", \"aabaaabaaaaab\", \"aaabaaaabab\", \"abcabcabcabcabc\", \"aaaaabaaaa\", \"aaaabaaaaaaa\", \"ghgh... | {
"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": "Squid loves painting vertices in graphs.\n\nThere is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially,... | code | {
"ground_truth": "{\"inputs\": [\"14 10\\n1 4\\n5 7\\n7 11\\n4 10\\n14 7\\n14 3\\n6 14\\n8 11\\n5 13\\n8 3\\n8\\n8 6 2\\n9 7 85\\n6 9 3\\n6 7 5\\n10 3 1\\n12 9 4\\n9 6 6\\n8 2 3\", \"7 7\\n1 2\\n1 3\\n1 4\\n4 5\\n5 6\\n5 7\\n2 3\\n2\\n6 1 1\\n1 2 2\", \"14 10\\n1 4\\n5 7\\n7 11\\n4 10\\n14 7\\n14 3\\n6 14\\n8 11\\n5... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Given a undirected graph find the number of connected components.\n\n\nInput\nFirst line of the input is 't'- number of test case. Followed by N, the... | code | {
"ground_truth": "{\"inputs\": [\"2\\n4\\n2\\n0 1\\n0 2\\n8\\n0\", \"2\\n4\\n2\\n0 1\\n0 1\\n8\\n0\", \"2\\n4\\n2\\n0 0\\n0 2\\n9\\n0\", \"2\\n4\\n2\\n0 1\\n0 2\\n3\\n0\", \"2\\n4\\n2\\n0 2\\n0 1\\n8\\n0\", \"2\\n4\\n2\\n0 0\\n0 3\\n3\\n0\", \"2\\n4\\n2\\n0 0\\n0 0\\n8\\n-1\", \"2\\n4\\n2\\n1 0\\n0 2\\n9\\n-1\", \"2... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There are n students living in the campus. Every morning all students wake up at the same time and go to wash. There are m rooms with wash basins. Th... | code | {
"ground_truth": "{\"inputs\": [\"2 2\\n1 1\\n\", \"2 3\\n1 1 1\\n\", \"7 5\\n1 1 2 3 1\\n\", \"1 1\\n2\\n\", \"35 40\\n12 1 4 8 1 9 1 11 1 1 8 8 16 1 6 5 3 1 6 4 6 2 4 6 2 1 1 16 2 2 3 1 1 2 2 3 8 12 1 4\\n\", \"7 4\\n1 2 3 4\\n\", \"1 50\\n9 1 1 4 1 9 7 4 3 10 1 7 4 7 2 5 13 2 3 3 2 1 2 1 1 7 7 5 2 6 1 8 2 6 2 15 ... | {
"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 United States of America, telephone numbers within an area code consist of seven digits: the prefix number is the first three digits and the l... | code | {
"ground_truth": "{\"inputs\": [\"5551212\\n\", \"5519876\\n\", \"5055555\\n\", \"5550000\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"0\\n\", \"1\\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: Kefa and Company\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nKefa wants to celebrate his first big sa... | code | {
"ground_truth": "{\"inputs\": [\"4 5\\n75 5\\n0 100\\n150 20\\n75 1\", \"5 100\\n0 7\\n11 32\\n99 10\\n46 8\\n87 54\", \"1 1000000000\\n15 12\", \"5 1\\n5 9\\n2 10\\n8 5\\n18 12\\n1 1\", \"3 3\\n4 15\\n0 17\\n9 11\", \"5 10\\n8 90\\n1009 1000000\\n9 121\\n10 298\\n0 109092\", \"5 9\\n0 98\\n2 1000000000\\n8 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": "Jal Mahal Lake is famous tourist place in Jaipur. The lake has floating planks in a straight line. The planks are currently not attached to each othe... | code | {
"ground_truth": "{\"inputs\": [\"4\\n4\\n1 3 10 20\\n2 2 5 3\\n3\\n100 50 1\\n10 2 1\\n5\\n4 10 100 13 80\\n5 3 42 40 9\\n10\\n5606451 63581020 81615191 190991272 352848147 413795385 468408016 615921162 760622952 791438427\\n42643329 9909484 58137134 99547272 39849232 15146704 144630245 604149 15591965 107856540\",... | {
"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 even number N (greater than 2), return two prime numbers whose sum will be equal to given number. There are several combinations possible. P... | code | {
"ground_truth": "{\"fn_name\": \"primeDivision\", \"inputs\": [[10], [16], [20], [28], [34], [4], [6], [8], [10], [12], [10000], [9998]], \"outputs\": [[[3, 7]], [[3, 13]], [[3, 17]], [[5, 23]], [[3, 31]], [[2, 2]], [[3, 3]], [[3, 5]], [[3, 7]], [[5, 7]], [[59, 9941]], [[31, 9967]]]}",
"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": "### Lyrics...\n\nPyramids are amazing! Both in architectural and mathematical sense. If you have a computer, you can mess with pyramids even if you a... | code | {
"ground_truth": "{\"fn_name\": \"longest_slide_down\", \"inputs\": [[[[3], [7, 4], [2, 4, 6], [8, 5, 9, 3]]], [[[75], [95, 64], [17, 47, 82], [18, 35, 87, 10], [20, 4, 82, 47, 65], [19, 1, 23, 75, 3, 34], [88, 2, 77, 73, 7, 63, 67], [99, 65, 4, 28, 6, 16, 70, 92], [41, 41, 26, 56, 83, 40, 80, 70, 33], [41, 48, 72, ... | {
"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 hero of the Cut the Rope game is a little monster named Om Nom. He loves candies. And what a coincidence! He also is the hero of today's problem.... | code | {
"ground_truth": "{\"inputs\": [\"5 3\\n0 2 4\\n1 3 1\\n0 8 3\\n0 20 10\\n1 5 5\\n\", \"5 2\\n1 15 2\\n1 11 2\\n0 17 2\\n0 16 1\\n1 18 2\\n\", \"6 2\\n1 17 3\\n1 6 1\\n0 4 2\\n1 10 1\\n1 7 3\\n1 5 1\\n\", \"7 2\\n1 14 1\\n1 9 2\\n0 6 3\\n0 20 2\\n0 4 2\\n0 3 1\\n0 9 2\\n\", \"8 2\\n0 20 3\\n1 5 2\\n1 4 1\\n1 7 1\\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": "```if:python,php\nIn this kata you will have to write a function that takes `litres` and `price_per_litre` as arguments. Purchases of 2 or more litre... | code | {
"ground_truth": "{\"fn_name\": \"fuel_price\", \"inputs\": [[10, 21.5], [40, 10], [15, 5.83]], \"outputs\": [[212.5], [390], [83.7]]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Write a program that extracts n different numbers from the numbers 0 to 100 and outputs the number of combinations that add up to s. Each n number is... | code | {
"ground_truth": "{\"inputs\": [\"3 6\\n3 1\\n0 0\", \"3 12\\n3 1\\n0 0\", \"5 12\\n3 0\\n0 0\", \"5 23\\n3 0\\n0 0\", \"5 28\\n3 0\\n0 0\", \"6 6\\n3 1\\n0 0\", \"3 12\\n3 3\\n0 0\", \"6 23\\n3 0\\n0 0\", \"3 11\\n3 3\\n0 0\", \"3 19\\n3 -1\\n0 0\", \"6 19\\n3 0\\n0 0\", \"3 11\\n3 2\\n0 0\", \"6 26\\n3 0\\n0 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": "There is an infinitely large pond, which we consider as a number line. In this pond, there are N lotuses floating at coordinates 0, 1, 2, ..., N-2 an... | code | {
"ground_truth": "{\"inputs\": [\"6\\n0 10 -7 -4 -13 0\", \"5\\n0 2 5 1 0\", \"11\\n0 -4 0 -99 31 14 -15 -39 43 18 0\", \"6\\n0 10 -7 -4 -5 0\", \"5\\n0 2 5 0 0\", \"11\\n0 -4 0 -99 31 14 -15 -39 43 24 0\", \"6\\n0 2 -7 -1 -5 0\", \"11\\n0 -4 0 -99 31 13 -15 -39 64 24 0\", \"6\\n0 4 -7 -1 -3 0\", \"6\\n0 4 -7 -1 -1 ... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There is a heavy rainfall over the Antique Cultural Museum, and the roof has sprung a leak! All the beautiful paintings risk destruction, if it weren... | code | {
"ground_truth": "{\"inputs\": [\"10 6 1 2 1 8\\n\", \"10 6 1 4 1 8\\n\", \"10 20 2 8 7 3\\n\"], \"outputs\": [\"OVERFLOW\\n\", \"79732\\n\", \"31786\\n\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There has been a Galaxy war started between Deo system and Sprite system . Mountain named planet is leader from Deo system and want to distribute so... | code | {
"ground_truth": "{\"inputs\": [\"10\\n42 18468 33263\\n26501 19170 20370\\n11479 29359 1763\\n24465 5706 5767\\n23282 16828 1517\\n492 2996 4087\\n4828 5437 3599\\n14605 3903 17017\\n293 12383 6557\\n18717 19719 5767\\n\", \"10\\n1764 18468 33263\\n702303001 19170 224070\\n131767441 29359 82861\\n598536225 5706 478... | {
"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": "Apples and Oranges. You thought this question was gone when you passed class 6th. WELL YOU ARE WRONG. It's back.\n\nSee we have n apples and m orange... | code | {
"ground_truth": "{\"inputs\": [\"12028 12772\", \"12028 12772\\n\\nSAMPLE\", \"10005123 65124345\", \"157976 535028\", \"10005123 78827706\", \"157976 510009\", \"12028 12462\", \"11934 12772\\n\\nSAMPLE\", \"10005123 6956314\", \"157976 174734\", \"14870 12462\", \"11934 24366\\n\\nSAMPLE\", \"10005123 5167368\", ... | {
"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 tennis match involves three people: two players and an umpire. Each of these has to come from a different country. There are $N$ countries, and the... | code | {
"ground_truth": "{\"inputs\": [\"3\\n2 1\\n2 1\\n2 1\\n\", \"3\\n5 0\\n5 0\\n0 5\\n\"], \"outputs\": [\"12\\n\", \"125\\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: Duff in Love\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nDuff is in love with lovely numbers! A posit... | code | {
"ground_truth": "{\"inputs\": [\"10\", \"12\", \"1\", \"2\", \"4\", \"8\", \"3\", \"31\", \"97\", \"1000000000000\", \"15\", \"894\", \"271\", \"2457\", \"2829\", \"5000\", \"20\", \"68\", \"3096\", \"1024\", \"1048576\", \"413933789280\", \"817634153013\", \"56517269141\", \"30707328551\", \"279564127218\", \"4911... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Write a function, that doubles every second integer in a list starting from the left.\n\nWrite Python code to solve the problem. Present the code in ... | code | {
"ground_truth": "{\"fn_name\": \"double_every_other\", \"inputs\": [[[1, 2, 3, 4, 5]], [[1, 19, 6, 2, 12, -3]], [[-1000, 1653, 210, 0, 1]]], \"outputs\": [[[1, 4, 3, 8, 5]], [[1, 38, 6, 4, 12, -6]], [[-1000, 3306, 210, 0, 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": "Being a traveling salesman is tough work. Per is one such salesman and would like to find an efficient way to visit all the cities in a foreign count... | code | {
"ground_truth": "{\"inputs\": [\"4 4\\n1 2\\n1 3\\n2 4\\n3 4\\n\", \"4 3\\n1 2\\n2 3\\n3 4\\n\"], \"outputs\": [\"1\\n1 2 3 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": "You are playing the following simple game with a friend:\n - The first player picks a positive integer $X$.\n - The second player gives a list of $k$... | code | {
"ground_truth": "{\"inputs\": [\"1099511627776\\n\", \"127381\\n\"], \"outputs\": [\"8\\n\", \"3\\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": "Ken loves ken-ken-pa (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M e... | code | {
"ground_truth": "{\"inputs\": [\"4 4\\n1 2\\n2 3\\n3 4\\n4 1\\n1 3\", \"6 8\\n1 2\\n2 3\\n3 4\\n4 5\\n5 1\\n1 4\\n1 5\\n4 6\\n1 6\", \"3 3\\n1 2\\n2 3\\n3 1\\n1 2\", \"2 0\\n1 2\", \"4 4\\n1 3\\n2 3\\n3 4\\n4 1\\n1 3\", \"6 8\\n1 4\\n2 3\\n3 4\\n4 5\\n5 1\\n1 4\\n1 5\\n4 6\\n1 6\", \"3 3\\n1 2\\n2 3\\n2 1\\n1 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": "Let's call an array $a_1, a_2, \\dots, a_m$ of nonnegative integer numbers good if $a_1 + a_2 + \\dots + a_m = 2\\cdot(a_1 \\oplus a_2 \\oplus \\dots... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n4\\n1 2 3 6\\n1\\n8\\n2\\n1 1\\n\"\n ],\n \"outputs\": [\n \"0\\n\\n2\\n4 4\\n3\\n2 2 6\\n\"\n ]\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": "You are given two positive integers $n$ ($1 \\le n \\le 10^9$) and $k$ ($1 \\le k \\le 100$). Represent the number $n$ as the sum of $k$ positive int... | code | {
"ground_truth": "{\n \"inputs\": [\n \"8\\n10 3\\n100 4\\n8 7\\n97 2\\n8 8\\n3 10\\n5 3\\n1000000000 9\\n\",\n \"7\\n1 2\\n1 2\\n1 2\\n1 2\\n1 2\\n1 2\\n1 2\\n\"\n ],\n \"outputs\": [\n \"YES\\n2 2 6\\nYES\\n1 1 1 97\\nNO\\nNO\\nYES\\n1 1 1 1 1 1 1 1\\nNO\\nYES\\n1 1 3\\nYES\\n2 2 2 2 2 2 2 2 999999984\... | {
"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: Number With The Given Amount Of Divisors\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nGiven the number *n*... | code | {
"ground_truth": "{\"inputs\": [\"1\", \"7\", \"8\", \"9\", \"10\", \"15\", \"20\", \"47\", \"59\", \"100\", \"159\", \"265\", \"312\", \"473\", \"637\", \"500\", \"720\", \"902\", \"940\", \"1000\", \"999\", \"118\"], \"outputs\": [\"1\", \"64\", \"24\", \"36\", \"48\", \"144\", \"240\", \"70368744177664\", \"28823... | {
"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 a permutation of integers from 1 to n. Exactly once you apply the following operation to this permutation: pick a random segment and sh... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n2 3 1\\n\",\n \"1\\n1\\n\",\n \"2\\n1 2\\n\",\n \"2\\n2 1\\n\",\n \"3\\n1 2 3\\n\",\n \"3\\n2 1 3\\n\",\n \"3\\n3 1 2\\n\",\n \"3\\n1 3 2\\n\",\n \"3\\n3 2 1\\n\",\n \"4\\n1 4 2 3\\n\",\n \"4\\n4 2 3 1\\n\",\n \"10\\n1 2 3 4 5 6 7 8 9 1... | {
"index": 0,
"split": "dummy"
} |
codeforces | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Title: Cyclic Cipher\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nYou are given *n* sequences. Each sequence ... | code | {
"ground_truth": "{\"inputs\": [\"3 4\\n3 3 4 1\\n4 1 3 4 2\\n3 3 1 4\", \"5 5\\n2 3 1\\n4 5 1 3 2\\n4 2 1 3 5\\n1 3\\n2 5 3\", \"4 6\\n3 4 5 3\\n2 6 3\\n2 3 6\\n3 3 6 5\", \"10 5\\n2 2 4\\n2 4 5\\n2 1 2\\n4 3 1 5 2\\n4 1 3 2 5\\n5 3 4 5 2 1\\n3 3 5 4\\n1 1\\n2 4 1\\n1 5\", \"10 10\\n2 1 5\\n2 3 4\\n4 7 1 10 4\\n4 6... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "# Task\nA cake is sliced with `n` straight lines. Your task is to calculate the maximum number of pieces the cake can have.\n\n# Example\n\n For `n =... | code | {
"ground_truth": "{\"fn_name\": \"cake_slice\", \"inputs\": [[0], [1], [2], [3], [10]], \"outputs\": [[1], [2], [4], [7], [56]]}",
"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": "There is a game called \"Unique Bid Auction\". You can read more about it here: https://en.wikipedia.org/wiki/Unique_bid_auction (though you don't ha... | code | {
"ground_truth": "{\"inputs\": [\"6\\n2\\n1 1\\n3\\n2 1 3\\n4\\n2 2 2 3\\n1\\n1\\n5\\n2 3 2 4 2\\n6\\n1 1 5 5 4 4\\n\", \"2\\n2\\n1 1\\n1\\n1\\n\", \"4\\n19\\n16 3 11 9 3 13 11 9 14 10 10 19 19 15 11 8 8 7 3\\n10\\n8 6 1 4 1 4 2 9 7 10\\n7\\n7 1 1 4 4 1 2\\n1\\n1\\n\", \"8\\n12\\n10 1 3 2 11 5 12 11 12 12 9 4\\n11\\... | {
"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": "Our friendly friend Pete is really a nice person, but he tends to be rather... Inappropriate.\n\nAnd possibly loud, if given enough ethanol and free ... | code | {
"ground_truth": "{\"fn_name\": \"pete_talk\", \"inputs\": [[\"I want to punch someone in the face\"], [\"uh!\"], [\"What the hell am I doing here? And where is my wallet? PETE SMASH!\"], [\"I want to punch someone in the face\", [\"someone\", \"face\"]], [\"I want to punch someone in the face\", [\"drink\", \"job\"... | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "In this problem you have to simulate the workflow of one-thread server. There are n queries to process, the i-th will be received at moment t_{i} and... | code | {
"ground_truth": "{\"inputs\": [\"5 1\\n2 9\\n4 8\\n10 9\\n15 2\\n19 1\\n\", \"4 1\\n2 8\\n4 8\\n10 9\\n15 2\\n\", \"1 1\\n1000000000 1000000000\\n\", \"4 3\\n999999996 1000000000\\n999999997 1000000000\\n999999998 1000000000\\n999999999 1000000000\\n\", \"5 1\\n2 1\\n3 6\\n4 5\\n6 4\\n7 2\\n\", \"10 2\\n4 14\\n5 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": "Let's call left cyclic shift of some string $t_1 t_2 t_3 \\dots t_{n - 1} t_n$ as string $t_2 t_3 \\dots t_{n - 1} t_n t_1$.\n\nAnalogically, let's c... | code | {
"ground_truth": "{\n \"inputs\": [\n \"3\\n95831\\n100120013\\n252525252525\\n\",\n \"1\\n1111\\n\"\n ],\n \"outputs\": [\n \"3\\n5\\n0\\n\",\n \"0\\n\"\n ]\n}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads.\n\nThe... | code | {
"ground_truth": "{\"inputs\": [\"5\\n1 2\\n1 3\\n3 4\\n2 5\\n\", \"4\\n1 2\\n1 3\\n2 4\\n\", \"1\\n\", \"10\\n8 6\\n9 10\\n8 7\\n1 4\\n1 8\\n9 5\\n9 8\\n2 5\\n3 1\\n\", \"70\\n1 25\\n57 1\\n18 1\\n65 1\\n38 1\\n1 41\\n1 5\\n1 69\\n1 3\\n31 1\\n1 8\\n1 9\\n53 1\\n70 1\\n45 1\\n1 24\\n1 42\\n1 30\\n1 12\\n1 37\\n64 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": "A drunk person was moving from one point on the street to another point on the same street. His starting point was between two manholes on that stree... | code | {
"ground_truth": "{\"inputs\": [\"4\\nF 10 10 4 3 1\\nB 10 10 3 4 2\\nF 15 10 3 5 4\\nF 19 12 3 3 2\\n\\nSAMPLE\", \"2\\nF 10 15 2 3 1\\nB 6 1 4 2 3\"], \"outputs\": [\"F46\\nB92\\nB160\\nSURVIVED\", \"B75\\nB3\"]}",
"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": "Tracy loves Donuts. She purchased a lots of Donuts for her birthday party. She learnt to calculate the area of the circle a few days back and she is ... | code | {
"ground_truth": "{\"inputs\": [\"5\\n3\\n5\\n8\\n10\\n12\\n\", \"1\\n16\\n\", \"4\\n15\\n17\\n19\\n20\\n\"], \"outputs\": [\"28.26\\n78.5\\n200.96\\n314.0\\n452.16\", \"803.84\", \"706.5\\n907.46\\n1133.54\\n1256.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": "You're given a tree with n vertices rooted at 1.\n\nWe say that there's a k-ary heap of depth m located at u if the following holds:\n\n * For m = 1... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 2\\n2 3\\n3 4\\n\", \"4\\n1 3\\n2 3\\n4 3\\n\", \"7\\n2 1\\n2 6\\n3 4\\n7 6\\n5 7\\n5 3\\n\", \"7\\n4 1\\n2 7\\n2 6\\n3 1\\n1 2\\n1 5\\n\", \"10\\n10 1\\n3 1\\n1 9\\n4 1\\n7 1\\n2 1\\n6 1\\n8 1\\n5 1\\n\", \"18\\n10 1\\n5 15\\n5 12\\n1 2\\n5 13\\n8 1\\n5 16\\n4 1\\n5 14\\n5 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": "In programming contest circles, one of the most important roles is that of the Chief Equality Officer (CEO). This person is responsible for making su... | code | {
"ground_truth": "{\"inputs\": [\"concat(shuffle([1,2]),shuffle([1,2]))\\nshuffle([1,2,1,2])\\n\", \"sorted(concat([3,2,1],[4,5,6]))\\n[1,2,3,4,5,6]\\n\", \"concat(sorted([4,3,2,1]),shuffle([1]))\\nconcat(concat([1,2,3],shuffle([4])),sorted([1]))\\n\"], \"outputs\": [\"not equal\\n\", \"equal\\n\", \"equal\\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": "After returning from the army Makes received a gift — an array a consisting of n positive integer numbers. He hadn't been solving problems for a long... | code | {
"ground_truth": "{\n \"inputs\": [\n \"4\\n1 1 1 1\\n\",\n \"5\\n1 3 2 3 4\\n\",\n \"6\\n1 3 3 1 3 2\\n\",\n \"3\\n1000000000 1000000000 1000000000\\n\",\n \"4\\n1 1 2 2\\n\",\n \"3\\n1 3 1\\n\",\n \"11\\n1 2 2 2 2 2 2 2 2 2 2\\n\",\n \"5\\n1 2 2 2 2\\n\",\n \"6\\n1 2 2 3 3 4\\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": "In an infinite array with two rows, the numbers in the top row are denoted\n\n`. . . , A[−2], A[−1], A[0], A[1], A[2], . . .`\n\nand the numbers in t... | code | {
"ground_truth": "{\"fn_name\": \"find_a\", \"inputs\": [[[1, 2, 3, 4], 2], [[38, 200, -18, 45], 1], [[1, 0, 0, 1], 5], [[0, 2, 0, 3], -2], [[-20, 1, -3, 14], -5], [[1, 2, 3, 5], 100], [[0, 4, 6, 13], 100]], \"outputs\": [[3], [200], [20], [-126], [-44402], [60560100487003612846322657690093088848428068520476594299],... | {
"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: Suspects\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nAs Sherlock Holmes was investigating a crime, he... | code | {
"ground_truth": "{\"inputs\": [\"1 1\\n+1\", \"3 2\\n-1\\n-2\\n-3\", \"4 1\\n+2\\n-3\\n+4\\n-1\", \"1 0\\n-1\", \"2 2\\n+1\\n+1\", \"2 1\\n+2\\n+1\", \"2 0\\n-2\\n-2\", \"3 1\\n+2\\n+3\\n+3\", \"6 3\\n+5\\n+5\\n+5\\n+1\\n+1\\n+1\", \"4 3\\n-4\\n-3\\n-1\\n-3\", \"10 4\\n-8\\n+1\\n-6\\n-10\\n+5\\n-6\\n-8\\n-8\\n-4\\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: Spoilt Permutation\n\nTime Limit: 2 seconds\n\nMemory Limit: 256 megabytes\n\nProblem Description:\nVasya collects coins: he has exactly one c... | code | {
"ground_truth": "{\"inputs\": [\"8\\n1 6 5 4 3 2 7 8\", \"4\\n2 3 4 1\", \"4\\n1 2 3 4\", \"8\\n1 3 2 4 6 5 7 8\", \"8\\n1 3 4 2 6 5 7 8\", \"1\\n1\", \"2\\n1 2\", \"2\\n2 1\", \"149\\n9 120 122 97 93 70 85 56 102 16 103 112 88 84 118 135 113 62 65 19 89 15 108 73 82 21 147 27 115 130 136 6 1 90 29 94 149 17 53 132... | {
"index": 0,
"split": "dummy"
} |
codecontests | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "As always, this time again, Suresh and Ramesh went to the tailor for shortening of their father's Pent. And guess what after a bite of Perk they went... | code | {
"ground_truth": "{\"inputs\": [\"1000\\n897 802 765 992 1 521 220 380 729 969 184 887 104 641 909 378 724 582 387 583 241 294 159 198 653 369 418 692 36 901 516 623 703 971 304 394 491 525 464 219 183 648 796 287 979 395 356 702 667 743 976 908 728 134 106 380 193 214 71 920 114 587 543 817 248 537 901 739 752 364 ... | {
"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\nYou decide to invite your friends of the school and your friends of a friend to the Christmas party. The number of students in your school... | code | {
"ground_truth": "{\"inputs\": [\"6\\n5\\n1 2\\n1 3\\n3 4\\n2 3\\n4 5\\n6\\n5\\n2 3\\n3 4\\n4 5\\n5 6\\n2 5\\n0\\n0\", \"6\\n5\\n1 2\\n1 3\\n3 4\\n2 3\\n4 5\\n6\\n5\\n2 3\\n3 4\\n4 5\\n5 6\\n2 6\\n0\\n0\", \"6\\n5\\n1 2\\n1 3\\n3 4\\n2 3\\n4 5\\n6\\n5\\n2 3\\n3 4\\n1 5\\n5 6\\n2 6\\n0\\n0\", \"6\\n5\\n1 2\\n1 3\\n3 ... | {
"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: Zebra Tower\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nLittle Janet likes playing with cubes. Actual... | code | {
"ground_truth": "{\"inputs\": [\"4\\n1 2\\n1 3\\n2 4\\n3 3\", \"2\\n1 1\\n2 1\", \"3\\n1 2\\n2 2\\n2 1\", \"4\\n2 1\\n2 1\\n1 1\\n1 2\", \"6\\n1 1\\n1 1\\n2 2\\n1 2\\n1 2\\n2 2\", \"20\\n1 2\\n3 2\\n4 2\\n2 2\\n5 2\\n2 5\\n3 2\\n3 4\\n4 4\\n5 3\\n2 1\\n5 2\\n5 3\\n2 1\\n5 5\\n2 3\\n1 5\\n5 2\\n3 4\\n3 3\", \"100\\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": "Example\n\nInput\n\nanagram\ngrandmother\n\n\nOutput\n\n4\n\nWrite Python code to solve the problem. Present the code in \n```python\nYour code\n```\... | code | {
"ground_truth": "{\"inputs\": [\"anagram\\ngrandmosher\", \"anbgram\\ngrandmosher\", \"anbfram\\ngrandmosher\", \"narfamb\\nreoahmodsrg\", \"nbgaqnb\\ntohtheodscl\", \"anagram\\ngrandlother\", \"anagram\\nrehtoldnarg\", \"anagram\\nsehtoldnarg\", \"anbfram\\ngrandmhsoer\", \"anagram\\nsehtolndarg\", \"anbfram\\ngra... | {
"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: Keyboard Layouts\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nThere are two popular keyboard layouts i... | code | {
"ground_truth": "{\"inputs\": [\"qwertyuiopasdfghjklzxcvbnm\\nveamhjsgqocnrbfxdtwkylupzi\\nTwccpQZAvb2017\", \"mnbvcxzlkjhgfdsapoiuytrewq\\nasdfghjklqwertyuiopzxcvbnm\\n7abaCABAABAcaba7\", \"ayvguplhjsoiencbkxdrfwmqtz\\nkhzvtbspcndierqumlojyagfwx\\n3\", \"oaihbljgekzsxucwnqyrvfdtmp\\nwznqcfvrthjibokeglmudpayxs\\ntZ... | {
"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": "Its time for the Potions class. Harry absolutely HATES potions because he has to face mockery by the potions teacher Snape everytime he has a potions... | code | {
"ground_truth": "{\"inputs\": [\"1\\n5 2\\n2 1 4 7 2\\n1 1 0 2\\n1 5 0 0\\n\\nSAMPLE\", \"1\\n10 12\\n5 18 4 7 86 3 13 4 22 21\\n1 1 0 0\\n1 5 0 0\\n1 10 0 0\\n1 1 0 9\\n1 5 0 5 \\n1 5 0 2\\n5 1 0 0\\n5 5 0 0\\n5 10 0 0\\n5 1 0 9\\n5 5 0 5 \\n5 5 0 2\", \"5\\n10 10\\n32 32 54 12 52 56 8 30 44 94 \\n60 3 3 3\\n27 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": "Petya and Vasya are inventing a new game that requires a rectangular board and one chess piece. At the beginning of the game the piece stands in the ... | code | {
"ground_truth": "{\"inputs\": [\"10 2\\n1 1\\n1 2\\n2 1\\n2 2\\n1 3\\n2 3\\n3 1\\n3 2\\n3 3\\n4 3\\n\", \"20 1423\\n84222527 845280366\\n633691610 581066123\\n139385768 526475626\\n376643060 169937541\\n633431220 912159091\\n484006121 341973905\\n5364024 653383910\\n969336881 938962066\\n861831982 442451063\\n40876... | {
"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": "Would you want to fight against bears riding horses?\nMe neither.\n\nLimak is a grizzly bear.\nHe is a general of the dreadful army of Bearland.\nThe... | code | {
"ground_truth": "{\"inputs\": [\"2\\n6\\n12 9 7 1 20 10\\n3 6 4 7 5 5\\n4\\n5 17 10 1\\n200 400 800 600\\n\\nSAMPLE\", \"50\\n4\\n100 785 393 616 \\n2 45 586 236 \\n4\\n200 448 825 664 \\n905 570 664 402 \\n8\\n500 536 971 937 162 289 63 442 \\n845 427 269 921 860 259 298 8 \\n12\\n700 42 623 44 87 560 631 398 8 80... | {
"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": "Andrewid the Android is a galaxy-known detective. Now he does not investigate any case and is eating chocolate out of boredom.\n\nA bar of chocolate ... | code | {
"ground_truth": "{\"inputs\": [\"6 5\\n3 4 U\\n6 1 L\\n2 5 L\\n1 6 U\\n4 3 U\\n\", \"10 6\\n2 9 U\\n10 1 U\\n1 10 U\\n8 3 L\\n10 1 L\\n6 5 U\\n\", \"15 7\\n8 8 U\\n6 10 L\\n9 7 L\\n3 13 L\\n15 1 L\\n13 3 U\\n1 15 L\\n\", \"1000000000 1\\n117117117 882882884 U\\n\", \"10 10\\n5 6 U\\n4 7 U\\n8 3 L\\n8 3 L\\n1 10 U\\... | {
"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 constructed a rectangular parallelepiped of dimensions A \\times B \\times C built of ABC cubic blocks of side 1. Then, we placed the parallelepip... | code | {
"ground_truth": "{\"inputs\": [\"1 2 3 0\", \"3 5 7 100\", \"3 4 5 1\", \"1234 12345 1234567 5\", \"3 123456781 1000000000 100\", \"999999997 999999999 1000000000 50000\", \"1 2 3 1\", \"3 9 7 100\", \"1234 12345 317740 5\", \"1034375698 999999999 1000000000 50000\", \"2 2 3 1\", \"3 9 7 000\", \"1392 12345 317740 ... | {
"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 set of $n$ axis-aligned rectangles in a 2D plane. For this problem, two rectangles are considered to intersect if their boundaries co... | code | {
"ground_truth": "{\"inputs\": [\"3\\n0 0 2 2\\n1 1 3 4\\n5 7 6 8\\n\", \"4\\n0 0 20 20\\n1 1 3 4\\n2 10 9 12\\n11 3 19 18\\n\"], \"outputs\": [\"1\\n\", \"0\\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": "There is a sequence of colorful stones. The color of each stone is one of red, green, or blue. You are given a string s. The i-th (1-based) character... | code | {
"ground_truth": "{\n \"inputs\": [\n \"RGB\\nRRR\\n\",\n \"RRRBGBRBBB\\nBBBRR\\n\",\n \"BRRBGBRGRBGRGRRGGBGBGBRGBRGRGGGRBRRRBRBBBGRRRGGBBB\\nBBRBGGRGRGBBBRBGRBRBBBBRBRRRBGBBGBBRRBBGGRBRRBRGRB\\n\",\n \"G\\nRRBBRBRRBR\\n\",\n \"RRRRRBRRBRRGRBGGRRRGRBBRBBBBBRGRBGBRRGBBBRBBGBRGBB\\nB\\n\",\n \"RRGGB... | {
"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": "When new students come to the Specialized Educational and Scientific Centre (SESC) they need to start many things from the beginning. Sometimes the t... | code | {
"ground_truth": "{\"inputs\": [\"|+|=||||||\\n\", \"|||||+||=||\\n\", \"||+|=|||||\\n\", \"||||+||=||||||\\n\", \"|+||||||=|||||\\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: Pattern\n\nTime Limit: None seconds\n\nMemory Limit: None megabytes\n\nProblem Description:\nDevelopers often face with regular expression pat... | code | {
"ground_truth": "{\"inputs\": [\"2\\n?ab\\n??b\", \"2\\na\\nb\", \"1\\n?a?b\", \"1\\n?\", \"3\\nabacaba\\nabacaba\\nabacaba\", \"3\\nabc?t\\n?bc?z\\nab??t\", \"4\\nabc\\ndef\\n???\\nxyz\", \"2\\n?????\\n?????\", \"2\\na\\na\", \"3\\nabc\\n???\\naxc\", \"1\\n?m??x?xxexxx?xxmxx??\", \"2\\nhszhh?zszs\\nhhzhz?zzhs\", \... | {
"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 playing the following game. There are n points on a plane. They are the vertices of a regular n-polygon. Points are labeled with integer numb... | code | {
"ground_truth": "{\"inputs\": [\"4\\n2 3 4\\n*aba\\na*ab\\nba*b\\nabb*\\n\", \"4\\n2 3 4\\n*abc\\na*ab\\nba*b\\ncbb*\\n\", \"3\\n1 2 3\\n*aa\\na*a\\naa*\\n\", \"10\\n9 8 6\\n*abbbababb\\na*babbaaaa\\nbb*bbaabab\\nbab*bbbaab\\nbbbb*baaab\\nababb*baaa\\nbaabab*bba\\naabaaab*ab\\nbaaaaaba*a\\nbabbbaaba*\\n\", \"10\\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": "Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n3\\n1 3 2\\n\\nSAMPLE\"], \"outputs\": [\"1 2 3\"]}",
"style": "rule"
} | {
"index": 0,
"split": "dummy"
} |
taco | [
{
"content": "Write Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end.",
"role": "system"
},
{
"content": "Chefland is a $1D$ city where each of the $N$ houses is located at a distinct positive integer coordinate $A_{1}, A_{2}, \\ldots A_{N}$. The chef is ... | code | {
"ground_truth": "{\"inputs\": [\"1\\n3 2\\n1 2 3\\n\", \"1\\n4 2\\n1 2 3 4\\n\", \"1\\n5 3\\n1 2 3 4 5\\n\", \"1\\n3 1\\n5 10 15\\n\", \"1\\n4 2\\n5 10 15 20\\n\", \"2\\n2 2\\n1 2\\n1 1\\n999999999 1000000000\\n\", \"2\\n2 2\\n2 3\\n2 2\\n999999998 1000000000\\n\", \"1\\n10 5\\n1 2 3 4 5 6 7 8 9 10\\n\", \"1\\n5 10... | {
"index": 0,
"split": "dummy"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.