messages listlengths 1 1 | ground_truth stringlengths 156 726k | dataset stringclasses 2
values |
|---|---|---|
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGeorge is a cat, so he really likes to play. Most of all he likes to play with his array of positive integers... | [{"input": "69756649467079322827497669450385938193725265564551073376856848456377282337192553343102536673046067874193973249293390979688852602950724884726382282903675659200865787042684264196306648305545290076062924087939978017987667847105325657080274323400258982046115892228300171243907466293917094607884335945541120514423... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Story\n\nJohn found a path to a treasure, and while searching for its precise location he wrote a list of d... | [{"input": "\">^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v\"", "output": "[\">^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v\"]", "fn_name": "simplify"}, {"input": "\">vv<<<^^^^>>>>>vvvvvv<<<<<<^^^^^^^^>>>>\"", "output": "[\">vv<<<^^^^>>>>>vvvvvv<<<<<<^^^^^^^^>>>>\"]", "fn_name": "simplify"}, {"input": "\"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is \"7 rows\" in the game using playing cards. Here we consider a game that simplifies it. Arrange 7 us... | [{"input": "5\n1 2 3 4 5 6\n1 3 5 6 8 4\n1 2 3 4 6 8\n1 2 3 5 10 11\n1 3 3 6 9 11", "output": "yes\nyes\nyes\nyes\nno\n"}, {"input": "5\n1 2 3 4 5 10\n1 3 5 6 12 3\n1 2 3 4 6 8\n1 2 4 5 10 11\n1 4 2 6 9 5", "output": "no\nno\nyes\nyes\nyes\n"}, {"input": "5\n1 2 3 4 5 6\n1 3 5 6 8 4\n1 2 3 4 6 8\n1 2 3 5 10 11\n1 3 3 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese and Russian as well. \n\nVadim and Roman like discussing challen... | [{"input": "2\n2\n2 -1\n2 0\n3\n-1 1\n-1 0\n-2 1", "output": "3\n0\n"}, {"input": "2\n2\n2 -1\n0 0\n3\n-1 1\n-1 0\n-2 1", "output": "3\n0\n"}, {"input": "2\n2\n0 2\n-1 -1\n3\n3 3\n0 -1\n1 3", "output": "3\n0\n"}, {"input": "2\n2\n0 2\n-1 -1\n3\n5 3\n0 -1\n1 3", "output": "3\n0\n"}, {"input": "2\n2\n2 3\n0 0\n2\n3 -1\n-... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nExample\n\nInput\n\n2 2\n1 2 0\n3 4 1\n\n\nOutput\n\n2### Format: Read the inputs from stdin solve the proble... | [{"input": "8 0\n-2 0 1\n12 2 12", "output": "680445551\n"}, {"input": "4 0\n-2 0 -1\n12 2 5", "output": "15400\n"}, {"input": "4 0\n-2 0 1\n12 2 10", "output": "15400\n"}, {"input": "4 0\n1 0 1\n9 -1 -1", "output": "15400\n"}, {"input": "4 0\n1 0 0\n9 -1 -1", "output": "15400\n"}, {"input": "4 0\n-2 0 0\n12 2 5", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThis problem differs from the previous one only in the absence of the constraint on the equal length of all n... | [{"input": "100\n463 6421 2912 1546 3999 5175 4357 2259 7380 6081 1148 7857 3532 4168 5643 8819 2568 6681 975 9216 4590 5217 6215 7422 6631 1651 39 4268 8290 2022 3175 8281 1552 980 9314 234 934 5133 6712 1880 2766 5042 5004 5455 6038 6010 6022 1553 4015 4544 3985 4033 223 7682 6302 2121 4832 3956 9872 8340 5327 6763 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nChanek Jones is back, helping his long-lost relative Indiana Jones, to find a secret treasure in a maze burie... | [{"input": "4 4\n2 -1000 100 3\n2 1\n3 2\n4 1\n2 1 3\n2 2 2\n1 1 -1000000000\n2 1 4\n", "output": "2102\n0\n1000000003\n"}, {"input": "4 4\n2 -1000 100 3\n2 1\n3 2\n4 2\n2 1 3\n2 2 2\n1 1 -1000000000\n2 1 4\n", "output": "2102\n0\n1000002003\n"}, {"input": "4 4\n2 -1000 100 3\n2 1\n3 2\n4 2\n2 2 3\n2 2 2\n1 1 -10000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDr. Evil kidnapped Mahmoud and Ehab in the evil land because of their performance in the Evil Olympiad in Inf... | [{"input": "100 100\n58 88 12 71 22 1 40 19 73 20 67 48 57 17 69 36 100 35 33 37 72 55 52 8 89 85 47 42 78 70 81 86 11 9 68 99 6 16 21 61 53 98 23 62 32 59 51 0 87 24 50 30 65 10 80 95 7 92 25 74 60 79 91 5 13 31 75 38 90 94 46 66 93 34 14 41 28 2 76 84 43 96 3 56 49 82 27 77 64 63 4 45 18 29 54 39 15 26 83 44\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet's call an undirected graph of n vertices p-interesting, if the following conditions fulfill: the graph ... | [{"input": "5\n24 228\n24 228\n24 228\n24 228\n24 228\n", "output": "1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n1 11\n1 12\n1 13\n1 14\n1 15\n1 16\n1 17\n1 18\n1 19\n1 20\n1 21\n1 22\n1 23\n1 24\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n2 10\n2 11\n2 12\n2 13\n2 14\n2 15\n2 16\n2 17\n2 18\n2 19\n2 20\n2 21\n2 22\n2 23\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nE869120 defined a sequence $a$ like this:\n\n\n* $a_1=a_2=1$, $a_{k+2}=a_{k+1}+a_k \\ (k \\ge 1)$\n\n\nHe als... | [{"input": "42 102", "output": "184174004\n"}, {"input": "42 123", "output": "268300608\n"}, {"input": "46 123", "output": "960087486\n"}, {"input": "70 123", "output": "396400358\n"}, {"input": "42 140", "output": "918023453\n"}, {"input": "46 178", "output": "108507677\n"}, {"input": "118 12", "output": "677962323\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nConsider the decimal presentation of an integer. Let's call a number d-magic if digit d appears in decimal pr... | [{"input": "1286 4\n1886373541983002858974907276497223649072414883083336663541044958378875954171855070620868427474284001\n4050983123791059817478363830631049287126338893626273758612677264947268375965600848751800494833017145\n", "output": "820371303\n"}, {"input": "516 4\n1886373541983002858974907276497223649072414883083... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCowboy Beblop is a funny little boy who likes sitting at his computer. He somehow obtained two elastic hoops ... | [{"input": "16\n0 1000 0\n436 1013 0\n509 517 0\n1000 500 0\n1000 1000 0\n1401 1028 0\n1434 461 0\n2086 442 0\n2079 1044 0\n2506 1032 0\n2549 450 0\n3077 446 0\n3063 1067 0\n3715 1062 0\n3756 -125 0\n0 0 0\n16\n-243 700 394\n109 700 365\n129 700 -366\n763 700 -366\n725 700 397\n1131 700 409\n1173 700 -339\n2294 700 -43... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensiona... | [{"input": "10\n-357884841 -999999905 -357884841 999999943\n-130177221 999999983 -130177221 -999999974\n627454332 999999936 627454332 -999999900\n999999986 366591992 -999999919 366591992\n488824292 999999952 488824292 -999999979\n-261575319 999999910 -261575319 -999999995\n837827059 -999999983 837827059 999999984\n-999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe conducted a survey on newspaper subscriptions. More specifically, we asked each of the N respondents the f... | [{"input": "101 110 100", "output": "100 109\n"}, {"input": "100 110 100", "output": "100 110\n"}, {"input": "000 110 100", "output": "100 210\n"}, {"input": "000 100 100", "output": "100 200\n"}, {"input": "000 101 100", "output": "100 201\n"}, {"input": "100 101 100", "output": "100 101\n"}, {"input": "101 101 100", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTunnel formula\n\nOne day while exploring an abandoned mine, you found a long formula S written in the mine. ... | [{"input": "2-(2-3+4+5)", "output": "12\n"}, {"input": "3+(2-4-4+5)", "output": "10\n"}, {"input": "2-(2-3+4+6)", "output": "13\n"}, {"input": "3+(2-4-4+6)", "output": "11\n"}, {"input": "4-(2+5-0+2)", "output": "-1\n"}, {"input": "2-(2-3+4+7)", "output": "14\n"}, {"input": "0-(4+5-1+6)", "output": "-2\n"}, {"input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Task\n\n* **_Given_** *three integers* `a` ,`b` ,`c`, **_return_** *the **_largest number_** obtained after... | [{"input": "10\n5\n6", "output": "[300]", "fn_name": "expression_matter"}, {"input": "3\n5\n7", "output": "[105]", "fn_name": "expression_matter"}, {"input": "2\n10\n3", "output": "[60]", "fn_name": "expression_matter"}, {"input": "9\n7\n2", "output": "[126]", "fn_name": "expression_matter"}, {"input": "1\n1\n10", "out... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nChef Ciel wants to put a fancy neon signboard over the entrance of her restaurant. She has not enough money t... | [{"input": "5\n????CIELIS???E?\n????CIELISOUR???F\nT?KEITE?SY\n????????\n@??C???", "output": "CHEFCIELISACHEF\nCHEFCIELISOURCHEF\nTAKEITEASY\nCHEFCHEF\n@AACHEF\n"}, {"input": "5\n????CIELIS???E?\n????CIELISOUR???F\nYS?ETIEK?T\n????????\n@??C???", "output": "CHEFCIELISACHEF\nCHEFCIELISOURCHEF\nYSAETIEKAT\nCHEFCHEF\n@AAC... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a rectangular grid with $n$ rows and $m$ columns. The cell located on the $i$-th row from the t... | [{"input": "2\n2 2\n-1 1\n1 1\n3 4\n-1 -1 -2 -10\n0 -2 -5 -6\n-1 -3 -4 -5\n", "output": "2\n40\n"}, {"input": "2\n2 2\n-1 1\n1 1\n3 4\n-1 -1 -2 -3\n-1 -2 -3 -4\n-2 -1 -8 -5\n", "output": "2\n33\n"}, {"input": "2\n2 2\n-1 1\n1 1\n3 4\n-1 -1 -2 -3\n-1 -2 -2 -4\n-2 -1 -8 -5\n", "output": "2\n32\n"}, {"input": "2\n2 2\n-1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nProblem\n\nDen, the phone number of Ukunikia Co., Ltd., enters a very long phone number into the phone every ... | [{"input": "11\n129483884450", "output": "125\n694\n738\n"}, {"input": "11\n128935478480", "output": "123\n689\n745\n"}, {"input": "11\n18396312558", "output": "124\n857\n369\n"}, {"input": "11\n24764186449", "output": "318\n246\n597\n"}, {"input": "11\n31342613688", "output": "134\n562\n789\n"}, {"input": "11\n1173265... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya has a rectangular Board of size $n \\times m$. Initially, $k$ chips are placed on the board, $i$-th chi... | [{"input": "10 10 20\n7 5\n4 5\n5 4\n7 4\n1 5\n6 7\n9 10\n8 4\n1 4\n2 10\n3 10\n4 10\n0 6\n5 7\n6 2\n1 1\n10 9\n7 6\n1 4\n11 4\n8 2\n10 3\n5 1\n10 8\n4 2\n1 9\n1 10\n9 5\n2 2\n6 7\n8 6\n8 9\n2 2\n7 1\n3 3\n1 2\n6 20\n9 4\n10 2\n7 7\n", "output": "117\nUUUUUUUUULLLLLLLLLRRRRRRRRRDLLLLLLLLLDRRRRRRRRRDLLLLLLLLLDRRRRRRRRRD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou may know that Euclid was a mathematician. Well, as it turns out, Morpheus knew it too. So when he wanted ... | [{"input": "50 500000\n2 57 94\n2 1 10\n2 97 98\n2 15 86\n2 66 84\n2 40 100\n2 8 27\n2 14 43\n2 55 75\n2 25 90\n2 22 69\n2 9 12\n2 32 34\n2 24 48\n2 54 88\n2 13 50\n2 30 56\n2 38 77\n2 4 70\n2 39 92\n2 23 72\n2 17 36\n2 20 29\n2 6 51\n2 11 87\n2 21 68\n2 59 80\n2 52 61\n2 26 42\n2 2 37\n2 45 62\n2 28 83\n2 41 73\n2 46 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRecently Vasya found a golden ticket β a sequence which consists of $n$ digits $a_1a_2\\dots a_n$. Vasya cons... | [{"input": "100\n0809740931424957283280264749151125408689778966769781910603952566405858112111930579193115510555198933\n", "output": "YES\n"}, {"input": "100\n4360837235306857829226262079948050131795231482102447137288804547991971660484969090651046154392003840\n", "output": "YES\n"}, {"input": "100\n481885884397341317392... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya is a school PE teacher. Unlike other PE teachers, Vasya doesn't like it when the students stand in line... | [{"input": "6\n590202194 293471749 259345095 293471749 18056518 293471749\n293471749 293471749 293471749 18056518 259345095 590202194\n", "output": "9\n5 6\n4 5\n3 4\n2 3\n1 2\n5 6\n4 5\n3 4\n5 6\n"}, {"input": "5\n470138369 747764103 729004864 491957578 874531368\n874531368 729004864 491957578 747764103 470138369\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya writes his own library for building graphical user interface. Vasya called his creation VTK (VasyaToolK... | [{"input": "20\nVBox hykl\nVBox enwv\nenwv.pack(hykl)\nVBox dlepf\ndlepf.pack(hykl)\nenwv.set_border(30)\nWidget mjrrik(54,21)\nhykl.set_border(2)\ndlepf.set_border(22)\nenwv.set_border(3)\nenwv.pack(dlepf)\ndlepf.pack(mjrrik)\nhykl.set_spacing(96)\nenwv.set_border(32)\ndlepf.set_border(72)\nWidget j(54,86)\nhykl.pack(... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA star map in Berland is a checked field n Γ m squares. In each square there is or there is not a star. The f... | [{"input": "10 10 40\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n", "output": "6 9\n5 9\n7 9\n6 8\n6 10\n"}, {"input": "10 10 59\n**.*******\n********.*\n***.******\n**.*******\n*******.**\n**********\n**.**.****\n.*********\n*****.****\n*****... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite\n```python\nsmaller(arr)\n```\nthat given an array ```arr```, you have to return the amount of numbers ... | [{"input": "[5, 4, 7, 9, 2, 4, 4, 5, 6]", "output": "[[4, 1, 5, 5, 0, 0, 0, 0, 0]]", "fn_name": "smaller"}, {"input": "[1, 1, -1, 0, 0]", "output": "[[3, 3, 0, 0, 0]]", "fn_name": "smaller"}, {"input": "[5, 4, 3, 2, 1]", "output": "[[4, 3, 2, 1, 0]]", "fn_name": "smaller"}, {"input": "[1, 2, 3]", "output": "[[0, 0, 0]]... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou know that Japan is the country with almost the largest 'electronic devices per person' ratio. So you migh... | [{"input": "1116434957\n", "output": "-O|OO-OO\n-O|-OOOO\n-O|OOOO-\nO-|OOOO-\nO-|OOO-O\nO-|OOOO-\n-O|O-OOO\nO-|O-OOO\nO-|O-OOO\nO-|O-OOO\n"}, {"input": "1603481361\n", "output": "O-|O-OOO\n-O|O-OOO\nO-|OOO-O\nO-|O-OOO\n-O|OOO-O\nO-|OOOO-\nO-|OOO-O\nO-|-OOOO\n-O|O-OOO\nO-|O-OOO\n"}, {"input": "1231106676\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Kingdom of Takahashi has N towns, numbered 1 through N.\nThere is one teleporter in each town. The telepo... | [{"input": "6 727202214173249351\n6 5 2 5 3 2\n", "output": "2\n"}, {"input": "6 1007784494318310970\n6 5 2 5 3 2", "output": "3\n"}, {"input": "6 1122048832909353099\n6 4 1 1 3 2", "output": "4\n"}, {"input": "6 2190427306125562200\n6 4 1 1 3 2", "output": "1\n"}, {"input": "6 2190427306125562200\n6 4 2 1 3 2", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFizzBuzz is often one of the first programming puzzles people learn. Now undo it with reverse FizzBuzz!\n\nWr... | [{"input": "\"Fizz 688 689 FizzBuzz\"", "output": "[[687, 688, 689, 690]]", "fn_name": "reverse_fizzbuzz"}, {"input": "\"1 2 Fizz 4 Buzz\"", "output": "[[1, 2, 3, 4, 5]]", "fn_name": "reverse_fizzbuzz"}, {"input": "\"Fizz Buzz\"", "output": "[[9, 10]]", "fn_name": "reverse_fizzbuzz"}, {"input": "\"Buzz Fizz\"", "output... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLooking at consecutive powers of `2`, starting with `2^1`:\n\n`2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048... | [{"input": "100", "output": "[null]", "fn_name": "LDTA"}, {"input": "1111", "output": "[9]", "fn_name": "LDTA"}, {"input": "3000", "output": "[5]", "fn_name": "LDTA"}, {"input": "2", "output": "[7]", "fn_name": "LDTA"}, {"input": "3", "output": "[0]", "fn_name": "LDTA"}, {"input": "8", "output": "[7]", "fn_name": "LDTA... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNazar, a student of the scientific lyceum of the Kingdom of Kremland, is known for his outstanding mathematic... | [{"input": "1000000000000000000 1000000000000000000\n", "output": "975735772\n"}, {"input": "1000000000000000000 1000000000010000000\n", "output": "636734266\n"}, {"input": "1000000000000000000 1000000000000000000\n", "output": "975735772"}, {"input": "100879890062904086 919413561635743169\n", "output": "824441806\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe employees of the F company have lots of ways to entertain themselves. Today they invited a famous magicia... | [{"input": "100 50\n11 28\n11 1\n98 58\n38 27\n24 27\n67 37\n90 48\n91 14\n43 29\n3 64\n24 6\n53 19\n97 65\n13 27\n75 53\n37 82\n69 75\n94 99\n1 26\n95 60\n45 27\n100 82\n71 49\n86 99\n74 58\n88 68\n39 63\n38 23\n22 39\n29 58\n62 83\n62 1\n61 58\n2 30\n41 48\n83 90\n1 17\n73 81\n23 53\n71 16\n43 29\n27 78\n54 48\n6 89\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA factory produces thimbles in bulk. Typically, it can produce up to a thimbles a day. However, some of the m... | [{"input": "5 2 2 1 8\n1 1 2\n1 5 3\n1 2 1\n2 2\n1 4 2\n1 3 0\n2 1\n2 3\n", "output": "3\n4\n4\n"}, {"input": "5 2 2 2 8\n1 1 2\n1 5 3\n1 2 1\n2 2\n1 4 2\n1 3 2\n2 1\n2 3\n", "output": "4\n6\n5\n"}, {"input": "5 2 2 1 8\n1 1 2\n1 5 3\n1 2 1\n2 2\n1 5 2\n1 3 0\n2 1\n2 3\n", "output": "3\n2\n4\n"}, {"input": "5 2 2 2 8\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA programming competition site AtCode provides algorithmic problems.\nEach problem is allocated a score based... | [{"input": "10 10550000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n", "output": "1000\n"}, {"input": "10 100\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Quarkgo Empire Expeditionary Force is an evil organization that plans to invade the Earth. In keeping wit... | [{"input": "1204648530", "output": "20\n"}, {"input": "3727082973", "output": "21\n"}, {"input": "1369610954", "output": "20\n"}, {"input": "2281056559", "output": "20\n"}, {"input": "104442668", "output": "17\n"}, {"input": "518772949", "output": "19\n"}, {"input": "169668482", "output": "18\n"}, {"input": "2000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAlice and Bob decided to eat some fruit. In the kitchen they found a large bag of oranges and apples. Alice i... | [{"input": "420196140727489673 679891637638612258\n", "output": "1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B"}, {"input": "498454011879264 806515533049393\n", "output": "1B1A1B1A1B1A1B1A1B1A1B1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya likes taking part in Codeforces contests. When a round is over, Vasya follows all submissions in the sy... | [{"input": "100 10\n3 114 77 78 105 87 6 122 141 100 75 118 64 18 88 37 109 72 31 101 36 10 62 18 52 17 149 115 22 150 138 48 46 42 104 8 63 21 117 58 87 80 7 131 125 118 67 13 144 43 59 67 74 13 124 77 86 148 107 11 51 9 87 52 147 22 7 22 143 12 121 123 17 35 33 87 91 140 92 38 106 10 66 26 40 100 121 42 134 127 116 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this kata you have to correctly return who is the \"survivor\", ie: the last element of a Josephus permuta... | [{"input": "300\n300", "output": "[265]", "fn_name": "josephus_survivor"}, {"input": "100\n1", "output": "[100]", "fn_name": "josephus_survivor"}, {"input": "11\n19", "output": "[10]", "fn_name": "josephus_survivor"}, {"input": "40\n3", "output": "[28]", "fn_name": "josephus_survivor"}, {"input": "14\n2", "output": "[1... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nKontti language is a finnish word play game.\n\nYou add `-kontti` to the end of each word and then swap their... | [{"input": "\"lamppu sofia\"", "output": "[\"komppu-lantti kofia-sontti\"]", "fn_name": "kontti"}, {"input": "\"silly game\"", "output": "[\"kolly-sintti kome-gantti\"]", "fn_name": "kontti"}, {"input": "\"xyz lamppu\"", "output": "[\"koz-xyntti komppu-lantti\"]", "fn_name": "kontti"}, {"input": "\"silly grrr\"", "outp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe year 2015 is almost over.\n\nLimak is a little polar bear. He has recently learnt about the binary system... | [{"input": "1000000000000000000 1000000000000000000\n", "output": "0\n"}, {"input": "500000000000000000 1000000000000000000\n", "output": "58\n"}, {"input": "500000000000000000 1000000000000000000\n", "output": "58\n"}, {"input": "1000000000000000000 1000000000000000000\n", "output": "0\n"}, {"input": "5000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this Kata we focus on finding a sum S(n) which is the total number of divisors taken for all natural numbe... | [{"input": "9999999999999", "output": "[300880375389561]", "fn_name": "count_divisors"}, {"input": "9999999999998", "output": "[300880375389537]", "fn_name": "count_divisors"}, {"input": "9999999999995", "output": "[300880375389493]", "fn_name": "count_divisors"}, {"input": "9999999949950", "output": "[300880373832097]... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOnce upon a time in the Kingdom of Far Far Away lived Sir Lancelot, the chief Royal General. He was very prou... | [{"input": "1000 1000\n", "output": "500000\n"}, {"input": "999 1000\n", "output": "499500\n"}, {"input": "1000 997\n", "output": "498500\n"}, {"input": "997 1000\n", "output": "498500\n"}, {"input": "998 1000\n", "output": "499000\n"}, {"input": "1000 999\n", "output": "499500\n"}, {"input": "1000 998\n", "output": "4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nServal soon said goodbye to Japari kindergarten, and began his life in Japari Primary School.\n\nIn his favor... | [{"input": "300\n??????(??????(???)??(???????)??????)((??????(???(??)())?(???????)???????????((??(??(??(?)???)(????)??(??(?(??(????????()?????(????(?(??(?(?????)??(????(????(??(??(????((??)(??(??????????????????(????????(????(?(???????(??(????(???)?(???????)?)??(?????((??(??(??????????()?????(??????)??(((??(????????\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMiyako came to the flea kingdom with a ukulele. She became good friends with local flea residents and played ... | [{"input": "10\n13 18 10 3 9 19 20 4 10 5\n20\n0 9\n5 11\n1 5\n1 16\n3 3\n0 7\n10 19\n14 20\n6 15\n11 12\n13 16\n11 13\n3 9\n7 10\n2 2\n10 11\n17 20\n17 18\n0 15\n0 6\n", "output": "27 24 22 33 9 25 27 24 27 13 20 17 24 20 9 13 20 13 33 24\n"}, {"input": "10\n13 18 10 3 9 19 20 4 10 5\n20\n0 9\n5 11\n1 5\n1 16\n3 3\n0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe range search problem consists of a set of attributed records S to determine which records from S intersec... | [{"input": "6\n0 1\n4 0\n5 0\n6 4\n3 2\n11 6\n2\n-1 4 -1 2\n0 8 0 5", "output": "0\n1\n4\n\n0\n1\n2\n3\n4\n\n"}, {"input": "6\n2 1\n2 2\n4 2\n4 2\n3 3\n5 4\n2\n2 4 0 4\n4 10 2 5", "output": "0\n1\n2\n3\n4\n\n2\n3\n5\n\n"}, {"input": "6\n0 1\n4 2\n5 0\n6 4\n3 2\n11 4\n2\n-1 4 -1 2\n3 8 0 5", "output": "0\n1\n4\n\n1\n2\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCara is applying for several different jobs.\nThe online application forms ask her to respond within a specif... | [{"input": "\"As Deputy Base Manager on Phobos for five Martian years, I have significant relevant experience.\"\n90\nfalse", "output": "[[true, \"AsDeputyBaseManageronPhobosforfiveMartianyears,Ihavesignificantrelevantexperience.\"]]", "fn_name": "charCheck"}, {"input": "\"But, as I pointed out, anyone complaining abou... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe have N points numbered 1 to N arranged in a line in this order.\n\nTakahashi decides to make an undirected... | [{"input": "14 7\n2 4 18\n1 4 10\n2 3 1\n4 10 10\n3 9 -1\n6 14 5\n5 10 0", "output": "14\n"}, {"input": "10 7\n1 5 18\n3 4 14\n1 3 5\n4 7 10\n1 9 8\n6 10 5\n5 10 10", "output": "13\n"}, {"input": "10 7\n1 5 18\n3 4 10\n1 2 5\n4 7 10\n3 9 1\n6 10 6\n5 10 10", "output": "25\n"}, {"input": "10 7\n1 5 18\n3 4 13\n1 3 10\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVova has won $n$ trophies in different competitions. Each trophy is either golden or silver. The trophies are... | [{"input": "300\nSSGSGSSSGSGSSSSGGSGSSGGSGSGGSSSGSSGSGGSSGGSGSSGGSGGSSGSSSGSGSGSSGSGGSSSGSSGSSGGGGSSGSSGSSGSGGSSSSGGGGSSGSSSSSSSSGSSSSGSGSSSSSSSSGSGSSSSGSSGGSSGSGSSSSSSGSGSSSGGSSGSGSSGSSSSSSGGGSSSGSGSGSGGSGGGSSGSGSSSGSSGGSSGSSGGGGSGSSGSSSSGGSSSSGGSGSSSSSSGSSSGGGSGSGGSSGSSSSSSGGSSSGSSSSGGGSSGSSSGSGGGSSSSGSSSGSGSGGGGS\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn distant future on Earth day lasts for n hours and that's why there are n timezones. Local times in adjacen... | [{"input": "100\n6072 8210 6405 1191 2533 8552 7594 8793 2207 8855 7415 6252 3433 2339 5532 3118 3054 5750 3690 9843 3881 1390 936 8611 7099 988 7730 3835 7065 5030 6932 6936 5531 5173 1331 8975 5454 1592 8516 328 1091 4368 8275 6462 8638 4002 5534 113 6295 5960 1688 3668 6604 9632 4214 8687 7950 3483 6149 4301 6607 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOn a history lesson the teacher asked Vasya to name the dates when n famous events took place. He doesn't rem... | [{"input": "10\n10 10\n13 15\n6 14\n10 15\n4 15\n11 12\n11 15\n8 15\n1 11\n1 9\n", "output": "10 14 6 12 4 11 13 8 2 1\n"}, {"input": "10\n10 10\n13 15\n6 14\n10 15\n4 15\n11 12\n11 15\n5 15\n1 11\n1 9\n", "output": "10 14 6 12 4 11 13 5 2 1\n"}, {"input": "10\n10 10\n13 15\n6 14\n10 15\n4 15\n11 12\n11 15\n8 15\n1 20\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMr. Bill is shopping at the store. There are some coins in his wallet (10-yen coins, 50-yen coins, 100-yen co... | [{"input": "160\n1 1 2 0\n160\n1 1 2 10\n0", "output": "10 1\n50 1\n100 1\n\n10 1\n50 1\n100 1\n"}, {"input": "160\n1 1 2 0\n160\n1 -1 1 10\n0", "output": "10 1\n50 1\n100 1\n\n10 1\n500 1\n"}, {"input": "160\n1 1 4 0\n125\n-1 1 2 10\n0", "output": "10 1\n50 1\n100 1\n\n50 1\n100 1\n"}, {"input": "160\n1 1 8 0\n125\n-1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe government of Berland decided to improve network coverage in his country. Berland has a unique structure:... | [{"input": "3\n10\n3 3 2 3 2 5 1 2 11 3\n6 5 2 5 3 2 4 2 1 2\n20\n9 1 10 1 17 7 5 5 8 1 1 2 7 1 4 2 3 7 6 3\n2 6 3 2 37 1 5 5 4 5 1 3 21 15 1 7 7 5 0 1\n20\n9 1 9 1 5 1 3 2 0 3 6 1 2 8 11 7 3 5 14 2\n11 14 6 4 6 8 8 2 9 9 6 5 3 2 5 7 1 9 14 1\n", "output": "NO\nNO\nNO\n"}, {"input": "3\n10\n3 3 2 3 2 5 1 2 11 3\n6 5 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRidhiman challenged Ashish to find the maximum valued subsequence of an array $a$ of size $n$ consisting of p... | [{"input": "20\n541032394951352952 204302388514120798 548305186805250399 743987576790520671 332874928746186630 60150973547887825 600093435051546090 862815570651991829 798946884837606574 383607230476788640 748981752333005915 317959714195378963 824508576221039025 547099154391774856 411018774272655732 824285680939035203 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe have a string s consisting of lowercase English letters. Snuke is partitioning s into some number of non-e... | [{"input": "zyxwvutsrqponmlkjihgfedcba", "output": "26\n"}, {"input": "zyxwvutsrqponmlkjihgfedbba", "output": "24\n"}, {"input": "ayxwvutsrqponmlkiihgfedbbz", "output": "22\n"}, {"input": "ayxwwutsrqponmlkiihgfedbbz", "output": "20\n"}, {"input": "ayxwwutsrpponmlkiihgfedbbz", "output": "18\n"}, {"input": "ayxwwutsrppon... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya has a grid with $2$ rows and $n$ columns. He colours each cell red, green, or blue.\n\nVasya is colourb... | [{"input": "1\n55\nBBBBBBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBGBGB\nBBBBBBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBGBGB\n", "output": "YES\n"}, {"input": "6\n2\nRG\nRB\n4\nGRBG\nGBGB\n5\nGGGGG\nBBBBB\n7\nBBBBBBB\nRRRRRRR\n8\nRGBRRGBR\nRGGRRBGR\n1\nG\nG\n", "output": "YES\nNO\nYES\nNO\nYES\nYES\n"}, {"input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are N squares lining up in a row, numbered 1 through N from left to right. Initially, all squares are w... | [{"input": "100010", "output": "795416653\n"}, {"input": "110010", "output": "993165555\n"}, {"input": "110011", "output": "471359203\n"}, {"input": "110001", "output": "428910207\n"}, {"input": "111001", "output": "293611143\n"}, {"input": "101001", "output": "186012357\n"}, {"input": "101101", "output": "187749075\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an array of $n$ integers: $a_1, a_2, \\ldots, a_n$. Your task is to find some non-zero integer ... | [{"input": "100\n-246 -98 -29 -208 -305 -231 -309 -632 -255 -293 -810 -283 -962 -593 -203 -40 -910 -934 -640 -520 -481 -988 -774 -696 -700 -875 -418 -750 -193 -863 -163 -498 -77 -627 -786 -820 -469 -799 -50 -162 -938 -133 -842 -144 -383 -245 -983 -975 -279 -86 -725 -304 -313 -785 -509 -192 -110 -726 -789 -36 -151 -792 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMonocarp plays a computer game (yet again!). This game has a unique trading mechanics.\n\nTo trade with a cha... | [{"input": "3 4 5\n10 60 30\n12 57 17 6\n0 2 2 1 1\n", "output": "100\n102\n102\n100\n100\n"}, {"input": "3 4 5\n10 60 30\n12 57 17 6\n0 2 1 1 1\n", "output": "100\n102\n100\n100\n100\n"}, {"input": "3 4 5\n10 36 60\n19 57 23 0\n0 2 2 1 1\n", "output": "106\n106\n106\n106\n106\n"}, {"input": "3 4 5\n10 60 30\n12 57 28 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nImplication is a function of two logical arguments, its value is false if and only if the value of the first ... | [{"input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nProblem\n\nIt seems that a magician with a smoky smell will show off his magic.\n\n\"Now, think of one favori... | [{"input": "10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10", "output": "-1000000000 1000000000\n"}, {"input": "10\n1 10\n1 10\n1 10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 10", "output": "-1000000 1000000000\n"}, {"input": "10\n1 10\n1 10\n1 10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 17", "output": "-1700... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nKevin Sun wants to move his precious collection of n cowbells from Naperthrill to Exeter, where there is actu... | [{"input": "100 49990\n221 257 543 613 818 855 884 1195 1233 1293 1327 1474 1567 1568 1728 1789 1809 1957 1994 2198 2217 2289 2298 2360 2441 2454 2517 2519 2597 2652 2909 2958 2970 3271 3310 3409 3450 3646 3950 3965 4016 4116 4134 4159 4462 4624 4631 4783 4804 5031 5276 5538 5729 5845 5880 5894 5959 5961 6028 6105 6184... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou're hanging out with your friends in a bar, when suddenly one of them is so drunk, that he can't speak, an... | [{"input": "\"Hvv? R'n mlg gszg wifmp, r xzm hgroo gzpv nb xolgsvh luu\"", "output": "[\"See? I'm not that drunk, i can still take my clothes off\"]", "fn_name": "decode"}, {"input": "\"Hfiv r xzm wzmxv lm xlk'h xzi, slow nb yvvi\"", "output": "[\"Sure i can dance on cop's car, hold my beer\"]", "fn_name": "decode"}, {... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIt is so boring in the summer holiday, isn't it? So Alice and Bob have invented a new game to play. The rules... | [{"input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 700000000 800000000 900000000 1000000000\n", "output": "Bob\n"}, {"input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 700000000 800000000 900000000 1000000000\n", "output": "Bob\n"}, {"input": "10\n101000000 200000000 3000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nProblem Statement\n\nYou are given a connected undirected graph which has even numbers of nodes. A connected ... | [{"input": "2 1\n1 2 10\n4 6\n2 2 1\n1 3 2\n1 4 3\n3 3 6\n2 4 1\n3 1 6\n8 17\n1 4 767\n3 1 609\n8 3 426\n6 5 1132\n8 1 607\n6 4 51\n5 1 683\n3 2 451\n3 8 630\n8 7 912\n3 7 20\n5 7 421\n3 5 204\n8 4 538\n5 7 1262\n1 6 604\n8 2 608\n0 0", "output": "10\n2\n426\n"}, {"input": "2 1\n1 2 10\n4 6\n2 2 1\n1 3 0\n1 4 3\n3 3 6\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou have decided to watch the best moments of some movie. There are two buttons on your player: Watch the c... | [{"input": "18 111\n1449 2156\n3497 4784\n7775 14575\n23857 24593\n29211 30739\n31932 33447\n35902 36426\n36991 38506\n39679 47202\n48772 60016\n60522 61868\n63340 63982\n68417 78537\n79445 86568\n86918 87940\n90081 90310\n90629 94325\n95728 96263\n", "output": "58967\n"}, {"input": "18 111\n1449 2156\n3497 4784\n7775 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTo quickly hire highly skilled specialists one of the new IT City companies made an unprecedented move. Every... | [{"input": "30\n", "output": "4809844402031689728\n"}, {"input": "29\n", "output": "1161928703861587968\n"}, {"input": "29\n", "output": "1161928703861587968"}, {"input": "30\n", "output": "4809844402031689728"}, {"input": "28\n", "output": "280349076803813376\n"}, {"input": "28\n", "output": "280349076803813376"}, {"i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this problem you will have to help Berland army with organizing their command delivery system.\n\nThere ar... | [{"input": "13 12\n1 1 1 1 1 1 1 1 1 1 1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n"}, {"input": "13 12\n1 1 1 1 1 1 1 1 1 1 1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n"}, {"inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a program which reads an integer n and prints the number of prime numbers which are less than or equal ... | [{"input": "10\n10\n126", "output": "4\n4\n30\n"}, {"input": "10\n117\n4", "output": "4\n30\n2\n"}, {"input": "10\n147\n9", "output": "4\n34\n4\n"}, {"input": "10\n54\n18", "output": "4\n16\n7\n"}, {"input": "10\n10\n41", "output": "4\n4\n13\n"}, {"input": "10\n36\n18", "output": "4\n11\n7\n"}, {"input": "10\n19\n43", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven is an integer r.\nHow many times is the area of a circle of radius r larger than the area of a circle o... | [{"input": "100\n", "output": "10000\n"}, {"input": "87\n", "output": "7569\n"}, {"input": "76\n", "output": "5776\n"}, {"input": "91\n", "output": "8281\n"}, {"input": "88\n", "output": "7744\n"}, {"input": "79\n", "output": "6241\n"}, {"input": "83\n", "output": "6889\n"}, {"input": "52\n", "output": "2704\n"}, {"inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTakahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange t... | [{"input": "1390 180 1200", "output": "1\n"}, {"input": "1390 180 2246", "output": "1\n"}, {"input": "1390 180 2625", "output": "0\n"}, {"input": "1390 213 2625", "output": "0\n"}, {"input": "1390 213 4202", "output": "0\n"}, {"input": "1592 128 6815", "output": "0\n"}, {"input": "1592 128 6089", "output": "0\n"}, {"in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nD: Shiritori Compression\n\nproblem\n\nEbi-chan and Kana-chan did a shiritori. Ebi-chan is looking at the mem... | [{"input": "7\nbanana\nta\ntomb\nbus\nsound\ndoes\nsome", "output": "2\n"}, {"input": "7\nananab\nta\nsomb\nbus\nsound\ndoes\nsemo", "output": "3\n"}, {"input": "7\nbanaoa\nta\ntomb\nbus\nsound\ndoes\nsome", "output": "2\n"}, {"input": "7\nbanaoa\nta\nuomb\nbus\nsound\ndoes\nsome", "output": "2\n"}, {"input": "7\nbanao... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEric is the teacher of graph theory class. Today, Eric teaches independent set and edge-induced subgraph.\n\n... | [{"input": "50\n21 10\n30 22\n3 37\n37 32\n4 27\n18 7\n2 30\n29 19\n6 37\n12 39\n47 25\n41 49\n45 9\n25 48\n16 14\n9 7\n33 28\n3 31\n34 16\n35 37\n27 40\n45 16\n29 44\n16 15\n26 15\n1 12\n2 13\n15 21\n43 14\n9 33\n44 15\n46 1\n38 5\n15 5\n1 32\n42 35\n20 27\n23 8\n1 16\n15 17\n36 50\n13 8\n49 45\n11 2\n24 4\n36 15\n15 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSimilar to the [previous kata](https://www.codewars.com/kata/string-subpattern-recognition-ii/), but this tim... | [{"input": "\"12aa13a21233A\"", "output": "[\"111222333Aaaa\"]", "fn_name": "has_subpattern"}, {"input": "\"123A123a123a\"", "output": "[\"111222333Aaa\"]", "fn_name": "has_subpattern"}, {"input": "\"abcdabcaccd\"", "output": "[\"aaabbccccdd\"]", "fn_name": "has_subpattern"}, {"input": "\"babababababababa\"", "output":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese here \n\n------ Problem Statement ------ \n\nLira is a little gi... | [{"input": "2\n-1 -1 0 100 100 0\n1 2 0 11 14 1", "output": "2 1\n"}, {"input": "2\n-1 1 -1 010 000 0\n1 6 0 10 14 1", "output": "1 2\n"}, {"input": "2\n-1 1 -1 000 000 0\n1 6 0 10 14 1", "output": "1 2\n"}, {"input": "2\n-2 1 -1 010 000 0\n1 6 0 10 14 1", "output": "1 2\n"}, {"input": "2\n-1 0 -1 010 000 0\n1 3 0 7 14... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet f(A, B) be the exclusive OR of A, A+1, ..., B. Find f(A, B).\nWhat is exclusive OR?\nThe bitwise exclusiv... | [{"input": "1000000000000 1000000000000\n", "output": "1000000000000\n"}, {"input": "123456789012 123456789012\n", "output": "123456789012\n"}, {"input": "250874886258 260155437540\n", "output": "260155437541\n"}, {"input": "449425032568 599872999674\n", "output": "599872999675\n"}, {"input": "339795662481 341697428425... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou have $n$ coins, each of the same value of $1$.\n\nDistribute them into packets such that any amount $x$ (... | [{"input": "1000000000\n", "output": "30\n"}, {"input": "1000000000\n", "output": "30"}, {"input": "723061816\n", "output": "30\n"}, {"input": "517188853\n", "output": "29\n"}, {"input": "237913214\n", "output": "28\n"}, {"input": "536870911\n", "output": "29\n"}, {"input": "781222222\n", "output": "30\n"}, {"input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe smallest unit of data handled by a computer is called a bit, and the amount of information that represent... | [{"input": "-322", "output": "-10304\n"}, {"input": "-542", "output": "-17344\n"}, {"input": "-130", "output": "-4160\n"}, {"input": "-133", "output": "-4256\n"}, {"input": "-199", "output": "-6368\n"}, {"input": "-177", "output": "-5664\n"}, {"input": "-35", "output": "-1120\n"}, {"input": "-32", "output": "-1024\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Chef commutes to work every day using the city's underground metro. The schedule for the trains has recen... | [{"input": "3\n2\n0 3 6\n0 6 8\n2\n0 -1 3\n12 4 1\n2\n0 1 8\n0 0 12", "output": "14\n16\n12\n"}, {"input": "3\n2\n0 4 12\n-1 8 5\n2\n-1 1 2\n6 8 10\n2\n1 1 5\n0 2 3", "output": "12\n14\n5\n"}, {"input": "3\n2\n0 3 7\n0 6 5\n2\n0 -1 3\n12 4 1\n2\n1 1 8\n1 0 12", "output": "11\n16\n13\n"}, {"input": "3\n2\n0 3 7\n0 6 6\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA tree is a connected undirected graph consisting of n vertices and n - 1 edges. Vertices are numbered 1 thro... | [{"input": "11005 209 166\n", "output": "1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 8\n8 9\n9 10\n10 11\n11 12\n12 13\n13 14\n14 15\n15 16\n16 17\n17 18\n18 19\n19 20\n20 21\n21 22\n22 23\n23 24\n24 25\n25 26\n26 27\n27 28\n28 29\n29 30\n30 31\n31 32\n32 33\n33 34\n34 35\n35 36\n36 37\n37 38\n38 39\n39 40\n40 41\n41 42\n42 43\n43... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Task\nTwo arrays are called similar if one can be obtained from another by swapping at most one pair of ele... | [{"input": "[1, 2, 3]\n[1, 10, 2]", "output": "[false]", "fn_name": "are_similar"}, {"input": "[1, 2, 2]\n[2, 1, 1]", "output": "[false]", "fn_name": "are_similar"}, {"input": "[1, 1, 2]\n[1, 2, 2]", "output": "[false]", "fn_name": "are_similar"}, {"input": "[1, 2, 3]\n[1, 2, 3]", "output": "[true]", "fn_name": "are_si... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSet\n\nGiven the sequence a_1, a_2, .., a_N.\n\nHow many values ββare there in this sequence?\n\ninput\n\n\nN... | [{"input": "6\n-4 -3 1 -1 27 -1", "output": "5\n"}, {"input": "6\n-1 0 63 -1 3 -1", "output": "4\n"}, {"input": "6\n-2 -1 25 -2 4 0", "output": "5\n"}, {"input": "6\n-1 -1 25 -2 4 0", "output": "5\n"}, {"input": "6\n-1 -1 25 -2 4 1", "output": "5\n"}, {"input": "6\n-1 -1 35 -2 4 1", "output": "5\n"}, {"input": "6\n-1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an integer sequence $a_1, a_2, \\dots, a_n$.\n\nFind the number of pairs of indices $(l, r)$ ($... | [{"input": "15 2\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\n", "output": "97\n"}, {"input": "15 1\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\n", "output": "18\n"}, {"input": "15 1\n1 2 3 0 2 3 1 2 3 1 2 3 1 2 3\n", "output": "15\n"}, {"input": "15 1\n1 2 3 0 2 3 1 2 3 1 2 3 2 2 3\n", "output": "11\n"}, {"input": "15 2\n1 2 3 1 2 3 1 2 3 1 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMarcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a sma... | [{"input": "10\n206158430208 206162624513 68719476737 137506062337 206162624513 4194305 68719476737 206225539072 137443147777 68719476736\n202243898 470292528 170057449 290025540 127995253 514454151 607963029 768676450 611202521 68834463\n", "output": "2773043292\n"}, {"input": "10\n206158430208 206162624513 6871947673... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSunuke-kun's dictionary contains the words s1, ..., sn, which consist of n lowercase letters. This satisfies ... | [{"input": "2\n?rum??mer\nc??a??mp", "output": "715167440\n"}, {"input": "2\n?sum??mer\nc??a??mp", "output": "703286064"}, {"input": "2\n?rum??mer\nc@?a??mp", "output": "0\n"}, {"input": "2\n?rum??mer\ncA?a??mp", "output": "0\n"}, {"input": "2\nrem??mur?\ncA?a??mp", "output": "0\n"}, {"input": "2\nsem??mur?\ncA?a??mp",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFind the sum of weights of edges of the Minimum Spanning Tree for a given weighted undirected graph G = (V, E... | [{"input": "6 1\n0 1 -1\n1 0 2\n1 2 8\n-1 3 13\n0 0 -1\n1 -1 11\n7 0 0\n2 1 2\n1 8 0", "output": "-1\n"}, {"input": "6 9\n0 2 1\n0 2 3\n0 2 2\n0 3 7\n2 4 5\n1 4 3\n3 2 1\n3 3 1\n2 5 10", "output": "20\n"}, {"input": "6 9\n0 2 1\n0 2 3\n2 0 2\n1 3 7\n2 4 4\n1 4 3\n3 2 1\n3 2 1\n2 5 10", "output": "19\n"}, {"input": "6 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAndryusha is an orderly boy and likes to keep things in their place.\n\nToday he faced a problem to put his s... | [{"input": "50\n50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 10 4 3 2 1\n", "output": "50\n"}... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSasha lives in a big happy family. At the Man's Day all the men of the family gather to celebrate it followin... | [{"input": "4 3\n1 2\n2 3\n3 4\n1 2 3 4\n", "output": "4\n4\n3\n2\n1\n"}, {"input": "4 3\n1 2\n2 3\n3 4\n1 2 3 3\n", "output": "3\n3\n2\n1\n"}, {"input": "4 3\n1 2\n2 3\n3 4\n1 1 3 4\n", "output": "3\n4\n3\n1\n"}, {"input": "4 3\n1 2\n2 3\n3 4\n1 1 1 4\n", "output": "2\n4\n1\n"}, {"input": "4 3\n1 2\n2 3\n3 4\n1 1 3 3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese and Russian as well. \n\nThere are N+1 lights. Lights are placed... | [{"input": "2\n1\n-452", "output": "2\n101474\n"}, {"input": "2\n6\n-410", "output": "27\n83435\n"}, {"input": "2\n6\n-294", "output": "27\n42777\n"}, {"input": "2\n6\n-150", "output": "27\n11025\n"}, {"input": "2\n1\n-177", "output": "2\n15399\n"}, {"input": "2\n1\n-247", "output": "2\n30134\n"}, {"input": "2\n3\n-245... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMishka got an integer array $a$ of length $n$ as a birthday present (what a surprise!).\n\nMishka doesn't lik... | [{"input": "10\n10100 18 108515962 1 16 111 2 999999999 60506056 1000000000\n", "output": "10099 17 108515961 1 15 111 1 999999999 60506055 999999999\n"}, {"input": "10\n10100 12 108515962 1 5 101 2 999999999 60506056 1000000000\n", "output": "10099 11 108515961 1 5 101 1 999999999 60506055 999999999\n"}, {"input": "10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMaxim loves to fill in a matrix in a special manner. Here is a pseudocode of filling in a matrix of size (m +... | [{"input": "1001000000000 1048576\n", "output": "118743657117"}, {"input": "1000000000000 1048576\n", "output": "118606527258"}, {"input": "987654321987 1048576\n", "output": "116961880791"}, {"input": "425523908799 1048576\n", "output": "46001789128"}, {"input": "1000000000000 1000000000000\n", "output": "0"}, {"input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recent... | [{"input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n", "output": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a graph consisting of $n$ vertices and $m$ edges. It is not guaranteed that the given graph is ... | [{"input": "4\n3 1\n0 1 2\n9 5\n0 2 2\n1 1 5\n1 5 4\n0 5 2\n1 2 8\n4 5\n1 1 2\n0 4 3\n1 3 1\n0 2 3\n1 2 4\n4 5\n0 3 1\n1 1 3\n0 1 1\n1 2 4\n1 3 2\n", "output": "YES\n2 1\nYES\n2 2\n1 5\n5 4\n2 5\n2 8\nYES\n1 2\n3 4\n3 1\n3 2\n2 4\nYES\n1 3\n1 3\n1 1\n2 4\n3 2\n"}, {"input": "4\n3 1\n0 1 3\n5 5\n1 2 1\n1 1 5\n1 5 4\n0 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe get more and more news about DDoS-attacks of popular websites.\n\nArseny is an admin and he thinks that a ... | [{"input": "100\n70 111 5 73 69 22 79 62 101 99 249 88 75 31 27 49 7 36 37 62 61 77 75 38 203 61 81 43 98 224 114 48 98 8 67 46 80 83 81 64 15 72 95 39 79 93 79 140 27 65 67 44 294 170 89 97 73 48 18 53 31 49 47 13 88 70 5 46 256 81 26 9 89 38 43 28 219 30 10 71 96 95 241 96 98 96 82 29 219 85 52 34 54 74 86 66 71 10 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAlmost Identical Programs\n\nThe programming contest named Concours de Programmation Comtemporaine Interunive... | [{"input": "print\"hello\";print133\nprint\"hello\";print123\nread\"B1input\";solve;output;\n;tuptuo;evlos;\"2B\"daer\nread\"C1\";solve;output\"C1ans\";\nread\"C2\";solve;output\"C2ans\";\n\"\"\"\"\"\"\"\"\n\"\"\"42\"\"#\"\"\nslow\"program\"\nfast\"code\"\n\"super\"fast\"program\"\n\"super\"faster\"program\"\nX\"\"\nY\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPeter is a senior manager of Agile Change Management (ACM) Inc., where each employee is a member of one or mo... | [{"input": "2\ndevelopment:alice,bob,design,eve.\ndesign:carol,alice.\n3\none:another.\nanother:yetanother.\nxetanother:dave.\n3\nfriends:alice,bob,bestfriends,carol,fran,badcompany.\nbestfriends:eve,alice.\nbadcompany:dave,carol.\n5\na:b,c,d,e.\nb:c,d,e,f.\nc:d,e,f,g.\nd:e,f,g,h.\ne:f,g,h,i.\n4\naa:bb.\ncc:dd,ee.\nff:... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n---\n\n# Hint\n\n\nThis Kata is an extension of the earlier ones in this series. Completing those first will ... | [{"input": "\"^~?!'\\\"()-:;+&%*=<>\\u20ac\\u00a3$\\u00a5\\u00a4\\\\[]{},.@\\u00a7#\\u00bf\\u00a1_/ \"", "output": "[88]", "fn_name": "tv_remote"}, {"input": "\"The Quick Brown Fox Jumps Over A Lazy Dog.\"", "output": "[262]", "fn_name": "tv_remote"}, {"input": "\"abcde123fghij456klmno789pqrst.@0uvwxyz_/ \"", "output":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given two strings. In a single move, you can choose any of them, and delete the first (i.e. leftmost)... | [{"input": "\"nogkvcdldfpvlbkpedsecl\"\n\"nogkvcdldfpvlbkpedsecl\"", "output": "[0]", "fn_name": "shift_left"}, {"input": "\"abacabadabacaba\"\n\"abacabadacaba\"", "output": "[18]", "fn_name": "shift_left"}, {"input": "\"test\"\n\"west\"", "output": "[2]", "fn_name": "shift_left"}, {"input": "\"dadc\"\n\"dddc\"", "outp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTetris is a game in which falling blocks are lined up on the board and erased. Here, let's consider a game th... | [{"input": "4\n2 4 1\n1 3 1\n2 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 1 1\n2 1 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0", "output": "12\n0\n13\n"}, {"input": "4\n2 4 1\n1 3 1\n2 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 1 1\n2 0 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0", "output": "12\n0\n12\n"}, {"input": "4\n2 4 1\n1 3 1\n2 2 4\n2 3 5\n1\n1 5 1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBash has set out on a journey to become the greatest Pokemon master. To get his first Pokemon, he went to Pro... | [{"input": "95\n72 38 75 62 87 30 11 65 35 16 73 23 18 48 19 4 22 42 14 60 49 83 59 15 51 27 80 97 37 100 64 81 54 71 52 20 5 98 78 86 26 55 25 57 36 3 8 74 82 21 29 1 76 2 79 61 39 9 89 77 70 63 56 28 92 53 31 45 93 47 67 99 58 12 84 44 32 34 69 40 13 7 66 68 17 85 6 90 33 91 94 24 46 10 50\n", "output": "48\n"}, {"in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne day a well-known sponsor of a well-known contest decided to give every participant of the contest a T-shi... | [{"input": "302 143 40 63 452\n100\nXXL\nM\nXL\nS\nXXL\nS\nL\nXL\nXL\nXL\nXXL\nS\nXXL\nS\nXXL\nXL\nXL\nXXL\nXL\nXXL\nM\nS\nS\nS\nS\nXXL\nS\nL\nXL\nXXL\nXXL\nS\nXXL\nL\nXXL\nM\nS\nL\nL\nXL\nXL\nS\nXL\nL\nXL\nM\nXL\nL\nM\nS\nXL\nXXL\nXL\nL\nXL\nXL\nXL\nM\nM\nXL\nL\nS\nS\nXL\nS\nXXL\nXXL\nXL\nS\nXL\nXXL\nS\nS\nL\nL\nXXL\n... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.