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\nPolycarp doesn't like integers t...
[{"type": "stdin_stdout", "input": "100\n1000\n999\n998\n997\n996\n995\n994\n993\n992\n991\n990\n989\n988\n987\n986\n985\n984\n983\n982\n981\n980\n979\n978\n977\n976\n975\n974\n973\n972\n971\n970\n969\n968\n967\n966\n965\n964\n963\n962\n961\n960\n959\n958\n957\n956\n955\n954\n953\n952\n951\n950\n949\n948\n947\n946\n945...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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: Flick input\n\nA college stud...
[{"type": "stdin_stdout", "input": "5R3D", "output": "neso\n"}, {"type": "stdin_stdout", "input": "5D2R", "output": "noke\n"}, {"type": "stdin_stdout", "input": "5T2D", "output": "nako\n"}, {"type": "stdin_stdout", "input": "5D3R", "output": "nose\n"}, {"type": "stdin_stdout", "input": "5U2D", "output": "nuko\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\nDr. Moriarty is about to send a ...
[{"type": "stdin_stdout", "input": "ksmbytfyhhnstlecripupiwdhbkhfpfmimrbqgszohcqnezcybvwasxmkxfupvuecsctcpadccnqexsglwaiyxcoyheefcjmdedesgjqdtqgrvfjonzesffousooutsjumrxl\nhgjqihcfbnmgufonaiudbjegexexthrzcdkuimwogpbyovemztzcmqnrbhabxyyxyfuzpyhjgnioexbezzupcxlyzuuncstiiqsjzdtqppqhxilvqimlpjejiqbwpeekzweeyvthvjffgfvqauqru...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMasha really loves algebra. On t...
[{"type": "stdin_stdout", "input": "-3 0 92055 36\n-92974174 -486557474 -663622151 695596393 177960746 -563227474 -364263320 -676254242 -614140218 71456762 -764104225 705056581 -106398436 332755134 -199942822 -732751692 658942664 677739866 886535704 183687802 -784248291 -22550621 -938674499 637055091 -704750213 7803958...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTanya is learning how to add num...
[{"type": "stdin_stdout", "input": "6\n17236 1106911\n1 5\n108 112\n12345 1023412\n1 11\n1 20\n", "output": "3465\n4\n-1\n90007\n10\n-1\n"}, {"type": "stdin_stdout", "input": "6\n17236 1106911\n1 5\n108 112\n12345 1023412\n1 11\n1 20\n", "output": "3465\n4\n-1\n90007\n10\n-1\n"}, {"type": "stdin_stdout", "input": "6\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\nYour task is to determine how ma...
[{"input": "[4, 8, 15, 16, 23, 42]\n108", "output": "[6]", "fn_name": "save"}, {"input": "[11, 13, 15, 17, 19]\n8", "output": "[0]", "fn_name": "save"}, {"input": "[4, 4, 4, 3, 3]\n12", "output": "[3]", "fn_name": "save"}, {"input": "[4, 4, 4, 3, 3]\n11", "output": "[2]", "fn_name": "save"}, {"input": "[1, 2, 3, 4]\n25...
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 is an integer sequence of ...
[{"type": "stdin_stdout", "input": "10\n0 -1 1 1 3 3 4 8 13 23 34", "output": "360\n"}, {"type": "stdin_stdout", "input": "10\n-1 0 1 0 2 3 5 8 13 21 34", "output": "421\n"}, {"type": "stdin_stdout", "input": "10\n0 -1 1 1 3 4 4 8 13 23 34", "output": "358\n"}, {"type": "stdin_stdout", "input": "10\n-1 0 1 0 2 3 5 8 13...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 mathematics, a matrix (plural...
[{"input": "[[7, 3], [2, 5], [6, 8], [9, 0]]\n[[7, 4, 9], [8, 1, 5]]", "output": "[[[73, 31, 78], [54, 13, 43], [106, 32, 94], [63, 36, 81]]]", "fn_name": "getMatrixProduct"}, {"input": "[[1, 0.5], [-0.5, 1]]\n[[5, 0.25], [2, 0.5]]", "output": "[[[6.0, 0.5], [-0.5, 0.375]]]", "fn_name": "getMatrixProduct"}, {"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\nVasya and Petya take part in a C...
[{"type": "stdin_stdout", "input": "26\n3 -1 71 -1 42\n85 72 48 38 -1\n-1 -1 66 24 -1\n46 -1 60 99 107\n53 106 51 -1 104\n-1 17 135 54 -1\n44 107 66 65 102\n47 40 62 34 5\n-1 10 -1 98 -1\n-1 69 47 85 75\n12 62 -1 15 -1\n48 63 72 32 99\n116 104 111 -1 -1\n92 -1 52 -1 11\n118 25 97 1 108\n-1 78 97 37 -1\n87 47 -1 -1 21\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 an experienced Codeforce...
[{"type": "stdin_stdout", "input": "5\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n162133301 999999998 999999998 999999999\n", "output": "899999999100000001\n449999999550000002\n899999999100000001\n449999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 might know some pretty large...
[{"input": "15241383936", "output": "[15241630849]", "fn_name": "find_next_square"}, {"input": "319225", "output": "[320356]", "fn_name": "find_next_square"}, {"input": "342786627", "output": "[-1]", "fn_name": "find_next_square"}, {"input": "121", "output": "[144]", "fn_name": "find_next_square"}, {"input": "625", "ou...
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\nTsuruga Castle, a symbol of Aizu...
[{"type": "stdin_stdout", "input": "8\n106\n29\n127\n11\n41\n39\n2\n5\n4\n67\n81\n78\n65\n0", "output": "2\n1\n1\n1\n1\n0\n2\n0\n0\n0\n0\n0\n0\n4\n"}, {"type": "stdin_stdout", "input": "8\n001\n21\n127\n11\n41\n39\n2\n5\n4\n67\n81\n78\n65\n0", "output": "3\n1\n1\n1\n1\n0\n1\n0\n0\n0\n0\n0\n0\n4\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\nRecently, Tokitsukaze found an i...
[{"type": "stdin_stdout", "input": "1000000000000000000 20 365\n31881893160049984 103938857870698567 103962228223609431 140762820261865064 175962215264653912 239086305245565642 354522451098745823 383839975876242372 443471287955807705 478923027151493682 511195154588214957 619570919279066139 677571312513476877 7058647976...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOmkar's most recent follower, Aj...
[{"type": "stdin_stdout", "input": "4\n3 4\n0000\n00#0\n0000\n2 1\n#\n#\n1 2\n##\n6 29\n#############################\n#000##0###0##0#0####0####000#\n#0#0##00#00##00####0#0###0#0#\n#0#0##0#0#0##00###00000##00##\n#000##0###0##0#0##0###0##0#0#\n#############################\n", "output": "\n2\n3\n3\n319908071\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\nMonocarp plays \"Rage of Empires...
[{"type": "stdin_stdout", "input": "71\n76468 749982 526217 695732 169602 557600 719698 698344 105043 522755 113036 693415 502619 741227 932643 534995 954172 87407 742242 172680 901819 194280 523575 413309 242835 918390 108115 823507 810672 916889 407735 504768 301602 942625 742419 779364 595511 775444 721352 115825 45...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 right triangle with l...
[{"type": "stdin_stdout", "input": "1000 1000\n", "output": "YES\n0 0\n280 960\n-960 280\n"}, {"type": "stdin_stdout", "input": "455 470\n", "output": "YES\n0 0\n273 364\n-376 282\n"}, {"type": "stdin_stdout", "input": "440 330\n", "output": "YES\n0 0\n264 352\n-264 198\n"}, {"type": "stdin_stdout", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp found on the street an ...
[{"type": "stdin_stdout", "input": "10\n5\n4 3 1 5 2\n5\n1 5 1 1 5\n5\n4 1 2 1 2\n5\n5 5 6 1 4\n5\n5 2 4 5 4\n5\n3 1 2 3 4\n5\n1 3 9 4 1\n5\n5 2 10 5 4\n5\n1 1 2 3 2\n4\n2 2 5 1\n", "output": "2\n0\n0\n2\n2\n2\n1\n2\n1\n1\n"}, {"type": "stdin_stdout", "input": "10\n5\n4 3 1 5 1\n5\n1 4 1 1 3\n5\n4 1 2 1 2\n5\n5 5 5 1 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\nPetya loves football very much. ...
[{"type": "stdin_stdout", "input": "1111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111111\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\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\n# Task\n Given string `s`, which...
[{"input": "\"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyy\"", "output": "[\"zz\"]", "fn_name": "missing_alphabets"}, {"input": "\"abbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy\"", "output": "[\"ayzz\"]", "fn_name": "missing_alphabets"}, {"input": "\"abcdefghijklmnopqrstuvwxy\"", "output": "[\"z\"]", "fn_name"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a complete directe...
[{"type": "stdin_stdout", "input": "1\n132 8 1257\n", "output": "5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 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\nAshish has $n$ elements arranged...
[{"type": "stdin_stdout", "input": "10\n8\n94616 28275 43594 32192 68030 82703 84250 96281\n1 0 0 0 0 0 0 0\n5\n28821 83833 62399 69723 77684\n1 1 0 1 1\n8\n115822 94805 71389 67802 43519 34364 17842 98783\n0 1 0 1 0 1 0 0\n3\n63630 83145 89435\n1 1 1\n5\n66195 67879 10777 54269 80789\n1 1 1 1 0\n8\n42696 26113 2424 33...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 characters have been om...
[{"type": "stdin_stdout", "input": "20\n01001100001100011011\n00111101001100001101\n01010010000010000110\n10101001000000000110\n00110110111101100000\n00111010110011100011\n01101000111001110100\n11111100011110000100\n11111010011110011000\n10001100000101100101\n11001111010010100011\n00001111001001111111\n1001111000010100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCongratulations! That Special So...
[{"input": "\"+447+4435512555\"", "output": "[\"Plenty more fish in the sea\"]", "fn_name": "validate_number"}, {"input": "\"+337535512555\"", "output": "[\"Plenty more fish in the sea\"]", "fn_name": "validate_number"}, {"input": "\"075335440555\"", "output": "[\"Plenty more fish in the sea\"]", "fn_name": "validate_n...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven the number n, find the sma...
[{"type": "stdin_stdout", "input": "118\n", "output": "864691128455135232"}, {"type": "stdin_stdout", "input": "473\n", "output": "259700248434180096"}, {"type": "stdin_stdout", "input": "940\n", "output": "199495389743677440"}, {"type": "stdin_stdout", "input": "265\n", "output": "364791569817010176"}, {"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\n**DESCRIPTION:**\n\n Your stric...
[{"input": "8\n10", "output": "[[3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]]", "fn_name": "side_len"}, {"input": "5\n12", "output": "[[8, 9, 10, 11, 12, 14, 15, 16]]", "fn_name": "side_len"}, {"input": "4\n6", "output": "[[3, 4, 5, 6, 7, 8, 9]]", "fn_name": "side_len"}, {"input": "3\n4", "output": "[[2, 3, 4, 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\nIn this Kata you are a builder a...
[{"input": "10\n7", "output": "[\"\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\n\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0\\n\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u25a0\\u25a0|\\u...
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# Task:\n\nWe define the \"self ...
[{"input": "7\n11", "output": "[[false, -1]]", "fn_name": "min_length_num"}, {"input": "10\n20", "output": "[[true, 17]]", "fn_name": "min_length_num"}, {"input": "5\n10", "output": "[[true, 10]]", "fn_name": "min_length_num"}, {"input": "7\n14", "output": "[[true, 13]]", "fn_name": "min_length_num"}, {"input": "8\n16"...
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\nAthenaeus has just finished crea...
[{"type": "stdin_stdout", "input": "5\n6\n1 2 2 2 5 11\n2\n2 4\n6\n1 1 3 4 4 10\n1\n1\n6\n1 1 1 2 2 2\n", "output": "5\n2\n6\n1\n3\n"}, {"type": "stdin_stdout", "input": "5\n6\n1 2 2 4 6 11\n2\n1 4\n6\n1 1 1 4 4 10\n1\n1\n6\n1 1 2 2 2 2\n", "output": "6\n2\n5\n1\n3\n"}, {"type": "stdin_stdout", "input": "5\n6\n2 2 2 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're given an ancient book tha...
[{"input": "[1, 2, 3000, 3, 4, 5, 8, 6, 7, 8, 100, 9, 40, 10, 11, 13]", "output": "[[3000, 8, 100, 40, 13]]", "fn_name": "find_page_number"}, {"input": "[1, 2, 3, 4, 50, 5, 6, 7, 51, 8, 40, 9]", "output": "[[50, 51, 40]]", "fn_name": "find_page_number"}, {"input": "[4, 1, 2, 3, 3, 4, 26, 5, 6, 2, 7]", "output": "[[4, 3...
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 magic island Geraldion, where ...
[{"type": "stdin_stdout", "input": "50\n474421 421097 217233 156339 27075 733996 281778 863492 184707 956857 288561 70997 393786 337382 663642 131184 637 273801 799870 295017 392338 842567 161819 297705 102013 930684 375703 838048 154915 138503 629056 256591 893619 19263 787927 684541 320265 841090 421423 490879 394582...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 can find anything whatsoever...
[{"type": "stdin_stdout", "input": "1 0 0\n0 0 0\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1 1 1\n0 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "0 0 1\n1 0 0\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1 0 0\n0 1 0\n", "output": "YES\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\nFor the given integer $n$ ($n > ...
[{"type": "stdin_stdout", "input": "2\n39776 83767477\n50000 1249975000\n", "output": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 started to attend programm...
[{"type": "stdin_stdout", "input": "FSNRBXLFQHZXGVMKLQDVHWLDSLKGKFMDRQWMWSSKPKKQBNDZRSCBLRSKCKKFFKRDMZFZGCNSMXNPMZVDLKXGNXGZQCLRTTDXLMXQ\n", "output": ".f.s.n.r.b.x.l.f.q.h.z.x.g.v.m.k.l.q.d.v.h.w.l.d.s.l.k.g.k.f.m.d.r.q.w.m.w.s.s.k.p.k.k.q.b.n.d.z.r.s.c.b.l.r.s.k.c.k.k.f.f.k.r.d.m.z.f.z.g.c.n.s.m.x.n.p.m.z.v.d.l.k.x.g...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSoon a school Olympiad in Inform...
[{"type": "stdin_stdout", "input": "3000000\n1000000 1000000\n1000000 1000000\n1000000 1000000\n", "output": "1000000 1000000 1000000 \n"}, {"type": "stdin_stdout", "input": "3000000\n1000000 1000000\n1000000 1000000\n1000000 1000000\n", "output": "1000000 1000000 1000000\n"}, {"type": "stdin_stdout", "input": "1629279...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\"We've tried solitary confineme...
[{"type": "stdin_stdout", "input": "98\n-99 -98 -95 -90 97 93 96 95 98 98 -94 -92 -99 -92 -91 -87 -83 -84 -87 -88 -90 -79 -79 -82 -77 -76 92 82 91 91 90 91 -69 -72 -65 -68 -65 -58 -59 -63 -56 -57 -59 -53 -55 -45 -51 -52 73 81 75 71 77 72 67 70 60 70 61 64 -34 -41 -41 -41 -37 -39 -36 -33 -36 -36 -33 -36 54 49 53 51 50 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tube which is re...
[{"type": "stdin_stdout", "input": "13 968288\n0 67108864 134217728 201326592 268435456 335544320 402653184 469762048 536870912 603979776 671088640 738197504 805306368\n13 986214\n33554432 100663296 167772160 234881024 301989888 369098752 436207616 503316480 570425344 637534208 704643072 771751936 838860800\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\nAn n × n table a is defined as f...
[{"type": "stdin_stdout", "input": "010\n", "output": "48620\n"}, {"type": "stdin_stdout", "input": "10\n", "output": "48620\n"}, {"type": "stdin_stdout", "input": "10\n", "output": "48620"}, {"type": "stdin_stdout", "input": "9\n", "output": "12870\n"}, {"type": "stdin_stdout", "input": "9\n", "output": "12870"}, {"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\nVasya has two arrays $A$ and $B$...
[{"type": "stdin_stdout", "input": "49\n18 1 7 2 1 1 50 22 8 2 2 1 30 2 46 10 1 4 5 18 25 21 38 11 2 15 29 8 7 2 45 12 14 16 16 23 11 1 1 4 48 18 3 1 1 23 4 10 7\n50\n5 25 34 22 19 4 4 2 40 52 1 4 1 3 47 9 4 1 8 47 4 5 1 1 9 22 9 2 2 1 1 48 7 2 8 16 4 2 41 12 3 30 21 10 2 2 5 1 31 13\n", "output": "14\n"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYoung Teodor enjoys drawing. His...
[{"type": "stdin_stdout", "input": "43 1319\n750 1030\n857 946\n941 1203\n407 1034\n1052 1290\n546 585\n630 1201\n133 342\n693 1315\n34 719\n176 1097\n39 931\n198 885\n3 1025\n892 1054\n461 1287\n195 1273\n832 1039\n308 955\n642 866\n770 838\n440 777\n289 948\n98 814\n458 768\n82 265\n300 596\n182 706\n368 1225\n237 62...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 reads a se...
[{"type": "stdin_stdout", "input": "8\n-2 0 0 32 -1 -2 153 26", "output": "26 153 -2 -1 32 0 0 -2\n"}, {"type": "stdin_stdout", "input": "8\n-2 0 0 32 -2 -2 153 26", "output": "26 153 -2 -2 32 0 0 -2\n"}, {"type": "stdin_stdout", "input": "8\n-2 1 0 32 -2 -2 153 26", "output": "26 153 -2 -2 32 0 1 -2\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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n6\n0 0 4 1 1 2\n0 -1 1 0 1 4\n1 0 1 1 1 3\n0 0 2 1 1 2\n3 0 0 4 4 7\n0 0 2 1 4 0", "output": "Scalene obtuse triangle\nScalene obtuse triangle\nScalene obtuse triangle\nIsosceles acute triangle\nIsosceles right triangle\nIsosceles obtuse triangle\n"}, {"type": "stdin_stdout", "inp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja has an array a, consistin...
[{"type": "stdin_stdout", "input": "10 10\n1 2 3 4 1 2 3 4 100000 99999\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n", "output": "6\n6\n6\n6\n6\n5\n4\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "10 10\n1 2 3 4 1 2 3 4 100000 99999\n1\n2\n3\n4\n5\n6\n7\n7\n9\n10\n", "output": "6\n6\n6\n6\n6\n5\n4\n4\n2\n1\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\nVanya got an important task — he...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "8888888899\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "8888888899\n"}, {"type": "stdin_stdout", "input": "222222222\n", "output": "1888888896\n"}, {"type": "stdin_stdout", "input": "943006819\n", "output": "8375950269\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\nGiven an integer, take the (mean...
[{"input": "3700", "output": "[4]", "fn_name": "digits_average"}, {"input": "246", "output": "[4]", "fn_name": "digits_average"}, {"input": "245", "output": "[4]", "fn_name": "digits_average"}, {"input": "345", "output": "[5]", "fn_name": "digits_average"}, {"input": "346", "output": "[5]", "fn_name": "digits_average"}...
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\nDmitry has an array of $n$ non-n...
[{"type": "stdin_stdout", "input": "5\n3\n0 1 3\n7\n0 2 2 3 4 3 2\n4\n3 0 0 0\n7\n4 6 2 3 5 0 5\n5\n4 0 1 0 4\n", "output": "1 1 0 -1 \n1 0 -1 -1 -1 -1 -1 -1 \n3 0 1 4 3 \n1 0 -1 -1 -1 -1 -1 -1 \n2 1 0 2 -1 -1 \n"}, {"type": "stdin_stdout", "input": "5\n3\n0 1 3\n7\n0 2 2 3 4 3 2\n4\n3 1 0 0\n7\n4 6 2 3 5 0 5\n5\n4 0 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 tree with N vertices. ...
[{"type": "stdin_stdout", "input": "1000\n1 1 2 3 4 5 5 7 8 9 10 11 12 12 14 14 15 16 18 19 20 19 20 23 24 24 25 27 28 29 30 31 32 32 32 35 36 36 38 39 39 41 42 42 43 45 45 47 48 49 50 50 52 52 53 55 56 57 57 59 59 61 62 62 64 64 66 67 67 69 70 70 71 72 73 73 76 77 78 79 79 81 82 83 83 84 86 87 87 88 90 91 91 92 94 95 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt's another Start[c]up finals, ...
[{"type": "stdin_stdout", "input": "25 6\n1 10 5\n1 8 4\n1 8 2\n4 8 9\n3 2 8\n1 9 5\n2 10 10\n3 9 6\n3 5 4\n2 7 8\n2 3 2\n2 6 8\n3 7 8\n4 3 7\n1 8 1\n3 6 4\n3 2 8\n2 2 1\n4 8 8\n4 15 4\n3 10 2\n3 6 6\n2 2 5\n1 6 2\n4 1 5\n", "output": "477\n"}, {"type": "stdin_stdout", "input": "25 6\n1 10 5\n1 8 4\n1 8 2\n4 8 9\n3 2 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\nKevin has just recevied his disa...
[{"type": "stdin_stdout", "input": "93\n010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\n", "output": "93\n"}, {"type": "stdin_stdout", "input": "93\n010101000101010101010101010101010101010101010101010101010101010101010101010101010101010101010\n", "output": "93\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\nRecently, Vladimir got bad mark ...
[{"type": "stdin_stdout", "input": "1000 1000 999 1000\n* * *\n", "output": "999000000000\n"}, {"type": "stdin_stdout", "input": "720 903 589 804\n* * *\n", "output": "307887168960\n"}, {"type": "stdin_stdout", "input": "573 598 1387 124\n* * *\n", "output": "58932376152\n"}, {"type": "stdin_stdout", "input": "739 903 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 loves numbers divisibl...
[{"type": "stdin_stdout", "input": "100\n", "output": "64\n"}, {"type": "stdin_stdout", "input": "32\n", "output": "32\n"}, {"type": "stdin_stdout", "input": "101", "output": "64\n"}, {"type": "stdin_stdout", "input": "111", "output": "64\n"}, {"type": "stdin_stdout", "input": "110", "output": "64\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\nThe Resistance is trying to take...
[{"type": "stdin_stdout", "input": "10\n4 3\n2 10\n10 1\n5 7\n9 8\n10 6\n5 10\n1 3\n2 9\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n4 1\n2 10\n10 1\n5 7\n3 8\n10 6\n5 9\n1 3\n1 9\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n4 3\n2 10\n10 1\n5 7\n5 8\n10 6\n5 9\n1 3\n1 9\n", "output": "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\nGiven a string of words (x), you...
[{"input": "\"what time are we climbing up the volcano\"", "output": "[[\"time\", \"are\", \"we\", \"the\", \"climbing\", \"volcano\", \"up\", \"what\"]]", "fn_name": "last"}, {"input": "\"man i need a taxi up to ubud\"", "output": "[[\"a\", \"need\", \"ubud\", \"i\", \"taxi\", \"man\", \"to\", \"up\"]]", "fn_name": "l...
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\nRecently, the bear started study...
[{"type": "stdin_stdout", "input": "9\n9999991 9999943 9999883 4658161 4657997 2315407 2315263 1000003 1000033\n13\n9999991 9999991\n9999943 9999943\n9999883 9999883\n4658161 4658161\n4657997 4657997\n2315407 2315407\n2315263 2315263\n1000003 1000003\n1000033 1000033\n2 2000000000\n2000000000 2000000000\n9999992 200000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarpus develops an interesti...
[{"type": "stdin_stdout", "input": "20\n-1 32 37 -1 -1 -1 57 -1 -1 40 31 33 -1 -1 39 47 43 -1 35 32\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "20\n-1 32 37 -1 -1 -1 57 -1 -1 40 31 33 -1 -1 39 47 43 -1 35 32\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "19\n23 26 -1 -1 35 38 41 -1 -1 -1 53 -1 59...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDreamoon loves summing up someth...
[{"type": "stdin_stdout", "input": "10000000 10000000\n", "output": "425362313\n"}, {"type": "stdin_stdout", "input": "10000000 10000000\n", "output": "425362313\n"}, {"type": "stdin_stdout", "input": "10000000 11383836\n", "output": "113242098\n"}, {"type": "stdin_stdout", "input": "10000100 10000000\n", "output": "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\nMonocarp and Polycarp are learni...
[{"type": "stdin_stdout", "input": "5\n\n3 2 2\n2 0\n0 5\n\n4 3 2\n2 0 5\n0 6\n\n0 2 2\n1 0\n2 3\n\n5 4 4\n6 0 8 0\n0 7 0 9\n\n5 4 1\n8 7 8 0\n0\n", "output": "0 2 0 5 \n0 2 0 5 6 \n-1\n0 6 0 7 0 8 0 9 \n-1\n"}, {"type": "stdin_stdout", "input": "5\n\n3 2 2\n2 0\n0 5\n\n4 3 2\n2 0 5\n0 6\n\n0 2 2\n1 0\n3 3\n\n5 4 4\n6 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFlatland has recently introduced...
[{"type": "stdin_stdout", "input": "38\n96 416\n24 104\n6 26\n12 52\n210 910\n150 650\n54 234\n174 754\n114 494\n18 78\n90 390\n36 156\n222 962\n186 806\n126 546\n78 338\n108 468\n180 780\n120 520\n84 364\n66 286\n138 598\n30 130\n228 988\n72 312\n144 624\n198 858\n60 403\n48 208\n102 442\n42 182\n162 702\n132 572\n156...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "\"BGHHGB\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "\"11029\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "-1029", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "1029", "output": "[1001]", "fn_name": "palindrome"}, {"input": "1221", "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\nHave you heard about Megamind? M...
[{"input": "100000\n1\n50000\n49999", "output": "[2500050000]", "fn_name": "mega_mind"}, {"input": "100000\n100000\n100000\n100000", "output": "[1]", "fn_name": "mega_mind"}, {"input": "100000\n99999\n100000\n100000", "output": "[2]", "fn_name": "mega_mind"}, {"input": "100000\n1\n1000\n999", "output": "[99001000]", "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\nIn some other world, today is Ch...
[{"type": "stdin_stdout", "input": "3 2\n1\n500000000\n1000000000\n", "output": "499999999\n"}, {"type": "stdin_stdout", "input": "5 3\n10\n15\n11\n14\n12\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "3 3\n10\n15\n33\n14\n12", "output": "23\n"}, {"type": "stdin_stdout", "input": "4 3\n10\n21\n21\n-1\n10", "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\nWrite a program which computes t...
[{"type": "stdin_stdout", "input": "20\n100", "output": "68440000\n55000000\n"}, {"type": "stdin_stdout", "input": "20\n120", "output": "68440000\n51840000\n"}, {"type": "stdin_stdout", "input": "20\n150", "output": "68440000\n47250000\n"}, {"type": "stdin_stdout", "input": "20\n200", "output": "68440000\n40000000\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 the programmer lives in th...
[{"type": "stdin_stdout", "input": "999999 1000000\n", "output": "Equal\n"}, {"type": "stdin_stdout", "input": "999997 1000000\n", "output": "Dasha\n"}, {"type": "stdin_stdout", "input": "1000000 999993\n", "output": "Masha\n"}, {"type": "stdin_stdout", "input": "999997 1000001\n", "output": "Dasha\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\nThe screen that displays digital...
[{"type": "stdin_stdout", "input": "3\n0\n5\n1\n1\n1\n-1", "output": "0111111\n1010010\n1101011\n0000110\n"}, {"type": "stdin_stdout", "input": "3\n0\n9\n1\n1\n0\n-1", "output": "0111111\n1010000\n1101001\n0111111\n"}, {"type": "stdin_stdout", "input": "3\n0\n5\n1\n1\n2\n-1", "output": "0111111\n1010010\n1101011\n10110...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 decided to play a game...
[{"type": "stdin_stdout", "input": "2 22\n1 9\n5 9\n4 5\n4 9\n0 1\n0 12\n2 4", "output": "2\n2\n2\n2\n2\n2\n2\n2\n2\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "2 18\n1 9\n5 9\n4 5\n4 9\n0 1\n0 12\n2 4", "output": "2\n2\n2\n2\n2\n2\n2\n2\n2\n0\n0\n0\n0\n0\n0\n0\n0\n0\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\nThe new operating system BerOS h...
[{"type": "stdin_stdout", "input": "/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\n", "output": "/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "/a/a/a/a/a/a/a/a/a/a/a/a/a/...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently, on the course of algor...
[{"type": "stdin_stdout", "input": "71 57\n9 26 80 10 65 60 63 1 15 85 71 1 58 27 41 97 42 15 42 56 87 22 10 28 34 90 13 70 71 56 65 21 0 78 47 191 56 77 32 83 28 16 10 41 0 18 92 12 27 58 4 67 21 41 99 20 21 52 74 10 83 45 43 65 2 15 1 63 46 97 72\n150\n21\n81\n81\n5\n9\n41\n76\n81\n92\n95\n94\n78\n93\n47\n30\n92\n3\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\nWhile working at DTL, Ela is ver...
[{"type": "stdin_stdout", "input": "10\n84693792843120399 722933352461265626\n1054414613006002 919996041213106080\n141147461122848960 215953152568344802\n36758866361588362 220526816065597583\n135781915245644528 740842808859507601\n49755792151684097 147448792408078224\n101352931056782000 386376107245094465\n480981404419...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of integers ...
[{"type": "stdin_stdout", "input": "4\n7 6\n1 1 2 3 4 5 6\n5 2\n5 1 3 2 3\n5 2\n5 5 5 5 4\n8 4\n1 3 3 3 1 2 5 5\n", "output": "1\n2\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "4\n7 6\n1 1 2 3 4 5 6\n5 2\n5 1 3 2 3\n5 2\n5 5 5 5 4\n8 4\n1 2 3 3 2 2 5 5\n", "output": "1\n2\n-1\n2\n"}, {"type": "stdin_stdout", "input"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe held two competitions: Coding...
[{"type": "stdin_stdout", "input": "1 001", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "10 001", "output": "300000\n"}, {"type": "stdin_stdout", "input": "11 001", "output": "300000\n"}, {"type": "stdin_stdout", "input": "3 001", "output": "400000\n"}, {"type": "stdin_stdout", "input": "5 001", "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\nWe have an integer sequence A, w...
[{"type": "stdin_stdout", "input": "7\n-1 -4 0 -20 -1 0 0", "output": "4\n"}, {"type": "stdin_stdout", "input": "7\n0 -1 1 -1 1 -1 1", "output": "13\n"}, {"type": "stdin_stdout", "input": "7\n0 -1 0 -5 0 -1 -3", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n0 -1 0 -5 0 -2 -3", "output": "3\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\nLittle Petya very much likes pla...
[{"type": "stdin_stdout", "input": "1110110101111111001111111110111011100001110111011001011111111111011010011111?111111?011111110001010110011111010111100111?111101010011101010?011111101010111111111101111010111?1111111100110110001111101111100100110011101111011110111000111?011110?111110?1011010111101111101111010100111110...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an integer N not less than...
[{"type": "stdin_stdout", "input": "-636", "output": "-114840\n"}, {"type": "stdin_stdout", "input": "-729", "output": "-131580\n"}, {"type": "stdin_stdout", "input": "-102", "output": "-18720\n"}, {"type": "stdin_stdout", "input": "-161", "output": "-29340\n"}, {"type": "stdin_stdout", "input": "-151", "output": "-275...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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---\n\n# Story\n\nThe Pied Piper...
[{"input": "\"O~~OO~~OO~~OO~P~OO~~OO~~OO~~O\"", "output": "[8]", "fn_name": "count_deaf_rats"}, {"input": "\" P \"", "output": "[0]", "fn_name": "count_deaf_rats"}, {"input": "\"~O~O~O~OP~O~OO~\"", "output": "[2]", "fn_name": "count_deaf_rats"}, {"input": "\"P O~ O~ ~O O~\"", "output": "[1]", "fn_name": "c...
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\nYour task is to make two functio...
[{"input": "[-52, 56, 30, 29, -54, 0, -110]", "output": "[-110]", "fn_name": "minimum"}, {"input": "[-1, -2, -3, -4, -5, -10]", "output": "[-10]", "fn_name": "minimum"}, {"input": "[42, 54, 65, 87, 0]", "output": "[0]", "fn_name": "minimum"}, {"input": "[1, 2, 3, 4, 5, 10]", "output": "[1]", "fn_name": "minimum"}, {"in...
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 math faculty of Berland Stat...
[{"type": "stdin_stdout", "input": "100\n1 2 1 2 1 2 1 2 1 3 1 3 1 2 1 3 1 2 1 3 1 2 1 3 1 2 1 2 1 3 1 2 1 2 1 3 1 3 1 2 1 2 1 3 1 2 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 2 1 3 1 3 1 3 1 2 1 2 1 2 1 2 1 2 1 2 1 3 1 3 1 2 1 2 1 2 1 3 1 2 1 3 1 2 1 2\n", "output": "Finite\n331\n"}, {"type": "stdin_stdout", "input": "100\n2 1 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\nABC Gene\n\nThere is a gene sequ...
[{"type": "stdin_stdout", "input": "BAC", "output": "No\n"}, {"type": "stdin_stdout", "input": "ACB", "output": "No\n"}, {"type": "stdin_stdout", "input": "CAB", "output": "No\n"}, {"type": "stdin_stdout", "input": "CBA", "output": "No\n"}, {"type": "stdin_stdout", "input": "ACA", "output": "No\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\nVasya plays The Elder Trolls IV:...
[{"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 1001000 1000000000\n", "output": "1001000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 1011000 1000000000\n", "output": "10110000000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, I've finally done i...
[{"type": "stdin_stdout", "input": "URQDE ERQSQN", "output": "TSE?DV E?GT'PA\n"}, {"type": "stdin_stdout", "input": "UEQDR ERQSQN", "output": "TTJ'GF E?GT'PA\n"}, {"type": "stdin_stdout", "input": "RDQEU ERQSQN", "output": "QGP-HF E?GT'PA\n"}, {"type": "stdin_stdout", "input": "QDQEU ERQSQN", "output": "T,M? OLUJ'NH,'\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 strings A and ...
[{"type": "stdin_stdout", "input": "175 190\nqnnnnnnnnnnrnnnnrnrnnnnnrnnnnrqnnnnnnannnnnnnrnrrnrnnnnnrnnrnnnnnnrnrnnnnnrnnnannnrrnnnnrnnnnnnnnnnnrnannnnnrnnnnrnnnnrnnnnnnrnarnnnnnnnnanrnnnnnnnrnnrrnrnrrnnnnnrnnnnnrnnnnnn\nnnnnnrnnnnrnnnnnrnnnnnnrnnqnnnnnnrnnnnnnnrnnrnnnnrnqnannnnnnnannnnnnnrnrnnnrnnnnrnnnnnnnrrnqnnnnnn...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOf course you have heard the fam...
[{"type": "stdin_stdout", "input": "15\n1 30 1409523818\n12 13 463027806\n9 14 846985104\n20 21 770345346\n17 22 514758030\n2 15 438137019\n18 19 331182033\n16 29 613043570\n10 19 765879041\n6 7 960155075\n13 27 323764310\n24 25 724736351\n4 9 107208241\n3 8 992951987\n23 28 125300818\n", "output": "6581903942\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\n# Introduction \n\nHamsters are ...
[{"input": "\"f\"\n\"abcdefghijklmnopqrstuvwxyz\"", "output": "[\"f22f23f24f25f26f1f2f3f4f5f6f7f8f9f10f11f12f13f14f15f16f17f18f19f20f21\"]", "fn_name": "hamster_me"}, {"input": "\"hhhhammmstteree\"\n\"hamster\"", "output": "[\"h1a1m1s1t1e1r1\"]", "fn_name": "hamster_me"}, {"input": "\"hamster\"\n\"hamster\"", "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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n2 10\n123 150", "output": "44\n272\n"}, {"type": "stdin_stdout", "input": "2\n1 10\n123 150", "output": "45\n272\n"}, {"type": "stdin_stdout", "input": "2\n1 10\n123 150", "output": "45\n272"}, {"type": "stdin_stdout", "input": "2\n1 7\n100 112", "output": "28\n212\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\nCreate a program that converts d...
[{"type": "stdin_stdout", "input": "3\nA a\n0 5\n5 4\n10\nB\nB\nC\n0\n1\n4\n5\na\nb\nA\n3\nA a\n0 5\n5 4\n10\nA\nB\nC\n0\n1\n4\n5\na\nb\nA\n0", "output": "BBC5144aba\naBC5144aba\n"}, {"type": "stdin_stdout", "input": "3\nA a\n0 0\n5 4\n10\nB\nB\nC\n0\n1\n4\n5\na\nb\nA\n3\nA a\n0 5\n5 4\n10\nA\nB\nC\n0\n1\n4\n5\na\nb\nA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tree consisting ...
[{"type": "stdin_stdout", "input": "20\n4 1 3 4 7 3 8 7 7 3 1 1 7 1 9 5 1 10 6 3\n6 15\n12 11\n18 1\n9 17\n8 1\n1 20\n13 7\n10 15\n20 19\n10 16\n8 5\n2 11\n14 3\n6 1\n1 12\n3 18\n6 4\n8 13\n9 18\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n7 4 6 7 6 6 7 5 7 5\n8 7\n4 5\n9 6\n2 5\n4 8\n9 10\n4 3\n9 4\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\nOnce upon a time a child got a t...
[{"type": "stdin_stdout", "input": "A.He_nan_de_yang_guang_zhao_yao_zhe_wo_men_mei_guo_ren_lian_shang_dou_xiao_kai_yan_wahaaaaaaaaaaaaaaaa\nB.Li_bai_li_bai_fei_liu_zhi_xia_san_qian_chi_yi_si_yin_he_luo_jiu_tian_li_bai_li_bai_li_bai_li_bai_shi\nC.Peng_yu_xiang_shi_zai_tai_shen_le_jian_zhi_jiu_shi_ye_jie_du_liu_a_si_mi_d...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSensation, sensation in the two-...
[{"type": "stdin_stdout", "input": "10\nUR\nDR\nUL\nDR\nUL\nULDR\nUR\nUL\nULDR\nUL\n", "output": "45\n"}, {"type": "stdin_stdout", "input": "10\nUL\nUL\nUL\nUL\nUL\nUL\nUL\nUL\nUL\nUL\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "10\nUL\nUR\nUR\nDR\nDR\nDR\nDL\nDL\nDL\nDL\n", "output": "35\n"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the greatest common divisor...
[{"input": "1590771464\n1590771620", "output": "[4]", "fn_name": "mygcd"}, {"input": "10927782\n6902514", "output": "[846]", "fn_name": "mygcd"}, {"input": "2672\n5678", "output": "[334]", "fn_name": "mygcd"}, {"input": "60\n12", "output": "[12]", "fn_name": "mygcd"}, {"input": "1\n3", "output": "[1]", "fn_name": "mygc...
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\nBeing a nonconformist, Volodya i...
[{"type": "stdin_stdout", "input": "1000000000000 1000000000000\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 1276759536556\n", "output": "1553519073112\n"}, {"type": "stdin_stdout", "input": "1000000000000 1000000000000\n", "output": "1000000000000"}, {"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\nToday, Mezo is playing a game. Z...
[{"type": "stdin_stdout", "input": "13\nLRLLLLRRLLRLR\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "13\nLRLLLLRRLLRLR\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "13\nLRLRLLRLLLRLR\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "13\nRLRLLRRLLLLRL\n", "output": "14\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\n# Task\n\nJohn and Alice have an...
[{"input": "10\n-10\n10", "output": "[false]", "fn_name": "is_john_lying"}, {"input": "-5\n-5\n10", "output": "[true]", "fn_name": "is_john_lying"}, {"input": "-5\n-5\n8", "output": "[false]", "fn_name": "is_john_lying"}, {"input": "4\n5\n10", "output": "[false]", "fn_name": "is_john_lying"}, {"input": "3\n3\n6", "outp...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTaro made a sugoroku so that eve...
[{"type": "stdin_stdout", "input": "3\n3\n-1\n1\n-1\n3\n0\n4\n2\n0\n-6\n4\n2\n-1\n-7\n0", "output": "OK\nOK\nOK\nOK\n"}, {"type": "stdin_stdout", "input": "3\n3\n0\n1\n-1\n3\n0\n4\n2\n0\n-6\n4\n2\n-1\n-8\n0", "output": "OK\nOK\nOK\nOK\n"}, {"type": "stdin_stdout", "input": "3\n3\n0\n1\n-1\n3\n0\n4\n2\n0\n-6\n4\n2\n-1\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a binary array A=(...
[{"type": "stdin_stdout", "input": "5 9\n1 1 0 0 1\n2 1 4\n1 3 4\n2 2 5\n2 1 3\n2 1 2", "output": "4\n0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "5 8\n1 1 0 0 1\n2 1 4\n1 3 4\n2 3 5\n2 1 3\n2 1 2", "output": "4\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "5 6\n1 1 0 0 0\n2 3 5\n2 3 4\n2 2 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\nOne day Vasya painted a Cartesia...
[{"type": "stdin_stdout", "input": "30\n507 836\n525 836\n-779 196\n507 -814\n525 -814\n525 42\n525 196\n525 -136\n-779 311\n507 -360\n525 300\n507 578\n507 311\n-779 836\n507 300\n525 -360\n525 311\n-779 -360\n-779 578\n-779 300\n507 42\n525 578\n-779 379\n507 196\n525 379\n507 379\n-779 -814\n-779 42\n-779 -136\n507 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n<image>\n\n\nMy grandmother uses...
[{"type": "stdin_stdout", "input": "5\n11\n731", "output": "1 4\n1 2 8\n1 2 8 16 64 128 512\n"}, {"type": "stdin_stdout", "input": "5\n17\n731", "output": "1 4\n1 16\n1 2 8 16 64 128 512\n"}, {"type": "stdin_stdout", "input": "5\n17\n994", "output": "1 4\n1 16\n2 32 64 128 256 512\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\nPasha has a positive integer a w...
[{"type": "stdin_stdout", "input": "1541326723729813719 14\n", "output": "9541132672372813719\n"}, {"type": "stdin_stdout", "input": "219810011901120912 100\n", "output": "999822211111110000\n"}, {"type": "stdin_stdout", "input": "191919191919119911 100\n", "output": "999999991111111111\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\n# Problem\n\nIn China,there is a...
[{"input": "1\n3\n5", "output": "[103]", "fn_name": "find_unknown_number"}, {"input": "0\n0\n0", "output": "[105]", "fn_name": "find_unknown_number"}, {"input": "2\n3\n2", "output": "[23]", "fn_name": "find_unknown_number"}, {"input": "1\n2\n3", "output": "[52]", "fn_name": "find_unknown_number"}, {"input": "1\n1\n1", ...
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 bracket sequence is a string c...
[{"type": "stdin_stdout", "input": "10\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\nAiz Onsen has a bathhouse and a ...
[{"type": "stdin_stdout", "input": "2\n111 101 -1 -2\n1001 722 131 -3", "output": "-313\n106060\n"}, {"type": "stdin_stdout", "input": "2\n111 001 -1 -2\n1001 722 131 -3", "output": "-113\n106060\n"}, {"type": "stdin_stdout", "input": "2\n111 000 -1 -2\n1001 722 131 -3", "output": "-111\n106060\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\nJett is tired after destroying t...
[{"type": "stdin_stdout", "input": "4\n1\n10\n28\n0111101000000000100\n", "output": "1\n2\n2\n28\n"}, {"type": "stdin_stdout", "input": "4\n1\n10\n28\n0101101000000000100\n", "output": "1\n2\n2\n28\n"}, {"type": "stdin_stdout", "input": "4\n2\n10\n28\n0101101000000000100\n", "output": "1\n2\n2\n28\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\nYou are given an array $a$ consi...
[{"type": "stdin_stdout", "input": "4\n9999991 9999883 9999659 9999433\n", "output": "3 4\n"}, {"type": "stdin_stdout", "input": "4\n9999991 9999883 9999659 9999433\n", "output": "3 4\n"}, {"type": "stdin_stdout", "input": "4\n9999991 5101198 9999659 9999433\n", "output": "2 4\n"}, {"type": "stdin_stdout", "input": "3\...
code_stdio