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\nAshish and Vivek play a game on ... | [{"type": "stdin_stdout", "input": "4\n2 2\n0 0\n0 0\n2 2\n1 0\n0 0\n2 3\n0 0 0\n1 1 0\n3 3\n1 0 0\n0 0 0\n1 0 0\n", "output": "Vivek\nAshish\nAshish\nAshish\n"}, {"type": "stdin_stdout", "input": "4\n2 2\n1 0\n0 0\n2 2\n0 0\n0 1\n2 3\n1 0 1\n1 1 0\n3 3\n1 0 0\n0 0 0\n1 0 0\n", "output": "Ashish\nAshish\nVivek\nAshish\... | 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 farm whose length and... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "9801\n"}, {"type": "stdin_stdout", "input": "91 61\n", "output": "5400\n"}, {"type": "stdin_stdout", "input": "-33 13", "output": "-408\n"}, {"type": "stdin_stdout", "input": "-36 13", "output": "-444\n"}, {"type": "stdin_stdout", "input": "-36 17", "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\nLevko loves array a_1, a_2, ... ... | [{"type": "stdin_stdout", "input": "97 29\n2 78 82 356152\n2 14 29 430177\n1 59 84 3680\n1 49 89 -2247\n1 92 96 3701\n2 54 89 377271\n1 62 70 -507\n2 94 97 431563\n1 46 55 -9257\n1 51 83 1627\n1 10 20 6633\n1 17 34 -9263\n2 66 92 383251\n1 12 82 3884\n1 78 96 -5379\n2 13 35 424798\n1 68 91 2939\n2 80 84 214725\n1 61 85... | 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 only difference between easy... | [{"type": "stdin_stdout", "input": "100 10000\n93 99 95 105 94 108 104 104 102 112 106 82 114 104 88 107 105 104 93 96 103 109 105 82 107 95 83 93 120 115 96 104 96 86 87 102 103 108 97 84 108 117 109 107 80 87 102 107 88 97 96 101 101 114 106 103 99 101 105 102 85 94 98 101 115 100 91 92 108 105 94 110 91 89 119 119 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\nPetya studies positional notatio... | [{"type": "stdin_stdout", "input": "10\n", "output": "1 2 3 4 5 6 7 8 9 \n2 4 6 8 10 12 14 16 18 \n3 6 9 12 15 18 21 24 27 \n4 8 12 16 20 24 28 32 36 \n5 10 15 20 25 30 35 40 45 \n6 12 18 24 30 36 42 48 54 \n7 14 21 28 35 42 49 56 63 \n8 16 24 32 40 48 56 64 72 \n9 18 27 36 45 54 63 72 81 \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\nYou have probably registered on ... | [{"type": "stdin_stdout", "input": "c7jqaudcqmv8o7zvb5x_gp6zcgl6nwr7tz5or!28.tj8s1m2.wxz5a4id03!rq07?662vy.7.p5?vk2f2mc7ag8q3861rgd0rmbr\n", "output": "Too weak\n"}, {"type": "stdin_stdout", "input": "i6a.,8jb,n0kv4.1!7h?p.96pnhhgy6cl7dg7e4o6o384ys3z.t71kkq,,w,oqi4?u,,m5!rzu6wym_4hm,ohjy!.vvksl?pt,,1\n", "output": "Too... | 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\nDora loves adventures quite a lo... | [{"type": "stdin_stdout", "input": "1 100\n197 693 757 329 311 798 783 1130 504 1051 978 358 367 467 623 767 481 154 855 608 157 104 273 261 110 713 948 897 96 476 855 337 93 321 648 441 215 979 505 69 858 99 1215 337 237 116 824 98 955 192 773 99 485 385 861 347 772 993 470 215 792 1192 986 515 84 7 476 831 903 74 79 ... | 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 string S consisting o... | [{"type": "stdin_stdout", "input": "1111111111\n", "output": "642\n"}, {"type": "stdin_stdout", "input": "2432423234\n", "output": "321\n"}, {"type": "stdin_stdout", "input": "8889998899\n", "output": "135\n"}, {"type": "stdin_stdout", "input": "1234567876\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "69452... | 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": "3\n17 13\n3 12\n5 3", "output": "110/221\n1/2\n7/15\n"}, {"type": "stdin_stdout", "input": "3\n17 11\n3 5\n5 3", "output": "93/187\n7/15\n7/15\n"}, {"type": "stdin_stdout", "input": "3\n17 11\n3 6\n5 3", "output": "93/187\n1/2\n7/15\n"}, {"type": "stdin_stdout", "input": "3\n1 2\n11 ... | 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## Task:\nYou have to write a fu... | [{"input": "5", "output": "[\"54321\\n5432\\n543\\n54\\n5\"]", "fn_name": "pattern"}, {"input": "2", "output": "[\"21\\n2\"]", "fn_name": "pattern"}, {"input": "-25", "output": "[\"\"]", "fn_name": "pattern"}, {"input": "1", "output": "[\"1\"]", "fn_name": "pattern"}, {"input": "0", "output": "[\"\"]", "fn_name": "patt... | 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\nTokitsukaze is one of the charac... | [{"type": "stdin_stdout", "input": "100\n", "output": "1 A\n"}, {"type": "stdin_stdout", "input": "100\n", "output": "1 A\n"}, {"type": "stdin_stdout", "input": "101\n", "output": "0 A\n"}, {"type": "stdin_stdout", "input": "130\n", "output": "1 B\n"}, {"type": "stdin_stdout", "input": "121\n", "output": "0 A\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 the evening, after the contes... | [{"type": "stdin_stdout", "input": "100\n4116 4116 4117 4117 4117 4117 4118 4119 4119 4119 4119 4120 4120 4120 4120 4121 4122 4123 4123 4123 4123 4124 4124 4124 4124 4125 4126 4126 4126 4126 4127 4127 4127 4127 4128 4128 4128 4128 4129 4129 4130 4130 4131 4132 4133 4133 4134 4134 4135 4135 4136 4137 4137 4137 4138 4139... | 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 starts to seize the init... | [{"type": "stdin_stdout", "input": "63 5\n76826 79919 83599 93821 79919 46132 46132 46132 79919 76826 79919 79919 76826 79919 79919 76826 76826 46132 76826 40347 79919 46132 76826 83599 79919 79919 46132 46132 46132 83599 83599 79919 46132 83599 93821 76826 81314 79919 79919 83599 76826 76826 76826 76826 46132 76826 46... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers $l$ a... | [{"type": "stdin_stdout", "input": "4\n0 9\n0 10\n10 23\n2 1010000000\n", "output": "9\n11\n14\n1122222220\n"}, {"type": "stdin_stdout", "input": "4\n1 18\n8 10\n10 12\n1 1000000000\n", "output": "18\n3\n2\n1111111110\n"}, {"type": "stdin_stdout", "input": "4\n0 12\n9 10\n6 23\n1 1000000000\n", "output": "13\n2\n19\n11... | 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 Masha loves arranging her... | [{"type": "stdin_stdout", "input": "7\n", "output": "877\n{1,2,3,4,5,6,7}\n{1,2,3,4,5,6},{7}\n{1,2,3,4,5},{6},{7}\n{1,2,3,4,5},{6,7}\n{1,2,3,4,5,7},{6}\n{1,2,3,4,7},{5},{6}\n{1,2,3,4},{5,7},{6}\n{1,2,3,4},{5},{6,7}\n{1,2,3,4},{5},{6},{7}\n{1,2,3,4},{5,6},{7}\n{1,2,3,4},{5,6,7}\n{1,2,3,4,7},{5,6}\n{1,2,3,4,6,7},{5}\n{1,... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers $n$ a... | [{"type": "stdin_stdout", "input": "5\n14 1\n3 0\n2 0\n110 1252\n528350 1051160\n", "output": "0\n0\n0\n1152\n1048576\n"}, {"type": "stdin_stdout", "input": "5\n22 0\n3 0\n1 1\n100 1218\n137071 1051160\n", "output": "0\n0\n2\n1152\n1048576\n"}, {"type": "stdin_stdout", "input": "5\n28 0\n4 0\n1 2\n110 1590\n978289 1283... | 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\nIvan is going to sleep now and w... | [{"type": "stdin_stdout", "input": "2 1\n500000000000000000 1000010000000000000\n700000000\n", "output": "YES\n500000000000000000 1\n"}, {"type": "stdin_stdout", "input": "2 2\n1 1000000000000000000\n1000000000000000000 1000000000000000000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "2 2\n1 100000000000000... | 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\nBuses run between the cities A a... | [{"type": "stdin_stdout", "input": "60 120\n17 120\n23:00\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "60 120\n17 120\n23:00\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "60 120\n17 175\n23:00\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "111 120\n24 100\n13:00\n", "output": "9\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\nIn a far away kingdom young page... | [{"type": "stdin_stdout", "input": "98\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\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-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "011\n", "output": "274\n"}, {"type": "stdin_stdout", "input": "010\n", "output": "265\n"}, {"type": "stdin_stdout", "input": "10\n", "output": "265\n"}, {"type": "stdin_stdout", "input": "11\n", "output": "274\n"}, {"type": "stdin_stdout", "input": "12\n", "output": "319\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\nThe Little Elephant loves sortin... | [{"type": "stdin_stdout", "input": "47\n703599938 780784195 912005704 957182560 961181825 964876912 996677776 997012583 999004240 999888999 999980718 999997556 999997940 999999989 999999991 999999991 999999999 999999999 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 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\nIn one little known, but very be... | [{"type": "stdin_stdout", "input": "54 22 1009\n15 7\n17 7\n11 9\n6 11\n12 9\n13 8\n13 12\n22 11\n20 9\n20 7\n16 11\n19 12\n3 12\n15 9\n1 12\n2 10\n16 10\n16 10\n14 10\n15 11\n11 9\n14 8\n10 10\n16 12\n1 8\n3 8\n21 11\n18 12\n2 6\n9 11\n11 7\n15 9\n20 11\n6 8\n8 8\n19 11\n15 7\n9 9\n22 3\n12 9\n17 9\n17 11\n12 7\n15 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\nFor a given polygon g, computes ... | [{"type": "stdin_stdout", "input": "4\n-1 -2\n-1 0\n-1 14\n-5 2", "output": "32.0\n"}, {"type": "stdin_stdout", "input": "4\n-1 -2\n-1 0\n-1 17\n-5 2", "output": "38.0\n"}, {"type": "stdin_stdout", "input": "4\n0 -1\n10 -3\n71 0\n0 11", "output": "502.0\n"}, {"type": "stdin_stdout", "input": "4\n0 -4\n-1 0\n-1 14\n-6 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\nYour task is to convert a given ... | [{"input": "1000000000.23", "output": "[\"1,000,000,000.23\"]", "fn_name": "commas"}, {"input": "-1000000.123", "output": "[\"-1,000,000.123\"]", "fn_name": "commas"}, {"input": "-1234567.0001236", "output": "[\"-1,234,567\"]", "fn_name": "commas"}, {"input": "9123.212", "output": "[\"9,123.212\"]", "fn_name": "commas"... | 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 decimal representation of an i... | [{"type": "stdin_stdout", "input": "2012 8\n83268 3\n1112 9\n0 1\n20 2\n0 0", "output": "13 86526432 3\n5 74943 4\n5 954197541 14\n0 0 1\n2 63 5\n"}, {"type": "stdin_stdout", "input": "245 9\n83268 23\n821 3\n0 0\n99 1\n0 -1", "output": "3 863098632 14\n12 98765433331976666543211 5\n3 495 1\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\nA matrix of size $n \\times m$ i... | [{"type": "stdin_stdout", "input": "9\n1 1\n132703760\n1 1\n33227322\n1 1\n943066084\n1 1\n729139464\n1 1\n450488051\n1 1\n206794512\n1 1\n372520051\n1 1\n552003271\n1 1\n319080560\n", "output": "0\n0\n0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "9\n1 1\n132703760\n1 1\n33227322\n1 1\n943066084\n1 1\n729... | 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**Steps**\n1. Square the numbers... | [{"input": "[1, -1, 10, -9, 16, 15, 45, -73, -26]", "output": "[2584]", "fn_name": "calc"}, {"input": "[1, 1, -9, 9, 16, -15, -45, -73, 26]", "output": "[1665]", "fn_name": "calc"}, {"input": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", "output": "[0]", "fn_name": "calc"}, {"input": "[-5, -5, -5, -5, -5, -5, -5]", "outpu... | 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\nRevised\n\nThe current era, Heis... | [{"type": "stdin_stdout", "input": "HEISEI 1 0 0\nHEISEI 31 4 2\nIETEIH 31 5 3\nIFISEH 142 12 42\nHEISEI 15 8 30\nIEJSEH 103 2 42\nHEISEI 3 3 14\nHEISEI 28 2 23\n#", "output": "HEISEI 1 0 0\nHEISEI 31 4 2\n? 1 5 3\n? 112 12 42\nHEISEI 15 8 30\n? 73 2 42\nHEISEI 3 3 14\nHEISEI 28 2 23\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\nHDD hard drives group data by se... | [{"type": "stdin_stdout", "input": "100\n11 9 35 34 51 74 16 67 26 21 14 80 84 79 7 61 28 3 53 43 42 5 56 36 69 30 22 88 1 27 65 91 46 31 59 50 17 96 25 18 64 55 78 2 63 24 95 48 93 13 38 76 89 94 15 90 45 81 52 87 83 73 44 49 23 82 85 75 86 33 47 19 58 97 37 20 40 10 92 4 6 68 77 54 71 12 62 60 100 39 41 99 72 29 57 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\nPolycarp wants to buy exactly $n... | [{"type": "stdin_stdout", "input": "10\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n", "output": "104395301\n104395301\n104395301\n104395301\n104395301\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\nSereja has two sequences a and b... | [{"type": "stdin_stdout", "input": "82 50 1\n4 2 2 4 4 3 2 2 3 3 4 3 4 1 4 1 4 3 5 3 4 2 4 4 5 2 5 4 2 4 2 5 3 2 3 4 2 5 4 3 3 4 3 4 1 1 5 2 4 1 3 3 2 4 1 2 2 5 4 4 5 3 3 1 2 3 4 5 3 1 2 3 3 5 5 2 4 1 4 2 3 1\n4 3 3 3 4 1 4 4 5 5 5 2 5 4 1 2 2 1 3 3 3 3 2 5 3 2 4 3 2 2 4 4 4 3 4 2 1 2 3 2 1 1 5 2 3 5 4 5 3 4\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an easier version of the... | [{"type": "stdin_stdout", "input": "100\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 22 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 77... | 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\nRaccoon is fighting with a monst... | [{"type": "stdin_stdout", "input": "210 5\n31 41 59 26 53\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "211 5\n31 41 59 26 53\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "210 3\n31 41 59 26 53", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "210 3\n31 55 59 26 53", "output": "Yes\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\nFor some time the program of rou... | [{"type": "stdin_stdout", "input": "2567340036354357844391998756110821468858185018763415770617907336824217629234299240638243305079104961\n", "output": "$2,567,340,036,354,357,844,391,998,756,110,821,468,858,185,018,763,415,770,617,907,336,824,217,629,234,299,240,638,243,305,079,104,961.00\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\nConsider some square matrix A wi... | [{"type": "stdin_stdout", "input": "100\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "89\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "91\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "76\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "80\n", "output": "13\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 an undirected conn... | [{"type": "stdin_stdout", "input": "7 1\n1 -1 0\n-1 4 1\n-1 0 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 1\n1 -1 0\n-1 4 2\n-1 0 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 1\n1 -2 0\n-1 4 2\n-1 0 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "14 -1\n2 0 1\n0 3 1\n0 0 4", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA sequence of brackets is called... | [{"type": "stdin_stdout", "input": "3\n6\n101101\n10\n1001011101\n4\n1001\n", "output": "YES\n((()))\n()()()\nYES\n(()((())))\n()(()())()\nYES\n(())\n()()\n"}, {"type": "stdin_stdout", "input": "3\n6\n101101\n10\n1011001101\n4\n1001\n", "output": "YES\n((()))\n()()()\nYES\n(((()())))\n()((()))()\nYES\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\nConsider a sequence, which is fo... | [{"input": "14514", "output": "[2305425]", "fn_name": "sequence"}, {"input": "1634", "output": "[79707]", "fn_name": "sequence"}, {"input": "546", "output": "[19929]", "fn_name": "sequence"}, {"input": "334", "output": "[7329]", "fn_name": "sequence"}, {"input": "123", "output": "[1084]", "fn_name": "sequence"}, {"inpu... | 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$ consi... | [{"type": "stdin_stdout", "input": "3\n5\n1 2 3 4 5\n5\n4 4 4 4 2\n6\n1 3 1 5 3 1\n", "output": "-1 -1 3 2 1 \n-1 4 4 4 2 \n-1 -1 1 1 1 1 \n"}, {"type": "stdin_stdout", "input": "3\n5\n4 4 4 4 2\n5\n1 2 3 4 5\n6\n1 3 1 5 3 1\n", "output": "-1 4 4 4 2 \n-1 -1 3 2 1 \n-1 -1 1 1 1 1 \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\nYou have final scores of an exam... | [{"type": "stdin_stdout", "input": "5\n70 115 100 90 20\n3\n74 80 117\n0", "output": "32.9241552663\n19.0146142626\n"}, {"type": "stdin_stdout", "input": "5\n70 115 100 90 20\n3\n74 82 117\n0", "output": "32.9241552663\n18.6726180989\n"}, {"type": "stdin_stdout", "input": "5\n70 115 100 90 20\n3\n74 80 80\n0", "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\nDefine a function that removes d... | [{"input": "[1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 7, 7]", "output": "[[1, 2, 3, 4, 5, 6, 7]]", "fn_name": "distinct"}, {"input": "[1, 1, 1, 2, 3, 4, 5]", "output": "[[1, 2, 3, 4, 5]]", "fn_name": "distinct"}, {"input": "[1, 1, 2]", "output": "[[1, 2]]", "fn_name": "distinct"}, {"input": "[1, 2]", "output": "[[1, 2]]", "fn_nam... | 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\nInstructors of Some Informatics ... | [{"type": "stdin_stdout", "input": "100 3 30\n20 10 8 3 97 20 40 4 58 24 105 56 26 21 66 1 126 4 21 46 8 2 9 21 0 13 24 53 58 23 3 107 1 22 189 3 31 4 31 0 3 0 9 43 19 74 92 7 71 22 46 26 31 49 18 3 10 9 9 110 30 2 40 21 33 4 11 14 47 4 1 37 3 19 18 63 10 53 19 35 11 57 8 3 11 27 23 5 45 15 127 27 23 48 3 8 20 33 5 28\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe task is simply stated. Given... | [{"input": "661915703", "output": "[4]", "fn_name": "sum_of_squares"}, {"input": "999887641", "output": "[1]", "fn_name": "sum_of_squares"}, {"input": "999950886", "output": "[3]", "fn_name": "sum_of_squares"}, {"input": "999951173", "output": "[2]", "fn_name": "sum_of_squares"}, {"input": "999998999", "output": "[4]",... | 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 .: Peter, do you know \"Yes, ... | [{"type": "stdin_stdout", "input": "Yes I have a number\nHow I wish I could calculate an unused bolor for space\nThank you\nEND OF INPUT", "output": "31416\n31415926535\n53\n"}, {"type": "stdin_stdout", "input": "Yes I have a rebmun\nHow I wish I could calculate an unused bolor for space\nThank you\nEND OF INPUT", "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\n3D Printing\n\nWe are designing ... | [{"type": "stdin_stdout", "input": "1 1 100\n100 100 100\n6 4 10\n100 100 100\n106 102 102\n112 110 104\n104 116 102\n100 114 104\n92 107 100\n10 1 10\n-100 101 100\n-108 102 120\n-116 103 100\n-124 100 100\n-132 99 100\n-92 98 100\n-84 100 140\n-76 103 100\n-68 146 100\n-60 101 100\n10 4 10\n100 100 100\n108 101 100\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 which converts u... | [{"type": "stdin_stdout", "input": "f@IR, LATER, OCCASIONALLY CLOUDY.", "output": "F@ir, later, occasionally cloudy.\n"}, {"type": "stdin_stdout", "input": "f@IR, LATER, YLLANOISACCO CLOUDY.", "output": "F@ir, later, yllanoisacco cloudy.\n"}, {"type": "stdin_stdout", "input": "f@IR, LATER, OLLANOISACCY CLOUDY.", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate the function ```consecuti... | [{"input": "[1, 2, 3, 4]", "output": "[0]", "fn_name": "consecutive"}, {"input": "[10, -10]", "output": "[19]", "fn_name": "consecutive"}, {"input": "[-10, 10]", "output": "[19]", "fn_name": "consecutive"}, {"input": "[4, 8, 6]", "output": "[2]", "fn_name": "consecutive"}, {"input": "[-10, -9]", "output": "[0]", "fn_na... | 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\nThe characters of Chima need you... | [{"input": "\"qwertyuiopasdfghjklzxcvbnm\"", "output": "[\"Not a character\"]", "fn_name": "identify_weapon"}, {"input": "\"Stinkin gorillas\"", "output": "[\"Not a character\"]", "fn_name": "identify_weapon"}, {"input": "\"Lagravis\"", "output": "[\"Lagravis-Blazeprowlor\"]", "fn_name": "identify_weapon"}, {"input": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string of number... | [{"input": "\"one two three four five\"", "output": "[\"three\"]", "fn_name": "average_string"}, {"input": "\"zero zero zero zero zero\"", "output": "[\"zero\"]", "fn_name": "average_string"}, {"input": "\"four six two three\"", "output": "[\"three\"]", "fn_name": "average_string"}, {"input": "\"zero nine five two\"", ... | 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\nExample\n\nInput\n\n201\n\n\nOut... | [{"type": "stdin_stdout", "input": "148", "output": "648\n"}, {"type": "stdin_stdout", "input": "106", "output": "605\n"}, {"type": "stdin_stdout", "input": "145", "output": "645\n"}, {"type": "stdin_stdout", "input": "225", "output": "725\n"}, {"type": "stdin_stdout", "input": "171", "output": "671\n"}, {"type": "stdi... | 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 brothers Hiroshi and Kenjiro... | [{"type": "stdin_stdout", "input": "0 11\n10 0\n-1 1 41 0", "output": "kenjiro\n"}, {"type": "stdin_stdout", "input": "0 11\n10 0\n-1 2 41 0", "output": "kenjiro\n"}, {"type": "stdin_stdout", "input": "0 10\n10 0\n-1 2 41 0", "output": "kenjiro\n"}, {"type": "stdin_stdout", "input": "0 10\n10 1\n-1 2 41 0", "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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n11\n26", "output": "00:02\n11:58\n05:32\n06:28\n"}, {"type": "stdin_stdout", "input": "2\n4\n104", "output": "05:28\n06:32\n01:52\n10:08\n"}, {"type": "stdin_stdout", "input": "2\n1\n104", "output": "04:22\n07:38\n01:52\n10:08\n"}, {"type": "stdin_stdout", "input": "2\n1\n116", "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\nTokyo has a very complex railway... | [{"type": "stdin_stdout", "input": "4 4 2 1 4\n1 2 2 1\n3 3 2 1\n3 1 5 1\n2 4 4 2\n3 1\n3 11\n10 5 3\n\n10\n2 0 1 1 2\n1\n\n1\n4 5 2 4 1\n4 3 10 1\n3 2 2 1\n3 4 1 2\n3 2 5 2\n2 1 10 1\n3 3\n20 30\n3 2 1\n5 10\n4 2 1\n5 5 2 1 5\n2 2 10 2\n1 3 20 2\n1 4 32 1\n3 4 10 1\n4 5 20 1\n2 2\n20\n10 1\n20\n3 1\n0 0 0 0 0", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer $n$. Ch... | [{"type": "stdin_stdout", "input": "6\n3\n3\n4\n5\n998244353\n1368804034442\n", "output": "YES\nYES\nNO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "6\n3\n3\n4\n5\n998244353\n1099511627776\n", "output": "YES\nYES\nNO\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "6\n3\n3\n4\n5\n998244353\n852815039649\... | 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\nIlya is a very good-natured lion... | [{"type": "stdin_stdout", "input": "16\n978618343 473608041 799158564 800910753 461479363 520477481 780529176 678879534 118274424 720632652 1126830014 582019792 225578081 537373229 944668919 758615621\n", "output": "15485512030\n"}, {"type": "stdin_stdout", "input": "16\n978618343 473608041 799158564 800910753 46147936... | 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\nSpongebob is already tired tryin... | [{"type": "stdin_stdout", "input": "983282300\n", "output": "48\n 1 983282300\n 2 3277... | 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\nMike wants to prepare for IMO bu... | [{"type": "stdin_stdout", "input": "9 6\n-44 -29\n-11 85\n11 84\n-63 1\n75 89\n-37 61\n14 73\n78 88\n-22 -18\n", "output": " 0\n"}, {"type": "stdin_stdout", "input": "2 2\n-93 -22\n12 72\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\nSnuke has N sticks.\nThe length ... | [{"type": "stdin_stdout", "input": "15 14\n50 26 27 21 41 7 42 35 7 5 5 36 39 1 45\n", "output": "386\n"}, {"type": "stdin_stdout", "input": "15 14\n49 26 27 21 41 12 42 35 7 5 5 36 39 1 45", "output": "390\n"}, {"type": "stdin_stdout", "input": "15 14\n49 26 27 21 33 14 42 35 7 5 5 31 39 1 45", "output": "379\n"}, {"t... | 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 work as a system administrat... | [{"type": "stdin_stdout", "input": "200 10\n10000010101010110011110010100010010000001100101111011001010010001101001011111110011010111101000101011110101001001101101011010011100000100101000010110111000110000010101110110000110000100000101110111100\n", "output": "989\n"}, {"type": "stdin_stdout", "input": "200 10\n10000010... | 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\nTakahashi is standing on a multi... | [{"type": "stdin_stdout", "input": "613921846801\n", "output": "613921846800\n"}, {"type": "stdin_stdout", "input": "550310490859\n", "output": "550310490858\n"}, {"type": "stdin_stdout", "input": "571704556531\n", "output": "571704556530\n"}, {"type": "stdin_stdout", "input": "472249589291\n", "output": "472249589290\... | 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\nTakahashi wants to be a member o... | [{"type": "stdin_stdout", "input": "aaaaaaaaaa\naaaaaaaaaaa\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "vgxgpuamkx\nvgxgpuamkxk\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "chokudai\nchokudaiz\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "vfjaqmop\nodotkrjzr\n", "output": "No\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 multiset S consi... | [{"type": "stdin_stdout", "input": "88\n1 1411\n2\n1 1783\n1 2132\n2\n2\n1 2799\n2\n2\n1 7856\n1 10551\n2\n2\n1 10868\n1 15159\n1 16497\n2\n1 20266\n2\n2\n2\n1 21665\n2\n2\n2\n2\n1 25670\n2\n2\n2\n1 26767\n1 31392\n2\n2\n2\n1 35319\n1 38575\n1 40111\n2\n1 41305\n1 49444\n1 53013\n2\n2\n1 53117\n2\n2\n1 55113\n2\n2\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\nLittle Petya likes points a lot.... | [{"type": "stdin_stdout", "input": "100 100\n-98 -97 -96 -93 -92 -91 -90 -87 -86 -84 -81 -80 -79 -78 -76 -75 -73 -71 -69 -67 -65 -64 -63 -62 -61 -54 -51 -50 -49 -48 -46 -45 -44 -37 -36 -33 -30 -28 -27 -16 -15 -13 -12 -10 -9 -7 -6 -5 -4 2 3 5 8 9 10 11 13 14 15 16 17 19 22 24 25 26 27 28 30 31 32 36 40 43 45 46 47 50 51... | 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# Situation\nYou have been hired... | [{"input": "\".....P......P.P..P....\"", "output": "[\"0000012345554333321000\"]", "fn_name": "controller"}, {"input": "\".....P.P........P....\"", "output": "[\"000001222222222234555\"]", "fn_name": "controller"}, {"input": "\"P......P..OP..P...\"", "output": "[\"123455543233334555\"]", "fn_name": "controller"}, {"inp... | 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\nBear Limak prepares problems for... | [{"type": "stdin_stdout", "input": "75\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\n", "output": "1406\n"}, {"type": "stdin_stdout", "input": "75\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\n", "output": "1406\n"}, {"type": "stdin_stdout", "input": "75\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 that returns th... | [{"input": "\"abmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | 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 have just been put in charge... | [{"type": "stdin_stdout", "input": "50 12346\n712 144139\n927438 667387\n23 3312\n9 3142\n25 1299\n101 63556\n103 862150\n6 1104\n0 0", "output": "43 1 2 34 6\n481 1 441 39\n667387 667387\n18 3 3 12\nerror\n21 1 2 9 9\n97 6 35 56\n103 86 2 15 0\nrejected\n"}, {"type": "stdin_stdout", "input": "50 12346\n712 144139\n158... | 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\nInnopolis University scientists ... | [{"type": "stdin_stdout", "input": "20 20 80\n5 3\n13 13\n8 5\n2 9\n12 16\n1 11\n15 11\n3 20\n10 7\n5 4\n11 2\n5 20\n14 8\n5 1\n8 13\n11 5\n19 2\n15 12\n12 7\n16 5\n17 3\n12 2\n17 16\n12 3\n12 6\n18 20\n2 20\n9 1\n5 10\n9 18\n17 1\n17 10\n20 1\n12 12\n19 14\n7 8\n2 19\n6 14\n5 6\n15 2\n18 14\n5 7\n14 14\n17 2\n20 20\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\nVasya owns a cornfield which can... | [{"type": "stdin_stdout", "input": "9 3\n100\n0 0\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n0 7\n0 8\n0 9\n1 0\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n2 0\n2 1\n2 2\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n3 0\n3 1\n3 2\n3 3\n3 4\n3 5\n3 6\n3 7\n3 8\n3 9\n4 0\n4 1\n4 2\n4 3\n4 4\n4 5\n4 6\n4 7\n4 8\n4 9\n5 0\n5 1\n5 2\n5 3\n5 4\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N towns in a coordinat... | [{"type": "stdin_stdout", "input": "8\n898 1000\n85 1000\n980 1000\n359 1000\n-560 1000\n-764 1000\n-103 1000\n-116 1000\n", "output": "5277.7500000000\n"}, {"type": "stdin_stdout", "input": "8\n-1000 1000\n-1000 0\n-1000 -1000\n0 1000\n0 -1000\n1000 1000\n1000 0\n1000 -1000\n", "output": "12300.5630797458\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\nThe Little Elephant loves permut... | [{"type": "stdin_stdout", "input": "125 8\n111 69 3 82 24 38 4 39 42 22 92 6 16 10 8 45 17 91 84 53 5 46 124 47 18 57 43 73 114 102 121 105 118 95 104 98 72 20 56 60 123 80 103 70 65 107 67 112 101 108 99 49 12 94 2 68 119 109 59 40 86 116 88 63 110 14 13 120 41 64 89 71 15 35 81 51 113 90 55 122 1 75 54 33 28 7 125 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\nPooja would like to withdraw X U... | [{"type": "stdin_stdout", "input": "1013 120.00", "output": "120.00\n"}, {"type": "stdin_stdout", "input": "1676 120.00", "output": "120.00\n"}, {"type": "stdin_stdout", "input": "1038 120.00", "output": "120.00\n"}, {"type": "stdin_stdout", "input": "1022 120.00", "output": "120.00\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\nSince Sonya has just learned the... | [{"type": "stdin_stdout", "input": "20\n1 0 2 3 5 3 2 1 3 2 3 1 4 2 1 4 2 3 2 4\n", "output": "4 5\n2 2\n"}, {"type": "stdin_stdout", "input": "20\n1 0 2 3 5 3 2 1 3 2 3 1 4 2 1 4 2 3 2 4\n", "output": "4 5\n2 2\n"}, {"type": "stdin_stdout", "input": "18\n2 2 3 2 4 3 3 3 0 2 4 2 1 3 2 1 1 1\n", "output": "3 6\n2 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\nVasya has n days of vacations! S... | [{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100\n3 0 3 0 3 0 3 0... | 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 prepared 6 problems for a ... | [{"type": "stdin_stdout", "input": "001011", "output": "3\n"}, {"type": "stdin_stdout", "input": "100000", "output": "1\n"}, {"type": "stdin_stdout", "input": "011011", "output": "4\n"}, {"type": "stdin_stdout", "input": "100100", "output": "2\n"}, {"type": "stdin_stdout", "input": "111011", "output": "5\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\nYou are given <var>Q</var> tuple... | [{"type": "stdin_stdout", "input": "31940 139378099479290043 26943708742238 1000000000\n", "output": "997629525\n"}, {"type": "stdin_stdout", "input": "1 999999999999999999 999999999999999999 998244353\n", "output": "716070897\n"}, {"type": "stdin_stdout", "input": "345 493299812499659259 1418510335032035 998244353\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\nAllen wants to enter a fan zone ... | [{"type": "stdin_stdout", "input": "30\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000... | 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 define a multiplication op... | [{"type": "stdin_stdout", "input": "13\na\na\na\na\na\na\na\na\na\na\na\na\nb\na\na\na\na\na\na\na\na\na\na\na\nb\na\n", "output": "a\na\na\na\na\na\n-1\na\na\na\na\na\n-1\n"}, {"type": "stdin_stdout", "input": "13\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\nb\na\n", "output": "a\na\na\na\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 sequence $s$ con... | [{"type": "stdin_stdout", "input": "21\n3\n123\n3\n123\n3\n123\n3\n123\n3\n123\n3\n213\n3\n123\n3\n123\n3\n123\n3\n321\n3\n123\n3\n321\n3\n132\n3\n322\n3\n321\n3\n341\n3\n123\n3\n421\n3\n421\n3\n421\n3\n421\n", "output": "YES\n2\n1 23\nYES\n2\n1 23\nYES\n2\n1 23\nYES\n2\n1 23\nYES\n2\n1 23\nYES\n2\n2 13\nYES\n2\n1 23\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\nIvan has an array consisting of ... | [{"type": "stdin_stdout", "input": "10\n71550121 446173607 640274071 402690754 802030518 598196518 796619138 96204862 983359971 799843967\n", "output": "71550121 446173607 640274071 802030518 983359971 \n402690754 598196518 796619138 799843967 \n96204862 \n"}, {"type": "stdin_stdout", "input": "10\n71550121 446173607 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\nDuring the last Sereja's Codesec... | [{"type": "stdin_stdout", "input": "10 0\n5 9 1 12 4 2 2 4 12 1\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n"}, {"type": "stdin_stdout", "input": "10 0\n5 16 1 7 4 2 2 5 18 3\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n"}, {"type": "stdin_stdout", "input": "10 0\n5 16 1 7 4 2 2 4 18 3\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\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\nThe capital of Berland has n mul... | [{"type": "stdin_stdout", "input": "100\n9 9 72 55 14 8 55 58 35 67 3 18 73 92 41 49 15 60 18 66 9 26 97 47 43 88 71 97 19 34 48 96 79 53 8 24 69 49 12 23 77 12 21 88 66 9 29 13 61 69 54 77 41 13 4 68 37 74 7 6 29 76 55 72 89 4 78 27 29 82 18 83 12 4 32 69 89 85 66 13 92 54 38 5 26 56 17 55 29 4 17 39 29 94 3 67 85 98 ... | 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 a billiard table of rec... | [{"type": "stdin_stdout", "input": "1000000000 999999999 999999998 999999999 -1 -1\n", "output": "1000000000 999999999\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999 999999998 999999999 -1 -1\n", "output": "1000000000 999999999"}, {"type": "stdin_stdout", "input": "1000000000 999999999 999999998 999999999... | 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 is a collector. Once he w... | [{"type": "stdin_stdout", "input": "3 999999\n22 1000000 1000000 1250369 623205 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000100 1506663 1001000 1010000 999999 1000000 1000000 1010000 352800 999999 1000000\n14 999999 999999 1521826 1368902 999999 1000000 999999 1556972 999999 999999 418013 999999 1000000... | 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 that will encry... | [{"input": "\"THE QUICK BROWN FOX\"", "output": "[\"- .... . --.- ..- .. -.-. -.- -... .-. --- .-- -. ..-. --- -..-\"]", "fn_name": "encryption"}, {"input": "\"WOLFRAM ALPHA 1\"", "output": "[\".-- --- .-.. ..-. .-. .- -- .- .-.. .--. .... .- .----\"]", "fn_name": "encryption"}, {"input": "\"Final basic test\... | 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 introduce a number system ... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "48999999753\n"}, {"type": "stdin_stdout", "input": "1000000100\n", "output": "49000004653\n"}, {"type": "stdin_stdout", "input": "1517731607\n", "output": "74368848496\n"}, {"type": "stdin_stdout", "input": "1000001100\n", "output": "49000053653\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\nThe internet is a very confoundi... | [{"input": "\"Sometimes I use ? in the middle of a sentence; is that ok?!\"", "output": "[\"OMG ZOMETIMEZ I UZE ?????????????? IN the MIDDLE of A zentence; IZ that OK??????????????!1!1!1!1!1!1!1\"]", "fn_name": "n00bify"}, {"input": "\"Before you know it... wait, what does this have to do with UNO!?\"", "output": "[\"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\nA and B are preparing themselves... | [{"type": "stdin_stdout", "input": "10\n460626451 802090732 277246428 661369649 388684428 784303821 376287098 656422756 9301599 25720377\n277246428 388684428 661369649 460626451 656422756 802090732 9301599 784303821 376287098\n376287098 802090732 388684428 9301599 656422756 784303821 460626451 277246428\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\nAt the first holiday in spring, ... | [{"type": "stdin_stdout", "input": "100 15 6 10\n6 9 1 7 6 4 1 9 3 2 4 6 2 5 3 10 9 2 9 1 6 5 6 2 3 10 7 10 7 4 5 4 4 4 4 7 1 10 8 4 8 3 10 10 7 4 4 10 6 1 8 5 4 6 2 3 10 3 2 5 7 5 6 10 10 3 4 7 4 3 3 1 7 8 10 10 10 10 8 3 7 4 2 1 8 6 5 6 5 8 7 9 2 1 5 2 4 6 10 8\n6 9 7 8 7 1 4 3 5 8\n", "output": "2\n76 77 \n"}, {"typ... | 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 square matrix of... | [{"type": "stdin_stdout", "input": "5\n3 2\n1 2 3\n2 3 1\n3 1 2\nDR\n3 2\n1 2 3\n2 3 1\n3 1 2\nLU\n3 1\n1 2 3\n2 3 1\n3 1 2\nI\n3 1\n1 2 3\n2 3 1\n3 1 2\nC\n3 16\n1 2 3\n2 3 1\n3 1 2\nLDICRUCILDICRUCI\n", "output": "\n2 3 1 \n3 1 2 \n1 2 3 \n\n3 1 2 \n1 2 3 \n2 3 1 \n\n1 2 3 \n3 1 2 \n2 3 1 \n\n1 3 2 \n2 1 3 \n3 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\nNatasha is going to fly on a roc... | [{"type": "stdin_stdout", "input": "90\n35\n1 68 16 30 24 1 1 1 35 1 1 67 1 1 1 1 33 16 37 77 83 1 77 26 1 1 68 67 70 62 1 47 1 1 1 84 1 65 1 32 83 1 1 1 28 1 71 76 84 1 1 5 1 74 10 1 1 1 38 87 13 1 7 66 81 49 1 9 1 11 1 25 1 1 1 1 7 1 1 36 61 47 51 1 1 69 40 1 37 1\n40 1 21 1 19 51 37 52 64 1 86 1 5 24 1 1 1 19 36 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\nA high school has a strange prin... | [{"input": "950811894", "output": "[30835]", "fn_name": "num_of_open_lockers"}, {"input": "3991700", "output": "[1997]", "fn_name": "num_of_open_lockers"}, {"input": "74864", "output": "[273]", "fn_name": "num_of_open_lockers"}, {"input": "128", "output": "[11]", "fn_name": "num_of_open_lockers"}, {"input": "500", "out... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp found a rectangular tab... | [{"type": "stdin_stdout", "input": "5\n1 1 1\n2 2 3\n3 10 11\n100 100 7312\n1001000 1000010 1000000000000\n", "output": "1\n2\n14\n1174\n1000009998991\n"}, {"type": "stdin_stdout", "input": "5\n1 1 1\n2 2 2\n3 10 11\n100 100 7312\n1001000 1000010 1000000000000\n", "output": "1\n3\n14\n1174\n1000009998991\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\nZiota found a video game called ... | [{"type": "stdin_stdout", "input": "100 5 5 9 3\n3 4 2 3 4 3 8 5 2 1 1 4 1 1 10 10 7 5 2 9 4 2 10 10 8 2 4 9 6 2 6 7 7 5 7 7 1 8 10 9 9 3 10 3 10 1 1 8 3 6 4 5 5 4 9 5 9 4 8 2 10 8 9 1 5 9 7 2 1 7 9 3 2 9 1 5 4 2 3 10 6 7 8 2 10 1 6 2 1 6 10 9 1 2 2 7 2 8 4 4\n", "output": "1597\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\nYou are given a bracket sequence... | [{"type": "stdin_stdout", "input": "20\n(())(()((((()())()((\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "20\n(())(((((((()())()()\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "20\n(()())()((((()(())((\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "20\n(())((((()(((())()()\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\nAs you might remember from the p... | [{"type": "stdin_stdout", "input": "5\n1 1\n1 4\n3 6 3\n1 4\n3 10 3\n", "output": "1\n0\n"}, {"type": "stdin_stdout", "input": "5\n1 3\n1 4\n3 11 3\n2 4\n3 6 2\n", "output": "0\n0\n"}, {"type": "stdin_stdout", "input": "5\n1 3\n1 4\n3 12 3\n1 4\n3 4 3\n", "output": "0\n2\n"}, {"type": "stdin_stdout", "input": "5\n1 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\nAlice has a birthday today, so s... | [{"type": "stdin_stdout", "input": "10 3\n0 1 1 0 1 0 0 2 -1 0\n1 4 1 2 -1 0 1 1 -1 1\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10 10\n1 0 0 0 0 0 0 0 0 1\n0 0 0 0 0 0 0 0 0 0\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 10\n1 0 0 0 0 0 0 0 0 1\n0 0 0 0 0 0 0 0 0 0\n", "output": "YES\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 Elephant loves magic squa... | [{"type": "stdin_stdout", "input": "0 100000 100000\n100000 0 100000\n100000 100000 0\n", "output": "100000 100000 100000\n100000 100000 100000\n100000 100000 100000\n"}, {"type": "stdin_stdout", "input": "0 100000 100000\n100000 0 100000\n100000 100000 0\n", "output": "100000 100000 100000\n100000 100000 100000\n10000... | 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\nThere are fine icicle... | [{"type": "stdin_stdout", "input": "1 56\n4\n-1\n-1\n-1", "output": "52\n"}, {"type": "stdin_stdout", "input": "2 71\n14\n6\n0\n0", "output": "122\n"}, {"type": "stdin_stdout", "input": "2 30\n14\n6\n3\n0", "output": "40\n"}, {"type": "stdin_stdout", "input": "2 17\n2\n3\n3\n-1", "output": "29\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\nThird day at your new cryptoanal... | [{"input": "\"alpha bravo charlie\"\n\"delta\"", "output": "[\"djofd eqdvn lfdqjga\"]", "fn_name": "keyword_cipher"}, {"input": "\"WELCOME HOME\"\n\"gridlocked\"", "output": "[\"wlfimhl kmhl\"]", "fn_name": "keyword_cipher"}, {"input": "\"one two three\"\n\"rails\"", "output": "[\"mks twm tdpss\"]", "fn_name": "keyword... | code_functional |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.