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\nA has a string consisting of som...
[{"type": "stdin_stdout", "input": "aaaaabbbbbb\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "aaaaabbbbbb\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "aaaaabbabbb\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "bbbabbaaaaa\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "aabb...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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: A-Z-\n\nproblem\n\nThere is a...
[{"type": "stdin_stdout", "input": "AIZV", "output": "2\n"}, {"type": "stdin_stdout", "input": "W\\AG", "output": "1\n"}, {"type": "stdin_stdout", "input": "[VIA", "output": "3\n"}, {"type": "stdin_stdout", "input": "BEW]", "output": "0\n"}, {"type": "stdin_stdout", "input": "VZIA", "output": "2\n"}, {"type": "stdin_st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValera takes part in the Berland...
[{"type": "stdin_stdout", "input": "70092.4982 95833.7741\n1000\n", "output": "70092.4982000000 25741.2759000000\n18609.9464000000 70092.4982000000\n7131.3295000000 0.0000000000\n70092.4982000000 32872.6054000000\n11478.6169000001 70092.4982000000\n14262.6590000000 0.0000000000\n70092.4982000000 40003.9348999999\n4347....
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array a of integers let's...
[{"type": "stdin_stdout", "input": "1\n24\n1 1 1 1 1 1 2 2 2 2 2 2 4 4 4 4 4 4 5 5 5 5 5 5\n", "output": "YES\n12 13\n"}, {"type": "stdin_stdout", "input": "1\n24\n1 1 1 1 1 1 2 2 2 2 2 2 4 4 4 4 4 4 4 5 5 5 5 5\n", "output": "YES\n12 13\n"}, {"type": "stdin_stdout", "input": "1\n24\n1 1 2 1 1 1 2 2 2 2 2 2 4 4 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\nThe only king stands on the stan...
[{"type": "stdin_stdout", "input": "e4\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "a1\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "h8\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "a4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "g7\n", "output": "8\n"}, {"type": "stdin_std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Collatz conjecture is one of...
[{"input": "1000000", "output": "[[837799, 525]]", "fn_name": "max_collatz_length"}, {"input": "1000", "output": "[[871, 179]]", "fn_name": "max_collatz_length"}, {"input": "30", "output": "[[27, 112]]", "fn_name": "max_collatz_length"}, {"input": "1", "output": "[[1, 1]]", "fn_name": "max_collatz_length"}, {"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\nYour task is to ___find the next...
[{"input": "1253343", "output": "[1253359]", "fn_name": "next_higher"}, {"input": "1022", "output": "[1279]", "fn_name": "next_higher"}, {"input": "128", "output": "[256]", "fn_name": "next_higher"}, {"input": "127", "output": "[191]", "fn_name": "next_higher"}, {"input": "1", "output": "[2]", "fn_name": "next_higher"}...
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\nKarlsson has recently discovered...
[{"type": "stdin_stdout", "input": "4\n6\n1 1 1 1 2 1 2 1 2 1 1 1\n2\n2 2 1 2\n3\n1 1 1 1 1 1\n2\n2 1 2 1\n", "output": "12\n2\n6\n0\n"}, {"type": "stdin_stdout", "input": "4\n6\n2 2 2 1 2 2 2 1 2 2 1 2\n2\n2 2 1 2\n3\n1 1 1 1 2 1\n2\n2 1 1 1\n", "output": "10\n2\n4\n2\n"}, {"type": "stdin_stdout", "input": "4\n6\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\nYou are given a string S consist...
[{"type": "stdin_stdout", "input": "dnuoodnuuuhs\n1", "output": "dnuoodnuuuhs\n"}, {"type": "stdin_stdout", "input": "shuuundoound\n1", "output": "shuuundoound\n"}, {"type": "stdin_stdout", "input": "dnuondouuuhs\n1", "output": "dnuondouuuhs\n"}, {"type": "stdin_stdout", "input": "siuuuodnound\n1", "output": "siuuuodno...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nM-kun has the following three ca...
[{"type": "stdin_stdout", "input": "13 4 1\n10", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "13 5 1\n10", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 3 4\n9", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 4 4\n9", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 4 2\n9", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Russ...
[{"type": "stdin_stdout", "input": "3\n5\n13\n13", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n13\n15\n13", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n13\n18\n21", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n5\n13\n11", "output": "YES\nYES\nNO\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_Based on [Project Euler problem...
[{"input": "179", "output": "[false]", "fn_name": "circular_prime"}, {"input": "222", "output": "[false]", "fn_name": "circular_prime"}, {"input": "9377", "output": "[true]", "fn_name": "circular_prime"}, {"input": "213", "output": "[false]", "fn_name": "circular_prime"}, {"input": "197", "output": "[true]", "fn_name":...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn 20XX AD, a school competition...
[{"type": "stdin_stdout", "input": "5 5\n-38 -71 -293 75 1\n-158 -38 -405 66 1\n-236 -303 157 266 1\n316 26 411 190 1\n207 -312 -27 196 1\n-50 292 -375 -401 389 -389\n460 278 409 -329 -303 411\n215 -220 -200 309 -474 300\n310 -494 -87 -300 123 -463\n386 378 486 -443 -64 299", "output": "0\n2\n1\n3\n0\n"}, {"type": "std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a deck of $n$ cards. Th...
[{"type": "stdin_stdout", "input": "20\n24 12\n37 1\n5 35\n36 19\n22 6\n25 4\n26 17\n15 31\n39 8\n28 16\n11 29\n21 18\n14 34\n30 10\n32 2\n20 27\n33 13\n23 9\n40 7\n3 38\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "20\n7 29\n4 34\n40 2\n39 10\n33 5\n1 37\n20 23\n14 21\n22 9\n8 28\n19 24\n26 13\n32 6\n30 16...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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###Instructions\n\nWrite a funct...
[{"input": "259180", "output": "[\"Thursday 23:40\"]", "fn_name": "day_and_time"}, {"input": "-349000", "output": "[\"Tuesday 15:20\"]", "fn_name": "day_and_time"}, {"input": "18876", "output": "[\"Saturday 02:36\"]", "fn_name": "day_and_time"}, {"input": "-3", "output": "[\"Saturday 23:57\"]", "fn_name": "day_and_time...
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\nWrite a program which calculates...
[{"type": "stdin_stdout", "input": "-1 -4 3 -115", "output": "111.072048689\n"}, {"type": "stdin_stdout", "input": "-1 -4 3 -190", "output": "186.043005781\n"}, {"type": "stdin_stdout", "input": "-1 -4 1 -190", "output": "186.010752377\n"}, {"type": "stdin_stdout", "input": "-1 -5 1 -190", "output": "185.010810495\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 progress is not standing sti...
[{"type": "stdin_stdout", "input": "7\n1 2 5\n1 1 3 0 0\n2 2 5\n0 0 0 1 0\n2 1 4\n1 1 2 0 0\n1 2 5\n1 2 3 0 1\n0 0 0\n0 0 0 0 0\n1 0 4\n1 0 0 0 0\n13 37 42\n1 0 0 40 47\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n1 2 3\n1 1 3 0 0\n2 2 5\n0 0 3 1 0\n2 2 4\n1 2 2 0 1\n1 2 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThanks to your help, Heidi is co...
[{"type": "stdin_stdout", "input": "688094\n", "output": "abcdefghijklmnopqrssrqpomlkjihgfebbbccddeeffgghhiijjkkllmmnnooppqqrrss abcdefghijklmnopqrs\n"}, {"type": "stdin_stdout", "input": "912733\n", "output": "abcdefghijklmnopqrstsrqpnljigfedbccddeeffgghhiijjkkllmmnnooppqqrrsstt abcdefghijklmnopqrst\n"}, {"type": "std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string of words, you nee...
[{"input": "\"what time are we climbing up the volcano\"", "output": "[\"volcano\"]", "fn_name": "high"}, {"input": "\"take two bintang and a dance please\"", "output": "[\"bintang\"]", "fn_name": "high"}, {"input": "\"massage yes massage yes massage\"", "output": "[\"massage\"]", "fn_name": "high"}, {"input": "\"man i...
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 function $f : R \\rightarrow R...
[{"type": "stdin_stdout", "input": "3 6\n48261735 26888803 75904937\n1 2\n1 3\n2 3\n1 2\n2 3\n1 3\n", "output": "21372932\n119405200\n49016134\n21372932\n49016134\n119405200\n"}, {"type": "stdin_stdout", "input": "3 6\n48261735 26888803 75904937\n1 2\n1 3\n2 3\n1 2\n2 3\n1 3\n", "output": "21372932\n119405200\n49016134...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n5\n1 0 1 1 1\n5\n1 2 10 2 2", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 0 1 1 1\n5\n1 2 10 0 2", "output": "2\n4\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 0 1 1 1\n5\n1 2 10 0 4", "output": "2\n5\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 1 1 1 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\nA median of an array of integers...
[{"type": "stdin_stdout", "input": "6\n2 4\n0 24 37 58 62 64 69 78\n2 2\n27 61 81 91\n4 3\n0 4 16 18 21 27 36 53 82 91 92 95\n3 4\n1 11 12 22 33 35 38 67 69 71 94 99\n2 1\n11 41\n3 3\n1 2 1 1 1 1 1 1 -1\n", "output": "168\n108\n145\n234\n11\n3\n"}, {"type": "stdin_stdout", "input": "6\n2 4\n0 24 25 58 62 64 69 78\n2 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 an array of n inte...
[{"type": "stdin_stdout", "input": "100\n2 1 -2 -1 -2 0 -1 -2 1 2 0 1 0 -2 -1 -2 0 2 0 1 -2 -2 2 0 -2 2 -2 0 2 -1 2 0 -1 0 -2 2 -1 -1 -2 -1 0 -2 2 0 -2 -2 -2 -1 1 0 -2 -1 2 -1 -4 0 -1 1 1 2 -2 1 -2 1 2 2 -2 1 -2 0 -1 -1 -2 -2 1 0 -1 -1 2 0 2 0 -1 2 1 -1 2 0 2 1 1 1 -1 -1 1 -2 0 0 -2 0\n", "output": "2 78 92\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 n rectangles. The ...
[{"type": "stdin_stdout", "input": "5\n20421 5189 23141 12511\n16414 10436 17880 12511\n17880 10436 20421 12511\n15819 10436 16414 12511\n15819 5189 20421 10436\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n20421 5189 23141 12511\n16414 10436 17880 12511\n17880 10436 20421 12511\n15819 10436 16414 12511...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 logs of lengths A_1,A_...
[{"type": "stdin_stdout", "input": "10 10\n158260522 877914575 602436426 24979445 861648772 623690081 433933447 476190629 262703497 211047202\n", "output": "292638192\n"}, {"type": "stdin_stdout", "input": "10 10\n158260522 877914575 1013896555 24979445 861648772 623690081 433933447 476190629 262703497 374010847", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an array of $n$ positive i...
[{"type": "stdin_stdout", "input": "9\n19\n146 637 288 867 647 705 297 414 541 951 238 806 73 916 781 371 937 343 985\n6\n289 797 286 446 650 296\n15\n670 558 11 473 388 270 231 981 580 180 834 882 212 233 547\n16\n461 336 815 510 720 169 999 580 367 47 992 786 671 522 25 24\n8\n732 710 651 518 287 789 347 14\n4\n697 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\n# Scenario \n\n*You're saying go...
[{"input": "1001", "output": "[1023]", "fn_name": "next_happy_year"}, {"input": "1123", "output": "[1203]", "fn_name": "next_happy_year"}, {"input": "2001", "output": "[2013]", "fn_name": "next_happy_year"}, {"input": "2334", "output": "[2340]", "fn_name": "next_happy_year"}, {"input": "3331", "output": "[3401]", "fn_n...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo experienced climbers are pla...
[{"type": "stdin_stdout", "input": "6\n0 -1\n3 4\n9 12\n17 10\n21 12\n33 -1\n5\n0 0\n12 0\n20 0\n30 0\n74 0\n10\n0 0\n1 2\n3 0\n6 3\n9 0\n11 2\n13 0\n15 2\n16 2\n35 0\n7\n0 0\n150 997\n300 1\n450 999\n600 2\n750 998\n900 0\n0", "output": "46.241105114034\n74.000000000000\n46.612166980266\n10078.072814085803\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\nWe have a grid with N rows and M...
[{"type": "stdin_stdout", "input": "1 13 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 13 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7 17 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 20 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 21 3", "output": "Yes\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n points on a plan...
[{"type": "stdin_stdout", "input": "40\n-8 24\n2 -1\n1 -18\n72 -70\n5 -4\n-308 436\n-19 40\n36 -35\n-178 265\n-1 2\n-7 30\n-1 0\n3 -2\n200 -285\n17 -16\n-35 74\n0 -4\n-86 106\n-1 4\n-7 6\n0 1\n-5 4\n-2 3\n6 -5\n-4 5\n181 -262\n76 -118\n0 0\n-7 18\n-58 104\n-5 6\n-6 12\n-3 4\n1 0\n11 -10\n-86 130\n-3 6\n153 -236\n-183 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\n# Task\n Mobius function - an im...
[{"input": "100000000001", "output": "[0]", "fn_name": "mobius"}, {"input": "10", "output": "[1]", "fn_name": "mobius"}, {"input": "7", "output": "[-1]", "fn_name": "mobius"}, {"input": "5", "output": "[-1]", "fn_name": "mobius"}, {"input": "9", "output": "[0]", "fn_name": "mobius"}, {"input": "8", "output": "[0]", "fn...
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<image>\n\n\nYou know the merry-...
[{"type": "stdin_stdout", "input": "0 3 1 1 0 -1 -1 2\n1 1 5 3 -1 3 0 -1", "output": "1 4 1 2 1 2 1 4\n1 2 1 4 1 4 1 2\n"}, {"type": "stdin_stdout", "input": "0 2 0 1 0 -1 -1 2\n1 1 5 3 -1 3 0 -1", "output": "1 2 1 2 1 4 1 4\n1 2 1 4 1 4 1 2\n"}, {"type": "stdin_stdout", "input": "0 2 1 1 0 -1 -1 2\n1 1 5 3 -1 0 0 -1",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n \"AL-AHLY\" and \"Zamal...
[{"input": "[1, 2, 3, 4, 5]\n[0, 1, 2, 3, 4]", "output": "[4]", "fn_name": "best_match"}, {"input": "[3, 4, 3]\n[1, 1, 2]", "output": "[2]", "fn_name": "best_match"}, {"input": "[4, 3, 4]\n[1, 1, 1]", "output": "[1]", "fn_name": "best_match"}, {"input": "[6, 4]\n[1, 2]", "output": "[1]", "fn_name": "best_match"}, {"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\nYou are given positive integer n...
[{"type": "stdin_stdout", "input": "10000000000 5000\n", "output": "640 1280 1920 2560 3200 3840 4480 5120 5760 6400 7040 7680 8320 8960 9600 10240 10880 11520 12160 12800 13440 14080 14720 15360 16000 16640 17280 17920 18560 19200 19840 20480 21120 21760 22400 23040 23680 24320 24960 25600 26240 26880 27520 28160 2880...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $ N $ stree...
[{"type": "stdin_stdout", "input": "43 16 2\n4 7\n-1 8\n10 0", "output": "48\n"}, {"type": "stdin_stdout", "input": "19 21 2\n0 3\n-1 11\n1 1", "output": "30\n"}, {"type": "stdin_stdout", "input": "12 31 1\n5 2\n-1 1\n14 0", "output": "36\n"}, {"type": "stdin_stdout", "input": "34 50 1\n9 1\n0 1\n-2 -1", "output": "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\nThe sequence of integers $a_1, a...
[{"type": "stdin_stdout", "input": "4\n-2 0 4 -1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n-2 0 1 -1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "4\n-2 1 5 0\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 4 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n-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\nMahmoud and Ehab continue their ...
[{"type": "stdin_stdout", "input": "10\n7 6\n2 10\n7 1\n8 5\n9 3\n2 3\n8 7\n10 8\n10 4\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "10\n7 6\n2 7\n4 1\n8 5\n9 4\n5 3\n8 7\n10 8\n10 4\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "10\n2 6\n3 7\n8 4\n4 10\n6 9\n9 7\n3 10\n1 2\n5 8\n", "output": "16...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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: A-Z Cat / A-Z Cat\n\nstory\n\...
[{"type": "stdin_stdout", "input": "AOZUNYANPERIPERO", "output": "AZ\n"}, {"type": "stdin_stdout", "input": "OREQIRMQEAYNUYOA", "output": "-1\n"}, {"type": "stdin_stdout", "input": "OREPIREPNAYNUZOA", "output": "AZ\n"}, {"type": "stdin_stdout", "input": "OREPIRNPEAYNUZOA", "output": "AZ\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\nRecently a dog was bought for Po...
[{"type": "stdin_stdout", "input": "100 500\n64 140 15 221 24 106 73 30 275 97 296 55 5 30 47 199 130 44 72 170 7 204 359 40 128 117 45 192 344 112 0 11 196 78 73 53 222 93 88 151 99 283 60 71 4 87 226 46 66 74 23 89 77 60 397 181 0 101 358 54 124 155 19 218 9 140 161 130 308 85 103 85 300 128 19 108 225 136 100 54 30 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 participants in the ...
[{"type": "stdin_stdout", "input": "12 14 3\ncaababaccaba", "output": "No\nYes\nYes\nYes\nYes\nYes\nYes\nNo\nNo\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "12 14 3\nabaccababaac", "output": "Yes\nYes\nYes\nNo\nNo\nYes\nYes\nYes\nYes\nYes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "12 16 2\ncabbabaacaaa"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integer $n...
[{"type": "stdin_stdout", "input": "6\n2\n2\n3\n8\n10\n100\n", "output": "2\n2\n3\n8\n9\n18\n"}, {"type": "stdin_stdout", "input": "6\n2\n2\n3\n4\n10\n100\n", "output": "2\n2\n3\n4\n9\n18\n"}, {"type": "stdin_stdout", "input": "6\n1\n2\n3\n4\n5\n100\n", "output": "\n1\n2\n3\n4\n5\n18\n"}, {"type": "stdin_stdout", "inpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which prints the...
[{"type": "stdin_stdout", "input": "1 -2\n3 2\n-2 0", "output": "0.62500000000000000000 0.68750000000000000000 2.71353666826155124291"}, {"type": "stdin_stdout", "input": "0 3\n4 0\n0 0", "output": "2.00000000000000000000 1.50000000000000000000 2.50000000000000000000"}, {"type": "stdin_stdout", "input": "7 -3\n1 0\n-13...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers. We al...
[{"type": "stdin_stdout", "input": "987654215 1000000000 9854874 854888120 270\n", "output": "3.1951405575880256686e-08"}, {"type": "stdin_stdout", "input": "777777776 778777777 777777775 1000000000 1\n", "output": "2.013495963778572506e-06"}, {"type": "stdin_stdout", "input": "987654215 1000000000 5640296 854888120 27...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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```if-not:rust\nYour task is to ...
[{"input": "\"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\"", "output": "[\"7#3 QU!(K 8R0WN F0X JUMP$ 0V3R 7#3 1@2Y D06\"]", "fn_name": "to_leet_speak"}, {"input": "\"LOREM IPSUM DOLOR SIT AMET\"", "output": "[\"10R3M !P$UM D010R $!7 @M37\"]", "fn_name": "to_leet_speak"}, {"input": "\"HELLO WORLD\"", "output": "[\"#311...
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\nConsider the set of all nonnegat...
[{"type": "stdin_stdout", "input": "4\n10 10\n1 10\n6 9\n7 3\n", "output": "Infinite\nFinite\nInfinite\nFinite\n"}, {"type": "stdin_stdout", "input": "4\n10 10\n1 10\n3 9\n7 3\n", "output": "Infinite\nFinite\nInfinite\nFinite\n"}, {"type": "stdin_stdout", "input": "4\n10 10\n1 10\n6 9\n7 3\n", "output": "Infinite\nFini...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI love Fibonacci numbers in gene...
[{"input": "22", "output": "[10946]", "fn_name": "nth_fib"}, {"input": "23", "output": "[17711]", "fn_name": "nth_fib"}, {"input": "24", "output": "[28657]", "fn_name": "nth_fib"}, {"input": "25", "output": "[46368]", "fn_name": "nth_fib"}, {"input": "18", "output": "[1597]", "fn_name": "nth_fib"}, {"input": "19", "out...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nGiven the squares of ...
[{"type": "stdin_stdout", "input": "3 5\n.....\n.#.#.\n.###.\n.#.#.\n.....", "output": "3\n"}, {"type": "stdin_stdout", "input": "3 1\n.....\n.#.#.\n.###.\n.#.#.\n.....", "output": "0\n"}, {"type": "stdin_stdout", "input": "2 5\n.....\n.#.#.\n.###.\n.#.#.\n.....", "output": "2\n"}, {"type": "stdin_stdout", "input": "4 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n cities in the countr...
[{"type": "stdin_stdout", "input": "100 6\n15 20 32 8 29 10 33 15 9 26 28 21 34 7 41 23 9 17 16 15 14 29 25 31 24 26 13 18 19 40 9 16 36 32 39 11 4 31 37 28 32 40 7 18 45 21 15 45 6 15 27 22 27 41 28 7 22 43 25 40 6 7 32 31 36 14 5 27 31 28 23 9 13 14 7 25 28 33 40 22 44 9 29 26 41 30 16 15 31 42 13 40 36 44 17 29 32 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\n# Task\nYou are a lifelong fan o...
[{"input": "100\n[100, 100]", "output": "[2]", "fn_name": "penaltyShots"}, {"input": "10\n[10, 10]", "output": "[2]", "fn_name": "penaltyShots"}, {"input": "2\n[1, 2]", "output": "[3]", "fn_name": "penaltyShots"}, {"input": "5\n[5, 5]", "output": "[2]", "fn_name": "penaltyShots"}, {"input": "0\n[0, 0]", "output": "[6]"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a very secret base in P...
[{"type": "stdin_stdout", "input": "...\nX.X\n...\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "X.X\n.X.\nX.X\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "...\nXXX\n...\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "X..\n.X.\n..X\n", "output": "YES\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\nTheofanis has a riddle for you a...
[{"type": "stdin_stdout", "input": "7\n1\n3\n20\n2\n110\n23\n4838829180358\n", "output": "0 1\n-2 3\n-19 20\n-1 2\n-109 110\n-22 23\n-4838829180357 4838829180358\n"}, {"type": "stdin_stdout", "input": "7\n1\n2\n12\n2\n101\n56\n3000000000000\n", "output": "0 1\n-1 2\n-11 12\n-1 2\n-100 101\n-55 56\n-2999999999999 300000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n4\nDurett 7\...
[{"type": "stdin_stdout", "input": "4\nDurett 10\nGayles 4\nF`cenda 10\nyrethguaD 0\n1\n+ Mccourtney 1", "output": "Mccourtney is not working now.\nF`cenda is working hard now.\n"}, {"type": "stdin_stdout", "input": "4\nDurett 10\nGaxles 4\nFacenda 10\nyrethguaD 0\n1\n+ yentruoccM 2", "output": "yentruoccM is not worki...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUjan has a lot of useless stuff ...
[{"type": "stdin_stdout", "input": "15 10\n2 3\n5 4\n5 12\n5 7\n3 8\n3 10\n11 12\n12 13\n13 14\n14 15\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "15 10\n2 3\n6 4\n5 12\n5 7\n3 8\n3 10\n11 12\n12 13\n13 14\n14 15\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "15 10\n2 3\n5 8\n5 6\n5 7\n3 8\n3 10\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 robot on a coordinate...
[{"type": "stdin_stdout", "input": "4\n4\nLRUD\n4\nLURD\n5\nRRUDU\n5\nLRDDL\n", "output": "1 2 \n1 4 \n3 4 \n1 2 \n"}, {"type": "stdin_stdout", "input": "4\n4\nLRUD\n4\nLURD\n5\nRURDU\n5\nLRDDL\n", "output": "1 2 \n1 4 \n4 5 \n1 2 \n"}, {"type": "stdin_stdout", "input": "4\n4\nDURL\n4\nLURD\n5\nUDURR\n5\nLRDDL\n", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOnce Bob needed to find the seco...
[{"type": "stdin_stdout", "input": "99\n10 -84 -100 -100 73 -64 -100 -94 33 -100 -100 -100 -100 71 64 24 7 -100 -32 -100 -100 77 -100 62 -12 55 45 -100 -100 -80 -100 -100 -100 -100 -100 -100 -100 -100 -100 -39 -48 -100 -34 47 -100 -100 -100 -100 -100 -77 -100 -100 -100 -100 -100 -100 -52 40 -55 -100 -44 -100 72 33 70 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ and...
[{"type": "stdin_stdout", "input": "1\n100\n77 18 18 20 58 11 45 18 21 15 44 87 77 65 94 83 68 73 43 84 75 100 66 39 63 44 60 16 100 4 83 53 37 11 95 71 38 57 66 31 40 60 36 37 92 79 30 55 46 25 54 45 85 38 29 82 60 11 11 69 30 1 53 100 62 61 17 75 99 9 31 8 100 53 57 8 11 26 95 72 50 77 90 88 80 84 53 50 23 3 78 27 76...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBerOilGasDiamondBank has branche...
[{"type": "stdin_stdout", "input": "58\nesgdfmf\nxfkluadj\nqhvh\njwhuyhm\nmgi\nysgc\nvhhenku\npb\ntr\nu\njyrpjnpd\nkluadjo\nopb\ncopb\ngcyhceo\nr\ndjo\nxfklu\neo\nadjo\nfkluadjo\nybe\nwljwh\nqhvhh\nrhgotp\nyhceo\nuyhm\nvdd\nyhm\nysgcyhc\nvddrhg\nril\nwljwhu\nx\nqh\nhceo\ntfcopb\nmgitfc\nvddrh\nmgitfco\nxf\nmgitf\ncyoyb...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "10 4\n2 3 3 1 1 4 1 2 3 3\n", "output": "4\n4 1 3 2\n"}, {"type": "stdin_stdout", "input": "10 4\n2 3 3 1 1 2 1 2 5 3\n", "output": "4\n5 1 3 2\n"}, {"type": "stdin_stdout", "input": "10 4\n2 3 3 2 1 4 1 2 3 3\n", "output": "4\n4 1 3 2\n"}, {"type": "stdin_stdout", "input": "10 4\n2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrewid the Android is a galaxy...
[{"type": "stdin_stdout", "input": "20 10\n10 11 U\n12 9 U\n6 15 L\n17 4 U\n11 10 L\n7 14 L\n4 17 U\n2 19 L\n8 13 L\n14 7 U\n", "output": "11\n9\n6\n4\n1\n7\n2\n2\n8\n7\n"}, {"type": "stdin_stdout", "input": "20 10\n10 11 U\n12 9 U\n6 15 L\n17 4 U\n11 10 L\n7 14 L\n4 17 U\n2 19 L\n8 13 L\n14 7 U\n", "output": "11\n9\n6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn extension of a complex number...
[{"type": "stdin_stdout", "input": "2\n2 0 2 1 89 0 26 7\n13 11 25 8 -1 3 0 -2\n0", "output": "119 -12 230 103\n-30 -22 21 -109\n"}, {"type": "stdin_stdout", "input": "2\n2 0 2 5 89 0 26 4\n7 11 25 8 -1 3 0 -2\n0", "output": "106 -122 230 453\n-24 -40 21 -97\n"}, {"type": "stdin_stdout", "input": "2\n2 0 2 5 89 0 26 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\nVasya has recently finished writ...
[{"type": "stdin_stdout", "input": "26\nabcdefghijklmnopqrstuvwxyzfgvnsltvvohywvqhuhtydghtthgdythuhqvwyhovvtlsnvgfzyxwvutsrqponmlkjihgfedcba\n", "output": "abcdefghijklmnopqrstuvwxyzfgvnsltvvohywvqhuhtydghtthgdythuhqvwyhovvtlsnvgfzyxwvutsrqponmlkjihgfedcba\n"}, {"type": "stdin_stdout", "input": "26\nab?defg??j??mnopqrs...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 contest is `CODEFESTIVAL`, ...
[{"type": "stdin_stdout", "input": "CODDFESTIVAL", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "EDOCLAVFTSEI", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ECOFLAVDTSEI", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "DOECSDKSIVAF", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "DOEC...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rebus of form ? ...
[{"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\n\"The Shell Game\" involves cups...
[{"input": "0\n[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20], [20, 21], [21, 22], [22, 23], [23, 24], [24, 25], [25, 26], [26, 27], [27, 28], [28, 29], [29, 30], [30, 31], [31, 32], [32...
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 list of white pawns on a...
[{"input": "[\"a1\", \"a2\", \"a3\", \"a4\", \"a5\", \"a6\", \"a7\", \"a8\", \"b1\", \"b2\", \"b3\", \"b4\", \"b5\", \"b6\", \"b7\", \"b8\", \"c1\", \"c2\", \"c3\", \"c4\", \"c5\", \"c6\", \"c7\", \"c8\", \"d1\", \"d2\", \"d3\", \"d4\", \"d5\", \"d6\", \"d7\", \"d8\", \"e1\", \"e2\", \"e3\", \"e4\", \"e5\", \"e6\", \"e...
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\nVasilisa the Wise from a far awa...
[{"type": "stdin_stdout", "input": "BYOVRR\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "OVBRYG\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "RRYOGB\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "VOBYGO\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "GRBYVO\n", "output": "30...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n3\n0 2 7\n2 ...
[{"type": "stdin_stdout", "input": "3\n0 3 10\n1 0 4\n19 11 0", "output": "15\n"}, {"type": "stdin_stdout", "input": "3\n0 6 13\n4 0 3\n24 12 0", "output": "20\n"}, {"type": "stdin_stdout", "input": "3\n0 12 13\n6 0 6\n27 8 0", "output": "25\n"}, {"type": "stdin_stdout", "input": "3\n0 12 18\n6 0 6\n27 8 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\nGiven an integer `n` return `\"o...
[{"input": "27", "output": "[\"even\"]", "fn_name": "oddity"}, {"input": "121", "output": "[\"odd\"]", "fn_name": "oddity"}, {"input": "5", "output": "[\"even\"]", "fn_name": "oddity"}, {"input": "16", "output": "[\"odd\"]", "fn_name": "oddity"}, {"input": "1", "output": "[\"odd\"]", "fn_name": "oddity"}]
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string S of leng...
[{"type": "stdin_stdout", "input": "18\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "output": "9075135300"}, {"type": "stdin_stdout", "input": "18\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aaaa", "output": "0\n"}, {"type": "stdin_stdout", "input": "18\naaaaaaaaaaaaaaaaaaaaaaabaaaaaaa`aaaa", "output": "0\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\nToday's Random Number\n\nE869120...
[{"type": "stdin_stdout", "input": "5\n15 -1 21 0 20", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n15 -1 21 0 22", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n-2 -1 -1 14 2", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n-2 -1 -1 21 2", "output": "2\n"}, {"type": "stdin_stdout", "input...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCurrently Tiny is learning Compu...
[{"type": "stdin_stdout", "input": "3119 2029631\n", "output": "0 0\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n0 7\n0 8\n0 9\n0 10\n0 11\n0 12\n0 13\n0 14\n0 15\n0 16\n0 17\n0 18\n0 19\n0 20\n0 21\n0 22\n0 23\n0 24\n0 25\n0 26\n0 27\n0 28\n0 29\n0 30\n0 31\n0 32\n0 33\n0 34\n0 35\n0 36\n0 37\n0 38\n0 39\n0 40\n0 41\n0 42\n0 43\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\nVasya is a regular participant a...
[{"type": "stdin_stdout", "input": "2684354990\n", "output": "2684354990\n"}, {"type": "stdin_stdout", "input": "2539579656\n", "output": "2539579656\n"}, {"type": "stdin_stdout", "input": "9663677133\n", "output": "9663677133\n"}, {"type": "stdin_stdout", "input": "6530347911\n", "output": "6530347911\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\nTurbulent times are coming, so y...
[{"type": "stdin_stdout", "input": "1\n100 37\n29 33 45 64 95 33 45 76 86 5 52 16 27 24 80 5 44 19 96 8 77 67 21 17 22 56 28 3 84 27 39 12 60 35 75 6 68 71 81 5 76 85 73 54 8 4 58 4 22 5 11 51 72 31 67 93 38 94 96 22 73 34 33 84 21 60 89 88 30 21 44 57 5 16 11 65 20 68 68 41 25 78 43 96 61 10 40 98 55 35 19 79 21 4 62 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou can not just take the file a...
[{"type": "stdin_stdout", "input": "100\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "98\n"}, {"type": "stdin_stdout", "input": "100\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxxxxmrx\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 a Golden Circle of Beet...
[{"type": "stdin_stdout", "input": "100000 100000\n50000 6424\n", "output": "1250000000 1250000000\n"}, {"type": "stdin_stdout", "input": "100000 101000\n50000 6424\n", "output": "39453125 1262500000\n"}, {"type": "stdin_stdout", "input": "98752 97209\n41218 39020\n", "output": "21427641 3199861056\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\nSereja has an n × m rectangular ...
[{"type": "stdin_stdout", "input": "21 10 8\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 1 1 1 0 0 0 0 0\n0 0 0 1 1 0 0 0 0 0\n1 1 1 0 0 1 1 1 1 1\n0 0 0 1 1 0 0 0 0 0\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 0 1 1 0 0 0 0 0\n1 0 1 0 0 1 1 1 1 1\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\nDrazil likes heap very much. So ...
[{"type": "stdin_stdout", "input": "2\n3 1\n7 6 3 5 4 2 1\n3 1\n23 6 5 4 3 2 1\n", "output": "1\n1 1 1 1 1 1\n1\n1 1 1 1 1 1\n"}, {"type": "stdin_stdout", "input": "2\n3 1\n14 10 3 5 4 2 1\n3 2\n23 12 9 4 3 2 1\n", "output": "1\n1 1 1 1 1 1\n8\n1 1 1 3\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n14 6 3 5 4 2 1\n3 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a consist...
[{"type": "stdin_stdout", "input": "100\n79 79 79 97 97 97 64 64 64 2 2 2 38 38 38 65 65 65 10 10 10 25 24 25 53 53 53 73 73 73 11 11 11 29 29 29 93 93 93 73 73 73 89 89 89 72 72 72 49 49 49 78 78 78 92 92 92 90 90 90 95 95 95 92 92 92 12 12 12 65 65 65 81 81 81 5 5 5 21 21 21 94 94 94 51 51 51 44 44 44 55 55 55 47 47 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 day we can send from the s...
[{"input": "1000\n1000", "output": "[\"Daily limit is reached\"]", "fn_name": "get_percentage"}, {"input": "0", "output": "[\"No e-mails sent\"]", "fn_name": "get_percentage"}, {"input": "101\n1000", "output": "[\"10%\"]", "fn_name": "get_percentage"}, {"input": "256\n500", "output": "[\"51%\"]", "fn_name": "get_percen...
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 two numbers (m and n) :\n\...
[{"input": "100\n1000", "output": "[\"111111001111110110011011000101110101110\"]", "fn_name": "binary_pyramid"}, {"input": "1\n100", "output": "[\"10011101010010110000101010\"]", "fn_name": "binary_pyramid"}, {"input": "100\n100", "output": "[\"100001100100101000100\"]", "fn_name": "binary_pyramid"}, {"input": "21\n60"...
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\nOn Bertown's main street n trees...
[{"type": "stdin_stdout", "input": "10\n73905 73906 73907 85732 73909 73909 73908 73907 73906 73905\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "10\n60718 99414 65042 65043 65044 38495 95782 65042 65041 65040\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n60718 99414 65042 89001 65044 38495 95...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTime Limit: 8 sec / Memory Limit...
[{"type": "stdin_stdout", "input": "egechmilfgcgg", "output": "chicken\n"}, {"type": "stdin_stdout", "input": "egichgckenegg", "output": "egg\n"}, {"type": "stdin_stdout", "input": "egichnckegegg", "output": "egg\n"}, {"type": "stdin_stdout", "input": "egechickgnegg", "output": "egg\n"}, {"type": "stdin_stdout", "input...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe start with a string s consist...
[{"type": "stdin_stdout", "input": "9\n1500\n1212\n1500\n1221\n1500\n122\n1500\n12121\n1500\n22\n1500\n1111112111111112\n1500\n1111111111221111111\n1500\n111111122\n1500\n11111121111121111111\n", "output": "1504\n1599\n1502\n1598\n1502\n1510\n1657\n1502\n1763\n"}, {"type": "stdin_stdout", "input": "9\n1676\n1212\n1500\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Define crossover operat...
[{"input": "[\"abc\", \"aaa\", \"aba\", \"bab\"]\n\"bbb\"", "output": "[2]", "fn_name": "strings_crossover"}, {"input": "[\"aacccc\", \"bbcccc\"]\n\"abdddd\"", "output": "[0]", "fn_name": "strings_crossover"}, {"input": "[\"a\", \"b\", \"c\", \"d\", \"e\"]\n\"c\"", "output": "[4]", "fn_name": "strings_crossover"}, {"in...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nn people came to a party. Then t...
[{"type": "stdin_stdout", "input": "1\n108\n", "output": "106\n"}, {"type": "stdin_stdout", "input": "1\n157\n", "output": "155\n"}, {"type": "stdin_stdout", "input": "1\n168\n", "output": "166\n"}, {"type": "stdin_stdout", "input": "1\n299\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "1\n111\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\nAssume `\"#\"` is like a backspa...
[{"input": "\"831####jns###s#cas/*####-5##s##6+yqw87e##hfklsd-=-28##fds##\"", "output": "[\"6+yqw8hfklsd-=-f\"]", "fn_name": "clean_string"}, {"input": "\"####gfdsgf##hhs#dg####fjhsd###dbs########afns#######sdanfl##db#####s#a\"", "output": "[\"sa\"]", "fn_name": "clean_string"}, {"input": "\"gfh#jds###d#dsd####dasdaskh...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBear Limak wants to become the l...
[{"type": "stdin_stdout", "input": "10 10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "11 12\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 43\n", "output": "10\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\nGildong's town has a train syste...
[{"type": "stdin_stdout", "input": "3\n1 2\n1\n3 4\n3 2\n2 3 11\n2 1\n9 14\n2 12 16 28 42 57 59 86 99\n3 9 14 19 25 26 20 35 41 59 85 87 99 100\n", "output": "0\n1\n2\n"}, {"type": "stdin_stdout", "input": "3\n1 2\n1\n1 4\n3 2\n1 3 4\n2 4\n9 14\n2 14 16 28 33 57 59 92 99\n3 9 14 19 25 26 28 35 41 59 85 87 99 100\n", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ chips arranged in ...
[{"type": "stdin_stdout", "input": "101 2\nBWBWBWWWBWBWBWWWBWWWBWWWBWBBBBBWBWBBBWBWBWWBBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWWWBWBWBWB\n", "output": "BBBWWWWWWWBWWWWWWWWWWWWWWBBBBBBBBBBBBBBWWWWBBBBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWWWWWWWBWBBB\n"}, {"type": "stdin_stdout", "input": "101 2\nBWBWBWBWWWB...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nMobiles are widely kn...
[{"type": "stdin_stdout", "input": "1\n7 22 0 0\n4\n2 2 0 4\n1 3 0 0\n9 10 2 1\n3 2 0 0\n0", "output": "29\n190\n"}, {"type": "stdin_stdout", "input": "1\n7 11 0 0\n4\n2 2 0 4\n1 3 0 0\n3 8 2 1\n3 2 0 0\n0", "output": "18\n110\n"}, {"type": "stdin_stdout", "input": "1\n7 22 0 0\n4\n2 2 0 4\n1 3 0 0\n3 8 2 1\n3 2 0 0\n0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReading books is one of Sasha's ...
[{"type": "stdin_stdout", "input": "tttdddssstttssstttdddddddddttttttdddsssdddtttsssdddsssssstttddddddtttdddssstttsssttttttdddtttsssssstttssssssssstttsssssstttssstttdddddddddsssdddssssssdddssstttsssdddssstttdddttttttdddddddddsssssstttdddtttssssssdddddddddttttttdddtttsssdddssstttsssdddssssssdddsssdddddddddtttssstttsssss...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is currently at a car rent...
[{"type": "stdin_stdout", "input": "4 13 400 600\n13 30\n1 19\n1 160\n1 113\n58 73 15 319 194 362 128 157 336 162 77 90 96\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "4 13 400 600\n13 30\n1 19\n1 160\n1 113\n58 73 15 319 194 362 128 157 336 162 77 90 96\n", "output": "1\n"}, {"type": "stdin_stdout", "input...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n3\n3 0 1\n\n...
[{"type": "stdin_stdout", "input": "3\n152 -3 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n-1 -1 1", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n13 -2 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n25 -2 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n25 -2 4", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn 2N - 1 boxes there are apples...
[{"type": "stdin_stdout", "input": "2\n2\n10 15\n5 7\n20 18\n1\n0 0\n", "output": "YES\n1 3 \nYES\n1 \n"}, {"type": "stdin_stdout", "input": "2\n2\n10 15\n5 7\n20 18\n1\n0 0\n", "output": "YES\n1 3 \nYES\n1 \n"}, {"type": "stdin_stdout", "input": "2\n2\n10 15\n5 11\n20 22\n1\n0 0\n", "output": "YES\n1 3\nYES\n1\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: four tea\n\nproblem\n\nTea is...
[{"type": "stdin_stdout", "input": "10\n1 2 10 2\n0 0 0 15", "output": "2\n"}, {"type": "stdin_stdout", "input": "10\n1 1 3 2\n0 2 3 16", "output": "2\n"}, {"type": "stdin_stdout", "input": "10\n0 1 3 2\n1 2 3 16", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n0 1 6 1\n0 0 1 50", "output": "1\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\nPresident of Berland has a very ...
[{"type": "stdin_stdout", "input": "24 11 N\n.NNNNNNNNNN\n.NNNNNNNNNN\n........RRR\n........RRR\n........RRR\n..MMMMMMRRR\n..MMMMMMRRR\n..MMMMMMRRR\n..MMMMMM...\n....XXXXXXX\n...........\n.....CCCCCC\n.....CCCCCC\n.HHHHHHHHHH\n..VVVVV....\n..VVVVV....\n..VVVVV....\n..VVVVV.I..\n..VVVVV.I..\n..VVVVV.I..\n..VVVVV.I..\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\nModern text editors usually show...
[{"type": "stdin_stdout", "input": "255\nT___J(M_XZJlr_lH___mqJA_p__kW)ko__F_M_Aro__ZA_G_M_P_____j_V(J_Jk_dkR_ta_lbIUhKFfo_y_DluW)IVFj_gouRfMhabn()_e___q_vo__QPEGBI_TpVVI_clPwwb_m_yL_cMVKgi___RJb_J_f____tPCyntLOr_s_x_N_SyqQw_zP_mycsW_o_c_o_Yzb_UVa_ATd(BYH_gl___Y__Uzok_Y_IA_XL_D__bkJ____e__K_quk)\n", "output": "10 25\n"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider a currency system in wh...
[{"type": "stdin_stdout", "input": "3 \n1200\n1258\n242", "output": "12\n16\n7\n"}, {"type": "stdin_stdout", "input": "3 \n1200\n493\n380", "output": "12\n11\n7\n"}, {"type": "stdin_stdout", "input": "3 \n1200\n806\n380", "output": "12\n10\n7\n"}, {"type": "stdin_stdout", "input": "3\n1200\n500\n242\n", "output": "12\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 few years ago Sajjad left his ...
[{"type": "stdin_stdout", "input": "300997\n", "output": "150498\n"}, {"type": "stdin_stdout", "input": "273658\n", "output": "136828\n"}, {"type": "stdin_stdout", "input": "222057\n", "output": "111028\n"}, {"type": "stdin_stdout", "input": "456496\n", "output": "228247\n"}, {"type": "stdin_stdout", "input": "220343\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\nWith one die of 6 sides we will ...
[{"input": "[3, 15, 8, 20]", "output": "[44]", "fn_name": "eq_dice"}, {"input": "[5, 6, 4]", "output": "[5]", "fn_name": "eq_dice"}, {"input": "[6, 6]", "output": "[3]", "fn_name": "eq_dice"}, {"input": "[3, 3]", "output": "[0]", "fn_name": "eq_dice"}, {"input": "[3, 6]", "output": "[0]", "fn_name": "eq_dice"}, {"input...
code_functional