messages listlengths 1 1 | ground_truth stringlengths 88 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\nSolve the following coding problem using the programming language python:\n\nThe elections to Berland parliam... | [{"type": "stdin_stdout", "input": "100 100 100 100\n71 22 92 3 19 90 1 16 88 56 62 37 56 84 52 46 4 64 21 19 37 54 21 81 56 33 71 57 86 75 62 42 79 67 14 8 66 30 13 38 20 71 36 66 46 55 4 99 18 37 7 24 72 46 32 86 87 7 90 93 96 94 21 23 62 53 16 11 11 83 21 81 68 50 85 9 94 60 47 41 34 82 11 12 95 81 61 81 86 85 64 36... | 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\nSolve the following coding problem using the programming language python:\n\nLittle Mishka is a great travell... | [{"type": "stdin_stdout", "input": "76 24\n6814 3834 1131 6256 2598 850 7353 1702 5773 1699 35 5103 1368 2258 7891 7455 8546 7316 7428 8864 6536 5750 8455 2624 7326 2197 8239 3806 3016 7126 85 3249 1138 6783 9684 4417 7417 3660 6334 7324 9760 9755 7605 9891 3676 8784 8739 8266 3272 9250 5875 939 4130 6540 7813 6867 914... | 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\nSolve the following coding problem using the programming language python:\n\n<image>\n\n\nThis figure shows r... | [{"type": "stdin_stdout", "input": "1\n6\n-1\n13\n10\n0\n0\n0", "output": "10\n13\n-1\n"}, {"type": "stdin_stdout", "input": "1\n20\n0\n20\n11\n0\n0\n1", "output": "20\n11\n20\n"}, {"type": "stdin_stdout", "input": "1\n38\n0\n20\n11\n0\n0\n1", "output": "38\n11\n20\n"}, {"type": "stdin_stdout", "input": "1\n10\n0\n20\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\nSolve the following coding problem using the programming language python:\n\n2^k teams participate in a playo... | [{"type": "stdin_stdout", "input": "3\n0110?11\n6\n5 1\n6 ?\n7 ?\n1 ?\n5 ?\n1 1\n", "output": "\n1\n2\n3\n3\n5\n4\n"}, {"type": "stdin_stdout", "input": "3\n0110?11\n6\n5 1\n6 ?\n7 ?\n2 ?\n5 ?\n1 1\n", "output": "1\n2\n3\n4\n5\n5\n"}, {"type": "stdin_stdout", "input": "3\n0110?11\n6\n5 1\n6 ?\n6 ?\n1 ?\n5 ?\n1 1\n", "o... | 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\nSolve the following coding problem using the programming language python:\n\nGiven an integer, if the length ... | [{"input": "11137980416513326753900366614118127597534595333758924261793440915871873756952319756649737238032191522372673120386100703535104754039588400552740678721535237244611848291138569327958593044675614468557005002330545247507161735907754581937618290513118338573433800934507948491646900563507252698934433726005748974840... | 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\nSolve the following coding problem using the programming language python:\n\nAs Sherlock Holmes was investiga... | [{"type": "stdin_stdout", "input": "64 28\n+54\n+44\n+55\n-3\n+33\n-54\n-54\n-7\n+33\n+54\n+54\n+26\n-54\n+14\n-54\n-47\n+25\n-54\n-54\n-54\n-52\n+54\n+54\n+54\n+54\n+20\n+7\n+54\n+4\n+32\n+46\n-54\n-47\n+15\n+32\n-54\n+7\n+62\n-16\n-54\n+3\n+54\n+54\n+54\n+54\n-54\n+54\n-54\n+54\n-52\n+27\n-7\n+54\n-5\n-54\n-18\n+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\nSolve the following coding problem using the programming language python:\n\nYou are given a book with n chap... | [{"type": "stdin_stdout", "input": "5\n4\n1 2\n0\n2 1 4\n1 3\n5\n1 5\n1 1\n1 1\n1 1\n1 4\n5\n0\n0\n2 1 2\n1 2\n2 2 1\n4\n2 2 3\n0\n0\n2 3 2\n5\n1 2\n1 3\n1 4\n1 3\n0\n", "output": "-1\n-1\n1\n2\n-1\n"}, {"type": "stdin_stdout", "input": "5\n4\n1 2\n0\n2 1 4\n1 2\n5\n1 5\n1 1\n1 1\n1 1\n1 4\n5\n0\n0\n2 1 2\n1 2\n2 2 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\nSolve the following coding problem using the programming language python:\n\nYou are given a function $f$ wri... | [{"type": "stdin_stdout", "input": "83\nadd\nfor 58\nend\nadd\nadd\nfor 36\nfor 84\nadd\nadd\nfor 86\nadd\nadd\nend\nend\nadd\nadd\nadd\nadd\nfor 23\nadd\nadd\nadd\nfor 70\nadd\nadd\nend\nfor 24\nfor 58\nend\nadd\nend\nend\nend\nfor 41\nfor 51\nend\nfor 22\nfor 39\nend\nfor 94\nfor 47\nadd\nfor 57\nend\nadd\nend\nfor 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\nSolve the following coding problem using the programming language python:\n\nRecently Petya walked in the for... | [{"type": "stdin_stdout", "input": "7\n2 3\n1 1\n3 6\n6 8\n1 2\n4 1\n31235 6578234\n", "output": "YES\nYES\nNO\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n4 3\n1 1\n3 6\n6 8\n1 2\n4 1\n31235 6578234\n", "output": "Yes\nYes\nNo\nYes\nNo\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "7\n2 3\n1 1\n3 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\nSolve the following coding problem using the programming language python:\n\nAs you know, Bob's brother lives... | [{"type": "stdin_stdout", "input": "50\n7 34\n5 34\n5 11\n11 23\n42 5\n41 11\n12 41\n41 49\n1 49\n12 6\n7 15\n17 42\n20 6\n17 46\n20 19\n46 22\n49 40\n44 40\n43 46\n22 8\n17 29\n44 18\n31 18\n46 9\n7 16\n32 11\n13 41\n20 36\n34 25\n46 28\n39 34\n30 42\n11 47\n45 15\n37 17\n4 23\n35 17\n17 48\n2 17\n34 24\n1 10\n21 5\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\nSolve the following coding problem using the programming language python:\n\nVasya works as a watchman in the... | [{"type": "stdin_stdout", "input": "100000 100000 100000 100000 100000\n", "output": "10000000000\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000 100000 100000\n", "output": "10000000000"}, {"type": "stdin_stdout", "input": "100000 83958 32567 91083 110780\n", "output": "1466200000\n"}, {"type": "stdin_std... | 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\nSolve the following coding problem using the programming language python:\n\n# Fix the Bugs (Syntax) - My Fir... | [{"input": "\"hello\"\n{}", "output": "[false]", "fn_name": "my_first_kata"}, {"input": "[]\n\"pippi\"", "output": "[false]", "fn_name": "my_first_kata"}, {"input": "\"hello\"\n3", "output": "[false]", "fn_name": "my_first_kata"}, {"input": "true\ntrue", "output": "[false]", "fn_name": "my_first_kata"}, {"input": "67\n... | 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\nSolve the following coding problem using the programming language python:\n\nThree-valued logic is a logic sy... | [{"type": "stdin_stdout", "input": "(Q*P)\n(--R+(Q*R))\n(P+-Q)\n2\n-1\n(-1+(((---P+Q)*(--Q+---R))+(-R+-P)))\n.", "output": "3\n9\n15\n27\n0\n19\n"}, {"type": "stdin_stdout", "input": "(P*Q)\n(--R+(P*Q))\n(P*-P)\n2\n2\n(-1+(((---P+Q)*(--Q+---R))*(-R+-P)))\n.", "output": "3\n11\n0\n27\n27\n7\n"}, {"type": "stdin_stdout",... | 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\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers. Every... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1022"}, {"type": "stdin_stdout", "input": "852355975 1000000000\n", "output": "1022\n"}, {"type": "stdin_stdout", "input": "444747744 1000000000\n", "output": "554"}, {"type": "stdin_stdout", "input": "70407598 1000000000\n", "output": "382\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\nSolve the following coding problem using the programming language python:\n\nLittle walrus Fangy loves math v... | [{"type": "stdin_stdout", "input": "1000101100110000000001111010110000000010001001111110011011000011101011001001010010111\n", "output": "133\n"}, {"type": "stdin_stdout", "input": "1000101100100000000001111010110000000010001001111110011011000011101011001001010010111\n", "output": "134\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nYou've got an undirected graph, ... | [{"type": "stdin_stdout", "input": "50 47\n21 17 47 15 50 47 47 41 28 18 27 47 29 28 32 26 16 26 8 22 27 10 45 21 17 30 31 38 14 8 9 40 29 35 41 24 22 14 40 46 44 34 40 31 48 40 8 50 1 28\n10 5\n34 2\n42 5\n36 28\n8 44\n36 3\n40 15\n33 18\n5 50\n1 6\n25 20\n39 24\n45 35\n14 27\n14 39\n17 47\n19 49\n28 10\n7 13\n34 3\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\nSolve the following coding problem using the programming language python:\n\nRecently Adaltik discovered japa... | [{"type": "stdin_stdout", "input": "100\nWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWB\n", "output": "50\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 "}, {"type": "stdin_stdout", "input": "100\nWBWBWBWBWBWBWBW... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given positive integers ... | [{"type": "stdin_stdout", "input": "10 111", "output": "101\n"}, {"type": "stdin_stdout", "input": "110 40", "output": "-70\n"}, {"type": "stdin_stdout", "input": "111 40", "output": "-71\n"}, {"type": "stdin_stdout", "input": "111 62", "output": "-49\n"}, {"type": "stdin_stdout", "input": "111 68", "output": "-43\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\nSolve the following coding problem using the programming language python:\n\nWilliam is a huge fan of plannin... | [{"type": "stdin_stdout", "input": "10\n4\n1\n1\n1\n1\n4\n1\n1\n1\n2\n4\n1\n1\n1\n1\n4\n1\n1\n2\n2\n4\n1\n1\n2\n3\n4\n1\n1\n1\n1\n4\n1\n2\n1\n2\n4\n1\n2\n1\n1\n4\n1\n2\n3\n1\n4\n1\n2\n3\n1\n", "output": "1\n1.1\n1.1.1\n1.1.1.1\n1\n1.1\n1.1.1\n1.1.2\n1\n1.1\n1.1.1\n1.1.1.1\n1\n1.1\n1.2\n2\n1\n1.1\n1.2\n1.3\n1\n1.1\n1.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\nSolve the following coding problem using the programming language python:\n\nGiven an Array and an Example-Ar... | [{"input": "[\"a\", \"a\", \"b\", \"f\", \"d\", \"a\"]\n[\"c\", \"a\", \"d\", \"b\", \"e\", \"f\"]", "output": "[[\"a\", \"a\", \"a\", \"d\", \"b\", \"f\"]]", "fn_name": "example_sort"}, {"input": "[1, 2, 3, 3, 3, 5]\n[3, 4, 5, 6, 9, 11, 12, 13, 1, 7, 8, 2, 10]", "output": "[[3, 3, 3, 5, 1, 2]]", "fn_name": "example_so... | 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\nSolve the following coding problem using the programming language python:\n\nPositive integer $x$ is called d... | [{"type": "stdin_stdout", "input": "2\n14\n100\n", "output": "527\n21311\n"}, {"type": "stdin_stdout", "input": "2\n14\n110\n", "output": "527\n25199\n"}, {"type": "stdin_stdout", "input": "2\n14\n111\n", "output": "527\n25651\n"}, {"type": "stdin_stdout", "input": "2\n60\n25\n", "output": "7747\n1711\n"}, {"type": "st... | 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\nSolve the following coding problem using the programming language python:\n\nFor the New Year, Polycarp decid... | [{"type": "stdin_stdout", "input": "16\n8192 8192 67108864\n8192 8192 67108865\n8192 8192 70000000\n8192 8192 67108863\n1 1 1\n13 13 1\n1000 1000 100\n100 15 16\n157 185 95\n1992 1895 12\n1888 4984 164\n1564 8917 15\n150 15 2\n1500 10 40\n1 10000 1000\n1 10000 10000\n", "output": "YES\nNO\nNO\nYES\nYES\nYES\nNO\nNO\nNO... | 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\nSolve the following coding problem using the programming language python:\n\nThere is a grid with infinitely ... | [{"type": "stdin_stdout", "input": "1495 932", "output": "1388490\n"}, {"type": "stdin_stdout", "input": "582 1592", "output": "922200\n"}, {"type": "stdin_stdout", "input": "1018 932", "output": "944880\n"}, {"type": "stdin_stdout", "input": "1018 374", "output": "377952\n"}, {"type": "stdin_stdout", "input": "314 169... | 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\nSolve the following coding problem using the programming language python:\n\nProblem\n\n\"Ritsumeikan Univers... | [{"type": "stdin_stdout", "input": "1234 5 4 789012345678901234 5 6", "output": "1357101234567708000\n"}, {"type": "stdin_stdout", "input": "2017 4 2 789012345678901234 5 6", "output": "1357101234567706652\n"}, {"type": "stdin_stdout", "input": "2684 2 6 699116447311015755 5 1", "output": "1202480289374942482\n"}, {"ty... | 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\nSolve the following coding problem using the programming language python:\n\nLittle Vlad is fond of popular c... | [{"type": "stdin_stdout", "input": "100\n955 479 355 759 257 497 690 598 275 446 439 787 257 326 584 713 322 5 253 781 434 307 164 154 241 381 38 942 771 906 240 11 431 478 628 1892 346 74 493 964 455 1105 950 41 585 549 892 687 264 41 487 676 63 453 861 980 620 844 80 907 285 506 772 748 773 743 44 925 529 685 845 313... | 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\nSolve the following coding problem using the programming language python:\n\nGregor is learning about RSA cry... | [{"type": "stdin_stdout", "input": "5\n5\n11\n11\n13\n19\n", "output": "2 4\n2 10\n2 10\n2 12\n2 18\n"}, {"type": "stdin_stdout", "input": "5\n5\n7\n11\n13\n19\n", "output": "2 4\n2 6\n2 10\n2 12\n2 18\n"}, {"type": "stdin_stdout", "input": "5\n5\n7\n11\n13\n19\n", "output": "2 4\n2 6\n2 10\n2 12\n2 18\n"}, {"type": "s... | 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\nSolve the following coding problem using the programming language python:\n\nBleatrix Trotter the sheep has d... | [{"input": "1250000", "output": "[90000000]", "fn_name": "trotter"}, {"input": "459923", "output": "[4139307]", "fn_name": "trotter"}, {"input": "691520", "output": "[2074560]", "fn_name": "trotter"}, {"input": "163444", "output": "[653776]", "fn_name": "trotter"}, {"input": "206929", "output": "[620787]", "fn_name": "... | 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\nSolve the following coding problem using the programming language python:\n\nLet's define a split of $n$ as a... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "500000001\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "500000001\n"}, {"type": "stdin_stdout", "input": "1223796969\n", "output": "611898485\n"}, {"type": "stdin_stdout", "input": "1074371686\n", "output": "537185844\n"}, {"type": "stdin... | 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\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ... | [{"input": "276\n12", "output": "[[3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 78]]", "fn_name": "solve"}, {"input": "24\n6", "output": "[[1, 2, 3, 4, 5, 9]]", "fn_name": "solve"}, {"input": "24\n5", "output": "[[1, 2, 3, 4, 14]]", "fn_name": "solve"}, {"input": "18\n5", "output": "[[1, 2, 3, 4, 8]]", "fn_name": "solve"},... | 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\nSolve the following coding problem using the programming language python:\n\nWe have two indistinguishable pi... | [{"type": "stdin_stdout", "input": "1010000 100000 200000", "output": "489638142\n"}, {"type": "stdin_stdout", "input": "1010000 100001 200000", "output": "645079609\n"}, {"type": "stdin_stdout", "input": "1011000 100001 200000", "output": "150445035\n"}, {"type": "stdin_stdout", "input": "1011001 100001 200000", "outp... | 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\nSolve the following coding problem using the programming language python:\n\nRecently Anton found a box with ... | [{"type": "stdin_stdout", "input": "5000000 5000000 5000000 5000000\n", "output": "1280000000\n"}, {"type": "stdin_stdout", "input": "4759823 3520376 4743363 4743363\n", "output": "1214827648\n"}, {"type": "stdin_stdout", "input": "4759823 3520376 4743363 4743363\n", "output": "1214827648\n"}, {"type": "stdin_stdout", ... | 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\nSolve the following coding problem using the programming language python:\n\nPolycarp has interviewed Oleg an... | [{"type": "stdin_stdout", "input": "100\nggogogoooggogooggoggogggggogoogoggooooggooggoooggogoooggoggoogggoogoggogggoooggoggoggogggogoogggoooo\n", "output": "gg***oogg***oggoggoggggg******ggooooggooggooogg***ooggoggoogggo***ggogggoooggoggoggoggg***ogggoooo\n"}, {"type": "stdin_stdout", "input": "100\nggogogoooggogooggog... | 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\nSolve the following coding problem using the programming language python:\n\nIn Takahashi Kingdom, there is a... | [{"type": "stdin_stdout", "input": "10 10 10\n1 6\n2 9\n4 5\n4 7\n4 7\n5 8\n6 6\n6 7\n7 9\n10 10\n1 8\n1 9\n1 10\n2 8\n2 9\n2 10\n3 8\n3 9\n3 10\n1 10\n", "output": "7\n9\n10\n6\n8\n9\n6\n7\n8\n10\n"}, {"type": "stdin_stdout", "input": "10 10 10\n1 6\n2 9\n4 5\n4 7\n4 7\n5 8\n6 6\n6 7\n7 9\n10 10\n1 8\n1 9\n1 10\n2 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\nSolve the following coding problem using the programming language python:\n\nInternational Abbreviation Olymp... | [{"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'00... | 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\nSolve the following coding problem using the programming language python:\n\nAndrew skipped lessons on the su... | [{"type": "stdin_stdout", "input": "100\n0 1 1 1 0 0 0 2 1 2 2 1 2 2 2 0 0 2 1 2 0 1 1 0 2 0 1 2 2 0 2 0 1 0 1 2 0 2 1 1 0 1 0 1 0 0 0 2 2 2 2 1 1 1 0 2 1 0 0 0 0 0 1 0 2 -1 1 0 0 2 0 2 2 1 0 2 2 0 2 0 2 1 2 1 1 1 0 2 1 0 2 1 1 2 1 2 0 1 2 2\n", "output": "36 30 38 35 35 33 34 31 28 22 22 23 19 16 19 20 22 23 24 25 25 ... | 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\nSolve the following coding problem using the programming language python:\n\nSnuke has two boards, each divid... | [{"type": "stdin_stdout", "input": "5\nabcde\nfghij\nklmno\npqrst\nuvvxy", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\nabcde\nfghij\nonmlk\npqrst\nuvwxy", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\nedcba\nfghij\nonmlk\npqrst\nuvwxy", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\nedcba... | 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\nSolve the following coding problem using the programming language python:\n\nThere is a card game called \"Du... | [{"type": "stdin_stdout", "input": "D\n9S 8S\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "H\nTH 8H\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "H\nAH KH\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "H\nAD KD\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "H\nAC QC\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\nSolve the following coding problem using the programming language python:\n\nWrite a program to check whether... | [{"type": "stdin_stdout", "input": "3 \n40 40 100\n45 45 90\n180 1 1\n\n", "output": "YES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "3 \n30 40 110\n45 45 90\n180 0 0", "output": "YES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "3 \n30 40 110\n12 45 90\n180 0 0", "output": "YES\nNO\nNO\n"}, {"type": "stdin_std... | 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\nSolve the following coding problem using the programming language python:\n\nBoboniu likes bit operations. He... | [{"type": "stdin_stdout", "input": "30 55\n194 478 207 22 344 507 374 462 107 506 317 299 326 308 459 396 330 317 138 342 126 473 423 180 41 165 435 72 53 71\n44 229 106 350 420 462 412 115 452 364 452 294 280 171 325 250 94 266 33 329 197 384 50 36 495 464 67 283 83 3 335 62 101 307 474 296 484 388 315 444 203 304 110... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given four integers A, B... | [{"type": "stdin_stdout", "input": "123456789987654321 987654321123456789 999999999 1000000000\n", "output": "864197529407407405\n"}, {"type": "stdin_stdout", "input": "314159265358979323 846264338327950288 419716939 937510582\n", "output": "532105071133627368\n"}, {"type": "stdin_stdout", "input": "827191816666888190 ... | 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\nSolve the following coding problem using the programming language python:\n\nThor is getting used to the Eart... | [{"type": "stdin_stdout", "input": "10 85\n2 2\n1 10\n1 1\n2 6\n1 2\n1 4\n1 7\n2 1\n1 1\n3 3\n1 9\n1 6\n1 8\n1 10\n1 8\n2 8\n1 6\n1 3\n1 9\n1 6\n1 3\n1 8\n1 1\n1 6\n1 10\n2 1\n2 10\n1 10\n1 1\n1 10\n1 6\n1 2\n1 8\n1 3\n1 4\n1 9\n1 5\n1 5\n2 2\n2 4\n1 7\n1 1\n2 4\n1 9\n2 1\n1 7\n1 8\n3 33\n1 10\n2 2\n1 3\n1 10\n1 6\n3 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\nSolve the following coding problem using the programming language python:\n\nBerland State University has rec... | [{"type": "stdin_stdout", "input": "13\n576460752303423486 576460752303423486\n576460752303423487 576460752303423487\n576460752303423488 576460752303423488\n576460752303423489 576460752303423489\n576460752303423490 576460752303423490\n576460752303423488 288230376151711743\n576460752303423488 288230376151711744\n5764607... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays $a$ and... | [{"type": "stdin_stdout", "input": "235 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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\nSolve the following coding problem using the programming language python:\n\nThe stardate is 1977 and the sci... | [{"type": "stdin_stdout", "input": "10\nXXXOOOOXOX\nOOOXXXOXXO\nXOXXXXOOXX\nXOOOXXOXOO\nOOXOOOOOOX\nXXXXOXOOOO\nXXXOOXOXOX\nOOOOXOXOXX\nXOXXOXOOXO\nOOOOOXOOOO\nXXXOOOOXOX\nOOOXXXOXXO\nXOXXXXOOXX\nXOOOXXOXOO\nOOXOOOOOOX\nXXXXOXOOOO\nXXXOOXOXOX\nOOOOXOXOXX\nXOXXOXOOXO\nOOOOOXOOOO\n", "output": "Yes\n"}, {"type": "stdin_s... | 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\nSolve the following coding problem using the programming language python:\n\nVasya lives in a round building,... | [{"type": "stdin_stdout", "input": "100 37 -100\n", "output": "37\n"}, {"type": "stdin_stdout", "input": "100 37 -100\n", "output": "37\n"}, {"type": "stdin_stdout", "input": "100 37 -124\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "145 38 106\n", "output": "144\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nGordon Ramsay shouts. He shouts ... | [{"input": "\"What feck damn cake\"", "output": "[\"WH@T!!!! F*CK!!!! D@MN!!!! C@K*!!!!\"]", "fn_name": "gordon"}, {"input": "\"dont you talk tome\"", "output": "[\"D*NT!!!! Y**!!!! T@LK!!!! T*M*!!!!\"]", "fn_name": "gordon"}, {"input": "\"how dare you feck\"", "output": "[\"H*W!!!! D@R*!!!! Y**!!!! F*CK!!!!\"]", "fn_n... | 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\nSolve the following coding problem using the programming language python:\n\nConvert a hash into an array. No... | [{"input": "{\"name\": \"Jeremy\", \"age\": 24, \"role\": \"Software Engineer\"}", "output": "[[[\"age\", 24], [\"name\", \"Jeremy\"], [\"role\", \"Software Engineer\"]]]", "fn_name": "convert_hash_to_array"}, {"input": "{\"product\": \"CodeWars\", \"power_level_over\": 9000}", "output": "[[[\"power_level_over\", 9000]... | 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\nSolve the following coding problem using the programming language python:\n\nIf we write out the digits of \"... | [{"input": "999", "output": "[[\"nineninenine\", \"onetwo\", \"six\", \"three\", \"five\", \"four\"]]", "fn_name": "numbers_of_letters"}, {"input": "311", "output": "[[\"threeoneone\", \"oneone\", \"six\", \"three\", \"five\", \"four\"]]", "fn_name": "numbers_of_letters"}, {"input": "37", "output": "[[\"threeseven\", \... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given N non-negative int... | [{"type": "stdin_stdout", "input": "1 0\n1000000000000\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "4 9\n7 4 0 3\n", "output": "46\n"}, {"type": "stdin_stdout", "input": "3 7\n1 6 3\n", "output": "14\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\nSolve the following coding problem using the programming language python:\n\nYou took a peek on Thanos wearin... | [{"type": "stdin_stdout", "input": "4\ngreen\nyellow\norange\npurple\n", "output": "2\nReality\nSpace\n"}, {"type": "stdin_stdout", "input": "4\ngreen\nyellow\norange\npurple\n", "output": "2\nSpace\nReality\n"}, {"type": "stdin_stdout", "input": "4\ngreen\nyellow\norange\npurple\n", "output": "2\nSpace\nReality\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\nSolve the following coding problem using the programming language python:\n\nOn the competitive programming p... | [{"type": "stdin_stdout", "input": "5\n5\n1 5 3 4 2\n4\n1 3 2 1\n5\n1 3 3 3 1\n10\n1 2 3 4 5 10 7 8 9 10\n3\n3 3 2\n", "output": "10111\n0001\n00001\n0000011111\n000\n"}, {"type": "stdin_stdout", "input": "5\n5\n2 5 3 4 2\n4\n1 3 2 1\n5\n1 3 3 3 2\n10\n1 1 1 4 10 6 2 8 9 10\n3\n3 3 2\n", "output": "00000\n0001\n00111\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\nSolve the following coding problem using the programming language python:\n\nATMs of a well-known bank of a s... | [{"type": "stdin_stdout", "input": "58 5\n1 6 9 18 34 41 82 99 164 179 183 204 240 396 636 1224 2023 2856 4488 4705 5712 9180 9266 18360 18850 20270 23086 60810 190701 197064 211140 214200 222970 243240 263510 314442 425670 486480 708288 789888 1009800 1025349 1054040 1094580 1325184 1579776 1748076 2050698 2635100 289... | 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\nSolve the following coding problem using the programming language python:\n\nIs it rated?\n\nHere it is. The ... | [{"type": "stdin_stdout", "input": "10\n4078 4078\n2876 2876\n1061 1061\n3721 3721\n143 143\n2992 2992\n3279 3279\n3389 3389\n1702 1702\n1110 1110\n", "output": "unrated\n"}, {"type": "stdin_stdout", "input": "10\n4078 4078\n2876 2876\n1061 1061\n3721 3721\n143 143\n2992 2992\n3279 3279\n3389 3389\n1702 1702\n1110 1110... | 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\nSolve the following coding problem using the programming language python:\n\nIn geometry, a cube is a three-d... | [{"input": "99", "output": "[false]", "fn_name": "you_are_a_cube"}, {"input": "27", "output": "[true]", "fn_name": "you_are_a_cube"}, {"input": "2", "output": "[false]", "fn_name": "you_are_a_cube"}, {"input": "64", "output": "[true]", "fn_name": "you_are_a_cube"}, {"input": "1", "output": "[true]", "fn_name": "you_are... | 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\nSolve the following coding problem using the programming language python:\n\nMikhail walks on a Cartesian pla... | [{"type": "stdin_stdout", "input": "3\n7 0 0\n3 1 0\n22 0 2\n", "output": "-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "3\n1 1 1\n9 -1 5\n35 0 1\n", "output": "1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "3\n2 2 3\n6 2 18\n10 0 1\n", "output": "1\n18\n-1\n"}, {"type": "stdin_stdout", "input": "3\n1 0 1\n9 -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\nSolve the following coding problem using the programming language python:\n\nLet $s$ be some string consistin... | [{"type": "stdin_stdout", "input": "99985 45273\n", "output": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000... | 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\nSolve the following coding problem using the programming language python:\n\nYou are creating a level for a v... | [{"type": "stdin_stdout", "input": "50\n499 1400 1621 123 72 526 944 482 862 136 265 605 5 616 974 967 713 187 969 467 573 845 71 224 17 873 648 120 239 1722 438 574 404 129 899 583 632 314 525 496 443 857 241 78 575 2 430 137 387 911\n", "output": "459200194 19968654 978281891 778632355 119790684 519088159 339403985 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\nSolve the following coding problem using the programming language python:\n\nAyoub thinks that he is a very s... | [{"type": "stdin_stdout", "input": "5\n6 4\n5 2\n3 2\n2 1\n10 2\n", "output": "19\n12\n5\n2\n40\n"}, {"type": "stdin_stdout", "input": "5\n6 4\n5 2\n4 2\n2 1\n10 2\n", "output": "19\n12\n8\n2\n40\n"}, {"type": "stdin_stdout", "input": "5\n6 1\n0 0\n5 0\n16 1\n8 1\n", "output": "12\n0\n0\n72\n20\n"}, {"type": "stdin_std... | 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\nSolve the following coding problem using the programming language python:\n\nA and B are preparing themselves... | [{"type": "stdin_stdout", "input": "...QK...\n........\n........\n........\n........\n........\n........\n...rk...\n", "output": "White\n"}, {"type": "stdin_stdout", "input": "rppppppr\n...k....\n........\n........\n........\n........\nK...Q...\n........\n", "output": "Black\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nWe have a permutation of the int... | [{"type": "stdin_stdout", "input": "10 8\n10 3 6 8 7 10 9 1 2 4\n2 1\n4 1\n5 9\n4 2\n6 2\n3 5\n8 9\n7 9", "output": "2\n"}, {"type": "stdin_stdout", "input": "10 8\n10 3 6 8 7 10 9 1 2 4\n2 1\n3 1\n5 9\n4 2\n6 2\n3 5\n8 9\n7 9", "output": "7\n"}, {"type": "stdin_stdout", "input": "10 8\n10 3 6 8 7 10 9 1 2 4\n2 1\n4 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\nSolve the following coding problem using the programming language python:\n\nTheater stage is a rectangular f... | [{"type": "stdin_stdout", "input": "10 20\n0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 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\nSolve the following coding problem using the programming language python:\n\nYou and your $n - 1$ friends hav... | [{"type": "stdin_stdout", "input": "4\n6 3 2\n4 16 1 3 8 5\n4 4 1\n2 13 60 4\n4 2 3\n1 -1 2 2\n2 2 0\n2 2\n", "output": "16\n4\n2\n2\n"}, {"type": "stdin_stdout", "input": "4\n6 3 2\n2 9 2 3 10 5\n4 4 1\n2 13 60 4\n4 2 3\n1 2 2 1\n2 2 0\n1 2\n", "output": "10\n4\n2\n1\n"}, {"type": "stdin_stdout", "input": "4\n6 3 2\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\nSolve the following coding problem using the programming language python:\n\nConsider an infinite sequence a_... | [{"type": "stdin_stdout", "input": "5\n56 114834\n72 -134386\n100 190757\n192 -132693\n240 133108", "output": "438699\n"}, {"type": "stdin_stdout", "input": "5\n56 114834\n72 -134386\n100 190757\n192 -132693\n240 261716", "output": "567307\n"}, {"type": "stdin_stdout", "input": "5\n92 114834\n125 -176641\n100 13125\n19... | 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\nSolve the following coding problem using the programming language python:\n\nThe store sells $n$ items, the p... | [{"type": "stdin_stdout", "input": "13 3\n5 3 1 5 2 5 3 1 5 2 5 3 1\n3 2\n1 1\n5 3\n", "output": "10\n5\n15\n"}, {"type": "stdin_stdout", "input": "5 3\n100 200 300 400 500\n2 1\n1 1\n3 2\n", "output": "400\n500\n700\n"}, {"type": "stdin_stdout", "input": "5 3\n100 200 300 400 500\n1 1\n3 2\n2 2\n", "output": "500\n700... | 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\nSolve the following coding problem using the programming language python:\n\nAlena has successfully passed th... | [{"type": "stdin_stdout", "input": "100\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\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100\n1 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\nSolve the following coding problem using the programming language python:\n\nGiven is an integer sequence A_1... | [{"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 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\nSolve the following coding problem using the programming language python:\n\nThere are n cities numbered from... | [{"type": "stdin_stdout", "input": "5\n0 954 1255 266 751\n954 0 1677 688 1173\n1255 1677 0 989 504\n266 688 989 0 485\n751 1173 504 485 0\n5\n5 2 1509\n3 4 692\n3 5 756\n3 1 151\n2 5 262\n", "output": "8742 7851 7851 6398 5111 "}, {"type": "stdin_stdout", "input": "5\n0 954 1255 266 751\n954 0 1677 688 1173\n1255 1677... | 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\nSolve the following coding problem using the programming language python:\n\nEmuskald is an avid horticulturi... | [{"type": "stdin_stdout", "input": "20 15\n7 8720.017100830131\n2 13067.215819731118\n8 58623.690996\n9 184322.3412850205\n6 227999.61123331118\n2 279836.330518\n9 282807.34217112145\n2 311057.23684687156\n1 312315.562927\n5 459200.373445\n14 563454.265947\n11 647366.9355815595\n13 679761.613732\n4 684192.647497\n3 733... | 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\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n2\n2 2\n3 2\n3\n-1 1 4 1\n1 4 1 4", "output": "1\n2\n"}, {"type": "stdin_stdout", "input": "2\n2\n2 2\n3 2\n3\n-1 1 2 1\n1 4 1 4", "output": "1\n2\n"}, {"type": "stdin_stdout", "input": "2\n2\n1 2\n2 1\n4\n1 2 1 1\n2 10 1 3", "output": "1\n2\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nYukiya, the owner of Aizuyama Sk... | [{"type": "stdin_stdout", "input": "5 5\n0 0 0 0 1\n2 1 0 2 0\n1 0 0 1 1\n0 2 1 2 0\n0 1 -1 0 0\n5 5\n0 0 1 0 0\n2 1 0 2 0\n1 0 0 0 1\n0 2 1 2 0\n0 1 0 0 0\n15 15\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 1 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\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\nSolve the following coding problem using the programming language python:\n\nDr. Hedro is astonished. Accordi... | [{"type": "stdin_stdout", "input": "2\n14\n0", "output": "24\n328\n"}, {"type": "stdin_stdout", "input": "2\n12\n0", "output": "24\n264\n"}, {"type": "stdin_stdout", "input": "2\n10\n0", "output": "24\n216\n"}, {"type": "stdin_stdout", "input": "2\n18\n0", "output": "24\n440\n"}, {"type": "stdin_stdout", "input": "2\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\nSolve the following coding problem using the programming language python:\n\nKamil likes streaming the compet... | [{"type": "stdin_stdout", "input": "32\n402528994560 0 0 0 0 0 0 932646223872 893192888700 0 813583026900 0 0 0 0 143521875000 0 177570054144 186624000000 0 517655600000 202145625000 341007975000 0 116252718750 0 148561875000 0 304819200000 248474688000 0 103125000000\n29 25\n20 24\n8 21\n23 3\n32 14\n29 30\n31 24\n28 ... | 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\nSolve the following coding problem using the programming language python:\n\nAnastasia loves going for a walk... | [{"type": "stdin_stdout", "input": "9 13\n132 166 200 62 168 51 185 192 118\n", "output": "51\n"}, {"type": "stdin_stdout", "input": "9 13\n132 166 200 62 168 58 185 192 118\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "9 13\n132 166 200 62 168 58 106 192 118\n", "output": "49\n"}, {"type": "stdin_stdout", ... | 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\nSolve the following coding problem using the programming language python:\n\nThere are N blocks arranged in a... | [{"type": "stdin_stdout", "input": "200000 200000 199999\n", "output": "703273590\n"}, {"type": "stdin_stdout", "input": "178720 187658 129518\n", "output": "963607179\n"}, {"type": "stdin_stdout", "input": "189770 199455 133747\n", "output": "971381227\n"}, {"type": "stdin_stdout", "input": "189992 49130 122242\n", "o... | 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\nSolve the following coding problem using the programming language python:\n\nVasya plays a computer game with... | [{"type": "stdin_stdout", "input": "101 1\n----------------------------------------------------------------------------------------------------X\n----------------------------------------------------------------------------------------------------X\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "100 10\n-X----... | 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\nSolve the following coding problem using the programming language python:\n\nPolycarp is a beginner programme... | [{"type": "stdin_stdout", "input": "2 1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac\n1\n", "output": "Yes\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | 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\nSolve the following coding problem using the programming language python:\n\nShe was worried. The grades are ... | [{"type": "stdin_stdout", "input": "(B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)\n(S&X&~W)\n#", "output": "yes\nyes\n"}, {"type": "stdin_stdout", "input": "(B&B&f)|(~d&~i&i)|(~v&i&~V)|(&g&~e&o)|(~f&d&~v)|(d&~i&o)|(g&i&~B)|(~i&f&d)|(e&~i~~V)|(~v&f&~d)\n(T&X&~W)\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\nSolve the following coding problem using the programming language python:\n\nYou are given a string S of leng... | [{"type": "stdin_stdout", "input": "bac\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "abc\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "bab\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "aaa\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "cab", "output": "Yes\n"}, {"type":... | 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\nSolve the following coding problem using the programming language python:\n\nStatistics claims that students ... | [{"type": "stdin_stdout", "input": "100 100\n50 50\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "82 60\n100 38\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100\n36 50\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "82 60\n100 64\n", "output": "YES\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nKate and Michael want to buy a p... | [{"input": "28.789", "output": "[19.19]", "fn_name": "michael_pays"}, {"input": "5.9181", "output": "[3.95]", "fn_name": "michael_pays"}, {"input": "4.325", "output": "[4.33]", "fn_name": "michael_pays"}, {"input": "4.99", "output": "[4.99]", "fn_name": "michael_pays"}, {"input": "22", "output": "[14.67]", "fn_name": "... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given a rectangular fiel... | [{"type": "stdin_stdout", "input": "10 10\n*.*...*.**\n..*...*.**\n.**.***...\n....*.*.**\n***....***\n.*..*...*.\n.***.*..*.\n.*****.*.*\n*.***.*...\n..*..*....\n", "output": "9.9...5.71\n..9...5.77\n.99.997...\n....9.5.77\n299....513\n.2..0...1.\n.490.0..9.\n.71120.7.1\n7.434.8...\n..6..2....\n"}, {"type": "stdin_std... | 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\nSolve the following coding problem using the programming language python:\n\nInput\n\nThe only line of input ... | [{"type": "stdin_stdout", "input": "20 20 20\n", "output": "218920\n"}, {"type": "stdin_stdout", "input": "1 19 20\n", "output": "132716\n"}, {"type": "stdin_stdout", "input": "10 11 15\n", "output": "10480\n"}, {"type": "stdin_stdout", "input": "10 11 12\n", "output": "2474\n"}, {"type": "stdin_stdout", "input": "12 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\nSolve the following coding problem using the programming language python:\n\nThere are $n$ consecutive seat p... | [{"type": "stdin_stdout", "input": "64 59 2\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "64 59 2\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "64 59 3\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\nSolve the following coding problem using the programming language python:\n\nSuppose you have a special $x$-$... | [{"type": "stdin_stdout", "input": "01985222473\n", "output": "-1 35 -1 33 -1 -1 -1 31 -1 29 \n35 53 24 17 20 17 18 15 13 13 \n-1 24 -1 18 -1 18 -1 19 -1 14 \n33 17 18 51 14 19 23 13 21 15 \n-1 20 -1 14 -1 21 -1 22 -1 22 \n-1 17 18 19 21 -1 17 17 20 19 \n-1 18 -1 23 -1 17 -1 12 -1 17 \n31 15 19 13 22 17 12 49 16 15 \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\nSolve the following coding problem using the programming language python:\n\nA dragon symbolizes wisdom, powe... | [{"type": "stdin_stdout", "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... | 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\nSolve the following coding problem using the programming language python:\n\nYou've got string s, consisting ... | [{"type": "stdin_stdout", "input": "zyxzxzwyxywxxwabcdabdacdbcacdbcacabaaba\n", "output": "zzzyyxxwddddccbba\n"}, {"type": "stdin_stdout", "input": "zyxzxzwyxybxxwabcdawdacdccacdbcacabaaba\n", "output": "zzzyyxxwwdddccbba\n"}, {"type": "stdin_stdout", "input": "thankstosamarasauteddybearsforthiscontest\n", "output": "y... | 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\nSolve the following coding problem using the programming language python:\n\nA string $s$ of length $n$ ($1 \... | [{"type": "stdin_stdout", "input": "11\na\nba\nab\nbac\nihfcbadeg\nz\naa\nca\nacb\nxyz\nddcba\n", "output": "YES\nYES\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "11\na\nba\nab\ncac\nihfcbadeg\nz\nab\nca\nbca\nxyz\nddcba\n", "output": "YES\nYES\nYES\nNO\nYES\nNO\nYES\nNO\nNO\nNO\nNO\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\nSolve the following coding problem using the programming language python:\n\nWrite a function \n```javascript... | [{"input": "451999277\n41177722899", "output": "[1]", "fn_name": "triple_double"}, {"input": "666789\n12345667", "output": "[1]", "fn_name": "triple_double"}, {"input": "1222345\n12345", "output": "[0]", "fn_name": "triple_double"}, {"input": "10560002\n100", "output": "[1]", "fn_name": "triple_double"}, {"input": "123... | 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\nSolve the following coding problem using the programming language python:\n\nThere are many anime that are ab... | [{"type": "stdin_stdout", "input": "28567 13\n28079 24675 1\n18409 26720 1\n980 10815 1\n20794 16571 1\n7376 19861 1\n11146 706 1\n4255 16391 1\n27376 18263 1\n10019 28444 1\n6574 28053 1\n5036 16610 1\n3543 7122 1\n512 9554 1\n", "output": " 928433852\n"}, {"type":... | 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\nSolve the following coding problem using the programming language python:\n\nInternational Abbreviation Olymp... | [{"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "5\nIAO'15\nIAO'2015\nIAO'1\nIAO'9\nIAO'0\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\nSolve the following coding problem using the programming language python:\n\nI have a sequence defined as fol... | [{"type": "stdin_stdout", "input": "12.245545640480573\n11.553343685171598\n20.008357034777177", "output": "95.6966714867\n90.2872413915\n156.361604975\n"}, {"type": "stdin_stdout", "input": "12.245545640480573\n13.018962096503808\n20.008357034777177", "output": "95.6966714867\n101.740777865\n156.361604975\n"}, {"type"... | 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\nSolve the following coding problem using the programming language python:\n\nKolya loves putting gnomes at th... | [{"type": "stdin_stdout", "input": "100000\n", "output": "192156836"}, {"type": "stdin_stdout", "input": "100000\n", "output": "192156836"}, {"type": "stdin_stdout", "input": "100000\n", "output": "192156836"}, {"type": "stdin_stdout", "input": "10701\n", "output": "198227529\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nYou are given a problemset consi... | [{"type": "stdin_stdout", "input": "9\n4 6 9 12 100 150 200 400 800\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "9\n4 6 9 12 100 150 200 400 800\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "9\n4 6 9 12 100 150 200 400 612\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "9\n4 2 9 12 100 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\nSolve the following coding problem using the programming language python:\n\nOne company of IT City decided t... | [{"type": "stdin_stdout", "input": "700\n", "output": "16017044425409540\n"}, {"type": "stdin_stdout", "input": "776\n", "output": "33019955679376860\n"}, {"type": "stdin_stdout", "input": "666\n", "output": "11292070960994226\n"}, {"type": "stdin_stdout", "input": "777\n", "output": "33319741730082870\n"}, {"type": "s... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given an integer $n$ and... | [{"type": "stdin_stdout", "input": "93\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\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\nSolve the following coding problem using the programming language python:\n\nLong is a huge fan of CFC (Codef... | [{"type": "stdin_stdout", "input": "4\n3 5 3\n..R..\n...R.\n....R\n6 4 6\nR..R\nRR..\nRRRR\nRRRR\nR..R\nR..R\n5 5 12\nRRR..\nR.R..\nRRR..\nRR...\nR...R\n2 31 62\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n", "output": "aaabb\ncccbb\nccccc\naaaa\nbaaa\nbbcc\ndddc\neeee\nffff\nabcdd\needdd\nfghii\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\nSolve the following coding problem using the programming language python:\n\nGiven a string, capitalize the l... | [{"input": "\"codingisafunactivity\"", "output": "[[\"CoDiNgIsAfUnAcTiViTy\", \"cOdInGiSaFuNaCtIvItY\"]]", "fn_name": "capitalize"}, {"input": "\"indexinglessons\"", "output": "[[\"InDeXiNgLeSsOnS\", \"iNdExInGlEsSoNs\"]]", "fn_name": "capitalize"}, {"input": "\"codewarriors\"", "output": "[[\"CoDeWaRrIoRs\", \"cOdEwAr... | 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\nSolve the following coding problem using the programming language python:\n\nDr. Sato, a botanist, invented a... | [{"type": "stdin_stdout", "input": "3 3\n1.8036677694351575 3.7376015310643522 0.9359006248557373\n4.789021816134845 2.456993805979323 1.0\n3.0 1.470921439035275 1.5624820640788264\n2 7\n1.2643980385584639 1.3805003041132355\n2.3877376705228617 1.9499455465451372\n0 0", "output": "17.90\n67.31\n"}, {"type": "stdin_stdo... | 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\nSolve the following coding problem using the programming language python:\n\nAyush is a cashier at the shoppi... | [{"type": "stdin_stdout", "input": "10 1 100\n1 55 67 75 40 86 24 84 82 26 81 23 70 79 51 54 21 78 31 98 68 93 66 88 99 65 20 52 35 85 16 12 94 100 59 56 18 33 47 46 71 8 38 57 2 92 3 95 6 4 87 22 48 80 15 29 11 45 72 76 44 60 91 90 39 74 41 36 13 27 53 83 32 10 30 63 89 64 49 17 9 97 69 14 50 77 37 96 10 42 28 34 61 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\nSolve the following coding problem using the programming language python:\n\nThere are n animals in the queue... | [{"type": "stdin_stdout", "input": "150 2476\n70 21 114 127 22 11 29 59 51 59 35 3 53 88 5 8 44 4 12 100 1 27 1 25 27 56 48 22 23 103 85 66 14 58 20 7 176 11 19 26 154 97 83 3 29 30 52 92 59 11 135 37 59 8 66 20 47 19 143 16 93 18 57 71 1 13 141 1 119 6 2 87 40 68 28 22 20 53 31 19 15 33 32 9 70 63 16 26 77 7 45 52 73 ... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.