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\nOnce upon a time in the Kingdom ... | [{"type": "stdin_stdout", "input": "1000 1000\n", "output": "500000\n"}, {"type": "stdin_stdout", "input": "999 1000\n", "output": "499500\n"}, {"type": "stdin_stdout", "input": "1000 997\n", "output": "498500\n"}, {"type": "stdin_stdout", "input": "997 1000\n", "output": "498500\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\nServal soon said goodbye to Japa... | [{"type": "stdin_stdout", "input": "300\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\nMiyako came to the flea kingdom ... | [{"type": "stdin_stdout", "input": "10\n13 18 10 3 9 19 20 4 10 5\n20\n0 9\n5 11\n1 5\n1 16\n3 3\n0 7\n10 19\n14 20\n6 15\n11 12\n13 16\n11 13\n3 9\n7 10\n2 2\n10 11\n17 20\n17 18\n0 15\n0 6\n", "output": "27 24 22 33 9 25 27 24 27 13 20 17 24 20 9 13 20 13 33 24\n"}, {"type": "stdin_stdout", "input": "10\n13 18 10 3 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe range search problem consist... | [{"type": "stdin_stdout", "input": "6\n0 1\n4 0\n5 0\n6 4\n3 2\n11 6\n2\n-1 4 -1 2\n0 8 0 5", "output": "0\n1\n4\n\n0\n1\n2\n3\n4\n\n"}, {"type": "stdin_stdout", "input": "6\n2 1\n2 2\n4 2\n4 2\n3 3\n5 4\n2\n2 4 0 4\n4 10 2 5", "output": "0\n1\n2\n3\n4\n\n2\n3\n5\n\n"}, {"type": "stdin_stdout", "input": "6\n0 1\n4 2\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\nCara is applying for several dif... | [{"input": "\"As Deputy Base Manager on Phobos for five Martian years, I have significant relevant experience.\"\n90\nfalse", "output": "[[true, \"AsDeputyBaseManageronPhobosforfiveMartianyears,Ihavesignificantrelevantexperience.\"]]", "fn_name": "charCheck"}, {"input": "\"But, as I pointed out, anyone complaining abou... | 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 distant future on Earth day l... | [{"type": "stdin_stdout", "input": "100\n6072 8210 6405 1191 2533 8552 7594 8793 2207 8855 7415 6252 3433 2339 5532 3118 3054 5750 3690 9843 3881 1390 936 8611 7099 988 7730 3835 7065 5030 6932 6936 5531 5173 1331 8975 5454 1592 8516 328 1091 4368 8275 6462 8638 4002 5534 113 6295 5960 1688 3668 6604 9632 4214 8687 795... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 history lesson the teacher ... | [{"type": "stdin_stdout", "input": "10\n10 10\n13 15\n6 14\n10 15\n4 15\n11 12\n11 15\n8 15\n1 11\n1 9\n", "output": "10 14 6 12 4 11 13 8 2 1\n"}, {"type": "stdin_stdout", "input": "10\n10 10\n13 15\n6 14\n10 15\n4 15\n11 12\n11 15\n5 15\n1 11\n1 9\n", "output": "10 14 6 12 4 11 13 5 2 1\n"}, {"type": "stdin_stdout", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. Bill is shopping at the stor... | [{"type": "stdin_stdout", "input": "160\n1 1 2 0\n160\n1 1 2 10\n0", "output": "10 1\n50 1\n100 1\n\n10 1\n50 1\n100 1\n"}, {"type": "stdin_stdout", "input": "160\n1 1 2 0\n160\n1 -1 1 10\n0", "output": "10 1\n50 1\n100 1\n\n10 1\n500 1\n"}, {"type": "stdin_stdout", "input": "160\n1 1 4 0\n125\n-1 1 2 10\n0", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo get on the Shinkansen, you ne... | [{"type": "stdin_stdout", "input": "0 0 0", "output": "Close\n"}, {"type": "stdin_stdout", "input": "1 0 0", "output": "Close\n"}, {"type": "stdin_stdout", "input": "0 1 0", "output": "Close\n"}, {"type": "stdin_stdout", "input": "0 0 0", "output": "Close\n"}, {"type": "stdin_stdout", "input": "0 1 0", "output": "Close... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nICPC Calculator\n\nIn mathematic... | [{"type": "stdin_stdout", "input": "1\n4\n0\n+\n2.115262384218664\n1.6946524456220797\n1.2494077125386351\n0\n+\n2.4871472060127386\n+.\n.-*\n3...\n...)\n--.+1\n2....\n1.1146316365084887\n-1\n*\n0\n1.4326064398520582\n.3.\n)/\n0.6657411913142146\n*/.\n.7..\n...6\n1.7891160931823404\n-1", "output": "4\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\nThere are n beacons located at d... | [{"type": "stdin_stdout", "input": "11\n110 90\n100 70\n90 10\n155 15\n130 1\n60 1\n71 10\n40 1\n30 1\n10 1\n20 1\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "11\n110 90\n100 70\n90 10\n155 15\n70 1\n60 1\n71 10\n40 1\n30 1\n10 1\n20 1\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "11\n110 90\n100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMary wrote a recipe book and is ... | [{"input": "\"In another bowl, add 2 tsp of vanilla extract, 3 tsp of baking soda and 1/2 tsp of salt\"", "output": "[\"In another bowl, add 2 tsp (10g) of vanilla extract, 3 tsp (15g) of baking soda and 1/2 tsp (3g) of salt\"]", "fn_name": "convert_recipe"}, {"input": "\"Add to the mixing bowl and coat well with 1 tbs... | 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\nColossal! — exclaimed Hawk-nose.... | [{"type": "stdin_stdout", "input": "9\n3\n2\n2\n228\n1\n1\n0\n16\n1488\n", "output": "4\n2\n2\n16\n2\n2\n1\n2\n32\n"}, {"type": "stdin_stdout", "input": "9\n2\n1\n2\n228\n1\n6\n8\n16\n1488\n", "output": "2\n2\n2\n16\n2\n4\n2\n2\n32\n"}, {"type": "stdin_stdout", "input": "9\n3\n2\n2\n272\n1\n1\n15\n3\n1488\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\nWrite an algorithm that takes an... | [{"input": "[\"a\", 0, 0, \"b\", null, \"c\", \"d\", 0, 1, false, 0, 1, 0, 3, [], 0, 1, 9, 0, 0, {}, 0, 0, 9]", "output": "[[\"a\", \"b\", null, \"c\", \"d\", 1, false, 1, 3, [], 1, 9, {}, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]", "fn_name": "move_zeros"}, {"input": "[\"a\", 0, 0, \"b\", \"c\", \"d\", 0, 1, 0, 1, 0, 3, 0, 1,... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke has a string S consisting ... | [{"type": "stdin_stdout", "input": "bacaccbabab", "output": "YES\n"}, {"type": "stdin_stdout", "input": "bacaacbcbab", "output": "YES\n"}, {"type": "stdin_stdout", "input": "babcbcaacab", "output": "YES\n"}, {"type": "stdin_stdout", "input": "bababccacab", "output": "YES\n"}, {"type": "stdin_stdout", "input": "bacaccba... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCodefortia is a small island cou... | [{"type": "stdin_stdout", "input": "6 7 13 22\n1 2 13\n2 3 13\n1 4 22\n3 4 13\n4 5 13\n5 6 13\n6 1 13\n", "output": "0 13 26 39 26 13\n"}, {"type": "stdin_stdout", "input": "6 7 13 22\n1 2 13\n2 3 13\n1 4 22\n3 4 13\n4 1 13\n5 6 13\n6 1 13\n", "output": "0 13 26 13 26 13 "}, {"type": "stdin_stdout", "input": "6 7 13 22... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a number sequence A of ... | [{"type": "stdin_stdout", "input": "10\n33 18 45 28 8 19 89 86 2 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n33 4 45 28 15 19 123 86 2 4", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n33 18 45 28 8 19 89 86 2 7", "output": "6\n"}, {"type": "stdin_stdout", "input": "10\n33 4 45 28 15 19 89... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 will take ... | [{"input": "\"aaaabbcdefffffffg\"", "output": "[\"aa[aa]bbcdeff[fffff]g\"]", "fn_name": "string_parse"}, {"input": "\"aAAabbcdeFFFffffg\"", "output": "[\"aAAabbcdeFF[F]ff[ff]g\"]", "fn_name": "string_parse"}, {"input": "\"aAAabbcdeffFfFffg\"", "output": "[\"aAAabbcdeffFfFffg\"]", "fn_name": "string_parse"}, {"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\nWe have a grid with H rows and W... | [{"type": "stdin_stdout", "input": "5 5 4\n13 25 7 15 17\n16 22 20 2 9\n14 11 12 1 19\n10 6 23 8 18\n3 21 5 24 4\n3\n13 13\n2 10\n13 13\n", "output": "0\n5\n0\n"}, {"type": "stdin_stdout", "input": "5 5 4\n13 25 7 15 17\n16 22 20 2 9\n14 11 12 1 19\n10 6 23 8 18\n3 21 5 24 4\n3\n13 13\n0 10\n13 13", "output": "0\n5\n0\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBerland shop sells $n$ kinds of ... | [{"type": "stdin_stdout", "input": "25\n8 CA\n4 AB\n8 CA\n4 CA\n7 CB\n4 CB\n4 CB\n2 AC\n2 CA\n3 BC\n4 AC\n7 AB\n3 CA\n5 BC\n7 CB\n9 CA\n7 AB\n7 CA\n9 BA\n8 AC\n6 BA\n2 AC\n1 CB\n5 AB\n3 AB\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "25\n8 CA\n4 AB\n8 CA\n4 CA\n2 CB\n4 CB\n4 CB\n2 AC\n2 CA\n3 BC\n4 AC\n7 AB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBran and his older sister Arya a... | [{"type": "stdin_stdout", "input": "100 456\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo T-shirt sizes are given: $a$... | [{"type": "stdin_stdout", "input": "15\nM M\nM L\nL M\nS M\nM S\nL L\nXL L\nL XXXXXXL\nS S\nXXXXS XXXS\nXS XXXXXXS\nM XXXS\nM XXXL\nXXXXXS XL\nXL XXXXS\n", "output": "=\n<\n>\n<\n>\n=\n>\n<\n=\n<\n>\n>\n<\n<\n>\n"}, {"type": "stdin_stdout", "input": "1\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXS XXXXXXXXXXXXXXX... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery Friday and Saturday night,... | [{"input": "[2, 5, 8]\n[11, 23, 3, 4, 15, 112, 12, 4]\n355", "output": "[156]", "fn_name": "lostSheep"}, {"input": "[2, 7, 13, 17]\n[23, 56, 44, 12, 1, 2, 1]\n255", "output": "[77]", "fn_name": "lostSheep"}, {"input": "[11, 23, 3, 4, 15]\n[7, 14, 9, 21, 15]\n300", "output": "[178]", "fn_name": "lostSheep"}, {"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\nGiven positive integers N, K and... | [{"type": "stdin_stdout", "input": "100 100 996766481\n", "output": "100\n479013218\n301906461\n76865454\n197164919\n185261994\n562146154\n218533225\n703919664\n761757943\n421733444\n150668448\n939625796\n441056419\n399708797\n265484256\n872130614\n530113978\n956321625\n942851863\n391142590\n196625433\n784864879\n81918... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 letters shop showcase is a s... | [{"type": "stdin_stdout", "input": "100\nwjtwxtttttxjjwxtjtttwxjwjjwjxtwwxxwwwtwttwxjxxjxwxwjtjjwxxxxwwtwtxjxwtwtjjjxwjxjtwwwwtjtttjjtxtwtxjw\n10\nxwjxjwxtwwj\nwxjxxjxjx\nwtjxxxjxjxtwt\njwwxj\njtwjtxjxttxwtw\nwtwxjjjttjx\nwwwjtxw\ntjxjwtjwtw\ntjwtjjxtxjwt\nwxwtxtjw\n", "output": "21\n29\n29\n12\n15\n17\n21\n14\n17\n14\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHeading ##There are two integers... | [{"type": "stdin_stdout", "input": "124\n1476395008 1493172223\n1275068416 1291845631\n4009754624 4026531839\n2516582400 2533359615\n50331648 67108863\n2566914048 2583691263\n2952790016 2969567231\n3892314112 3909091327\n3489660928 3506438143\n33554432 50331647\n1694498816 1711276031\n3623878656 3640655871\n1308622848 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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## Grade book\n\nComplete the fu... | [{"input": "100\n100\n100", "output": "[\"A\"]", "fn_name": "get_grade"}, {"input": "100\n85\n96", "output": "[\"A\"]", "fn_name": "get_grade"}, {"input": "70\n70\n100", "output": "[\"B\"]", "fn_name": "get_grade"}, {"input": "95\n90\n93", "output": "[\"A\"]", "fn_name": "get_grade"}, {"input": "92\n93\n94", "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\nIn Manhattan, roads run where th... | [{"type": "stdin_stdout", "input": "10.685123853325852", "output": "15.1110470690\n"}, {"type": "stdin_stdout", "input": "10.702511281748821", "output": "15.1356366061\n"}, {"type": "stdin_stdout", "input": "10.804121325601631", "output": "15.2793349082\n"}, {"type": "stdin_stdout", "input": "11.285119341606524", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo semifinals have just been in... | [{"type": "stdin_stdout", "input": "8\n100 101\n200 201\n300 301\n310 400\n320 500\n330 600\n340 700\n350 800\n", "output": "11111000\n11110000\n"}, {"type": "stdin_stdout", "input": "8\n100 101\n200 201\n300 301\n310 400\n320 500\n330 600\n340 700\n350 800\n", "output": "11111000\n11110000\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\nIf the girl doesn't go to Denis,... | [{"type": "stdin_stdout", "input": "30 8\n0 1 13 12 23 24 26 30\n40 7\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "30 8\n0 1 9 12 23 24 26 30\n40 7\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "30 8\n0 1 9 12 23 24 26 30\n27 7\n", "output": "41\n"}, {"type": "stdin_stdout", "input": "30 8\n0 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\nBob is an active user of the soc... | [{"type": "stdin_stdout", "input": "35\n21 26 18 7 28 2 16 13 16 25 6 32 11 5 31 17 18 3 24 33 14 27 29 1 20 4 12 9 10 30 34 8 19 23 22\n", "output": "0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 \n"}, {"type": "stdin_stdout", "input": "35\n21 26 18 4 28 3 15 13 16 25 6 25 11 5 31 17 9 3 24 33 14 27 29 1 20 4 12 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\nThe greatest common divisor is a... | [{"type": "stdin_stdout", "input": "1251 5715\n10 10\n0 0", "output": "9 6\n10 1\n"}, {"type": "stdin_stdout", "input": "1251 3144\n10 10\n0 0", "output": "3 6\n10 1\n"}, {"type": "stdin_stdout", "input": "1893 2905\n10 6\n0 0", "output": "1 11\n2 3\n"}, {"type": "stdin_stdout", "input": "1893 2905\n11 6\n0 0", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n3\n1 1 1\n1 4 1000\nARM\n4\n0 2 3 11\n-1 1 1100\nAMAM", "output": "2 2 8\n1099 1 1 9\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 1 1\n3 4 1100\nARM\n4\n0 2 3 8\n-1 1 1100\nAMAM", "output": "4 4 16\n1099 1 1 6\n"}, {"type": "stdin_stdout", "input": "2\n3\n2 1 1\n2 3 1000\nARM\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\nImplement a function ... | [{"input": "[0, 1, 2, 1, 0, 2, 1, 1, 1, 0, 4, 5, 6, 2, 1, 1, 0]", "output": "[[[0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0], [2, 5, 10, 11, 12, 13]]]", "fn_name": "binary_cleaner"}, {"input": "[0, 1, 2, 1, 0, 2, 1, 1]", "output": "[[[0, 1, 1, 0, 1, 1], [2, 5]]]", "fn_name": "binary_cleaner"}, {"input": "[3, 0, 7, 0, 2, 0]", "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\nA palindrome is a word, phrase, ... | [{"input": "\"ACCDDCCA\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "\"@14AbC\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "1456009006541", "output": "[true]", "fn_name": "palindrome"}, {"input": "\"1221\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"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\nInternational Abbreviation Olymp... | [{"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'01... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 probability theory the fo... | [{"type": "stdin_stdout", "input": "20\n3 21\n15 28\n21 26\n4 6\n13 28\n20 23\n22 27\n4 13\n1 7\n5 35\n3 3\n16 30\n9 32\n9 16\n3 7\n21 22\n24 29\n6 25\n15 25\n28 33\n51\n", "output": "3.349496664437241e-05\n"}, {"type": "stdin_stdout", "input": "20\n10 21\n18 29\n4 8\n1 27\n24 29\n5 5\n22 22\n4 5\n1 4\n7 12\n11 23\n11 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou got a job as a marketer in a... | [{"type": "stdin_stdout", "input": "10\n335544320 671088640\n335544322 671088639\n335544321 671088639\n335544325 671088637\n335544319 671088640\n335544319 671088641\n335544319 671088639\n335544318 671088639\n352759476 671088637\n335544319 671088643\n", "output": "NO\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nYES\nNO\n"}, {"type":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "1\n147\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 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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTurtle Shi-ta and turtle Be-ko d... | [{"type": "stdin_stdout", "input": "2 3 7 10 50\n3 3\n6 6\n10 10\n4.0000000000 4.380940502722975\n7.0000000000 7.0000000000\n2 3 10 10 48\n2 3\n7 6\n10 10\n4.1530399119933294 4.124627510166318\n7.679827074828504 8.063298606739774\n2 3 10 10 30\n3 3\n6 6\n10 10\n4.0000000000 4.920930737803775\n7.0000000000 7.0000000000\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn the planet Mars a year lasts ... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "285714 285715\n"}, {"type": "stdin_stdout", "input": "999999\n", "output": "285714 285714\n"}, {"type": "stdin_stdout", "input": "999998\n", "output": "285713 285714\n"}, {"type": "stdin_stdout", "input": "999997\n", "output": "285712 285714\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\nEdogawa Conan got tired of solvi... | [{"type": "stdin_stdout", "input": "10\n38282 53699 38282 38282 38282 38282 38282 38282 38282 38282\n", "output": "Conan\n"}, {"type": "stdin_stdout", "input": "10\n50165 50165 50165 50165 50165 50165 50165 50165 50165 50165\n", "output": "Agasa\n"}, {"type": "stdin_stdout", "input": "10\n32093 36846 32093 32093 36846 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLearning to code around your ful... | [{"input": "\"What do you mean I cant learn to code??\"\n8\n9", "output": "[\"Sabbatical! Boom!\"]", "fn_name": "sabb"}, {"input": "\"I can?! Nice. FaC..Im coming :D\"\n9\n9", "output": "[\"Sabbatical! Boom!\"]", "fn_name": "sabb"}, {"input": "\"Why are you shouting?\"\n7\n2", "output": "[\"Back to your desk, boy.\"]",... | 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$2^n$ teams participate in a pla... | [{"type": "stdin_stdout", "input": "7\n1011011\n", "output": "32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers A and B, ... | [{"type": "stdin_stdout", "input": "-1 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-3 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 -3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-5 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 -5", "output": "Yes\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\nYou are given an array of intege... | [{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]", "output": "[[1, 8, 3, 6, 5, 4, 7, 2, 9, 0]]", "fn_name": "sort_array"}, {"input": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[[8, 1, 6, 3, 4, 5, 2, 7, 0, 9]]", "fn_name": "sort_array"}, {"input": "[0, 1, 2, 3, 4, 9, 8, 7, 6, 5]", "output": "[[8, 1, 6, 3, 4, 5, 2, 7, 0, 9]]... | 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\nBelow is a right-angled triangle... | [{"input": "16.7\n0\n12.3", "output": "[47]", "fn_name": "missing_angle"}, {"input": "0\n400\n300", "output": "[37]", "fn_name": "missing_angle"}, {"input": "5\n4\n0", "output": "[37]", "fn_name": "missing_angle"}, {"input": "8\n0\n5", "output": "[39]", "fn_name": "missing_angle"}, {"input": "7\n5\n0", "output": "[44]"... | 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\nGreatest common divisor GCD(a, b... | [{"type": "stdin_stdout", "input": "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\n", "output": "10000000000000000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAwruk is taking part in election... | [{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "46\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "30\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "35\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "43\n", "output": "YES\n"}, {"type": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNantendo Co., Ltd. has released ... | [{"type": "stdin_stdout", "input": "CBA\ncba\ncCa\nX\nYZ\nZ\n-", "output": "BbA\nYX\n"}, {"type": "stdin_stdout", "input": "CBA\ncba\ncCa\nY\nYZ\nZ\n-", "output": "BbA\nYY\n"}, {"type": "stdin_stdout", "input": "CBA\ncca\ncCa\nX\nZY\nZ\n-", "output": "BcA\nXY\n"}, {"type": "stdin_stdout", "input": "CAB\ncba\ncCa\nX\nYZ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDon't Drink the Water\n\nGiven a... | [{"input": "[[\"A\", \"A\", \"O\", \"H\"], [\"A\", \"H\", \"W\", \"O\"], [\"W\", \"W\", \"A\", \"W\"], [\"H\", \"H\", \"O\", \"O\"]]", "output": "[[[\"O\", \"O\", \"O\", \"O\"], [\"A\", \"A\", \"A\", \"A\"], [\"W\", \"W\", \"W\", \"W\"], [\"H\", \"H\", \"H\", \"H\"]]]", "fn_name": "separate_liquids"}, {"input": "[[\"H\... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are several days left befo... | [{"type": "stdin_stdout", "input": "55 1000\n2612 1306 4300 1790 3173 9493 7209 7763 8563 4534 7466 1281 4483 6863 3787 7292 3957 8775 7221 4016 5743 6556 2070 2119 4795 9094 1913 2077 8786 4520 1865 2357 7871 3288 8231 5808 9383 9820 9974 3056 5343 2169 5177 6299 5805 8132 9315 6747 5226 3531 1206 4073 8290 1423 6720\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring the winter holidays, the ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n1000000000 1000000000 1000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n1000000000 1000000000 1000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n1000100000 100000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# The Invitation\n\nMost of us p... | [{"input": "[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]", "output": "[true]", "fn_name": "build_square"}, {"input": "[1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1]", "output": "[false]", "fn_name": "build_square"}, {"input": "[2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]", "output": "[false]", "fn_name": "build_square"}, {"input": "[1,... | 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\nEncryption System\n\nA programme... | [{"type": "stdin_stdout", "input": "enw\nabc\nabcdefghijklmnopqrst\ny\n#", "output": "1\nfox\n5\nacc\nacd\nbbd\nbcc\nbcd\n17711\nacceeggiikkmmooqqssu\nacceeggiikkmmooqqstt\nacceeggiikkmmooqqstu\nacceeggiikkmmooqrrtt\nacceeggiikkmmooqrrtu\nbcdefghijklmnopqrrtt\nbcdefghijklmnopqrrtu\nbcdefghijklmnopqrssu\nbcdefghijklmnop... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThanks to the effects of El Nino... | [{"input": "\"_~~~~~~~_~__~______~~__~~_~~\"", "output": "[\"Throw Up\"]", "fn_name": "sea_sick"}, {"input": "\"_~~_~____~~~~~~~__~_~\"", "output": "[\"Throw Up\"]", "fn_name": "sea_sick"}, {"input": "\"______~___~_\"", "output": "[\"Throw Up\"]", "fn_name": "sea_sick"}, {"input": "\"____\"", "output": "[\"No Problem\"... | 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\nAstronaut Natasha arrived on Mar... | [{"type": "stdin_stdout", "input": "2 420\n412 363\n", "output": "420\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers A and... | [{"type": "stdin_stdout", "input": "-169 -1", "output": "-170\n"}, {"type": "stdin_stdout", "input": "-169 -2", "output": "-171\n"}, {"type": "stdin_stdout", "input": "-279 -2", "output": "-281\n"}, {"type": "stdin_stdout", "input": "-279 -1", "output": "-280\n"}, {"type": "stdin_stdout", "input": "-433 -1", "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 are given a chessboard of si... | [{"type": "stdin_stdout", "input": "100\n93 54 57 61 68 66 70 96 64 82 80 75 69 77 76 94 67 86 90 73 74 58 100 83 92 89 56 99 88 59 95 72 81 51 85 71 97 60 91 63 65 98 79 84 53 62 87 55 52 78\n", "output": "1225\n"}, {"type": "stdin_stdout", "input": "100\n93 54 57 61 68 66 70 96 64 82 80 75 69 77 76 94 67 86 90 73 74 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo players are playing a game. ... | [{"type": "stdin_stdout", "input": "3\n1\n2 5\n2\n4 10\n5 10\n2\n2 3\n1 5", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n1\n1 5\n2\n4 10\n5 10\n2\n2 3\n1 5", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n1\n1 3\n2\n4 10\n5 10\n2\n4 3\n3 5", "output": "YES\nYES\nYES\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\nYour task is to find the number ... | [{"input": "[\"45896-2354\", \"4654-556767\", \"2455-423522\", \"3455-355\", \"34-34\", \"2524522-0\"]", "output": "[\"2524522-0\"]", "fn_name": "diff"}, {"input": "[\"43-45\", \"1021-55\", \"000-18888\", \"92-34\", \"76-32\", \"99-1\", \"1020-54\"]", "output": "[\"000-18888\"]", "fn_name": "diff"}, {"input": "[\"1-100... | 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\nAssume that a, b, and n are all ... | [{"type": "stdin_stdout", "input": "2 3 2\n2 7 3\n13 3 5\n4 6 2", "output": "12\n15\n15\n12\n"}, {"type": "stdin_stdout", "input": "1 3 2\n2 7 3\n13 3 5\n4 6 2", "output": "6\n15\n15\n12\n"}, {"type": "stdin_stdout", "input": "2 3 2\n2 7 3\n13 3 5\n4 4 2", "output": "12\n15\n15\n0\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\nAt regular competition Vladik an... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "Vladik\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "Vladik\n"}, {"type": "stdin_stdout", "input": "1000000000 1387445955\n", "output": "Vladik\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000001\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\nWe all know about Roman Numerals... | [{"input": "1632\n2", "output": "[\"MDCXXXII:\"]", "fn_name": "roman_fractions"}, {"input": "5000", "output": "[\"MMMMM\"]", "fn_name": "roman_fractions"}, {"input": "0\n11", "output": "[\"S:.:\"]", "fn_name": "roman_fractions"}, {"input": "0\n-1", "output": "[\"NaR\"]", "fn_name": "roman_fractions"}, {"input": "0\n12"... | 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\nWell met with Fibonacci bigger b... | [{"input": "[0.5, 0.5, 0.5]\n30", "output": "[[0.5, 0.5, 0.5, 1.5, 2.5, 4.5, 8.5, 15.5, 28.5, 52.5, 96.5, 177.5, 326.5, 600.5, 1104.5, 2031.5, 3736.5, 6872.5, 12640.5, 23249.5, 42762.5, 78652.5, 144664.5, 266079.5, 489396.5, 900140.5, 1655616.5, 3045153.5, 5600910.5, 10301680.5]]", "fn_name": "tribonacci"}, {"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\nThere is a string s of length 3 ... | [{"type": "stdin_stdout", "input": "fzezbxdbwzbqzxdlkqpcheqlhlfkohdekflklzxpxodqexwewpfbobcdlxowlqzxkqdobwodoxdhcohfdzhlfzbzhcobhewxzodzqfxfbokxkqexwzdfxwhwfeocxobxkocphcofwlkzkcqpblclblbecbwozldhxfdekpwxocfhbzkxqwhkofcxzqlwhpdzkdcedxwkqpqpfchfeclcxeqxfcbzfkophefxkqclxwfoxdfpbeowxpxfdwpolkczlpcdhkhkhohplbfzkolqlzfbhfzl... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 N integers. The i-th int... | [{"type": "stdin_stdout", "input": "10\n3 14 159 2653 58979 323846 2643383 27950288 419716939 9375105820\n", "output": "103715602\n"}, {"type": "stdin_stdout", "input": "10\n1 14 159 2653 58979 323846 2643383 27950288 419716939 9375105820", "output": "103715608\n"}, {"type": "stdin_stdout", "input": "10\n1 14 159 2653 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 com... | [{"type": "stdin_stdout", "input": "274842194 1000000000\n", "output": "1162261466\n"}, {"type": "stdin_stdout", "input": "274842194 1000100000\n", "output": "1162105233\n"}, {"type": "stdin_stdout", "input": "922263603 387506683\n", "output": "1064907553\n"}, {"type": "stdin_stdout", "input": "1000000000 100000000\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 are some ambiguities when ... | [{"type": "stdin_stdout", "input": "101\nukuu\nh\nouuo\no\nkkuo\nko\nu\nh\nhku\nh\nh\nhuo\nuhoh\nkuu\nhu\nhkko\nuhuk\nkoho\nh\nhukk\noohu\nkk\nkko\nou\noou\nh\nuuu\nuh\nkhuk\nokoo\nouou\nuo\nkk\noo\nhuok\no\nu\nhok\nhu\nhhuu\nkuu\nooho\noku\nhuoh\nhhkh\nuuuh\nouo\nhou\nhhu\nh\no\nokou\nuo\nh\nukk\nu\nhook\nh\noouk\noku... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Bob saw a string. It contai... | [{"type": "stdin_stdout", "input": "100\n8 43 55 27 70 81 66 10 49 67 24 61 53 0 2 76 96 16 16 1 78 1 69 69 4 59 6 87 98 14 98 20 12 48 20 41 67 90 20 96 44 8 77 94 84 2 61 27 90 42 66 84 5 19 68 13 5 53 13 87 70 41 48 40 19 61 72 31 4 4 59 100 50 64 84 10 96 16 73 3 63 85 67 91 74 63 22 34 6 96 78 42 61 85 3 95 98 84 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $n$ ... | [{"type": "stdin_stdout", "input": "5\n105 24 C 1500000000000 white\n100 23 C 1500000000000 blue\n105 23 A 1480000000000 pink\n110 25 B 1500000000000 black\n110 20 A 1484487224415 gree", "output": "100 23 C 1500000000000 blue\n105 23 A 1480000000000 pink\n105 24 C 1500000000000 white\n110 20 A 1484487224415 gree\n110 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 are given two arrays $a_1, a... | [{"type": "stdin_stdout", "input": "77 22\n3 2 4 8 10 7 5 7 9 7 5 6 2 9 10 1 5 4 5 8 6 9 3 1 8 1 10 9 6 7 7 1 5 3 6 4 9 10 7 8 2 3 10 10 9 9 2 9 1 9 7 3 2 4 7 7 1 1 10 4 2 2 8 3 2 9 11 10 5 6 7 1 10 8 3 9 1\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22\n", "output": "0\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\nAfter making bad dives into swim... | [{"type": "stdin_stdout", "input": "4\n-474 -894\n-474 -833\n-446 -894\n-446 -833\n", "output": "1708\n"}, {"type": "stdin_stdout", "input": "4\n-474 -894\n-474 -833\n-446 -894\n-446 -833\n", "output": "1708\n"}, {"type": "stdin_stdout", "input": "4\n-414 -891\n-414 896\n346 -891\n346 896\n", "output": "1358120\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor an integer n not less than 0... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "124999999999999995\n"}, {"type": "stdin_stdout", "input": "999003990299500294\n", "output": "124875498787437525\n"}, {"type": "stdin_stdout", "input": "1000000000010000000", "output": "125000000001249993\n"}, {"type": "stdin_stdout", "input": "10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMatrix of given integers\n\n\na1... | [{"type": "stdin_stdout", "input": "4\n1 3 -9 2\n2 7 -1 5\n-8 3 2 -1\n5 -1 -3 1", "output": "15\n"}, {"type": "stdin_stdout", "input": "4\n1 3 -9 0\n2 7 -1 5\n-8 3 2 -2\n3 -1 -3 1", "output": "14\n"}, {"type": "stdin_stdout", "input": "4\n1 3 -9 2\n2 4 -1 5\n-8 3 2 -1\n5 -1 -6 1", "output": "12\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\nOne day, Yuhao came across a pro... | [{"type": "stdin_stdout", "input": "30\n)(((())()())()(\n))(()()()(\n))()((\n)())(()\n())())((\n((((())\n(((()))(\n(())\n)()(((()(()\n((())))(\n)()()())((\n))))(()\n()(((()\n)()()(\n(())())\n(()()(())(\n)()((\n)(()(())))\n))))(())((\n)()(()(((((\n(()))((\n()())\n((()()()))\n()((((((((()\n)(()(\n)(((())(()\n)((((()(\n((... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA family of kookaburras are in m... | [{"input": "\"hahahahahahahaHaHa\"", "output": "[2]", "fn_name": "kooka_counter"}, {"input": "\"hahahahahaHaHaHa\"", "output": "[2]", "fn_name": "kooka_counter"}, {"input": "\"HaHaHahahaHaHa\"", "output": "[3]", "fn_name": "kooka_counter"}, {"input": "\"hahahahaha\"", "output": "[1]", "fn_name": "kooka_counter"}, {"inp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSmall, but very brave, mouse Bra... | [{"type": "stdin_stdout", "input": "5 5\nW G B W G\nG B W G B\nB W G B W\nW G B W G\nG B W G B\n", "output": "#Black&White\n"}, {"type": "stdin_stdout", "input": "5 5\nW G B W G\nG B W G B\nB W G B W\nW G B W G\nG B W G B\n", "output": "#Black&White"}, {"type": "stdin_stdout", "input": "5 5\nW G B Y M\nG B Y M C\nB Y M... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 busses in Berland are equipp... | [{"type": "stdin_stdout", "input": "102 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "102 1\n1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "1\n4\n1 -1 2 2", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\n4\n1 1 -1 4", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\n4\n1 2 2 -1", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\n4\n0 2 2 -1", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\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\nThere are N mountains ranging fr... | [{"type": "stdin_stdout", "input": "20\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "20\n54 53 68 68 35 35 62 61 74 73 94 94 94 94 86 85 65 64 68 68\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "20\n8 12 14 17 23 26 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCODE FESTIVAL 2016 is going to b... | [{"type": "stdin_stdout", "input": "EDOC6102LAVITSEF", "output": "16\n"}, {"type": "stdin_stdout", "input": "1DO2LAVI6REGE0TC", "output": "15\n"}, {"type": "stdin_stdout", "input": "VT0EGER6ICAL2OD0", "output": "10\n"}, {"type": "stdin_stdout", "input": "VV1EFFR7ICAK2OD0", "output": "11\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\nNow that Kuroni has reached 10 y... | [{"type": "stdin_stdout", "input": "((()((()()))))(\n", "output": "1\n12\n1 2 3 5 6 7 8 10 11 12 13 14\n"}, {"type": "stdin_stdout", "input": "(((((())()))()(\n", "output": "1\n12\n1 2 3 4 5 6 7 8 10 11 12 14\n"}, {"type": "stdin_stdout", "input": "((()(())()))()(\n", "output": "1\n10\n1 2 3 5 6 8 10 11 12 14\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\nConstruct a dice from a given se... | [{"type": "stdin_stdout", "input": "1 2 3 4 14 -1\n3\n1 3\n1 4\n3 2", "output": "14\n2\n-1\n"}, {"type": "stdin_stdout", "input": "1 2 3 4 5 12\n3\n3 2\n1 3\n3 2", "output": "12\n5\n12\n"}, {"type": "stdin_stdout", "input": "1 2 3 4 5 16\n3\n3 2\n1 3\n3 2", "output": "16\n5\n16\n"}, {"type": "stdin_stdout", "input": "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 on-board computer on Polycar... | [{"type": "stdin_stdout", "input": "100 100\n100 10\n", "output": "34500\n"}, {"type": "stdin_stdout", "input": "100 100\n100 10\n", "output": "34500"}, {"type": "stdin_stdout", "input": "100 100\n100 0\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "100 100\n100 1\n", "output": "12450\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 word internationalization is... | [{"type": "stdin_stdout", "input": "internationalization\n", "output": "i18n\n"}, {"type": "stdin_stdout", "input": "intfrnationalization", "output": "i18n\n"}, {"type": "stdin_stdout", "input": "noitazilanoitanrftni", "output": "n18i\n"}, {"type": "stdin_stdout", "input": "ooitazilanoitanrftni", "output": "o18i\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 Duck song\n\nFor simplicity,... | [{"type": "stdin_stdout", "input": "100000 100000 100000\n100000 100000 100000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000\n100000 100000 100000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "99999 100000 100000\n100000 100000 100000\n", "output": "YES\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\nGerald has been selling state se... | [{"type": "stdin_stdout", "input": "108\n", "output": " 2"}, {"type": "stdin_stdout", "input": "243\n", "output": " 1"}, {"type": "stdin_stdout", "input": "81\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\nRecently Johnny have learned bog... | [{"type": "stdin_stdout", "input": "3\n3\n6\n42", "output": "10/3\n1826/189\n3861289540035137932590423886961807813592751894315116939644306/8913121775113966157962800372668924735854723781840323828125\n"}, {"type": "stdin_stdout", "input": "3\n3\n5\n42", "output": "10/3\n149/21\n3861289540035137932590423886961807813592751... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 You are given three int... | [{"input": "2000\n7000\n3", "output": "[[2001, 3000]]", "fn_name": "min_and_max"}, {"input": "99\n5001\n28", "output": "[[1999, 4996]]", "fn_name": "min_and_max"}, {"input": "99\n5001\n27", "output": "[[999, 4995]]", "fn_name": "min_and_max"}, {"input": "100\n200\n10", "output": "[[109, 190]]", "fn_name": "min_and_max"... | 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\nSwitch/Case - Bug Fixing #6\n\nO... | [{"input": "{\"a\": 1, \"b\": 1, \"operation\": \"**\"}", "output": "[1]", "fn_name": "eval_object"}, {"input": "{\"a\": 1, \"b\": 1, \"operation\": \"+\"}", "output": "[2]", "fn_name": "eval_object"}, {"input": "{\"a\": 1, \"b\": 1, \"operation\": \"-\"}", "output": "[0]", "fn_name": "eval_object"}, {"input": "{\"a\":... | 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\nInnokenty works at a flea market... | [{"type": "stdin_stdout", "input": "10 10\naaaaarpppp\nbbbbsssssu\ncciiiiiiqq\nddmmgggggg\neeebbbbbbb\nfffffqoooo\ngxxxxrrrrr\nhhfuuuuuuu\niiillqqqqq\njjjjjppwww\n", "output": "138\n"}, {"type": "stdin_stdout", "input": "10 10\naaaaaaaaaa\nbbbbbbbbbb\ncccccccccc\ndddddddddd\neeeeeeeeee\nffffffffff\ngggggggggg\nhhhhhhhh... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 carpet shop sells carpets in d... | [{"input": "0\n0\n4\n10", "output": "[\"error\"]", "fn_name": "cost_of_carpet"}, {"input": "5\n6\n4\n10", "output": "[\"error\"]", "fn_name": "cost_of_carpet"}, {"input": "3.9\n2\n4\n10", "output": "[80]", "fn_name": "cost_of_carpet"}, {"input": "3\n5\n4\n10", "output": "[200]", "fn_name": "cost_of_carpet"}, {"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\nThere is a rectangle in a coordi... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 117928222 908877261\n", "output": "500000000000000000.000000 0\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 500000000 500000000\n", "output": "500000000000000000.000000 1\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 500000000 49... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDZY loves chessboard, and he enj... | [{"type": "stdin_stdout", "input": "8 35\n......................-............\n...-..........-........-...........\n...........-.......................\n-..................................\n...................................\n...........-............-.........-\n.........-.........-.--............\n...................... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn poker, you have 5 cards. Ther... | [{"type": "stdin_stdout", "input": "3\nAH KH QH TH JH\nJH 6S 3C 5C 7D\nQH QD 4S QC 2C", "output": "royal flush\nhigh card\nthree of a kind\n"}, {"type": "stdin_stdout", "input": "3\nAH KH QH TH JH\nKH 6S 2D 5C 7D\nQH QD 4S QC 2C", "output": "royal flush\nhigh card\nthree of a kind\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\nDescription\n\nKMC sells CDs eve... | [{"type": "stdin_stdout", "input": "500 1000\n100 10000\n400 1006\n1029 5000\n10000 10000\n0 0", "output": "0 1 0\n4 1 9\n1 1 0\n4 1 3\n0 0 0\n"}, {"type": "stdin_stdout", "input": "500 1001\n001 10100\n400 1047\n429 5000\n10000 10000\n0 0", "output": "0 1 0\n0 0 10\n1 1 0\n0 1 4\n0 0 0\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\nYou are given three strings $a$,... | [{"type": "stdin_stdout", "input": "4\naaa\nbbb\nccc\nabc\nbca\nbca\naabb\nbbaa\nbaba\nimi\nmii\niim\n", "output": "NO\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "4\naaa\nbbb\nccc\nabc\nbca\ncca\naabb\nbbaa\nbaba\niim\nmii\niim\n", "output": "NO\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\naa`\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\nPalo Alto is an unusual city bec... | [{"type": "stdin_stdout", "input": "1 4\n2 4 6 10 15\n1 1 1 1 0\n", "output": "0 0 0 1 "}, {"type": "stdin_stdout", "input": "1 4\n2 4 6 10 14\n1 1 1 1 0\n", "output": "0 0 0 1\n"}, {"type": "stdin_stdout", "input": "1 4\n3 4 6 10 15\n1 1 1 1 0\n", "output": "0 0 0 1\n"}, {"type": "stdin_stdout", "input": "1 4\n2 4 6 1... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.