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\nLet's call a list of positive in...
[{"type": "stdin_stdout", "input": "100\n881 479 355 759 257 497 690 598 275 446 439 787 257 326 436 713 322 5 253 781 434 307 164 154 241 381 38 942 680 906 240 11 431 478 628 1203 346 74 493 964 455 746 950 41 585 549 892 687 264 41 487 676 63 453 861 980 477 901 80 907 285 506 619 748 773 743 56 925 651 685 845 313 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMemory is now interested in the ...
[{"type": "stdin_stdout", "input": "100000 25000\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "100000 25000\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "167552 16353\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "113151 20996\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "1413...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 undirected graph G wi...
[{"type": "stdin_stdout", "input": "2000 999 1001\n", "output": "2000\n1999\n1998\n1997\n1996\n1995\n1994\n1993\n1992\n1991\n1990\n1989\n1988\n1987\n1986\n1985\n1984\n1983\n1982\n1981\n1980\n1979\n1978\n1977\n1976\n1975\n1974\n1973\n1972\n1971\n1970\n1969\n1968\n1967\n1966\n1965\n1964\n1963\n1962\n1961\n1960\n1959\n195...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 t...
[{"type": "stdin_stdout", "input": "3559 9 5\n2425 12 2\n2980 9 14", "output": "heisei 1571 9 5\nheisei 437 12 2\nheisei 992 9 14\n"}, {"type": "stdin_stdout", "input": "3559 9 5\n2425 12 2\n2980 9 7", "output": "heisei 1571 9 5\nheisei 437 12 2\nheisei 992 9 7\n"}, {"type": "stdin_stdout", "input": "3080 6 3\n2027 12 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDwarfs have planted a very inter...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "899770636\n"}, {"type": "stdin_stdout", "input": "148049062285906746\n", "output": "913927498\n"}, {"type": "stdin_stdout", "input": "615812227854199662\n", "output": "357939938\n"}, {"type": "stdin_stdout", "input": "585335721566249104\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\nMake a program that takes a valu...
[{"input": "41535", "output": "[\"BangBoom\"]", "fn_name": "multiple"}, {"input": "10003823", "output": "[\"Miss\"]", "fn_name": "multiple"}, {"input": "30", "output": "[\"BangBoom\"]", "fn_name": "multiple"}, {"input": "15", "output": "[\"BangBoom\"]", "fn_name": "multiple"}, {"input": "45", "output": "[\"BangBoom\"]"...
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 are N points on the circum...
[{"type": "stdin_stdout", "input": "10 100\n2\n11\n35\n42\n54\n69\n89\n91\n93\n99", "output": "0.352886583546338 -0.109065017701873"}, {"type": "stdin_stdout", "input": "10 100\n2\n11\n40\n46\n54\n69\n89\n91\n93\n183", "output": "-0.215229840673 -0.027898226758\n"}, {"type": "stdin_stdout", "input": "10 100\n2\n10\n35\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 least common multiple (...
[{"type": "stdin_stdout", "input": "3\n12 39 11", "output": "1716\n"}, {"type": "stdin_stdout", "input": "4\n1 2 5 24", "output": "120\n"}, {"type": "stdin_stdout", "input": "3\n3 37 10", "output": "1110\n"}, {"type": "stdin_stdout", "input": "4\n1 2 5 44", "output": "220\n"}, {"type": "stdin_stdout", "input": "3\n9 37...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGotou just received a dictionary...
[{"type": "stdin_stdout", "input": "abcdefghijklmnopqrytuvwzsx", "output": "abcdefghijklmnopqrytuvwzx\n"}, {"type": "stdin_stdout", "input": "abcpefghijklmnodqrytuvwzsx", "output": "abcpefghijklmnodqrytuvwzx\n"}, {"type": "stdin_stdout", "input": "azcdefghijklmnopqrstuvwbyx", "output": "azcdefghijklmnopqrstuvwx\n"}, {"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA pair of numbers has a unique L...
[{"input": "101101291", "output": "[5]", "fn_name": "lcm_cardinality"}, {"input": "12345676", "output": "[68]", "fn_name": "lcm_cardinality"}, {"input": "30858025", "output": "[63]", "fn_name": "lcm_cardinality"}, {"input": "1251562", "output": "[41]", "fn_name": "lcm_cardinality"}, {"input": "9801", "output": "[23]", ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem we consider a sp...
[{"type": "stdin_stdout", "input": "100\n2515 3324 7975 6171 4240 1217 4829 5203 8603 6900 3031 4699 4732 6070 4221 3228 6497 7359 9130 4346 4619 1109 3945 5442 3271 16 9711 2045 6410 2301 3406 8125 6003 1892 1260 9661 3940 6692 4708 7027 4930 6925 1979 5361 4263 3144 867 8639 6230 5562 9714 3676 4231 3347 4733 4920 48...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCat Snuke is learning to write c...
[{"type": "stdin_stdout", "input": "119\n", "output": "991\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "111\n"}, {"type": "stdin_stdout", "input": "191\n", "output": "919\n"}, {"type": "stdin_stdout", "input": "111\n", "output": "999\n"}, {"type": "stdin_stdout", "input": "191\n", "output": "919\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\nLee tried so hard to make a good...
[{"type": "stdin_stdout", "input": "7\n2\n2\n6\n8\n5\n110\n1478999\n", "output": "0\n0\n24\n96\n12\n782548134\n793574295\n"}, {"type": "stdin_stdout", "input": "7\n3\n2\n5\n8\n5\n101\n2000000\n", "output": "4\n0\n12\n96\n12\n981997171\n804665184\n"}, {"type": "stdin_stdout", "input": "3\n1234567\n1268501\n1268499\n", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA famous gang of pirates, Sea Do...
[{"type": "stdin_stdout", "input": "1000000000 3\n30490 19232\n45250 999980767\n264372930 1\n", "output": "-1"}, {"type": "stdin_stdout", "input": "1000000000 3\n30490 19232\n45250 999980767\n264372930 1\n", "output": "-1"}, {"type": "stdin_stdout", "input": "221407444 1\n999999999 999999999\n", "output": "-1\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 spirit of the holidays, S...
[{"type": "stdin_stdout", "input": "200\nNESENEESEESWWWNWWSWSWNWNNWNNESWSWNNWNWNENESENNESSWSESWWSSSEEEESSENNNESSWWSSSSESWSWWNNEESSWWNNWSWSSWWNWNNEENNENWWNESSSENWNESWNESWNESEESSWNESSSSSESESSWNNENENESSWWNNWWSWWNESEENWWWWNWWNWWNENESESSWWSWWSES\nNWNESESSENNNESWNWWSWWWNWSESSSWWNWWNNWSENWSWNENNNWWSWWSWNNNESWWWSSESSWWWSSENWSE...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 write a program ...
[{"type": "stdin_stdout", "input": "Thank you for your mail amd your lectures", "output": "your lectures\n"}, {"type": "stdin_stdout", "input": "ahTnk you for your mail and your serutcel", "output": "your serutcel\n"}, {"type": "stdin_stdout", "input": "Uhank you for your mail mad your lrctuees", "output": "your lrctue...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nI started a part-time...
[{"type": "stdin_stdout", "input": "135 100 340 4 200\n1 1 4\n70 100 351 5 200\n0 1 3\n70 100 340 6 343\n1 1 3\n0 0 0 0 0", "output": "1035\n1000\n1190\n"}, {"type": "stdin_stdout", "input": "135 100 340 5 200\n1 1 4\n70 100 351 5 200\n0 1 3\n70 100 340 6 343\n1 1 3\n0 0 0 0 0", "output": "1135\n1000\n1190\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\nComplete the function that accep...
[{"input": "\"The quick brown fox jumps over the lazy dog.\"", "output": "[\"ehT kciuq nworb xof spmuj revo eht yzal .god\"]", "fn_name": "reverse_words"}, {"input": "\"double spaced words\"", "output": "[\"elbuod decaps sdrow\"]", "fn_name": "reverse_words"}, {"input": "\"stressed desserts\"", "output": "[\"desser...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a railroad in Takahashi...
[{"type": "stdin_stdout", "input": "20 987654321\n129662684 2\n162021979 1\n458437539 1\n258406183 2\n202863355 1\n112218745 1\n348732033 1\n323036578 1\n382398703 1\n55854389 1\n283445191 1\n151300613 1\n693338042 2\n191178308 2\n386707193 1\n204580036 1\n335134457 1\n122253639 1\n824646518 2\n902554792 2", "output": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnna and Maria are in charge of ...
[{"type": "stdin_stdout", "input": "96 70\n30 37\n47 56\n19 79\n15 28\n2 43\n43 54\n59 75\n42 22\n38 18\n18 14\n47 41\n60 29\n35 11\n90 4\n14 41\n11 71\n41 24\n68 28\n45 92\n14 15\n34 63\n77 32\n67 38\n36 8\n37 4\n58 95\n68 84\n69 81\n35 23\n56 63\n78 91\n35 44\n66 63\n80 19\n87 88\n28 14\n62 35\n24 23\n83 37\n54 89\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\nPolycarpus takes part in the \"F...
[{"type": "stdin_stdout", "input": "42\n*****o*******t********************oo******\n10\nvcrccobltkeidtxhsxhccaslkjhfyeqsetoowaemso\nuimjsoxifamvctkgqmrwhyjrgmlydczzqjoobnnwch\nuvmjsoqizfavctkxemrpaycngmlyemzzqjoobszwbh\nusmjsoviskzvctkljmrlmylugmlydfzzqvoobzawgh\nfeqweodinkhiatqmfokaxwcmlmbmvskssyookgcrax\ntackfosjhxeq...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMaga and Alex are good at string...
[{"type": "stdin_stdout", "input": "13405\nqlwkktpsmzutqfxhgzzwxmiknbrbvapvjakratudazxuyjnbpuwctnsfdmnskauhctkbccsshzwacneogswzefzvqcssdbywvjyptxneeeetdircmwfmpncbwiacyuvsdcbvfadpgsqvjvzhhhbxkdkwtxkapzhziruscydsimcwnugatftvdcmoyspvvjdecugelyuqeilbfidarbkuhesbzoodavpzobbcciogucwmrzcztdjisxsxsurysojdknbopkwxcporaiyohkcwr...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Berland the opposition is goi...
[{"type": "stdin_stdout", "input": "250\n5 3 5 1 3 5 3 4 4 3 1 5 2 2 1 1 5 2 3 3 2 5 4 3 2 4 2 3 5 4 1 2 3 5 2 2 5 4 1 3 3 5 4 4 4 4 4 2 4 2 3 5 1 4 3 3 2 3 5 3 3 4 4 2 3 1 3 4 1 4 5 4 1 2 3 4 1 5 3 3 2 3 5 4 2 5 2 2 3 5 4 3 5 4 2 1 4 1 4 1 1 3 5 1 1 2 1 3 4 5 4 3 2 5 1 3 5 1 1 3 3 5 1 4 5 1 2 1 1 5 5 3 5 1 4 1 4 4 4 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 lucky numbers very m...
[{"type": "stdin_stdout", "input": "50\n44747747774474747747747447777447774747447477444474\n", "output": "YES"}, {"type": "stdin_stdout", "input": "50\n44444444444444444444444444444444444444444444444444\n", "output": "YES"}, {"type": "stdin_stdout", "input": "50\n77777777777777777777777777777777777777777777777777\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\nWe have a string S consisting of...
[{"type": "stdin_stdout", "input": "26\nYIHVXVZROUSFCUXIOGFIOUSIYDBTQLMECEEHARRBWUDXRITQZSTXNECYMODBOSODWDSWEFEXTVVPENGERSVLYSBDSJOKYSGTJQPEDQWMLFZANYYWWHRHPCOYXLEEBUPOBJMZVUTWCPXQEEHRPSUKCMIDRSBGHBRBAYXUGTZGFRSZTHEVFCFOOTPWYQMXJICOFMXDLCBINVZCPVWRKWDVGBDTDCWRNKPOXANOHOOCKXCSZBSHXXTGCKTSKBRZZTFAAQYFKZGNIZJJZSYTBOKKMTSH...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 purchasing certain items, ...
[{"type": "stdin_stdout", "input": "3 \n100 120\n10 20\n1200 20\n", "output": "12000.000000\n200.000000\n21600.000000\n"}, {"type": "stdin_stdout", "input": "3 \n100 120\n10 20\n1200 40", "output": "12000.000000\n200.000000\n43200.000000\n"}, {"type": "stdin_stdout", "input": "3 \n100 215\n10 20\n1200 40", "output": "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\nOne beautiful July morning a ter...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "512\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "511\n"}, {"type": "stdin_stdout", "input": "121212121\n", "output": "511\n"}, {"type": "stdin_stdout", "input": "101010101\n", "output": "341\n"}, {"type": "stdin_stdout", "input": "9015561...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given $n$ lengths of seg...
[{"type": "stdin_stdout", "input": "6\n2\n1 3\n3\n1 2 3\n4\n1 2 3 14\n4\n6 12 4 14\n7\n1 2 4 9 7 10 3\n8\n8 6 0 3 3 4 3 6\n", "output": "3\n3\n14\n16\n12\n8\n"}, {"type": "stdin_stdout", "input": "6\n2\n1 3\n3\n1 2 3\n4\n1 2 3 14\n4\n6 8 4 14\n7\n1 2 4 9 13 10 3\n8\n8 6 0 3 3 4 3 6\n", "output": "3\n3\n14\n14\n13\n8\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\nHere is a very simple variation ...
[{"type": "stdin_stdout", "input": "10 1 0 0\n7 1 0 0\n13 0 0 0\n6 11 1 1\n2\n5\n7 1 0 6\n1\n1\n3\n4\n5\n6\n0 0 0 0", "output": "0.000000\n0.000000\n0.000000\n0.829031\n0.000000\n"}, {"type": "stdin_stdout", "input": "6 1 0 0\n7 1 0 0\n7 2 0 0\n12 3 1 1\n2\n5\n8 10 0 6\n1\n3\n4\n4\n5\n6\n0 0 0 0", "output": "0.166667\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a kangaroo at coordinat...
[{"type": "stdin_stdout", "input": "12814", "output": "160\n"}, {"type": "stdin_stdout", "input": "19710", "output": "199\n"}, {"type": "stdin_stdout", "input": "36877", "output": "272\n"}, {"type": "stdin_stdout", "input": "49568", "output": "315\n"}, {"type": "stdin_stdout", "input": "44971", "output": "300\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\nInput\n\nThe input is given from...
[{"type": "stdin_stdout", "input": "4 6\n2 3 3 8 2 3\n11 8 9 0 2 0\n0 1 0 1 8 5\n3 10 3 5 9 27\n0 1 1 -1 2 4\n2 19 1 12 1 15", "output": "107\n"}, {"type": "stdin_stdout", "input": "4 6\n2 3 3 7 1 3\n11 8 9 0 2 0\n0 1 4 1 8 5\n3 10 3 5 9 14\n0 1 1 0 2 2\n2 19 1 12 1 10", "output": "96\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\nPolar bears Menshykov and Uslada...
[{"type": "stdin_stdout", "input": "53 3\n1 3 4 4 5 7 10 14 19 25 32 40 23 59 70 82 148 109 124 140 157 175 194 214 235 257 280 304 329 355 382 410 439 469 500 532 565 599 634 670 388 745 784 824 865 907 950 994 1039 1085 1132 1180 1229\n1 2 40\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "53 3\n1 3 4 4 5 7 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a beautiful April day and W...
[{"type": "stdin_stdout", "input": "111724 287004 1153685 512877 139642 23002\n", "output": "257072.950395018008"}, {"type": "stdin_stdout", "input": "435582 479389 540004 1229611 413521 1624\n", "output": "550382.746386589599"}, {"type": "stdin_stdout", "input": "246310 320553 585881 311740 443362 23788\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\nYou will turn on the air conditi...
[{"type": "stdin_stdout", "input": "30\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "40\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-40\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-29\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-30\n", "output": "No\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\nOn a chessboard with a width of ...
[{"type": "stdin_stdout", "input": "0 5\n1 192023486 84774294\n243235878 312125306 50510976\n326016273 338641867 50510976\n570999440 445224816 125759940\n456157384 569789185 50510976\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 5\n1 192023486 50510976\n243235878 312125306 50510976\n326016273 338641867 505...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 counts and...
[{"type": "stdin_stdout", "input": "This is ` pen.", "output": "a : 0\nb : 0\nc : 0\nd : 0\ne : 1\nf : 0\ng : 0\nh : 1\ni : 2\nj : 0\nk : 0\nl : 0\nm : 0\nn : 1\no : 0\np : 1\nq : 0\nr : 0\ns : 2\nt : 1\nu : 0\nv : 0\nw : 0\nx : 0\ny : 0\nz : 0\n"}, {"type": "stdin_stdout", "input": "This si a pen.", "output": "a : 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\nThe string $s$ is given, the str...
[{"type": "stdin_stdout", "input": "5\nabcde\nc\nabcde\nb\nx\ny\naaaaaaaaaaaaaaa\na\ncontest\nt\n", "output": "YES\nNO\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\nabcde\nc\nabcde\nb\nx\ny\nabobobussss\ns\ncontest\nt\n", "output": "YES\nNO\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1\nqwertyuiopp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndi and Budi were given an assi...
[{"type": "stdin_stdout", "input": "5 2\nAA\nAB\nBB\nBA\nAZ\n", "output": "5 2 1 3 4 \n"}, {"type": "stdin_stdout", "input": "5 2\nAA\nAB\nBB\nBA\nAZ\n", "output": "5 2 1 3 4\n"}, {"type": "stdin_stdout", "input": "5 2\nAA\nAB\nBB\nBA\nZA\n", "output": "2 1 3 4 5\n"}, {"type": "stdin_stdout", "input": "5 2\nAA\nAB\nCB\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHr0d1y has $q$ queries on a bina...
[{"type": "stdin_stdout", "input": "2\n6 3\n001000\n2 4\n1 3\n3 5\n4 2\n1111\n1 4\n2 3\n", "output": "\nYES\nNO\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "2\n6 3\n001000\n2 4\n1 3\n3 5\n4 2\n1111\n1 4\n2 3\n", "output": "YES\nNO\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "2\n6 3\n001000\n2 4\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\nTo write a research paper, you s...
[{"type": "stdin_stdout", "input": "5\n1 2 1 4 11\n3\n12 28 16\n0", "output": "1-2 1 4 11\n12 28 16\n"}, {"type": "stdin_stdout", "input": "5\n1 2 1 4 9\n3\n12 28 16\n0", "output": "1-2 1 4 9\n12 28 16\n"}, {"type": "stdin_stdout", "input": "5\n1 2 1 4 0\n3\n12 28 16\n0", "output": "1-2 1 4 0\n12 28 16\n"}, {"type": "s...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor given an integer $n$, print ...
[{"type": "stdin_stdout", "input": "5", "output": "1 2 3 4 5\n1 2 3 5 4\n1 2 4 3 5\n1 2 4 5 3\n1 2 5 3 4\n1 2 5 4 3\n1 3 2 4 5\n1 3 2 5 4\n1 3 4 2 5\n1 3 4 5 2\n1 3 5 2 4\n1 3 5 4 2\n1 4 2 3 5\n1 4 2 5 3\n1 4 3 2 5\n1 4 3 5 2\n1 4 5 2 3\n1 4 5 3 2\n1 5 2 3 4\n1 5 2 4 3\n1 5 3 2 4\n1 5 3 4 2\n1 5 4 2 3\n1 5 4 3 2\n2 1 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\nToday an outstanding event is go...
[{"type": "stdin_stdout", "input": "519325240668210886 776112702001665034 360568516809443669 1272711703453279586 994594983925273138\n", "output": "256787461333454149\n"}, {"type": "stdin_stdout", "input": "519325240668210886 776112702001665034 360568516809443669 875594219634943179 994594983925273138\n", "output": "2567...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a positive integer...
[{"type": "stdin_stdout", "input": "1111111111111111111111111111111011111111111101101110111011111111010011111111111110111111111101011111\n", "output": "148758249\n"}, {"type": "stdin_stdout", "input": "11011111101010010\n", "output": "141427753\n"}, {"type": "stdin_stdout", "input": "1110\n", "output": "780\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\nGiven are two integer sequences ...
[{"type": "stdin_stdout", "input": "6\n0 0 1 2 3 12\n0 2 14 6 2 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n1 0 1 2 3 12\n0 2 14 6 2 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n1 0 1 2 3 12\n0 4 14 6 2 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n1 0 1 2 3 12\n1 4 14...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA special type of prime is gener...
[{"input": "1000000\n1500000", "output": "[2]", "fn_name": "solve"}, {"input": "750000\n1000000", "output": "[3]", "fn_name": "solve"}, {"input": "500000\n1000000", "output": "[5]", "fn_name": "solve"}, {"input": "300000\n900000", "output": "[6]", "fn_name": "solve"}, {"input": "100\n1000000", "output": "[32]", "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\n\"This problem is rubbish! There...
[{"type": "stdin_stdout", "input": "5\n", "output": "1"}, {"type": "stdin_stdout", "input": "4\n", "output": "2"}, {"type": "stdin_stdout", "input": "2\n", "output": "3"}, {"type": "stdin_stdout", "input": "3\n", "output": "1"}, {"type": "stdin_stdout", "input": "1\n", "output": "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\nThe Little Elephant has got a pr...
[{"type": "stdin_stdout", "input": "128\n1 2 4 6 8 17 20 20 23 33 43 49 49 49 52 73 74 75 82 84 85 87 90 91 102 103 104 105 111 111 401 142 142 152 155 160 175 176 178 181 183 184 101 188 191 193 326 202 202 214 224 225 236 239 240 243 246 247 249 249 257 257 261 264 265 271 277 281 284 284 286 289 290 296 297 303 305 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 interactive problem.\...
[{"type": "stdin_stdout", "input": "1000000000 30 1000000000\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n500000000\n750000000\n875000000\n937500000\n968750000\n984375000\n992187500\n996093750\n99804...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is the coach of the Ber...
[{"type": "stdin_stdout", "input": "2\n4\n2 4\n3 4\n2 1\n1 3\n5\n1 5\n2 4\n3 3\n4 2\n5 1\n", "output": "3\n10\n"}, {"type": "stdin_stdout", "input": "2\n4\n2 4\n3 4\n2 1\n2 3\n5\n1 5\n2 4\n3 3\n4 2\n5 1\n", "output": "2\n10\n"}, {"type": "stdin_stdout", "input": "2\n4\n2 4\n3 3\n2 2\n1 3\n5\n1 5\n2 4\n3 3\n4 2\n5 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've been collecting change al...
[{"input": "\"dollar dollar dollar dollar dollar dollar dollar dollar dollar dollar penny\"", "output": "[\"$10.01\"]", "fn_name": "change_count"}, {"input": "\"dollar penny dollar\"", "output": "[\"$2.01\"]", "fn_name": "change_count"}, {"input": "\"dime penny dollar\"", "output": "[\"$1.11\"]", "fn_name": "change_cou...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIf `a = 1, b = 2, c = 3 ... z = ...
[{"input": "\"attitude\"", "output": "[100]", "fn_name": "words_to_marks"}, {"input": "\"knowledge\"", "output": "[96]", "fn_name": "words_to_marks"}, {"input": "\"selfness\"", "output": "[99]", "fn_name": "words_to_marks"}, {"input": "\"friends\"", "output": "[75]", "fn_name": "words_to_marks"}, {"input": "\"family\""...
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\nShortest Common Non-Subsequence\...
[{"type": "stdin_stdout", "input": "0101\n1101001", "output": "0000\n"}, {"type": "stdin_stdout", "input": "0101\n1101000", "output": "0001\n"}, {"type": "stdin_stdout", "input": "0101\n0011001", "output": "1000\n"}, {"type": "stdin_stdout", "input": "0101\n0110001", "output": "0010\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\nFurik loves math lessons very mu...
[{"type": "stdin_stdout", "input": "1000 1010\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1000 1000\n", "output": "0"}, {"type": "stdin_stdout", "input": "1190 225\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1190 315\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1491 512\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\n# # Task:\n * #### Complete the...
[{"input": "[1, 2, 3, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7]", "output": "[\"\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a0\\n\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a0\\u25a0\\n\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\\u25a1\...
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\nSeiji Hayashi had been a profess...
[{"type": "stdin_stdout", "input": "16\n10 8\n2 2\n2 6\n2 7\n6 6\n4 8\n4 2\n5 5\n4 8\n10 2\n6 7\n7 7\n7 8\n8 1\n5 4\n9 1\n10 3\n4 3\n8\n6 4\n2 2\n2 1\n2 4\n3 4\n4 2\n5 3\n1 1\n3 2\n3 3\n0", "output": "5\n5\n"}, {"type": "stdin_stdout", "input": "16\n10 9\n2 4\n2 6\n2 7\n6 6\n4 8\n4 2\n5 5\n4 8\n6 4\n6 7\n7 6\n7 8\n8 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\nproblem\n\nThere are many $ N $ ...
[{"type": "stdin_stdout", "input": "8 4\n46 70 57 10 174 41 130 43", "output": "193\n"}, {"type": "stdin_stdout", "input": "8 4\n46 70 57 10 174 33 130 43", "output": "201\n"}, {"type": "stdin_stdout", "input": "8 7\n46 70 57 3 174 25 130 43", "output": "1302\n"}, {"type": "stdin_stdout", "input": "8 4\n46 70 57 10 174...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 not particularly beautiful e...
[{"type": "stdin_stdout", "input": "10 60\n6 7\n2 4\n3 6\n1 4\n8 7\n2 8\n5 7\n6 4\n5 10\n1 7\n3 9\n3 4\n9 2\n7 1\n3 8\n10 7\n9 7\n9 1\n5 5\n4 7\n5 8\n4 2\n2 2\n9 4\n3 3\n7 5\n7 4\n7 7\n8 2\n8 1\n4 5\n1 10\n9 6\n3 1\n1 3\n3 2\n10 10\n4 6\n5 4\n7 3\n10 1\n3 7\n5 1\n10 9\n4 10\n6 10\n7 10\n5 9\n5 6\n1 2\n7 8\n3 5\n9 8\n9 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 fun...
[{"input": "\"10111\"\n\"001010101\"", "output": "[\"1101100\"]", "fn_name": "add"}, {"input": "\"1101\"\n\"10111\"", "output": "[\"100100\"]", "fn_name": "add"}, {"input": "\"1101\"\n\"101\"", "output": "[\"10010\"]", "fn_name": "add"}, {"input": "\"111\"\n\"10\"", "output": "[\"1001\"]", "fn_name": "add"}, {"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\nThis is a simplified version of ...
[{"type": "stdin_stdout", "input": "5000 1\n4008 1126\n", "output": "6125 6124 6123 6122 6121 6120 6119 6118 6117 6116 6115 6114 6113 6112 6111 6110 6109 6108 6107 6106 6105 6104 6103 6102 6101 6100 6099 6098 6097 6096 6095 6094 6093 6092 6091 6090 6089 6088 6087 6086 6085 6084 6083 6082 6081 6080 6079 6078 6077 6076 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\nFind the last element of the giv...
[{"input": "[\"a\", \"b\", \"c\", \"k\", \"x\", \"y\", \"z\"]", "output": "[\"z\"]", "fn_name": "last"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "[10]", "fn_name": "last"}, {"input": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10", "output": "[10]", "fn_name": "last"}, {"input": "\"a\"\n\"b\"\n\"c\"\n\"z\"", "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\nImplement a function which takes...
[{"input": "\"int main(int argc, char *argv[]) { return 0; }\"", "output": "[188]", "fn_name": "string_hash"}, {"input": "\"; -----> end of hash <-----\"", "output": "[-7136]", "fn_name": "string_hash"}, {"input": "\"int hash(const char *str);\"", "output": "[-9232]", "fn_name": "string_hash"}, {"input": "\" Yo - What'...
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\nThose days, many boys use beauti...
[{"type": "stdin_stdout", "input": "yufkkfwyhhvcjntsgsvpzbhqtmtgyxifqoewmuplphykmptfdebjxuaxigomjtwgtljwdjhjernkitifbomifbhysnmadtnyn\n", "output": "CHAT WITH HER!\n"}, {"type": "stdin_stdout", "input": "yufkkfwyhhvcjntsgsvpzbhqtmtgyxifqoewmuplphykmptfdebjxuaxigomjtwgtljwdjhjernkitifbomifbhysnmadtnyn\n", "output": "CHA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 country live wizards. Th...
[{"type": "stdin_stdout", "input": "10 7 8\n2 4\n3 13\n4 7\n5 1\n9 16\n10 9\n12 18\n16 4\n17 16\n20 10\n", "output": "4.285714285714286\n4.511857892036909\n5.642857142857143\n13.071428571428573\n13.071428571428573\n13.071428571428573\n13.51185789203691\n18.28571428571429\n18.511857892036907\n21.514285714285712\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\nSimple interest on a loan is cal...
[{"input": "100\n0.1\n10", "output": "[[200, 259]]", "fn_name": "interest"}, {"input": "100\n0.1\n1", "output": "[[110, 110]]", "fn_name": "interest"}, {"input": "100\n0.1\n2", "output": "[[120, 121]]", "fn_name": "interest"}, {"input": "100\n0.1\n0", "output": "[[100, 100]]", "fn_name": "interest"}, {"input": "100\n0\...
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*Based on this Numberphile video...
[{"input": "277777788888899", "output": "[[4996238671872, 438939648, 4478976, 338688, 27648, 2688, 768, 336, 54, 20, 0]]", "fn_name": "per"}, {"input": "3778888999", "output": "[[438939648, 4478976, 338688, 27648, 2688, 768, 336, 54, 20, 0]]", "fn_name": "per"}, {"input": "2379", "output": "[[378, 168, 48, 32, 6]]", "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\nChefs from all over the globe ga...
[{"type": "stdin_stdout", "input": "4 5\nRamanujan India\nTorricelli Italy\nGauss Germany\nLagrange Italy\nRamanujan\nTorricelli\nTorricelli\nRamanujan\nLagrange\n", "output": "Italy\nRamanujan\n"}, {"type": "stdin_stdout", "input": "2 2\nNewton England\nEuclid Greece\nNewton\nEuclid\n", "output": "England\nEuclid\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\nBeaches are filled with sand, wa...
[{"input": "\"saNdsandwaterwAterfishfishsunsunsandwatersandsandwaterwaterfishfishsunsunsandwatersandsandwaterwaterfishfishsunsunsandwatersandsandwaterwaterfishfishsunsunsandwatersandsandwaterwaterfishfishsunsunsandwatersandsandwaterwaterfishfishsunsunsandwatersandsandwaterwaterfishfishsunsunsandwatersandsandwaterwaterf...
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\nMaksim walks on a Cartesian plan...
[{"type": "stdin_stdout", "input": "39\n27 47\n30 9\n18 28\n49 16\n10 12\n25 13\n44 11\n13 9\n3 8\n30 2\n8 30\n38 32\n7 29\n38 43\n27 37\n6 13\n21 25\n31 18\n17 26\n51 52\n27 40\n10 43\n50 27\n41 41\n2 11\n38 45\n37 43\n20 52\n36 11\n43 46\n4 39\n22 32\n42 11\n8 37\n9 17\n38 8\n41 1\n24 50\n47 7\n", "output": "861\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\nAyush, Ashish and Vivek are busy...
[{"type": "stdin_stdout", "input": "24\n4\n1 2 3 4\n1 2 3 4\n4\n1 2 3 4\n1 2 4 3\n4\n1 2 3 4\n1 3 2 4\n4\n1 2 3 4\n1 3 4 2\n4\n1 2 3 4\n1 4 2 3\n4\n1 2 3 4\n1 4 3 2\n4\n1 2 3 4\n2 1 3 4\n4\n1 2 3 4\n2 1 4 3\n4\n1 2 3 4\n2 3 1 4\n4\n1 2 3 4\n2 3 4 1\n4\n1 2 3 4\n2 4 1 3\n4\n1 2 3 4\n2 4 3 1\n4\n1 2 3 4\n3 1 2 4\n4\n1 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\nVariation of this nice kata, the...
[{"input": "[7, -3, 20]", "output": "[\"evens win\"]", "fn_name": "bits_war"}, {"input": "[1, 5, 12]", "output": "[\"odds win\"]", "fn_name": "bits_war"}, {"input": "[7, -3, -2, 6]", "output": "[\"tie\"]", "fn_name": "bits_war"}, {"input": "[-3, -5]", "output": "[\"evens win\"]", "fn_name": "bits_war"}, {"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\nIn this kata we are focusing on ...
[{"input": "1\n5\n4", "output": "[[1.0, 2.333333333333333, 3.6666666666666665, 5.0]]", "fn_name": "looper"}, {"input": "1\n5\n5", "output": "[[1.0, 2.0, 3.0, 4.0, 5.0]]", "fn_name": "looper"}, {"input": "1\n5\n3", "output": "[[1.0, 3.0, 5.0]]", "fn_name": "looper"}, {"input": "1\n5\n2", "output": "[[1.0, 5.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\nFind the number of k-divisible n...
[{"type": "stdin_stdout", "input": "1 -1000000000000000000 1000000000000000000\n", "output": "2000000000000000001\n"}, {"type": "stdin_stdout", "input": "2 -1000000000000000000 1000000000000000000\n", "output": "1000000000000000001\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 -1000000000000000000 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\nThe Fair Nut likes kvass very mu...
[{"type": "stdin_stdout", "input": "4 4\n1000000000 1000000000 1000000000 1000000000\n", "output": "999999999\n"}, {"type": "stdin_stdout", "input": "4 4\n1000000000 1000000000 1000000000 1000000000\n", "output": "999999999\n"}, {"type": "stdin_stdout", "input": "4 4\n1000000000 1000000100 1000000000 1000000000\n", "ou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLinear Kingdom has exactly one t...
[{"type": "stdin_stdout", "input": "100\n0 1\n0 0\n0 0\n1 0\n0 0\n0 1\n0 1\n1 1\n0 0\n0 0\n1 1\n0 0\n1 1\n0 1\n1 1\n0 1\n1 1\n1 0\n1 0\n0 0\n1 0\n0 0\n1 0\n0 0\n0 1\n1 1\n1 1\n0 1\n0 0\n1 0\n1 1\n0 1\n1 0\n1 1\n0 1\n1 1\n1 0\n0 0\n0 0\n0 1\n0 0\n-1 1\n1 1\n0 0\n1 1\n1 1\n0 0\n0 1\n1 0\n0 1\n0 0\n0 1\n0 1\n1 1\n1 1\n1 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Fair Nut is going to travel ...
[{"type": "stdin_stdout", "input": "10\n81 34 31 38 69 62 54 18 72 29\n4 8 12\n2 9 25\n4 5 17\n5 7 35\n10 1 13\n9 3 53\n7 6 22\n1 6 82\n3 10 42\n", "output": " 187\n"}, {"type": "stdin_stdout", "input": "10\n11 43 11 96 18 53 25 89 31 41\n2 4 41\n7 1 88\n3 2 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\nFor two sequences S and T of len...
[{"type": "stdin_stdout", "input": "5\n52 67 72 25 79\n", "output": "269312\n"}, {"type": "stdin_stdout", "input": "5\n52 103 72 25 79", "output": "292096\n"}, {"type": "stdin_stdout", "input": "5\n63 103 72 25 79", "output": "306176\n"}, {"type": "stdin_stdout", "input": "1\n1000000000\n", "output": "999999993\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 have $n \\times n$ square gr...
[{"type": "stdin_stdout", "input": "250 1000000000\n", "output": "770503193\n"}, {"type": "stdin_stdout", "input": "250 1000000000\n", "output": "770503193\n"}, {"type": "stdin_stdout", "input": "216 1142401243\n", "output": "820247611\n"}, {"type": "stdin_stdout", "input": "246 1140071398\n", "output": "783102336\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\nPetya and Gena love playing tabl...
[{"type": "stdin_stdout", "input": "186\n2 1 2 1 1 1 1 1 2 1 1 2 2 2 1 1 2 2 1 1 1 2 1 1 2 2 1 1 1 2 2 1 1 1 1 1 2 1 1 1 2 1 2 1 1 2 1 1 1 2 2 2 2 2 2 2 1 2 1 2 1 1 2 1 2 2 1 1 1 1 1 2 2 1 2 2 1 2 2 1 1 1 2 2 1 1 2 2 1 2 2 1 2 2 2 2 2 1 1 1 1 2 1 1 2 2 2 2 2 2 1 1 1 1 1 2 1 1 2 2 1 2 2 1 1 1 1 1 2 2 1 1 2 2 1 2 2 2 1 2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDue to the coronavirus pandemic,...
[{"type": "stdin_stdout", "input": "5\n2 1\n1 3\n2 2\n1 3\n5 4\n", "output": "1\n2\n2\n2\n10\n"}, {"type": "stdin_stdout", "input": "2\n461 5299\n118 177\n", "output": "1221420\n10443\n"}, {"type": "stdin_stdout", "input": "2\n461 5299\n176 177\n", "output": "1221420\n15576\n"}, {"type": "stdin_stdout", "input": "5\n5 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike and !Mike are old childhood...
[{"type": "stdin_stdout", "input": "17\n714413739 -959271262 714413739 -745891378 926207665 -404845105 -404845105 -959271262 -189641729 -670860364 714413739 -189641729 192457837 -745891378 -670860364 536388097 -959271262\n-417715348 -959271262 -959271262 714413739 -189641729 571055593 571055593 571055593 -417715348 -41...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 town Nsk consists of n ju...
[{"type": "stdin_stdout", "input": "5 6 1 5\n1 2\n1 3\n1 4\n4 5\n3 5\n2 5\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "5 6 1 5\n1 2\n1 3\n1 4\n4 5\n3 5\n1 5\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "5 6 1 5\n1 2\n1 3\n2 4\n4 5\n3 5\n2 5\n", "output": "3\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\nSereja loves number sequences ve...
[{"type": "stdin_stdout", "input": "7\n1 53989\n1 47249\n1 71935\n2 1 3\n1 84520\n1 84185\n2 6 1\n14\n1 2 3 4 5 6 7 8 9 10 11 12 13 14\n", "output": "53989 47249 71935 53989 53989 53989 84520 84185 53989 47249 71935 53989 53989 53989\n"}, {"type": "stdin_stdout", "input": "7\n1 53989\n1 47249\n1 71935\n2 1 3\n1 84520\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\nAncient Egyptians are known to h...
[{"type": "stdin_stdout", "input": "107 100000\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 0 0 0 0 0 0 0\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...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 (an undirec...
[{"type": "stdin_stdout", "input": "3 1000000000\n3 2\n2 1\n", "output": "1000000000.000000000000000000"}, {"type": "stdin_stdout", "input": "2 1000000000\n2 1\n", "output": "1000000000.000000000000000000"}, {"type": "stdin_stdout", "input": "6 1\n2 1\n2 3\n2 5\n5 4\n5 6\n", "output": "0.500000000000000000"}, {"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\nIs the number even?\n\nIf the nu...
[{"input": "15", "output": "[false]", "fn_name": "is_even"}, {"input": "27", "output": "[false]", "fn_name": "is_even"}, {"input": "3", "output": "[false]", "fn_name": "is_even"}, {"input": "14", "output": "[true]", "fn_name": "is_even"}, {"input": "26", "output": "[true]", "fn_name": "is_even"}, {"input": "2", "output...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a random string consisting...
[{"input": "\"aHR0cDovL3d3dy5jb2Rld2Fycy5jb20va2F0YS9uZXcvamF2YXNjcmlwdA==\"", "output": "[53]", "fn_name": "sum_from_string"}, {"input": "\"In 2015, I want to know how much does iPhone 6+ cost?\"", "output": "[2021]", "fn_name": "sum_from_string"}, {"input": "\"a30561ff4fb19170aa598b1431b52edad1fcc3e0\"", "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\nAlice is playing with some stone...
[{"type": "stdin_stdout", "input": "64\n0 0 0\n0 0 1\n0 0 2\n0 0 3\n0 1 0\n0 1 1\n0 1 2\n0 1 3\n0 2 0\n0 2 1\n0 2 2\n0 2 3\n0 3 0\n0 3 1\n0 3 2\n0 3 3\n1 0 0\n1 0 1\n1 0 2\n1 0 3\n1 1 0\n1 1 1\n1 1 2\n1 1 3\n1 2 0\n1 2 1\n1 2 2\n1 2 3\n1 3 0\n1 3 1\n1 3 2\n1 3 3\n2 0 0\n2 0 1\n2 0 2\n2 0 3\n2 1 0\n2 1 1\n2 1 2\n2 1 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\nFrom the divine land of heaven c...
[{"type": "stdin_stdout", "input": "50", "output": "YES"}, {"type": "stdin_stdout", "input": "99", "output": "NO"}, {"type": "stdin_stdout", "input": "26", "output": "NO"}, {"type": "stdin_stdout", "input": "2", "output": "YES"}, {"type": "stdin_stdout", "input": "9", "output": "NO"}]
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Luba learned about a sp...
[{"type": "stdin_stdout", "input": "32640\n", "output": "32640\n"}, {"type": "stdin_stdout", "input": "97920\n", "output": "32640\n"}, {"type": "stdin_stdout", "input": "32640\n", "output": "32640\n"}, {"type": "stdin_stdout", "input": "97920\n", "output": "32640\n"}, {"type": "stdin_stdout", "input": "12096\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\nGiven two words and a letter, re...
[{"input": "\"JiOdIdA4\"\n\"oopopopoodddasdfdfsd\"\n\"d\"", "output": "[\"JiOdddasdfdfsd\"]", "fn_name": "string_merge"}, {"input": "\"abcdefxxxyzz\"\n\"abcxxxyyyxyzz\"\n\"x\"", "output": "[\"abcdefxxxyyyxyzz\"]", "fn_name": "string_merge"}, {"input": "\"apowiejfoiajsf\"\n\"iwahfeijouh\"\n\"j\"", "output": "[\"apowiejo...
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\nRidbit starts with an integer $n...
[{"type": "stdin_stdout", "input": "6\n1\n2\n3\n10\n10\n18\n", "output": "0\n1\n2\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "6\n1\n2\n3\n14\n6\n45\n", "output": "0\n1\n2\n2\n2\n3\n"}, {"type": "stdin_stdout", "input": "6\n2\n2\n3\n11\n4\n45\n", "output": "1\n1\n2\n3\n2\n3\n"}, {"type": "stdin_stdout", "input": "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\nProblem\n\nYou brought a flat, h...
[{"type": "stdin_stdout", "input": "7828 5000 20 -1 1069 300", "output": "0.2806361085\n"}, {"type": "stdin_stdout", "input": "7828 10252 13 -1 292 464", "output": "1.5890410959\n"}, {"type": "stdin_stdout", "input": "7828 10252 13 -1 574 464", "output": "0.8083623693\n"}, {"type": "stdin_stdout", "input": "4997 2843 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\nArkady coordinates rounds on som...
[{"type": "stdin_stdout", "input": "11000 10\n10000 9999 9998 1967 4502 9995 9994 10823 9992 9991\n", "output": "0000000000\n"}, {"type": "stdin_stdout", "input": "11000 10\n10000 9999 9998 1967 4502 9995 3707 10823 9992 9991\n", "output": "0000000000\n"}, {"type": "stdin_stdout", "input": "11010 10\n10000 9999 9998 19...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY inve...
[{"type": "stdin_stdout", "input": "20 15 17\n4 9 14 11 15 16 15 4 0 10 7 12 10 1 8 6 7 14 1 13\n6 3 14 8 8 11 16 4 5 9 2 13 6 14 15\n", "output": "10 1 3 8 3 15 7 14 1 12 3 10 15 16 16 5 4 15 13 11 "}, {"type": "stdin_stdout", "input": "20 15 17\n4 9 14 11 15 16 15 4 0 10 7 12 10 1 8 6 7 14 1 13\n6 3 14 8 8 11 16 4 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\nA very brave explorer Petya once...
[{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 1 4 4 0 2 2 4 1 7 1 11 0 8 4 12 12 3 0 3 2 2 4 3 9 1 5 4 6 9 14 6 2 4 18 7 7 19 11 20 13 17 16 0 34 2 6 12 27 9 4 29 22 4 20 20 17 17 20 37 53 17 3 3 15 1 46 11 24 31 6 12 6 11 18 13 1 5 0 19 10 24 41 16 41 18 52 46 39 16 30 18 23 53 13\n", "output": "66\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\nOne of the oddest traditions of ...
[{"type": "stdin_stdout", "input": "3 3\n1 2\n3 50\n10 29\n146 32\n39 2\n50 50\n0 0", "output": "0\n0\n1\n5\n31\n1\n13\n"}, {"type": "stdin_stdout", "input": "3 2\n1 2\n3 10\n10 29\n142 48\n39 2\n50 50\n0 0", "output": "1\n0\n2\n5\n63\n1\n13\n"}, {"type": "stdin_stdout", "input": "4 3\n3 3\n3 105\n10 29\n31 32\n27 5\n5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a functional graph...
[{"type": "stdin_stdout", "input": "20 10\n13 10 5 6 18 5 12 13 15 1 10 3 9 16 7 9 7 11 9 13\n2634 7980 171 3503 6601 9378 4618 8243 9343 1979 4172 7441 9722 9863 6041 4790 1737 7586 6461 228\n", "output": " 62163 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 matrix, consisti...
[{"type": "stdin_stdout", "input": "9 10 30\n5 3\n5 5\n5 10\n1 3\n5 7\n1 8\n4 9\n2 10\n4 10\n3 1\n2 5\n3 8\n1 7\n2 2\n1 5\n2 3\n3 2\n3 10\n3 2\n2 7\n2 4\n1 4\n4 8\n2 8\n4 1\n5 3\n4 6\n5 8\n1 5\n1 1\n", "output": "1027\n857\n829\n783\n664\n648\n619\n611\n606\n595\n548\n527\n521\n486\n480\n469\n462\n458\n465\n458\n451\n4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array of size N x M represent...
[{"input": "[[[64, 145, 158], [242, 117, 31], [44, 176, 104], [154, 72, 201], [170, 58, 146]], [[173, 12, 177], [59, 160, 180], [100, 11, 96], [179, 115, 51], [46, 149, 252]], [[227, 211, 100], [87, 135, 185], [49, 57, 239], [150, 67, 55], [156, 13, 217]], [[178, 173, 59], [84, 107, 34], [182, 41, 93], [205, 16, 51], [...
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\nCompute A \\times B, truncate it...
[{"type": "stdin_stdout", "input": "1000000000000000 9.99\n", "output": "9990000000000000\n"}, {"type": "stdin_stdout", "input": "1010000000000101 9.99", "output": "10089900000001008\n"}, {"type": "stdin_stdout", "input": "1010000000100101 9.99", "output": "10089900001000008\n"}, {"type": "stdin_stdout", "input": "1010...
code_stdio