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\nWe call a positive integer numbe... | [{"type": "stdin_stdout", "input": "100\n95\n94\n31\n65\n35\n95\n70\n78\n81\n36\n69\n97\n39\n28\n89\n62\n36\n23\n35\n21\n36\n11\n65\n39\n13\n34\n79\n87\n91\n70\n43\n82\n24\n97\n6\n87\n49\n81\n60\n92\n63\n9\n16\n6\n31\n90\n6\n5\n70\n48\n27\n86\n65\n66\n45\n8\n67\n17\n24\n44\n34\n93\n26\n32\n82\n54\n72\n83\n94\n81\n79\n7... | 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\nWriting light novels is the most... | [{"type": "stdin_stdout", "input": "20 2\n9 7\n3 7\n15 9\n1 3\n11 12\n18 7\n17 18\n20 1\n4 11\n2 11\n12 18\n8 18\n13 2\n19 2\n10 11\n6 13\n5 8\n14 1\n16 13\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "20 7\n9 7\n3 13\n15 9\n1 3\n11 9\n18 7\n17 18\n20 1\n4 11\n2 11\n12 18\n8 18\n13 2\n19 1\n10 14\n6 13\n5 8... | 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 playing a game and your ... | [{"type": "stdin_stdout", "input": "10\n710714906537 801526060256 134858704333 970632701383 344124734627 780768757320 1205627779029 145838269002 9231169966 485814502387\n31 83 57 11 001 30 10 91 15 28", "output": "1205627778393.899999976158\n"}, {"type": "stdin_stdout", "input": "10\n710714906537 223115971783 134858704... | 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\nValera wanted to prepare a Codes... | [{"type": "stdin_stdout", "input": "68 85\n43 55 2 4 72 45 19 56 53 81 18 90 11 87 47 8 94 88 24 4 67 9 21 70 25 66 65 27 46 13 8 51 65 99 37 77 71 59 71 79 22 56 49 43 57 85 95 81 40 28 60 36 72 81 60 40 16 78 61 37 29 26 15 95 70 27 50 97\n6 6 48 72 54 31 1 50 29 64 93 9 29 93 66 63 25 90 52 1 66 13 70 44 24 87 32 90... | 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**Story** \nOn some island live... | [{"input": "[673905669, 673905681, 174867657]\n2", "output": "[673905681]", "fn_name": "chameleon"}, {"input": "[1, 2147483646, 1]\n1", "output": "[1]", "fn_name": "chameleon"}, {"input": "[34, 32, 35]\n0", "output": "[35]", "fn_name": "chameleon"}, {"input": "[34, 32, 35]\n1", "output": "[-1]", "fn_name": "chameleon"}... | 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\nImp is watching a documentary ab... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000100000\n", "output": "No\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\nYou are given a graph with $n$ n... | [{"type": "stdin_stdout", "input": "10 50\nebibwbjihv\n1 10\n1 2\n5 4\n1 8\n9 7\n5 6\n1 8\n8 7\n2 6\n5 4\n1 9\n3 2\n3 3\n5 6\n5 9\n2 4\n2 7\n3 9\n1 2\n1 7\n1 10\n3 7\n1 8\n3 10\n8 6\n1 7\n10 6\n1 6\n10 8\n1 5\n2 10\n3 9\n1 8\n8 3\n3 7\n5 2\n1 10\n1 4\n5 3\n3 2\n1 2\n5 8\n10 4\n2 10\n8 2\n1 9\n1 8\n1 2\n3 4\n1 8\n", "ou... | 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 has two arrays $a$ and $... | [{"type": "stdin_stdout", "input": "10 10\n894887111 146743785 109114345 815955099 968902979 475266442 919978438 174336213 986559256 952162378\n894887111 146743785 820647914 104421530 968902979 475266442 919978438 908881640 252013829 952162378\n7 10\n6 9\n5 9\n1 7\n2 9\n1 3\n3 10\n1 10\n3 7\n2 4\n", "output": "73454542... | 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\nBaby Ehab is known for his love ... | [{"type": "stdin_stdout", "input": "15\n2\n660632533 660632533\n2\n774306959 774306959\n2\n971739496 784083784\n2\n775353256 672614891\n2\n403290217 403290217\n2\n651261320 651261320\n2\n894672621 894672621\n2\n46281693 620415865\n2\n92929999 409128591\n2\n26890011 630323358\n2\n443724284 443724284\n2\n308822599 308822... | 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 have an array $a_1, a_2, \\d... | [{"type": "stdin_stdout", "input": "15\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n3 3\n3 3 3\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\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\nproblem\n\nDo you know Just Odd ... | [{"type": "stdin_stdout", "input": "5\n2 2 1 2\n6 5\n1 17\n3 2 2 1\n11 1 20\n10 18 3\n8\n5 4 1 3\n5 5 4 5 2\n8 2 1 9 7\n1 1 3 5 1\n7 2 7 1 3\n6 5 6 2\n2 3 5 8 2 7\n1 6 9 4 5 1\n2 5 1 4 2 2\n5 4 2 5 3 3\n12 1 5 1 5 6\n6\n3 3 2 2\n2 17 2\n9 1 9\n2 9 2\n2 2 1 1\n1 3\n5 7\n0", "output": "17\n4\n9\n"}, {"type": "stdin_stdou... | 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 data of up to 100 chara... | [{"type": "stdin_stdout", "input": "abcba\nsx\nabcddcba\nrstrd", "output": "2\n"}, {"type": "stdin_stdout", "input": "abcca\nsw\nabcddcba\nrstrd", "output": "1\n"}, {"type": "stdin_stdout", "input": "abcca\nxt\nadcbdcba\nrdsrt", "output": "0\n"}, {"type": "stdin_stdout", "input": "abcba\nsw\nabcddcba\nrstrd", "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\nAyrat is looking for the perfect... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": " -418284973 -1154700538\n"}, {"type": "stdin_stdout", "input": "533568904697339792\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\nLittle Vitaly loves different al... | [{"type": "stdin_stdout", "input": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"}, {"type": "stdin_stdout", "input": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n", "output": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n"}, {"type": "stdin_stdout", "input": "yy... | 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 watched TV-show where k... | [{"type": "stdin_stdout", "input": "20 20\n-1012 625 39 -1747 -1626 898 -1261 180 -876 -1417 -1853 -1510 -1499 -561 -1824 442 -895 13 1857 1860\n-1269013 -1270956 -1264151 -1266004 -1268121 -1258341 -1269574 -1271851 -1258302 -1271838 -1260049 -1258966 -1271398 -1267514 -1269981 -1262038 -1261675 -1262734 -1260777 -126... | 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\nMountaineers Mr. Takahashi and M... | [{"type": "stdin_stdout", "input": "10\n1 3776 3776 8848 8848 8848 8848 8848 8848 8848\n8848 8848 8848 8848 8848 8848 8848 8848 3776 5", "output": "884111967"}, {"type": "stdin_stdout", "input": "5\n16 0 4 -1 2\n19 24 -3 0 -11", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n16 0 1 -1 2\n19 24 -3 0 -11", "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\nFor given two sides of a triangl... | [{"type": "stdin_stdout", "input": "1 2 -1", "output": "-0.0174524064373\n4.00030456331\n-0.0349048128746\n"}, {"type": "stdin_stdout", "input": "2 1 -2", "output": "-0.0348994967025\n4.00121760468\n-0.0348994967025\n"}, {"type": "stdin_stdout", "input": "1 1 -2", "output": "-0.0174497483513\n2.03490481287\n-0.03489949... | 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\nAt a break Vanya came to the cla... | [{"type": "stdin_stdout", "input": "20 30\n30095551 418501267 319405832 181290086 651729244 244371014 1160853882 491522284 582219539 1510068105 512276151 438340777 293617992 759003208 759003208 1 1043646272 1073741823 1431280338 1073741823\n", "output": "210\n"}, {"type": "stdin_stdout", "input": "20 30\n30095551 41850... | 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 going to be given a word... | [{"input": "\"AbcabcC\"", "output": "[false]", "fn_name": "validate_word"}, {"input": "\"abcabcd\"", "output": "[false]", "fn_name": "validate_word"}, {"input": "\"abc!abc!\"", "output": "[true]", "fn_name": "validate_word"}, {"input": "\"abc:abc\"", "output": "[false]", "fn_name": "validate_word"}, {"input": "\"abcabc... | 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\nIn this problem we assume the Ea... | [{"type": "stdin_stdout", "input": "10\n20000 South\n20000 North\n20000 South\n20000 North\n20000 South\n20000 North\n20000 South\n20000 North\n20000 South\n20000 North\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10\n20000 South\n20000 North\n20000 South\n20000 North\n20000 South\n20000 North\n20000 Sout... | 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# Triple Trouble\n\nCreate a fun... | [{"input": "\"aaaaaa\"\n\"bbbbbb\"\n\"cccccc\"", "output": "[\"abcabcabcabcabcabc\"]", "fn_name": "triple_trouble"}, {"input": "\"burn\"\n\"reds\"\n\"roll\"", "output": "[\"brrueordlnsl\"]", "fn_name": "triple_trouble"}, {"input": "\"aaa\"\n\"bbb\"\n\"ccc\"", "output": "[\"abcabcabc\"]", "fn_name": "triple_trouble"}, {... | 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\nDoes \\sqrt{a} + \\sqrt{b} < \\s... | [{"type": "stdin_stdout", "input": "-10 -1 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-10 -1 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-16 -1 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "110 -1 -3", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 -14 2", "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\nYou want to perform the combo on... | [{"type": "stdin_stdout", "input": "3\n4 2\nabca\n1 3\n10 5\ncodeforces\n2 8 3 2 9\n26 10\nqwertyuioplkjhgfdsazxcvbnm\n20 10 1 2 3 5 10 5 9 4\n", "output": "4 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \n\n0 0 9 4 5 3 0 0 0 0 0 0 0 0 9 0 0 3 1 0 0 0 0 0 0 0 \n\n2 1 1 2 9 2 2 2 5 2 2 2 1 1 5 4 11 8 2 7 5 1 10 1 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\nYou have a Petri dish with bacte... | [{"type": "stdin_stdout", "input": "8 1000000\n1 1 5 1000000 1000000 2 2 2\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "8 1000000\n1 1 5 1000000 1000000 2 2 2\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "8 1000000\n2 1 5 1000000 1000000 2 2 2\n", "output": "2\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\nYour friend has been out shoppin... | [{"input": "100", "output": "[\"Woah that's a lot of dogs!\"]", "fn_name": "how_many_dalmatians"}, {"input": "80", "output": "[\"Woah that's a lot of dogs!\"]", "fn_name": "how_many_dalmatians"}, {"input": "26", "output": "[\"More than a handful!\"]", "fn_name": "how_many_dalmatians"}, {"input": "14", "output": "[\"Mor... | 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 responsible for installi... | [{"type": "stdin_stdout", "input": "4\n8 2 5\n00110010\n8 1 1\n00110010\n9 100000000 100000000\n010101010\n2 5 1\n00\n", "output": "94\n25\n2900000000\n13\n"}, {"type": "stdin_stdout", "input": "4\n8 2 5\n00110010\n8 1 1\n01110010\n9 100000000 100000000\n010101010\n2 5 1\n00\n", "output": "94\n26\n2900000000\n13\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\nPolycarp has recently created a ... | [{"type": "stdin_stdout", "input": "1\n99\n1 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\n1 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\n1 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\n1 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\n1 1\n1 1\n1 1\n1 ... | 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\nDoubly linked list is one of the... | [{"type": "stdin_stdout", "input": "100\n0 0\n0 0\n0 0\n97 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 29\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n12 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 0\n0 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\nLet's call the following process... | [{"type": "stdin_stdout", "input": "40471\n", "output": "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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\nWe have a point $A$ with coordin... | [{"type": "stdin_stdout", "input": "6\n0 0\n5 8\n0 1000000\n1 0\n2 0\n0000000 1000000\n", "output": "0\n3\n1000000\n1\n0\n1000000\n"}, {"type": "stdin_stdout", "input": "6\n6 0\n0 8\n0 1000000\n0 0\n1 0\n0000000 1000000\n", "output": "0\n8\n1000000\n0\n1\n1000000\n"}, {"type": "stdin_stdout", "input": "6\n0 0\n5 8\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\nIn recreational mathematics, a m... | [{"input": "[4, 9, 2, 3, 5, 7, 8, 6, 1]", "output": "[false]", "fn_name": "is_magical"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[false]", "fn_name": "is_magical"}, {"input": "[9, 4, 7, 3, 5, 2, 8, 6, 1]", "output": "[false]", "fn_name": "is_magical"}, {"input": "[4, 9, 2, 3, 5, 7, 8, 1, 6]", "output": "[tr... | 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\nEveryone knows that 2010 FIFA Wo... | [{"type": "stdin_stdout", "input": "4\nTeMnHVvWKpwlpubwyhzqvc\nAWJwc\nbhbxErlydiwtoxy\nEVASMeLpfqwjkke\nAWJwc-TeMnHVvWKpwlpubwyhzqvc 43:73\nbhbxErlydiwtoxy-TeMnHVvWKpwlpubwyhzqvc 38:99\nbhbxErlydiwtoxy-AWJwc 33:84\nEVASMeLpfqwjkke-TeMnHVvWKpwlpubwyhzqvc 79:34\nEVASMeLpfqwjkke-AWJwc 243:7\nEVASMeLpfqwjkke-bhbxErlydiwtox... | 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 Group C of the 3rd year, we d... | [{"type": "stdin_stdout", "input": "50\n5576\n6063\n5578", "output": "3C11\n3C38\n3C18\n3C01\n"}, {"type": "stdin_stdout", "input": "50\n5576\n6063\n515", "output": "3C11\n3C38\n3C18\n3C08\n"}, {"type": "stdin_stdout", "input": "50\n1864\n13193\n39", "output": "3C11\n3C31\n3C11\n3C39\n"}, {"type": "stdin_stdout", "inpu... | 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\nE869120's and square1001's 16-th... | [{"type": "stdin_stdout", "input": "-2 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "-3 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "-6 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "-4 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "5 4\n", "output": "Yay!\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're fed up about changing the... | [{"input": "\"1.2.3.4.5.6.7.8\"", "output": "[\"1.2.3.4.5.6.7.9\"]", "fn_name": "next_version"}, {"input": "\"1.2.3\"", "output": "[\"1.2.4\"]", "fn_name": "next_version"}, {"input": "\"0.9.9\"", "output": "[\"1.0.0\"]", "fn_name": "next_version"}, {"input": "\"9.9\"", "output": "[\"10.0\"]", "fn_name": "next_version"}... | 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\nDo you remember how Kai construc... | [{"type": "stdin_stdout", "input": "2569\n09629965966225566262579565696595696954525955599926383255926955906666526913925296256629966292216925259225261263256229509529259756291959568892569599592218262625256926619266669279659295979299556965525222\n", "output": "44\n"}, {"type": "stdin_stdout", "input": "2559\n5255599526926... | 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\nJavaScript provides a built-in p... | [{"input": "\"5 friends\"", "output": "[\"NaN\"]", "fn_name": "my_parse_int"}, {"input": "\"5friends\"", "output": "[\"NaN\"]", "fn_name": "my_parse_int"}, {"input": "\"I <3 u\"", "output": "[\"NaN\"]", "fn_name": "my_parse_int"}, {"input": "\"17.42\"", "output": "[\"NaN\"]", "fn_name": "my_parse_int"}, {"input": "\"12... | 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 N people standing in a... | [{"type": "stdin_stdout", "input": "95617 23923\nRRRLRRRLLRRLRRLRLRRLLLRLLLRRRRRRRLLRRRRLRRRLLRLLRLLLRLLRLRLRRRRRLRRLRRRLRRRLRRLLRLLRLLRLRLRRLRRRLRLRLRLRLLLLRRLRLRRRRLRLLLLLLRLRRRLRLRRLRLLRLLRRLRRRRRRLRRRLRLRLRRRLLLRLRLRLLLLLRRRLRLLLLRLLRRLLLLRRLRLRLRLLRLLLLLLRRLRRRRLLLRLLLRLRRRRLRRRRLLRLRRRRRLRLRRLLRLLLRLRLRRLLLRRRRRR... | 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 `count_vowels` ... | [{"input": "\"asdfdsaf asdfsasdfdsafgjlsdjf asdfdsf daf 13243242 dsafdsafds\"", "output": "[9]", "fn_name": "count_vowels"}, {"input": "\"asdfviosdfopsiewrwwer asdf asdfdsaf)(asdflkajdsf \"", "output": "[12]", "fn_name": "count_vowels"}, {"input": "\"asdfdsaf asdfsdaf 13243242 dsafdsafds\"", "output": "[6]",... | 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\nGive the summation of all even n... | [{"input": "2147483647", "output": "[1485607536]", "fn_name": "even_fib"}, {"input": "1000000000", "output": "[350704366]", "fn_name": "even_fib"}, {"input": "100000000", "output": "[82790070]", "fn_name": "even_fib"}, {"input": "1000000", "output": "[1089154]", "fn_name": "even_fib"}, {"input": "1000", "output": "[798... | 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\nFrom beginning till end, this me... | [{"type": "stdin_stdout", "input": "100101\n", "output": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | 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\nLiLand is a country, consisting ... | [{"type": "stdin_stdout", "input": "5 6\n1 2\n2 3\n3 5\n1 4\n4 5\n1 3\n", "output": "Yes\n1\n1\n2\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2\n2 3\n3 4\n1 3\n", "output": "Yes\n1\n1\n2\n2\n"}, {"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n-1 -2\n", "output": "Yes\n2\n2\n2\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\nThe citizens of Byteland regular... | [{"type": "stdin_stdout", "input": "3\n2240\n162\n1224", "output": "losses\nlosses\nlosses\n"}, {"type": "stdin_stdout", "input": "3\n1450\n135\n1756", "output": "losses\nlosses\nlosses\n"}, {"type": "stdin_stdout", "input": "3\n3546\n155\n1157", "output": "losses\nlosses\nlosses\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\nA boy Bob likes to draw. Not lon... | [{"type": "stdin_stdout", "input": "50 1\n.\n*\n*\n*\n.\n.\n*\n.\n*\n*\n*\n*\n*\n*\n*\n.\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n.\n.\n.\n.\n*\n*\n.\n*\n*\n.\n.\n.\n.\n*\n*\n.\n.\n.\n.\n.\n.\n", "output": "*\n*\n*\n.\n.\n*\n.\n*\n*\n*\n*\n*\n*\n*\n.\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n.\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\nSolve the following coding problem using the programming language python:\n\nQwerty the Ranger took up a gove... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 1000000 1010000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "100000 100000 1000000 1000000\n", "output": "999999\n"}, {"type": "stdin_stdout", "input": "12... | 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\nAfter learning about polynomial ... | [{"type": "stdin_stdout", "input": "111\n011101111010100111111000010101011110011000010101010001001011000111100101111000010110010011110100000111000100101\n", "output": "108\n"}, {"type": "stdin_stdout", "input": "111\n0011011110001001111110000101010111100110000101010100010010110001111001011111010001100000111101101001110... | 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 Chelyabinsk lives a much resp... | [{"type": "stdin_stdout", "input": "20 30\n4 13 78 11\n13 19 56 41\n15 15 46 83\n4 9 74 72\n17 20 97 7\n15 20 29 64\n8 17 44 85\n4 18 26 46\n16 17 13 90\n16 16 39 89\n13 14 46 125\n14 18 67 18\n12 20 84 48\n10 20 49 32\n10 14 14 11\n6 18 80 84\n3 20 13 97\n12 20 62 42\n7 14 64 71\n5 19 38 17\n17 18 99 18\n11 15 83 22\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n2 19\n5 10\n3 10\n10 3 17", "output": "23\n10\n"}, {"type": "stdin_stdout", "input": "2\n2 19\n5 10\n3 18\n10 3 17", "output": "23\n24\n"}, {"type": "stdin_stdout", "input": "2\n2 19\n5 10\n3 18\n10 3 11", "output": "23\n30\n"}, {"type": "stdin_stdout", "input": "2\n2 19\n8 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\nSolve the following coding problem using the programming language python:\n\nA strongness of an even number i... | [{"input": "1151592177\n2129680158", "output": "[1610612736]", "fn_name": "strongest_even"}, {"input": "2085422641\n2128923730", "output": "[2113929216]", "fn_name": "strongest_even"}, {"input": "1082012216\n1876572332", "output": "[1610612736]", "fn_name": "strongest_even"}, {"input": "1806570867\n2067832928", "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\nSolve the following coding problem using the programming language python:\n\nGiven that \n```\nf0 = '0'\nf1 =... | [{"input": "5", "output": "[\"0100101001001\"]", "fn_name": "solve"}, {"input": "3", "output": "[\"01001\"]", "fn_name": "solve"}, {"input": "2", "output": "[\"010\"]", "fn_name": "solve"}, {"input": "1", "output": "[\"01\"]", "fn_name": "solve"}, {"input": "0", "output": "[\"0\"]", "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\nYou are given two integers $a$ a... | [{"type": "stdin_stdout", "input": "3\n1 3\n11 11\n30 20\n", "output": "3\n0\n4\n"}, {"type": "stdin_stdout", "input": "3\n0 3\n11 11\n30 20\n", "output": "2\n0\n4\n"}, {"type": "stdin_stdout", "input": "3\n1 3\n11 11\n30 20\n", "output": "3\n0\n4\n"}, {"type": "stdin_stdout", "input": "3\n1 3\n11 1\n30 20\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\nShe is an apprentice wizard. She... | [{"type": "stdin_stdout", "input": "12 3\n2 3 6\n12 4\n1 2 3 6\n0 0", "output": "6.0000000000\n0.0000000000"}, {"type": "stdin_stdout", "input": "21 3\n2 3 19\n13 4\n1 2 4 6\n0 0", "output": "10.5\n0.0\n"}, {"type": "stdin_stdout", "input": "21 3\n2 5 19\n13 4\n2 2 4 3\n0 0", "output": "10.5\n6.5\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\nIn a certain video game, the pla... | [{"type": "stdin_stdout", "input": "2\n1\n1 127\n2\n3 19 13 0\n2 12 11\n", "output": "128\n18\n"}, {"type": "stdin_stdout", "input": "2\n1\n1 146\n2\n3 19 16 0\n2 21 2\n", "output": "147\n20\n"}, {"type": "stdin_stdout", "input": "2\n1\n1 204\n2\n3 19 16 0\n2 21 2\n", "output": "205\n20\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\nLet's assume that we have a pair... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "999998\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "123455\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "998756\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "999879\n", "output": "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\nThere are some animals in a gard... | [{"type": "stdin_stdout", "input": "25 100\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "50 100\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "25 98\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "51 100\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "32 96\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\nOn the way to Dandi March, Gandh... | [{"type": "stdin_stdout", "input": "100\n1740948824551711527614232216857618927954312334113883114332134597298167586122324167251171554288490471\n1427793198650286024865090061389344606618496378829119288736948166064439831600905684206820568913977241\n159840763615420973726016575412001460717777335998188189953377771706410021457... | 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 Petya often visits his gr... | [{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 8, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8... | 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\nA flea is sitting at one of the ... | [{"type": "stdin_stdout", "input": "1000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "512\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "256\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "512\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000\n", "output": "NO\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\nD: Is greed the best?\n\nstory\n... | [{"type": "stdin_stdout", "input": "42 1010", "output": "1050\n"}, {"type": "stdin_stdout", "input": "133 178", "output": "266\n"}, {"type": "stdin_stdout", "input": "16 102", "output": "112\n"}, {"type": "stdin_stdout", "input": "24 128", "output": "144\n"}, {"type": "stdin_stdout", "input": "18 102", "output": "108\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\nJohnny has a younger sister Anne... | [{"type": "stdin_stdout", "input": "100 21 30 65\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "52 10 19 139\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "110 21 30 65\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "11 30 79 43\n", "output": "IMPOSSIBLE\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\nIn this kata you are given an ar... | [{"input": "[9, 7, 4, 2, 5, 3, 1, 8, 6]\n2\n5", "output": "[[9, 7, 1, 2, 3, 4, 5, 8, 6]]", "fn_name": "sect_sort"}, {"input": "[1, 2, 5, 7, 4, 6, 3, 9, 8]\n8\n3", "output": "[[1, 2, 5, 7, 4, 6, 3, 9, 8]]", "fn_name": "sect_sort"}, {"input": "[1, 2, 5, 7, 4, 6, 3, 9, 8]\n2", "output": "[[1, 2, 3, 4, 5, 6, 7, 8, 9]]", "f... | 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\nPaul is at the orchestra. The st... | [{"type": "stdin_stdout", "input": "10 10 10 1\n8 10\n2 9\n1 10\n3 1\n8 5\n10 1\n4 10\n10 2\n5 3\n9 3\n", "output": "1787\n"}, {"type": "stdin_stdout", "input": "14 10 10 1\n8 10\n2 9\n1 10\n3 1\n8 5\n10 1\n4 10\n10 2\n5 3\n9 3\n", "output": "3411\n"}, {"type": "stdin_stdout", "input": "10 10 10 1\n1 10\n10 8\n7 4\n7 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\nYou came to the exhibition and o... | [{"type": "stdin_stdout", "input": "50 1000000000\n824428839 821375880 831521735 868908015 86990853 248293447 886713846 425716910 443947914 504402098 40124673 774093026 271211165 873482658 592754073 490097471 947930201 69692739 145291746 418475785 80274059 696889747 854947829 231642778 141525047 57563878 92067934 38750... | 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 Will is stuck in the Upside D... | [{"type": "stdin_stdout", "input": ")?(??((???????()?(?????????)??(????????((?)?????)????)??????(?????)?)?????)??????(??()??????)????????)?)()??????????????())????????(???)??)????????????????????(?????)??)???)??(???????????????)???)??)?\n", "output": "8314\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\nThe stardate is 1983, and Prince... | [{"type": "stdin_stdout", "input": "10 5\nsomer\nandom\nnoise\nmayth\neforc\nebewi\nthyou\nhctwo\nagain\nnoise\nsomermayth\nandomeforc\nnoiseebewi\nagainthyou\nnoisehctwo\n", "output": "4 6\n"}, {"type": "stdin_stdout", "input": "10 5\nsomer\nandom\nnoise\nmayth\neforc\nebewi\nthyou\nhctwo\nagain\nooise\nsomermayth\nan... | 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\nWelcome to Rockport City!\n\nIt ... | [{"type": "stdin_stdout", "input": "4\n1 11\n1 2\n4 0\n20 10\n", "output": "10 1\n1 0\n4 0\n10 0\n"}, {"type": "stdin_stdout", "input": "4\n1 11\n1 2\n4 0\n22 10\n", "output": "10 1\n1 0\n4 0\n12 2\n"}, {"type": "stdin_stdout", "input": "4\n1 11\n1 2\n2 0\n22 10\n", "output": "10 1\n1 0\n2 0\n12 2\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\nWelcome to PC Koshien, players. ... | [{"type": "stdin_stdout", "input": "1\n2\n-1\n-9\n-1\n2\n-1\n-32\n-1\n1", "output": "-39\n"}, {"type": "stdin_stdout", "input": "1\n2\n0\n-38\n-1\n1\n-1\n-17\n0\n1", "output": "-52\n"}, {"type": "stdin_stdout", "input": "1\n2\n0\n-38\n-1\n1\n-1\n-32\n0\n1", "output": "-67\n"}, {"type": "stdin_stdout", "input": "1\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\nSolve the following coding problem using the programming language python:\n\n# Invalid Login - Bug Fixing #11... | [{"input": "\"Timmy\"\n\"password\\\"||\\\"\\\"==\\\"\"", "output": "[\"Wrong username or password!\"]", "fn_name": "validate"}, {"input": "\"Admin\"\n\"gs5bw\\\"||1==1//\"", "output": "[\"Wrong username or password!\"]", "fn_name": "validate"}, {"input": "\"Timmy\"\n\"h4x0r\"", "output": "[\"Wrong username or password... | 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\nGildong has bought a famous pain... | [{"type": "stdin_stdout", "input": "9 9\nBWBBWWWXW\nBWAWWWWWW\nWBWBBBBBB\nWWBBBWWWB\nWWBWBXBWW\nWBWWBBWWB\nWWWBWBWBW\nBBWBBBWWW\nWBWBBWWWW\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "9 9\nBWBBWWWXW\nBWAWWWWWW\nWBWBBBBBB\nWWBBBWWWB\nWWBWBXBWW\nWBWWBBWWB\nWWWBWBWBW\nWWWBBBWBB\nWBWBBWWWW\n", "output": "18\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 positive integer... | [{"type": "stdin_stdout", "input": "15607691432", "output": "15607691432\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "8325199727", "output": "16650399454\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "1999999998\n"}, {"type": "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\nYou are given a string $s$. You ... | [{"type": "stdin_stdout", "input": "1\nbbbaaaaabbabaabbbbaabbbbabbaabbaababbbbbbababbababbbaaaaaaabaababbbaababbbbababbbabbbbbabaabbaaaabaa\nbbbababbaabbbbbaabaaabaababaaaabaabbbabbababaaabba\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1\nbbbaaaaabbabaabbbbaabbbbabbaabbaababbbbbbababbababbbaaaaaaabaababb... | 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\nVadim is really keen on travelli... | [{"type": "stdin_stdout", "input": "50\n297 787 34 268 439 629 600 398 425 833 721 908 830 636 64 509 420 647 499 675 427 599 396 119 798 742 577 355 22 847 389 574 766 453 196 772 225 261 106 844 726 975 173 992 874 89 775 616 678 52 69 591 181 573 258 381 665 301 589 379 362 146 790 842 765 100 229 916 938 97 340 793... | 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 deck consisting of N c... | [{"type": "stdin_stdout", "input": "1 1 1\n1010000000", "output": "1009999999\n"}, {"type": "stdin_stdout", "input": "1 1 1\n1010100000", "output": "1010099999\n"}, {"type": "stdin_stdout", "input": "3 100 100\n10 1001 000", "output": "1001\n"}, {"type": "stdin_stdout", "input": "3 100 1001\n10 100 100", "output": "901... | 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\nSkyscraper \"MinatoHarukas\"\n\n... | [{"type": "stdin_stdout", "input": "15\n27\n3\n5\n14453855\n142729211\n251672118\n560550970\n979553853\n999999999\n0", "output": "1 5\n2 6\n1 2\n2 2\n111119 130\n801761 178\n11923 13484\n4003866 140\n7523 37374\n163837 5994\n"}, {"type": "stdin_stdout", "input": "15\n16\n3\n3\n9699690\n237086004\n847288609\n900660121\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\nThis is the simple version of Fa... | [{"input": "[-3, -2, -2, -1, 0, 1, 2, 3, 4]\n4", "output": "[[-2, -2]]", "fn_name": "find_a_b"}, {"input": "[-3, -2, -2, -1, 0, 1, 2, 3, 4]\n0", "output": "[[-3, 0]]", "fn_name": "find_a_b"}, {"input": "[-3, -2, -1, 0, 1, 2, 3, 4]\n4", "output": "[[1, 4]]", "fn_name": "find_a_b"}, {"input": "[1, 2, 3, 4, 5, 6]\n15", "o... | 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\nBimokh is Mashmokh's boss. For t... | [{"type": "stdin_stdout", "input": "10 1 100000000\n999999999 1634812359 999999999 999999999 129546129 999999999 999999999 999999999 1815265208 999999999\n", "output": "99999999 34812359 99999999 99999999 29546129 99999999 99999999 99999999 15265208 99999999\n"}, {"type": "stdin_stdout", "input": "10 1 100000000\n99999... | 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 map of some object is a rectan... | [{"type": "stdin_stdout", "input": "100 5000\n", "output": "YES\nLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLS\nSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSL\nLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSL... | 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\nStellar history 2005.11.5. You a... | [{"type": "stdin_stdout", "input": "-10 6 6\n20 2 5\n1 10 0\n-1 10 10\n0 0 10", "output": "MISS\n"}, {"type": "stdin_stdout", "input": "-10 6 6\n20 2 5\n0 10 0\n-1 10 10\n0 0 10", "output": "MISS\n"}, {"type": "stdin_stdout", "input": "-10 6 6\n20 2 5\n0 10 0\n-1 10 14\n0 0 10", "output": "MISS\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\nArcady is a copywriter. His toda... | [{"type": "stdin_stdout", "input": "thun-thun-thunder, thunder, thunder\nthunder, thun-, thunder\nthun-thun-thunder, thunder\nthunder, feel the thunder\nlightning then the thunder\nthunder, feel the thunder\nlightning then the thunder\nthunder, thunder\n", "output": "183\n"}, {"type": "stdin_stdout", "input": "thun-thu... | 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\nHaiku is a short form of Japanes... | [{"type": "stdin_stdout", "input": "37 4 2 3\n", "output": "863912418\n"}, {"type": "stdin_stdout", "input": "40 5 7 5\n", "output": "562805100\n"}, {"type": "stdin_stdout", "input": "15 10 2 3", "output": "138603924\n"}, {"type": "stdin_stdout", "input": "37 4 3 3", "output": "180978943\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\nWe have held a popularity poll f... | [{"type": "stdin_stdout", "input": "100 100\n1000 999 998 997 996 995 994 993 992 991 990 989 988 987 986 985 984 983 982 981 980 979 978 977 976 975 974 973 972 971 970 969 968 967 966 965 964 963 962 961 960 959 958 957 956 955 954 953 952 951 950 949 948 947 946 945 944 943 942 941 940 939 938 937 936 935 934 933 93... | 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 integers a_1, a_2, .... | [{"type": "stdin_stdout", "input": "1 1431379180228", "output": "1431379180228\n"}, {"type": "stdin_stdout", "input": "1 1472895801034", "output": "1472895801034\n"}, {"type": "stdin_stdout", "input": "1 1365467213485", "output": "1365467213485\n"}, {"type": "stdin_stdout", "input": "1 2203800626104", "output": "220380... | 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\nArthur and Alexander are number ... | [{"type": "stdin_stdout", "input": "200000000 794 1000 117 2000000000\n", "output": "2038505096\n"}, {"type": "stdin_stdout", "input": "200000000 794 1000 117 2000000000\n", "output": "2038505096\n"}, {"type": "stdin_stdout", "input": "20000000 280 1000 25 2000000000\n", "output": "2030769231\n"}, {"type": "stdin_stdou... | 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\nDuff is in love with lovely numb... | [{"type": "stdin_stdout", "input": "817634153013\n", "output": "817634153013\n"}, {"type": "stdin_stdout", "input": "734337660466\n", "output": "734337660466\n"}, {"type": "stdin_stdout", "input": "808453785117\n", "output": "808453785117\n"}, {"type": "stdin_stdout", "input": "294809951965\n", "output": "294809951965\... | 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# Story\n\nWell, here I am stuck... | [{"input": "\"abcdefghijklmnopqrstuvwX\"\n[\"AAA\", \"BBB\", \"CCC\", \"DDD\", \"EEE\", \"FFF\", \"GGG\", \"HHH\", \"III\", \"JJJ\", \"KKK\", \"LLL\", \"MMM\", \"NNN\", \"OOO\", \"PPP\", \"QQQ\", \"RRR\", \"SSS\", \"TTT\", \"UUU\", \"VVV\", \"WWW\"]", "output": "[\"aAbABAcBCBdCDCeDEDfEFEgFGFhGHGiHIHjIJIkJKJlKLKmLMLnMNM... | 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 an array $a$ of le... | [{"type": "stdin_stdout", "input": "4\n3\n1 2 3\n4\n3 1 2 4\n3\n2 3 1\n6\n2 4 12 1 3 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 2 3\n4\n3 1 2 4\n3\n2 3 1\n6\n2 4 19 1 3 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 2 3\n4\n3 1 2 4\n3\n2 3 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\nA palindrome is a word, phrase, ... | [{"input": "\"ACCDDCCA\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "\"1551\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "-4505", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "141221001", "output": "[5]", "fn_name": "palindrome"}, {"input": "13598", "o... | 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\n# Grains\n\nWrite a program that... | [{"input": "32", "output": "[2147483648]", "fn_name": "square"}, {"input": "16", "output": "[32768]", "fn_name": "square"}, {"input": "1", "output": "[1]", "fn_name": "square"}, {"input": "3", "output": "[4]", "fn_name": "square"}, {"input": "4", "output": "[8]", "fn_name": "square"}] | 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\nLittle Petya very much likes arr... | [{"type": "stdin_stdout", "input": "25\n1 1 1 2 2 2 1 2 1 2 2 2 2 2 1 2 2 2 1 2 2 2 2 1 2\n", "output": "1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 "}, {"type": "stdin_stdout", "input": "4\n1011110011 158379 10597860 181988389\n", "output": "1 158379 10597860 181988389\n"}, {"type": "stdin_stdout", "input": "4\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\nThere is the word heuristics. It... | [{"type": "stdin_stdout", "input": "4 1 3 4\nyskwcnt 16\nakzakr 7\ntsnukk 12\nfnmyi 13\nakzakr\n4 1 3 8\nakzakr 7\ntsnukk 4\nfnmyi 13\nyskwcnt 16\nakzakr\n4 2 2 1\nakzakr 4\ntsnukk 6\nyskwcnt 12\nfnmyi 12\nakzakr\nfnmyi\n5 2 3 28\nknmmdk 6\nskrkyk 14\ntmemm 14\nakmhmr 15\nmksyk 25\nknmmdk\nskrkyk\n5 2 3 11\ntmemm 12\ns... | 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 am a pipe tie craftsman. As lo... | [{"type": "stdin_stdout", "input": "3\n0 1 1\n3 3\n4\n4 1 2 3\n1 1 1\n5\n1 1 3 4 5\n3 12 2 2\n0", "output": "10\n40\n104\n"}, {"type": "stdin_stdout", "input": "3\n0 1 1\n3 3\n4\n3 1 5 3\n1 1 1\n5\n2 4 6 4 5\n0 3 2 1\n0", "output": "10\n48\n105\n"}, {"type": "stdin_stdout", "input": "3\n0 1 1\n3 3\n4\n3 1 5 3\n1 1 1\n5... | 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 Smart Beaver from ABBYY came... | [{"type": "stdin_stdout", "input": "21000\nSWISS OT LAHNCU NEW SERIES OF MONEY MARKET PEPAR\nZURICH, April 9 - The Svirs Federal tndmnrevoG lliw launch\na ndw series fo three mhnto mondx market setatificrec totallhng\nauornd 150 mln iwSss fraocs, dht National Bank said.\nSubscriptions close lirpA 14 and paynent date hs... | 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 New Year is coming! That's w... | [{"type": "stdin_stdout", "input": "10\n2 1 8 0 0 1 0 4 4 3\n", "output": "PRLPRLRPRLRPRLPRLPRLPRLPRLPRLPRLPRLRRRPRLRRPRLPRLPRLPRLRPRLPRLPRLPRLRPLRPLRPLR"}, {"type": "stdin_stdout", "input": "10\n2 0 8 0 0 1 0 4 4 3\n", "output": "PRLPRLRRPRLPRLPRLPRLPRLPRLPRLPRLRRRPRLRRPRLPRLPRLPRLRPRLPRLPRLPRLRPLRPLRPLR"}, {"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\nThe main server of Gomble compan... | [{"type": "stdin_stdout", "input": "14\n[12:07 p.m.]: mamaa\n[12:36 a.m.]: amaamppa\n[01:31 a.m.]: pmpp\n[05:47 a.m.]: paapappapaaampm\n[12:07 a.m.]: ppamammm\n[01:03 a.m.]: aapapmpampamamaaa\n[07:55 a.m.]: mpappmmapmpa\n[02:49 a.m.]: papmppppmpamppa\n[03:12 a.m.]: aaaaaaamam\n[04:40 a.m.]: paap\n[01:13 a.m.]: ap\n[03:... | 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\nMagic The Gathering is a collect... | [{"input": "[[1, 3], [3, 5], [4, 6], [5, 2]]\n[[2, 4], [6, 1], [4, 4], [3, 7], [3, 1]]", "output": "[{\"player1\": [[1, 3], [4, 6]], \"player2\": [[2, 4], [3, 7], [3, 1]]}]", "fn_name": "battle"}, {"input": "[[2, 3], [1, 4]]\n[[3, 3], [4, 1]]", "output": "[{\"player1\": [], \"player2\": [[3, 3]]}]", "fn_name": "battle"... | 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\nA median in an array with the le... | [{"type": "stdin_stdout", "input": "100 813\n285 143 378 188 972 950 222 557 170 755 470 164 1433 553 146 820 842 62 496 1893 746 944 677 828 465 577 791 277 303 218 561 653 925 692 871 424 626 795 813 343 418 280 123 364 496 447 435 452 645 36 311 315 830 289 450 675 23 212 421 661 7 217 468 877 172 141 475 409 178 71... | 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 kingdom of Lazyland is the h... | [{"type": "stdin_stdout", "input": "18 12\n6 3 6 6 6 6 6 6 6 12 1 3 6 6 10 6 6 6\n47 4 41 56 75 24 29 10 100 112 53 48 79 30 87 135 60 87\n", "output": "185\n"}, {"type": "stdin_stdout", "input": "18 12\n6 3 6 6 6 6 6 6 6 12 1 3 6 6 10 6 6 6\n47 4 41 56 75 24 29 10 100 112 53 48 79 30 87 135 10 87\n", "output": "148\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\nMany years ago, Roman numbers we... | [{"input": "10000000", "output": "[489999753]", "fn_name": "solve"}, {"input": "10", "output": "[244]", "fn_name": "solve"}, {"input": "2", "output": "[10]", "fn_name": "solve"}, {"input": "3", "output": "[20]", "fn_name": "solve"}, {"input": "4", "output": "[35]", "fn_name": "solve"}, {"input": "5", "output": "[56]", ... | 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\nSnuke signed up for a new websit... | [{"type": "stdin_stdout", "input": "atcoderbeginnercontest\natcoderregularcontest\n", "output": "aattccooddeerrbreeggiunlnaerrccoonntteesstt\n"}, {"type": "stdin_stdout", "input": "atcoderbeeinnercontgst\natcoderregularcontest", "output": "aattccooddeerrbreeegiunlnaerrccoonnttegsstt\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\nGiven is a tree with N vertices ... | [{"type": "stdin_stdout", "input": "10104\n5741 6080\n3408 7811\n5930 5446\n2841 6030\n7143 6678\n5930 3686\n3091 5609\n9185 6802\n8673 6440\n593 5930\n4271 5808\n3292 3568\n2712 5673\n10008 5082\n421 4874\n5930 7228\n5005 6587\n2254 9793\n8397 7976\n8682 4699\n8396 5930\n7253 1069\n1980 6577\n8066 4032\n2303 3724\n370... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.