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\nTwo players play a game. The gam... | [{"type": "stdin_stdout", "input": "100 100 1 1 100 100\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "100 100 10 10 13 14\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "000 100 1 1 100 100\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "100 32 71 12 71 22\n", "output": "Seco... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima has a hamsters farm. Soon N... | [{"type": "stdin_stdout", "input": "1998451655 50\n977141206 956777871 186433588 538218068 28363231 327484438 88827268 266300062 670616672 756092978 414181331 913675814 898008516 343057716 99416265 255545168 76528140 550467703 684435578 844649988 1024428164 550467703 493542638 33869647 414181331 198095018 913675814 994... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBoboniu gives you\n\n $r$ red b... | [{"type": "stdin_stdout", "input": "4\n0 1 1 1\n8 1 9 3\n0 0 0 0\n1000000000 1000000000 1000000000 1000000000\n", "output": "No\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "4\n0 1 1 1\n8 1 9 5\n0 0 0 0\n1000000000 1000000000 1000000000 1000000000\n", "output": "NO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA hero is on his way to the cast... | [{"input": "1500\n751", "output": "[false]", "fn_name": "hero"}, {"input": "100\n40", "output": "[true]", "fn_name": "hero"}, {"input": "10\n5", "output": "[true]", "fn_name": "hero"}, {"input": "7\n4", "output": "[false]", "fn_name": "hero"}, {"input": "4\n5", "output": "[false]", "fn_name": "hero"}, {"input": "0\n1",... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven the integer $n$ β the numb... | [{"type": "stdin_stdout", "input": "17\n58512\n46568\n77983\n60262\n48767\n75002\n79520\n52911\n42089\n38692\n71175\n51960\n33754\n36367\n67108\n79100\n78009\n", "output": "19504 19505 19503\n15523 15524 15521\n25995 25996 25992\n20088 20089 20085\n16256 16257 16254\n25001 25002 24999\n26507 26508 26505\n17637 17638 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTruncate the given string (first... | [{"input": "\"Seems like you have passed the final test. Congratulations\"\n53", "output": "[\"Seems like you have passed the final test. Congrat...\"]", "fn_name": "truncate_string"}, {"input": "\"A-tisket a-tasket A green and yellow basket\"\n43", "output": "[\"A-tisket a-tasket A green and yellow basket\"]", "fn_nam... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring one of the space missions... | [{"type": "stdin_stdout", "input": "4\n3 13\n5 8\n8 9\n8 10\n", "output": "8 3\n"}, {"type": "stdin_stdout", "input": "4\n3 13\n5 8\n6 9\n8 10\n", "output": "6 3\n"}, {"type": "stdin_stdout", "input": "4\n3 4\n4 5\n4 6\n8 10\n", "output": "4 2\n"}, {"type": "stdin_stdout", "input": "4\n3 4\n4 8\n4 6\n8 10\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\nPetya has got an interesting flo... | [{"type": "stdin_stdout", "input": "4\n3\n1 0 0\n3\n0 0 1\n4\n1 0 0 1\n1\n1\n", "output": "-1\n-1\n-1\n2\n"}, {"type": "stdin_stdout", "input": "4\n3\n0 0 1\n3\n0 0 1\n4\n1 0 0 1\n1\n0\n", "output": "-1\n-1\n-1\n1\n"}, {"type": "stdin_stdout", "input": "4\n3\n0 0 1\n3\n0 0 1\n4\n0 1 1 1\n1\n0\n", "output": "-1\n-1\n12\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAND gates and OR gates are basic... | [{"type": "stdin_stdout", "input": "4\n\n1\n0\n\n3\n0\n0\n1 1 2\n\n3\n0\n0\n2 1 2\n\n5\n0\n0\n0\n2 1 2\n1 3 4\n\n\n", "output": "0.50000\n0.29289\n0.70711\n0.40303\n"}, {"type": "stdin_stdout", "input": "4\n\n1\n0\n\n3\n0\n0\n2 1 2\n\n3\n0\n0\n1 2 1\n\n1\n0\n0\n-1\n2 1 3\n1 4 3", "output": "0.50000\n0.70711\n0.29289\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\nFor a dictionary $M$ that stores... | [{"type": "stdin_stdout", "input": "8\n0 blue 4\n0 der 0\n0 white 10\n1 esd\n1 bmue\n1 der\n1 black\n1 qed", "output": "0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "8\n0 blue 4\n0 red 1\n0 white 10\n1 red\n1 bmue\n1 red\n1 kcalb\n1 rdd", "output": "1\n0\n1\n0\n0\n"}, {"type": "stdin_stdout", "input": "8\n0 blu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou're re-designing a blog and t... | [{"input": "\"Tuesday January 29, 10pm\"", "output": "[\"Tuesday January 29\"]", "fn_name": "shorten_to_date"}, {"input": "\"Monday February 2, 8pm\"", "output": "[\"Monday February 2\"]", "fn_name": "shorten_to_date"}, {"input": "\"Wed September 1, 3am\"", "output": "[\"Wed September 1\"]", "fn_name": "shorten_to_date... | 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\nNiwango-kun has \\\\(N\\\\) chic... | [{"type": "stdin_stdout", "input": "4\n3 12 6 4", "output": "18\n"}, {"type": "stdin_stdout", "input": "4\n2 9 3 8", "output": "12\n"}, {"type": "stdin_stdout", "input": "4\n2 5 3 11", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n2 9 3 11", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n2 0 2 10", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 when people sti... | [{"type": "stdin_stdout", "input": "8\n-7 9 6 9\n1 5 12 8\n-10 -5 12 -5\n-6 9 -9 -1\n6 13 18 -1\n-1 -2 -4 10\n1 -2 4 10\n0 -3 2 -3\n8\n-7 9 5 7\n-3 5 6 5\n-10 -5 10 -5\n-6 9 -7 -5\n6 5 9 -6\n-1 -2 -3 10\n1 -2 3 10\n-2 -5 2 -3\n0", "output": "no\nyes\n"}, {"type": "stdin_stdout", "input": "8\n-9 9 6 9\n1 5 12 8\n-10 -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\nThe Travelling Salesman spends a... | [{"type": "stdin_stdout", "input": "10011010111010010111111110001010001010001010110010110010010111101111000101110101010111100101001100011001001001111011111100011110101011011001101101001111111101010010110011111101110010001000111111100011000000111111111100011000000000110101111000001011101000110000111110110000010000010011... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp decided to relax on his... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000010000\n", "output": "20000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a flower bed, there are N flo... | [{"type": "stdin_stdout", "input": "100\n0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 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\nArkady owns a non-decreasing arr... | [{"type": "stdin_stdout", "input": "50\n33938936 37616740 40124673 57563878 69692739 80274059 86990853 92067934 137164958 141525047 145291746 183557477 192615612 213000557 231642778 248293447 271211165 361145892 387507168 418475785 425716910 433349153 443947914 471529381 474531169 490097471 491934162 504402098 52235880... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 number `n` we will defin... | [{"input": "1000000000000000000", "output": "[1152921504606846975]", "fn_name": "score"}, {"input": "10000000", "output": "[16777215]", "fn_name": "score"}, {"input": "1000000", "output": "[1048575]", "fn_name": "score"}, {"input": "49", "output": "[63]", "fn_name": "score"}, {"input": "0", "output": "[0]", "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\nAlice wants to send an email to ... | [{"type": "stdin_stdout", "input": "5\n110\n100\n222220\n44033055505550666011011111090666077705550301110\n000555555550000330000444000080000200004440000", "output": ",\n.\nb\nhello, world!\nkeitai\n"}, {"type": "stdin_stdout", "input": "5\n40\n220\n222220\n44033055505550666011011111090666077705550301110\n000555555550000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers A, ... | [{"type": "stdin_stdout", "input": "-1 2 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-3 0 -3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-5 0 -3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-4 2 -3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 4 -1", "output": "Yes... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 non-decreasing a... | [{"type": "stdin_stdout", "input": "6\n4 1\n0 0 0 1\n3 1\n3 3 3\n11 3\n0 1 2 2 3 3 3 4 4 4 4\n5 3\n1 2 3 4 5\n9 4\n2 2 3 5 7 11 13 13 17\n10 7\n0 1 1 2 3 3 4 5 5 6\n", "output": "-1\n1\n2\n2\n2\n1\n"}, {"type": "stdin_stdout", "input": "6\n4 1\n0 0 0 1\n3 1\n3 3 3\n11 3\n0 1 2 2 3 3 3 4 4 4 4\n5 3\n1 2 3 4 5\n9 4\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\n-----Input-----\n\nThe only line... | [{"type": "stdin_stdout", "input": "A221033\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "A223635\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "A232726\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "A102210\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "A231010\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 Luba bought a monitor. ... | [{"type": "stdin_stdout", "input": "29 50 5 29\n21 42 1565821\n21 43 53275635\n21 44 2717830\n21 45 9579585\n21 46 20725775\n22 42 2568372\n22 43 9584662\n22 44 31411635\n22 45 5089311\n22 46 4960702\n23 42 11362237\n23 43 42200296\n23 44 18762146\n23 45 8553819\n23 46 4819516\n24 42 10226552\n24 43 21022685\n24 44 329... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an identity matrix of the... | [{"input": "5", "output": "[[[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]]", "fn_name": "get_matrix"}, {"input": "3", "output": "[[[1, 0, 0], [0, 1, 0], [0, 0, 1]]]", "fn_name": "get_matrix"}, {"input": "2", "output": "[[[1, 0], [0, 1]]]", "fn_name": "get_matrix"}, {"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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\nbabb\n4\ncbbe\n3", "output": "babb\nbbe\n"}, {"type": "stdin_stdout", "input": "2\nbabb\n4\ncbbe\n2", "output": "babb\nbb\n"}, {"type": "stdin_stdout", "input": "2\nabdc\n3\nbcbb\n3", "output": "abc\nbbb\n"}, {"type": "stdin_stdout", "input": "2\ncbda\n3\nbcbb\n3", "output": "bda\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 replace al... | [{"type": "stdin_stdout", "input": "this is b pen.", "output": "THIS IS B PEN.\n"}, {"type": "stdin_stdout", "input": "tiis is b pen.", "output": "TIIS IS B PEN.\n"}, {"type": "stdin_stdout", "input": "tiis is a pen.", "output": "TIIS IS A PEN.\n"}, {"type": "stdin_stdout", "input": "tiis it a pen.", "output": "TIIS IT... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTom is solving an IQ quiz in whi... | [{"type": "stdin_stdout", "input": "100 60 52 \n200 90 45", "output": "T"}, {"type": "stdin_stdout", "input": "20 10 10 \n30 10 10", "output": "Y"}, {"type": "stdin_stdout", "input": "20 10 10 \n60 10 10", "output": "N"}, {"type": "stdin_stdout", "input": "25 30 5 \n25 35 10", "output": "Y"}, {"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\nIn order to do some research, n^... | [{"type": "stdin_stdout", "input": "135\n", "output": "1 270 271 540 541 810 811 1080 1081 1350 1351 1620 1621 1890 1891 2160 2161 2430 2431 2700 2701 2970 2971 3240 3241 3510 3511 3780 3781 4050 4051 4320 4321 4590 4591 4860 4861 5130 5131 5400 5401 5670 5671 5940 5941 6210 6211 6480 6481 6750 6751 7020 7021 7290 7291... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nComplete the function that takes... | [{"input": "-67854\n-57", "output": "[-1]", "fn_name": "find_digit"}, {"input": "678998\n0", "output": "[-1]", "fn_name": "find_digit"}, {"input": "-2825\n3", "output": "[8]", "fn_name": "find_digit"}, {"input": "-1234\n2", "output": "[3]", "fn_name": "find_digit"}, {"input": "-5540\n1", "output": "[0]", "fn_name": "fi... | 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\nGuy-Manuel and Thomas have an ar... | [{"type": "stdin_stdout", "input": "1\n100\n64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 smelt fishing tournament was h... | [{"type": "stdin_stdout", "input": "3 5\n1 14\n2 5\n1 3\n3 4\n2 11", "output": "1 14\n1 14\n1 17\n1 17\n1 17\n"}, {"type": "stdin_stdout", "input": "3 5\n1 4\n2 10\n1 5\n3 4\n3 11", "output": "1 4\n2 10\n2 10\n2 10\n3 15\n"}, {"type": "stdin_stdout", "input": "3 5\n1 4\n2 19\n1 5\n3 4\n3 11", "output": "1 4\n2 19\n2 19... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBit Vectors/Bitmaps\nA bitmap is... | [{"input": "\"4814\\n3815\\n54\\n2747\\n1449\\n1880\\n1109\\n4942\\n1646\\n1750\\n2933\\n963\\n1757\\n137\\n4100\\n2188\\n2487\\n3027\\n1771\\n1223\\n4458\\n2755\\n247\\n3975\\n2125\\n1071\\n3967\\n3557\\n2741\\n3052\\n2013\\n4741\\n4501\\n975\\n1194\\n2352\\n3548\\n3436\\n462\\n2990\\n1072\\n53\\n920\\n3028\\n3648\\n2... | 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\nTenten runs a weapon shop for ni... | [{"type": "stdin_stdout", "input": "10\n+\n- 3\n+\n+\n+\n+\n- 1\n- 7\n- 9\n- 10\n+\n+\n+\n- 4\n- 5\n- 8\n+\n- 6\n+\n- 2\n", "output": "YES\n3 10 9 7 1 8 5 4 6 2 \n"}, {"type": "stdin_stdout", "input": "10\n+\n- 3\n+\n+\n+\n+\n- 1\n- 7\n- 9\n- 10\n+\n+\n+\n- 4\n- 5\n- 8\n+\n- 6\n+\n- 2\n", "output": "YES\n3 10 9 7 1 8 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\nOne of the games that uses the H... | [{"type": "stdin_stdout", "input": "2\nSSSSSSSSSSSSSSSLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n9\nSSSSSSSSSSSSSSLLLLLLLLLMLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMSL\n6\nMMMMMMSMSLLMMMSMMSLMMMLMMMMLSLLLLMMSMMLMMLLMSSSLMMMMLMLSMLMSMMMMMMMSMMM... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a biologist working on t... | [{"input": "\"PLPPLPLLEELELRPFFMAAGGTPLAMMGG\"\n[\"P\", \"E\", \"L\", \"R\", \"F\", \"M\", \"A\", \"G\", \"T\"]", "output": "[100]", "fn_name": "aa_percentage"}, {"input": "\"PLPPLPLLEELELRPFFMAAGGTPLAMMGG\"\n[\"P\", \"L\"]", "output": "[43]", "fn_name": "aa_percentage"}, {"input": "\"RLMADDFFGQTLMAAAAAAQERRR\"\n[\"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\nVus the Cossack has a field with... | [{"type": "stdin_stdout", "input": "1 2 10\n01\n4 1 5 1\n1 2 1 16\n3 4 3 5\n1 1 1 5\n4 3 6 5\n1 1 1 3\n1 3 4 5\n3 2 3 6\n3 1 5 2\n3 1 3 5\n", "output": "1\n8\n1\n3\n5\n2\n6\n2\n3\n2\n"}, {"type": "stdin_stdout", "input": "1 2 10\n01\n4 1 5 2\n1 2 1 4\n3 4 3 5\n1 3 1 5\n4 3 5 5\n1 1 3 3\n1 3 4 5\n3 2 3 4\n3 1 5 2\n3 1 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMarina loves Sasha. But she keep... | [{"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 99 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\nIn this Kata, you will be given ... | [{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]", "output": "[47]", "fn_name": "total"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]", "output": "[33]", "fn_name": "total"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]", "output": "[21]", "fn_name": "total"}, {"input": "[1, 2, 3, 4, 5, 6, 7... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n The string is called `p... | [{"input": "\"fdsyffdsyffdsyffdsyffdsyf\"", "output": "[false]", "fn_name": "prime_string"}, {"input": "\"utdutdtdutd\"", "output": "[true]", "fn_name": "prime_string"}, {"input": "\"abab\"", "output": "[false]", "fn_name": "prime_string"}, {"input": "\"aaaa\"", "output": "[false]", "fn_name": "prime_string"}, {"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\nMorning desert sun horizon\n\nRi... | [{"type": "stdin_stdout", "input": "7\n1\na\n2\nab\n2\nab\n2\nba\n2\nbc\n26\nabcdeqghujklmnopfrstivwxyz\n26\nabcdefghijklmnopqrstuvwxyz\n", "output": "1\n3\n3\n2\n3\n296\n351\n"}, {"type": "stdin_stdout", "input": "7\n1\na\n2\nca\n2\nab\n2\nba\n2\nad\n26\nabcdeqghujklmnopfrstivwxyz\n26\nabcdefgpijklmnohqrstuvwxyz\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 a total of W x H squar... | [{"type": "stdin_stdout", "input": "10 10\n...*....**\n..........\n**....**..\n........*.\n..*.......\n**........\n.*........\n..........\n....*..***\n.*....*...\n10 10\n..*....*..\n.*.*...*..\n*****..*..\n*...*..*..\n*...*..*..\n..........\n.***.*..**\n..*..*...*\n.*...*...*\n****..***.\n2 3\n...\n...\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\nA very passive-aggressive co-wor... | [{"input": "\"Uif usjdl up uijt lbub jt tjnqmf\"", "output": "[\"The trick to this kata is simple\"]", "fn_name": "one_down"}, {"input": "\"J ipqf zpv bsf ibwjoh b ojdf ebz\"", "output": "[\"I hope you are having a nice day\"]", "fn_name": "one_down"}, {"input": "[\"Hello there\", \"World\"]", "output": "[\"Input is no... | 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 currently in the United ... | [{"input": "730\n\"Bangladeshi Taka\"", "output": "[\"You now have 59860 of Bangladeshi Taka.\"]", "fn_name": "convert_my_dollars"}, {"input": "25\n\"Bangladeshi Taka\"", "output": "[\"You now have 2050 of Bangladeshi Taka.\"]", "fn_name": "convert_my_dollars"}, {"input": "768\n\"Dominican Peso\"", "output": "[\"You no... | 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\nAndrewid the Android is a galaxy... | [{"type": "stdin_stdout", "input": "100 19\n6 62 72 83 91 94 97\n3 61 84 99\n1 63\n5 46 53 56 69 78\n5 41 43 49 74 89\n5 55 57 79 85 87\n3 47 59 98\n3 64 76 82\n3 48 66 75\n2 60 88\n2 67 77\n4 40 51 73 95\n41 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 44 71 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMaki is a house cat. One day she... | [{"type": "stdin_stdout", "input": "3\n0 -1 100 001\n60 100 50\n100 110 10\n25 75 50\n4\n0 0 100 000\n50 50 50\n150 50 50\n50 150 50\n150 117 50\n0", "output": "0\n0\n"}, {"type": "stdin_stdout", "input": "3\n0 0 100 101\n60 100 50\n100 100 10\n80 80 50\n4\n0 0 100 100\n50 50 50\n150 50 50\n50 150 50\n150 150 50\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\nLast week, Hamed learned about a... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "infinity\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "infinity"}, {"type": "stdin_stdout", "input": "1000000000 1000001000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1204165230 1287214915\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\nLet us consider the following op... | [{"type": "stdin_stdout", "input": "AAAAABBBBAAABBBBAAAA\nBBBBAAABBBBBBAAAAABB\n10\n2 15 2 13\n2 13 6 16\n1 13 2 20\n4 20 3 20\n1 18 9 19\n2 14 1 11\n3 20 3 15\n6 16 1 17\n4 18 8 20\n7 20 3 14\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "AAAAABBBBAAABBBBAAAA\nBBBBA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 slimes lining up fro... | [{"type": "stdin_stdout", "input": "99798\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rare article in the Internet i... | [{"type": "stdin_stdout", "input": "A,3,B,2,C,0,D,1,E,0,F,1,G,0,H,1,I,1,J,0,K,1,L,0,M,2,N,0,O,1,P,0\n", "output": "4\nA K M \nB F H L N O \nC D G I P \nE J \n"}, {"type": "stdin_stdout", "input": "A,3,B,2,C,0,D,1,E,0,F,1,G,0,H,1,I,1,J,0,K,1,L,0,M,2,N,0,O,1,P,0\n", "output": "4\nA K M \nB F H L N O \nC D G I P \nE J \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\nCreate a function that returns t... | [{"input": "[25, 42, 12, 18, 22]", "output": "[30]", "fn_name": "sum_two_smallest_numbers"}, {"input": "[7, 15, 12, 18, 22]", "output": "[19]", "fn_name": "sum_two_smallest_numbers"}, {"input": "[13, 12, 5, 61, 22]", "output": "[17]", "fn_name": "sum_two_smallest_numbers"}, {"input": "[5, 8, 12, 18, 22]", "output": "[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\nInternet search engines, such as... | [{"type": "stdin_stdout", "input": "niW todax's premiminary contest `nd eb eqjgilaue ot vhsit Uniwersity of Aizu-", "output": "niW `nd vhsit Aizu-\n"}, {"type": "stdin_stdout", "input": "pUi sod'xsa yqnlibiocro tsfsloc `cn bg fualhgdpj pv hjssv Umjweqsity dn vyjA-", "output": "pUi `cn hjssv vyjA-\n"}, {"type": "stdin_s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider the range `0` to `10`. ... | [{"input": "1000\n3000", "output": "[12801]", "fn_name": "solve"}, {"input": "2000\n5000", "output": "[25005]", "fn_name": "solve"}, {"input": "2\n2000", "output": "[17705]", "fn_name": "solve"}, {"input": "2\n200", "output": "[457]", "fn_name": "solve"}, {"input": "0\n20", "output": "[14]", "fn_name": "solve"}] | 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\nComplete the function `scramble... | [{"input": "\"cedewaraaossoqqyt\"\n\"codewars\"", "output": "[true]", "fn_name": "scramble"}, {"input": "\"scriptingjava\"\n\"javascript\"", "output": "[true]", "fn_name": "scramble"}, {"input": "\"scriptsjava\"\n\"javascripts\"", "output": "[true]", "fn_name": "scramble"}, {"input": "\"scriptjavx\"\n\"javascript\"", "... | 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\nEach student eagerly awaits the ... | [{"type": "stdin_stdout", "input": "100 100 100 100\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "101 100 100 100\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "100 100 100 100\n", "output": "-1"}, {"type": "stdin_stdout", "input": "100 0 100 100\n", "output": "-1\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\nSam has been teaching Jon the Ga... | [{"type": "stdin_stdout", "input": "124\n34\n44\n21\n55\n1\n36\n53\n31\n58\n59\n11\n40\n20\n32\n43\n48\n16\n5\n35\n20\n21\n36\n15\n2\n11\n56\n58\n2\n40\n47\n29\n21\n4\n21\n1\n25\n51\n55\n17\n40\n56\n35\n51\n1\n34\n18\n54\n44\n1\n43\n16\n28\n21\n14\n57\n53\n29\n44\n59\n54\n47\n21\n43\n41\n11\n37\n30\n4\n39\n47\n40\n50\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 cave consisting of N ... | [{"type": "stdin_stdout", "input": "600 6251\n421 424\n422 488\n346 422\n556 565\n162 425\n500 595\n155 570\n391 405\n572 598\n287 416\n534 564\n452 513\n361 465\n31 420\n531 533\n45 458\n170 310\n176 284\n445 477\n319 415\n106 343\n405 428\n401 478\n178 456\n433 534\n532 584\n351 392\n252 319\n435 496\n341 521\n553 56... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nGiven an array of inte... | [{"input": "[2, 1, 2, 2, 6, 5, 0, 2, 0, 5, 5, 7, 7, 4, 3, 3, 9]", "output": "[6]", "fn_name": "sum_groups"}, {"input": "[2, 1, 2, 2, 6, 5, 0, 2, 0, 3, 3, 3, 9, 2]", "output": "[5]", "fn_name": "sum_groups"}, {"input": "[1, 1, 2, 2]", "output": "[1]", "fn_name": "sum_groups"}, {"input": "[1, 2]", "output": "[2]", "fn_na... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya very much likes pla... | [{"type": "stdin_stdout", "input": "1110110101111111001111111110111011100001110111011001011111111111011010011111?111111?011111110001010110011111010111100111?111101010011101010?011111101010111111111101111010111?1111111100110110001111101111100100110011101111011110111000111?011110?111110?1011010111101111101111010100111110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a pot and N ingredients... | [{"type": "stdin_stdout", "input": "50\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000\n", "output": "1000\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhereas humans nowadays read few... | [{"type": "stdin_stdout", "input": "11 1\n1 2 3 10 1 10 10 1 1 3 5\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "11 1\n1 2 3 5 1 10 10 1 1 3 5\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "11 1\n1 2 3 5 1 10 10 1 1 3 5\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "11 1\n1 4 3 5 1 10 10 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 look and say sequence is a s... | [{"input": "\"1\"\n5", "output": "[\"111221\"]", "fn_name": "look_and_say_sequence"}, {"input": "\"14\"\n2", "output": "[\"1114\"]", "fn_name": "look_and_say_sequence"}, {"input": "\"22\"\n10", "output": "[\"22\"]", "fn_name": "look_and_say_sequence"}, {"input": "\"1\"\n3", "output": "[\"21\"]", "fn_name": "look_and_sa... | 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\nLittle Petya wanted to give an A... | [{"type": "stdin_stdout", "input": "13\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "16\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "11\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "15\n", "output": "1\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\nJeel and Ashish play a game on a... | [{"type": "stdin_stdout", "input": "5\n5 5\n0 126 30 105 44\n126 98 21 0 108\n124 30 110 82 31\n119 117 87 99 97\n55 72 124 61 0\n5 5\n0 154 44 96 5\n82 20 16 99 66\n56 10 90 63 70\n99 87 103 0 23\n107 26 70 23 -1\n5 5\n100 112 41 120 29\n32 20 36 160 50\n100 11 92 7 30\n80 93 0 83 60\n69 31 24 102 48\n5 2\n0 100\n73 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\nVasya and Petya take part in a C... | [{"type": "stdin_stdout", "input": "26\n3 -1 71 -1 42\n85 72 48 38 -1\n-1 -1 66 24 -1\n46 -1 60 99 107\n53 106 51 -1 104\n-1 17 98 54 -1\n44 107 66 65 102\n47 40 62 34 5\n-1 10 -1 98 -1\n-1 69 47 85 75\n12 62 -1 15 -1\n48 63 72 32 99\n91 104 111 -1 -1\n92 -1 52 -1 11\n118 25 97 1 108\n-1 61 97 37 -1\n87 47 -1 -1 21\n79... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n```python\nremove(text, w... | [{"input": "\"codewars\"\n{\"c\": 5, \"o\": 1, \"d\": 1, \"e\": 1, \"w\": 1, \"z\": 1, \"a\": 1, \"r\": 1, \"s\": 1}", "output": "[\"\"]", "fn_name": "remove"}, {"input": "\"apples and bananas\"\n{\"a\": 50, \"n\": 1}", "output": "[\"pples d bnns\"]", "fn_name": "remove"}, {"input": "\"this is a string\"\n{\"t\": 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\nThis problem differs from the ne... | [{"type": "stdin_stdout", "input": "100\n463 6421 2912 1546 3999 5175 4357 2259 7380 6081 1148 7857 3532 4168 5643 14175 2568 6681 975 9216 4590 5217 6215 7422 6631 1651 39 4268 8290 2022 3175 8281 1552 980 9314 234 934 5133 6712 1880 2766 5042 5004 5455 6038 6010 6022 1553 4015 4544 3985 4033 223 7682 6302 2121 4832 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLimak is a little polar bear. He... | [{"type": "stdin_stdout", "input": "100 1000\n-62 57 -27 -67 49 -10 66 -64 -36 -78 62 -75 -39 75 -47 -36 41 -88 62 -43 22 29 -20 58 40 16 71 -2 -87 12 86 -90 -92 67 -12 -48 -10 -26 78 68 22 -3 66 -95 -81 34 14 -76 -27 76 -60 87 -84 3 35 -60 46 -65 29 -29 2 -44 -55 18 -75 91 36 34 -86 53 59 -54 -29 33 -95 66 9 72 67 -44... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 likes watching sports... | [{"type": "stdin_stdout", "input": "90\n1 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 86 87 88 89 90\n", "output": "90\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\nIgor has been into chess for a l... | [{"type": "stdin_stdout", "input": "13\n.............\n.....o.......\n......o......\n.............\n...o........o\no............\n.............\n..o..........\n..........ooo\n.............\n..o...o.....o\n.............\n.o........o..\n", "output": "YES\nxx......................x\nxx.....x........x.......x\n............... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a grid with `$m$` rows ... | [{"input": "123\n456", "output": "[448843261729071620474858205566477025894357385375655014634306680560209909590802545266425906052279365647506075241055256064119806400]", "fn_name": "number_of_routes"}, {"input": "10\n10", "output": "[184756]", "fn_name": "number_of_routes"}, {"input": "100\n3", "output": "[176851]", "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\nYou will be given a string (x) f... | [{"input": "\"C.....m\"", "output": "[\"Escaped!\"]", "fn_name": "cat_mouse"}, {"input": "\"C....m\"", "output": "[\"Escaped!\"]", "fn_name": "cat_mouse"}, {"input": "\"m...C\"", "output": "[\"Caught!\"]", "fn_name": "cat_mouse"}, {"input": "\"C..m\"", "output": "[\"Caught!\"]", "fn_name": "cat_mouse"}, {"input": "\"C.... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has the square chessboard ... | [{"type": "stdin_stdout", "input": "500 43\n176 85\n460 171\n233 260\n73 397\n474 35\n290 422\n309 318\n280 415\n485 169\n106 22\n355 129\n180 301\n205 347\n197 93\n263 318\n336 382\n314 350\n476 214\n367 277\n333 166\n500 376\n236 17\n94 73\n116 204\n166 50\n168 218\n144 369\n340 91\n274 360\n171 360\n41 251\n262 478\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice, Bob and Charlie are playi... | [{"type": "stdin_stdout", "input": "abcb\naacb\nbccc\n", "output": "C\n"}, {"type": "stdin_stdout", "input": "abcb\naabb\nbccc", "output": "B\n"}, {"type": "stdin_stdout", "input": "aaca\naabb\ncccc", "output": "C\n"}, {"type": "stdin_stdout", "input": "abcb\nbbaa\nbccc", "output": "B\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a password which you of... | [{"type": "stdin_stdout", "input": "44 20\nbcdefghijklmnopqrstabcdefghijklmnopqrstatata\n", "output": "61\n"}, {"type": "stdin_stdout", "input": "44 20\ncdefghijklmnopqrstabcdefghijklmnopqrstabtata\n", "output": "62\n"}, {"type": "stdin_stdout", "input": "44 20\natatbatsrqponmlkjihgfedcbatsrqponmlkjihgfedc\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\nProblem\n\nNeat lives on the wor... | [{"type": "stdin_stdout", "input": "8\n2 9 297 297\n8 6 359 211\n8 16 28 233\n7 9 113 143\n3 18 315 190\n10 18 277 300\n9 5 276 88\n3 5 322 40", "output": "297\n"}, {"type": "stdin_stdout", "input": "8\n2 9 297 297\n8 6 359 211\n8 16 28 288\n7 9 113 143\n3 18 315 190\n10 18 277 300\n9 5 276 88\n3 5 322 40", "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\nProblem\n\nSatake doesn't like b... | [{"type": "stdin_stdout", "input": "3\n2 -1\n1 3\n-2 -1", "output": "439.6951535312\n"}, {"type": "stdin_stdout", "input": "3\n1 0\n0 1\n-2 -2", "output": "405.0000000000\n"}, {"type": "stdin_stdout", "input": "3\n1 1\n0 1\n-2 -1", "output": "386.5650511771\n"}, {"type": "stdin_stdout", "input": "3\n1 0\n0 1\n-2 0", "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\nLittle kids, Jack and Evan like ... | [{"type": "stdin_stdout", "input": "10 6\nCLICK 2\nCLICK 3\nCLICK 3\nCLICK 2\nCLOSEALL\nCLICK 1", "output": "1\n2\n1\n0\n0\n1\n"}, {"type": "stdin_stdout", "input": "16 6\nCLICK 2\nCLICK 1\nCLICK 3\nCLICK 3\nCLOSEALL\nCLICK 1", "output": "1\n2\n3\n2\n0\n1\n"}, {"type": "stdin_stdout", "input": "16 6\nCLICK 2\nCLICK 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\nSome days ago, I learned the con... | [{"type": "stdin_stdout", "input": "1559681\n", "output": "3794080223197672320\n"}, {"type": "stdin_stdout", "input": "1362308\n", "output": "2528276952771261580\n"}, {"type": "stdin_stdout", "input": "1165938\n", "output": "1584981275574379920\n"}, {"type": "stdin_stdout", "input": "1001000\n", "output": "100299899299... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 A of N numbers, f... | [{"type": "stdin_stdout", "input": "10\n807\n935399 145100 -386862 856283 628359 256963 -461034 935399 776945 -759500 -759500 935399 -967263 649644 -24686 -452785 -352467 688773 908612 -386862 -479957 -146506 439811 -506538 -146506 145100 -461034 935399 -352307 -181185 740341 740341 439811 742466 -854789 700140 -740255... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Vasya the Hipster decide... | [{"type": "stdin_stdout", "input": "171 100\n", "output": "100 35\n"}, {"type": "stdin_stdout", "input": "171 110\n", "output": "110 30\n"}, {"type": "stdin_stdout", "input": "287 100\n", "output": "100 93\n"}, {"type": "stdin_stdout", "input": "287 101\n", "output": "101 93\n"}, {"type": "stdin_stdout", "input": "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\nA student of z-school found a ki... | [{"type": "stdin_stdout", "input": "100\n82 51 81 26 37 17 78 92 68 15 8 86 120 8 87 77 67 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 76 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 113 44 39 29 92 3 49 22 53 114 86 52 74 12 79 43 26 23 44 9 82 47 19 40 12 9 3 23 37 85 46 22 126 52 98 64 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHigh school student Vasya got a ... | [{"type": "stdin_stdout", "input": "100 10\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 30\nbbaabaaabbbbbbbbbbaababababbbbbbaabaabbbbbbbbabbbbbabbbbabbbbbbbbaabbbbbbbbbabbbbbabbbbbbbbbaaaaabba\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA zero-indexed array ```arr``` c... | [{"input": "[3, 4, 3, 2, 3, 1, 3, 3]", "output": "[3]", "fn_name": "dominator"}, {"input": "[1, 1, 1, 2, 2, 2, 2]", "output": "[2]", "fn_name": "dominator"}, {"input": "[1, 1, 1, 2, 2, 2]", "output": "[-1]", "fn_name": "dominator"}, {"input": "[1, 2, 3, 4, 5]", "output": "[-1]", "fn_name": "dominator"}, {"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\nProblem\n\nHere is a list of str... | [{"type": "stdin_stdout", "input": "7\nshf\nslldr\nsea\nshells\nyb\nteh\nsaeshore", "output": "a\nb\ne\nf\nh\nr\n"}, {"type": "stdin_stdout", "input": "7\nshf\nsller\nsae\nshells\nby\nteh\nsfeshora", "output": "a\ne\nf\nh\nr\ny\n"}, {"type": "stdin_stdout", "input": "7\nshg\nsller\nsae\nshells\nby\nteh\nsfeshora", "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\nDeoxyribonucleic acid, DNA is th... | [{"input": "\"GAAGCTTATCCGTTCCTGAAGGCTGTGGCATCCTCTAAATCAGACTTGGCTACGCCGTTAGCCGAGGGCTTAGCGTTGAGTGTCATTATATACGCGGCCTGCGACCTGGCCACACAATGCCCTCGAAAATTTTTCTTTCGGTTATACGAGTTGCGAAACCTTTCGCGCGTAGACGAAGAATTTGAAGTGGCCTACACCGTTTGGAAAGCCGTTCTCATTAGAATGGTACCGACTACTCGGCTCGGAGTCATTGTATAGGGAGAGTGTCGTATCAACATCACACACTTTTAGCATTTAAGGTCCATG... | 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\nFor integers b (b \\geq 2) and n... | [{"type": "stdin_stdout", "input": "100000000000\n100000000000\n", "output": "100000000001\n"}, {"type": "stdin_stdout", "input": "100000000000\n50000000000\n", "output": "50000000001\n"}, {"type": "stdin_stdout", "input": "99999515529\n49999757765\n", "output": "49999757765\n"}, {"type": "stdin_stdout", "input": "9999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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_1, a_2... | [{"type": "stdin_stdout", "input": "2\n5\n2 2 2 2 2\n6\n1 3 3 1 2 3\n", "output": "5\n2\n"}, {"type": "stdin_stdout", "input": "2\n5\n2 2 2 4 2\n6\n1 3 3 1 2 3\n", "output": "1\n2\n"}, {"type": "stdin_stdout", "input": "2\n5\n2 2 3 4 2\n6\n2 3 3 1 2 3\n", "output": "0\n2\n"}, {"type": "stdin_stdout", "input": "2\n5\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\nA lot of people associate Logo p... | [{"type": "stdin_stdout", "input": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n50\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "TFFFTTTFFFFTFFTTFTTFTTFFTFFFTTTTTTFTTTTTTFFFFFFFTFFFFTTTFTFFTTTTTTFFFFFTTFTFTFFFTFTTFFTTFFFTTFFFTTTT\n1\n", "output": "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\nSereja and his friends went to a... | [{"type": "stdin_stdout", "input": "50\n507 31\n31 250\n414 763\n169 304\n901 9\n592 610\n763 414\n656 789\n411 422\n360 468\n625 504\n538 201\n549 619\n484 797\n596 282\n42 310\n603 656\n351 623\n292 293\n837 180\n375 658\n21 192\n597 729\n22 512\n349 635\n200 56\n669 647\n485 887\n282 939\n735 808\n54 417\n1000 310\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\nTom loves vowels, and he likes l... | [{"type": "stdin_stdout", "input": "34110\n", "output": "aeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaeiouaei... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 D: Legendary Sword\n\n* ... | [{"type": "stdin_stdout", "input": "10 10\nS . . . . . . . . .\n. . . . . . . . . .\n. . . . 1 . . . . .\n. . . . . . . . . .\n. . . . . . . . . .\n. . . . . . . 3 . .\n. . . . . . . . . .\n. . . . . 4 . . . .\n. . . . . . . . . .\n2 . . . . . . . . G\n10 10\nS . . . . . 3 . . .\n. . 3 . . . . . . .\n. . . . 1 . . . . ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are organizing a boxing tour... | [{"type": "stdin_stdout", "input": "128\n-1 37 147 12 24 35 86 39 20 27 86 95 51 8 33 32 55 35 8 75 74 79 64 51 66 32 34 45 39 89 19 11 86 31 69 58 40 58 62 11 99 54 31 10 4 70 88 22 94 23 46 20 65 97 61 39 31 65 23 31 95 78 40 25 51 14 12 55 8 63 18 57 91 75 31 26 22 84 29 22 32 64 20 12 49 92 50 4 97 17 26 88 10 56 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\nAfter all the events in Orlando ... | [{"type": "stdin_stdout", "input": "15 10 15\n1\n2\n3\n4\n5\n6\n12\n8\n9\n10\n11\n12\n13\n14\n15\n", "output": ".X.X.XXX.XXXXXX"}, {"type": "stdin_stdout", "input": "15 10 15\n1\n2\n5\n6\n5\n6\n7\n12\n9\n10\n11\n12\n13\n14\n15\n", "output": ".X.X.X.X.XXXXXX"}, {"type": "stdin_stdout", "input": "17 10 15\n1\n2\n5\n6\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\nA large banner with word CODEFOR... | [{"type": "stdin_stdout", "input": "CODEFOGSIUZMZCMWAVQHNYFEKIEZQMAZOVEMDRMOEDBHAXPLBLDYYXCVTOOSJZVSQAKFXTBTZFWAYRZEMDEMVDJTDRXXAQBURCES\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "CODEFOGSIUZMZCMWAVQHNYFEKIEZQMAZOVEMDRMOEDBHAXPLBLDYYXCVTOOSJZVSQAKFXTBTZFWAYRZEMDEMVDJTDRXXAQBURCES\n", "output": "YES\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, the lord ordered a carp... | [{"type": "stdin_stdout", "input": "6\n4\n1,2,2,2\n1,3,4,3\n1,4,4,2\n2,5,3,2\n3,4,4,2\n3,6,1,2\n4,6,1,1\n5,6,1,2\n2,4,50,30", "output": "-11\n"}, {"type": "stdin_stdout", "input": "6\n8\n1,1,2,2\n3,4,3,0\n1,4,4,2\n2,3,5,2\n3,4,4,2\n3,6,1,2\n4,6,1,1\n5,6,2,2\n2,4,5,030", "output": "-36\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are K nuclear reactor cham... | [{"type": "stdin_stdout", "input": "1 22 82", "output": "1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "2 8 47", "output": "2 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\nPolycarp analyzes the prices of ... | [{"type": "stdin_stdout", "input": "5\n6\n3 5 4 12 2 5\n1\n1000000\n2\n2 0\n10\n31 41 59 26 82 66 97 127 23 84\n7\n2 2 1 2 3 4 5\n", "output": "4\n0\n1\n8\n2\n"}, {"type": "stdin_stdout", "input": "5\n6\n3 5 4 12 2 5\n1\n1000000\n2\n2 0\n10\n31 41 50 26 82 66 97 127 23 84\n7\n2 2 1 2 3 4 5\n", "output": "4\n0\n1\n8\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\nZookeeper is playing a game. In ... | [{"type": "stdin_stdout", "input": "3\nAAA\nBABA\nAABBBABBBB\n", "output": "3\n2\n0\n"}, {"type": "stdin_stdout", "input": "3\nAAA\nAABA\nAABBBABBBB\n", "output": "3\n2\n0\n"}, {"type": "stdin_stdout", "input": "3\nAAB\nBABA\nAABBBABBBB\n", "output": "1\n2\n0\n"}, {"type": "stdin_stdout", "input": "3\nAAB\nBABA\nBBBBAB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Little Elephant very much lo... | [{"type": "stdin_stdout", "input": "100000000000000000 1000000000000000000\n", "output": "90000000000000000\n"}, {"type": "stdin_stdout", "input": "779547115376367013 980561039207670775\n", "output": "20101392383130376\n"}, {"type": "stdin_stdout", "input": "458985985498001244 985458425544874008\n", "output": "52647244... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "1987385827\n", "output": "3123034907 15899086625\n"}, {"type": "stdin_stdout", "input": "1286843196\n", "output": "1286843244 10294745577\n"}, {"type": "stdin_stdout", "input": "1600010311\n", "output": "1936854671 12800082497\n"}, {"type": "stdin_stdout", "input": "1856589245\n", "o... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.