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\nYou are given an array of $n$ po... | [{"type": "stdin_stdout", "input": "100\n23 39 85 46 97 72 41 70 37 18 8 40 33 61 12 79 51 78 61 66 85 97 78 14 70 47 100 40 15 40 61 52 19 30 14 91 82 56 10 6 68 24 97 61 31 78 18 45 88 6 37 38 51 86 37 42 58 30 79 56 50 14 61 18 13 20 57 3 93 15 24 74 32 21 71 93 2 66 25 75 75 10 86 82 30 31 6 49 15 33 100 35 1 96 87... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 loves playin... | [{"type": "stdin_stdout", "input": "6 6\n1 2 2 3 3 3\n1 2\n2 2\n1 3\n2 4\n4 6\n1 6\n", "output": "1\n0\n2\n1\n1\n3\n"}, {"type": "stdin_stdout", "input": "6 6\n1 2 2 3 3 3\n1 2\n2 2\n1 3\n2 4\n4 6\n1 3\n", "output": "1\n0\n2\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6 6\n1 2 2 3 2 3\n1 2\n2 2\n1 3\n2 4\n4 6\n1 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a playlist consisting o... | [{"type": "stdin_stdout", "input": "10 1\n135600 59157\n2735 28902\n43406 39542\n24166 178402\n18565 14980\n69958 53925\n23473 81878\n89682 3949\n18757 31637\n35580 45873\n", "output": "8021689200\n"}, {"type": "stdin_stdout", "input": "10 1\n135600 59157\n2735 28902\n43406 39542\n24166 93361\n18565 14980\n69958 53925\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFilled with optimism, Hyunuk wil... | [{"type": "stdin_stdout", "input": "4\n544431836 544432042 793496989 793497079\n544429970 544430041 793496343 793496350\n544432412 544432541 793497670 793498269\n544431029 544431033 793494552 793494859\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "4\n922033367 922033530 246113700 246113747\n922034178 92203... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 February 14 Denis decided to ... | [{"type": "stdin_stdout", "input": "5\n8 6\n1 2 4 1 2 7 1 2\n5 3\n3 2 3 2 1\n10 8\n7 4 7 6 2 3 0 1 -1 1\n15 10\n3 14 4 8 2 1 4 5 21 2 0 4 2 1 3\n7 5\n1 2 3 4 2 6 2\n", "output": "3 2\n2 2\n4 2\n4 1\n3 3\n"}, {"type": "stdin_stdout", "input": "5\n8 6\n1 2 4 1 2 7 1 2\n5 3\n3 2 3 2 1\n10 8\n7 4 7 6 2 3 0 1 -1 1\n15 10\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKode Festival is an anual contes... | [{"type": "stdin_stdout", "input": "3\n2\n1\n-3\n4\n-1\n25\n110\n1014", "output": "872\n"}, {"type": "stdin_stdout", "input": "3\n2\n1\n-3\n4\n-1\n25\n111\n1014", "output": "871\n"}, {"type": "stdin_stdout", "input": "3\n2\n1\n-3\n4\n-2\n25\n111\n1014", "output": "870\n"}, {"type": "stdin_stdout", "input": "3\n2\n1\n-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\nJzzhu have n non-negative intege... | [{"type": "stdin_stdout", "input": "55\n0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 4 5 6 7 8 9 5 6 7 8 9 6 7 8 9 7 8 9 8 9 9\n", "output": "621247139\n"}, {"type": "stdin_stdout", "input": "55\n0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 2 3 4 10 6 7 8 9 3 4 5 6 7 8 9 4 5 6 7 8 9 5 6 7 8 9 6 7 8 9 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\nLittle girl Tanya is learning ho... | [{"type": "stdin_stdout", "input": "1000000000 0\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1559848638 5\n", "output": "1559848633\n"}, {"type": "stdin_stdout", "input": "1100000000 0\n", "output": "1100000000\n"}, {"type": "stdin_stdout", "input": "1086932676 10\n", "output": "108693264\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have an axis-aligned rectang... | [{"type": "stdin_stdout", "input": "5\n8 5\n2 1 7 4\n4 2\n5 4\n2 2 5 4\n3 3\n1 8\n0 3 1 6\n1 5\n8 1\n3 0 6 1\n5 1\n8 10\n4 5 7 8\n8 5\n", "output": "1.000000000\n-1\n2.000000000\n2.000000000\n0.000000000\n"}, {"type": "stdin_stdout", "input": "5\n8 5\n2 1 7 4\n4 2\n5 4\n2 2 5 4\n3 3\n1 8\n0 3 1 6\n1 5\n8 1\n3 0 6 1\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\nParsa has a humongous tree on $n... | [{"type": "stdin_stdout", "input": "3\n2\n2 10\n6 6\n1 2\n3\n1 3\n13 6\n7 15\n1 2\n2 3\n6\n10 14\n12 20\n21 19\n2 12\n10 17\n3 17\n3 2\n6 5\n1 5\n2 6\n4 6\n", "output": "4\n18\n48\n"}, {"type": "stdin_stdout", "input": "3\n2\n0 6\n3 13\n1 2\n3\n1 3\n10 6\n12 9\n1 2\n2 3\n6\n3 14\n9 20\n12 19\n1 12\n11 17\n3 17\n3 3\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\nThis problem is a complicated ve... | [{"type": "stdin_stdout", "input": "10\n10\n-30 45 -37 -11 25 61 97 7 7 35\n10\n48 -2 13 88 97 -27 40 88 41 -67\n10\n-13 -31 94 -43 19 95 -35 5 41 10\n10\n-28 -88 17 17 2 -43 -73 -73 -13 2\n10\n46 -73 47 54 -13 67 7 -33 1 -33\n10\n60 92 -100 -76 -12 -52 4 84 -38 36\n10\n50 62 56 -58 -10 87 29 52 14 -22\n10\n-78 50 -52 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHo ho! So you think you know int... | [{"input": "501337501337101", "output": "[3]", "fn_name": "champernowneDigit"}, {"input": "77199254740991", "output": "[7]", "fn_name": "champernowneDigit"}, {"input": "101800813569", "output": "[6]", "fn_name": "champernowneDigit"}, {"input": "1000599563", "output": "[1]", "fn_name": "champernowneDigit"}, {"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\n# A wolf in sheep's clothing\n\n... | [{"input": "[\"sheep\", \"sheep\", \"sheep\", \"sheep\", \"sheep\", \"wolf\", \"sheep\", \"sheep\"]", "output": "[\"Oi! Sheep number 2! You are about to be eaten by a wolf!\"]", "fn_name": "warn_the_sheep"}, {"input": "[\"sheep\", \"wolf\", \"sheep\", \"sheep\", \"sheep\", \"sheep\", \"sheep\"]", "output": "[\"Oi! Shee... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe phantom thief \"Lupin IV\" i... | [{"type": "stdin_stdout", "input": "5\n13 199 1\n93 1000 1\n37 350 10\n27 300 2\n123 200 1100", "output": "93 37 27 13 123\n"}, {"type": "stdin_stdout", "input": "5\n11 199 0\n93 1000 1\n37 350 10\n27 300 2\n123 200 1100", "output": "93 37 27 11 123\n"}, {"type": "stdin_stdout", "input": "5\n11 91 0\n124 1000 1\n37 350... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an active Internet user... | [{"type": "stdin_stdout", "input": "ftpprutpfrutrutptpfrutpfrutfrutrfrutpfrutprutruruu\n", "output": "ftp://p.ru/tpfrutrutptpfrutpfrutfrutrfrutpfrutprutruruu\n"}, {"type": "stdin_stdout", "input": "ftpprutufrutrutptpfrutpfrutfrutrfrutpfrptprutruruu\n", "output": "ftp://p.ru/tufrutrutptpfrutpfrutfrutrfrutpfrptprutruruu"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 infinite sequence o... | [{"type": "stdin_stdout", "input": "100000000000000\n", "output": "1749820\n"}, {"type": "stdin_stdout", "input": "99999998250180\n", "output": "14142135\n"}, {"type": "stdin_stdout", "input": "99999998250180\n", "output": "14142135\n"}, {"type": "stdin_stdout", "input": "100000000000000\n", "output": "1749820\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonocarp has decided to buy a ne... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "1000000000000000000\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\nGuy-Manuel and Thomas are going ... | [{"type": "stdin_stdout", "input": "8\n-440365664 -897818514\n107345267 -994221803\n248590739 -968608613\n473576011 -880752952\n105203574 994450706\n-164464580 1061907476\n-522092561 852888831\n-874210729 485546704\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "8\n-845415846 -897818514\n107345267 -994221803\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLunar New Year is approaching, a... | [{"type": "stdin_stdout", "input": "14\nXXX.XXXXX..X.X\nX..XX..X...X..\n.....X.XX..XXX\n.X..X..XXX.XX.\n...XXXX.XX..XX\n.X..XX...XXX..\nXX.XX.XX..XXX.\n.X..X.....X.XX\n...XXX...XX.XX\nXXX.XX.XX.X.XX\nX.XXXX..XX.XX.\n.X.XX....X....\nX..XX..X.XX.X.\n..X...XX....XX\n", "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\nInput\n\nThe first line of the i... | [{"type": "stdin_stdout", "input": "10\n2 0 0 1 1\n1 1 1 2 1\n2 1 0 1 2\n1 1 0 1 1\n2 1 0 2 1\n1 1 1 2 1\n1 2 1 3 1\n2 0 0 1 1\n1 1 0 1 1\n1 1 2 2 2\n", "output": "\ncodeforcez\n"}, {"type": "stdin_stdout", "input": "1\n1 0 0 1 0\n", "output": "codeforcez\n"}, {"type": "stdin_stdout", "input": "1\n1 0 0 1 0\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 an array of integers a... | [{"type": "stdin_stdout", "input": "7\n1\n1\n2\n2 2\n2\n2 2\n3\n1 2 3\n3\n1 1 1\n3\n3 1 2\n4\n2 1 4 3\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n1\n1\n2\n1 2\n2\n1 1\n3\n1 2 3\n3\n2 1 1\n3\n3 1 1\n4\n4 1 4 3\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\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 a picture consisti... | [{"type": "stdin_stdout", "input": "9\n5 5\n..*..\n..*..\n*****\n..*..\n..*..\n3 4\n****\n.*..\n.*..\n4 3\n***\n*..\n*..\n*..\n5 5\n*****\n*.*.*\n*****\n..*.*\n..***\n1 4\n****\n5 5\n.....\n..*..\n.***.\n..*..\n.....\n5 3\n...\n.*.\n.*.\n***\n.*.\n3 3\n.*.\n*.*\n.*.\n4 4\n*.**\n....\n*.**\n*.**\n", "output": "0\n0\n0\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\nProblem\n\nThere are coins with ... | [{"type": "stdin_stdout", "input": "12 110 467", "output": "469611202\n"}, {"type": "stdin_stdout", "input": "12 100 467", "output": "732809678\n"}, {"type": "stdin_stdout", "input": "12 13 187", "output": "455459798\n"}, {"type": "stdin_stdout", "input": "12 60 467", "output": "654858060\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\nMad scientist Mike entertains hi... | [{"type": "stdin_stdout", "input": "115\n10\n10\n10\n10\n01\n01\n10\n10\n10\n01\n01\n10\n01\n01\n10\n10\n10\n01\n10\n01\n10\n10\n01\n01\n10\n10\n10\n10\n01\n10\n01\n01\n10\n10\n10\n10\n01\n10\n10\n10\n01\n10\n01\n10\n10\n10\n10\n01\n01\n01\n10\n10\n01\n01\n01\n10\n10\n01\n10\n01\n01\n01\n01\n10\n10\n01\n10\n01\n01\n01\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 introduce some definitions... | [{"type": "stdin_stdout", "input": "1000000000 1000000000000000000\n", "output": "997440007\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000000000000\n", "output": "997440007\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000010000000\n", "output": "778038345\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\nAlice has just learned addition.... | [{"type": "stdin_stdout", "input": "2\n352942581\n1100110000\n", "output": "192407906\n102030199\n"}, {"type": "stdin_stdout", "input": "2\n178886702\n1100110000\n", "output": "148360651\n102030199\n"}, {"type": "stdin_stdout", "input": "2\n139544809\n1100110000\n", "output": "69014088\n102030199\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\nA progress bar is an element of ... | [{"type": "stdin_stdout", "input": "100 101 100\n", "output": "101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 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\nOn the way to Rio de Janeiro Ost... | [{"type": "stdin_stdout", "input": "100 20\n.....G.#.#..................#.........##....#...................#.#..........#...#.#.T..#.......#...\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 33\nG..................................................................................................T\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\nGiven time in 24-hour format, co... | [{"input": "\"23:31\"", "output": "[\"twenty nine minutes to midnight\"]", "fn_name": "solve"}, {"input": "\"11:31\"", "output": "[\"twenty nine minutes to twelve\"]", "fn_name": "solve"}, {"input": "\"13:29\"", "output": "[\"twenty nine minutes past one\"]", "fn_name": "solve"}, {"input": "\"00:08\"", "output": "[\"ei... | 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 an experienced Codeforce... | [{"type": "stdin_stdout", "input": "5\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n99999997 999999998 999999998 999999999\n", "output": "899999999100000001\n449999999550000002\n899999999100000001\n4499999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStudent A and student B are givi... | [{"input": "\"8 d9dx0962x8067d x 760x272690 d852757d59 d552820d52dx767d 0dxxxd995x0676x59d6x7760x0d7 02dd7558770x2d0760x85d8x709d0x590\"", "output": "[\"88x256960x8 027275x22xd6758dx7dd797272 07d00dd6d0066779x 95dd7056d0x095x6x5009 2xx08xx67d dx5d785268dxd97759x05579d 0d0\"]", "fn_name": "decipher_message"}, {"input... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is sitting on an extremely... | [{"type": "stdin_stdout", "input": "200 100\n56988719755815575893282254081467698462485803782142631369385180999746639622554559884281193367342283559238834106917388166048020056852911293394377949964185368886333934084399980368238188117302968424219707\n", "output": "295455656\n"}, {"type": "stdin_stdout", "input": "200 100\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\nAn eviternity number is a number... | [{"input": "0\n100000", "output": "[103]", "fn_name": "solve"}, {"input": "0\n500000", "output": "[148]", "fn_name": "solve"}, {"input": "90\n139701", "output": "[99]", "fn_name": "solve"}, {"input": "61\n56976", "output": "[53]", "fn_name": "solve"}, {"input": "0\n10000", "output": "[37]", "fn_name": "solve"}, {"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\nConnect the countless points wit... | [{"type": "stdin_stdout", "input": "20\n-975467170 758268840 -975467171 758268839 -975467172 758268838 -975467173 758268837 -975467174 1015089897 -975467175 758268835 -975467176 758268834 -975467177 967684266 -975467178 758268832 -975467179 1082851919\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "20\n-97546... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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ΠΡΠ½ΠΎΠ²ΠΎΠΉ Π»ΡΠ±ΠΎΠΉ ΡΠΎΡΠΈΠ°Π»ΡΠ½ΠΎΠΉ ΡΠ΅ΡΠΈ ΡΠ²... | [{"type": "stdin_stdout", "input": "10 50\n946010975 207263044\n923545573 749203275\n862015642 426425906\n749203275 839134958\n910721783 289091881\n827003531 333726912\n49704846 538788252\n382891592 207263044\n333726912 438209022\n974360048 49704846\n", "output": "49704846: 0\n207263044: 0\n289091881: 0\n333726912: 0\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\nChallenge:\nGiven two null-termi... | [{"input": "\"hello world!\"\n\"HELLO\"", "output": "[false]", "fn_name": "starts_with"}, {"input": "\"hello world!\"\n\"hello\"", "output": "[true]", "fn_name": "starts_with"}, {"input": "\"nowai\"\n\"nowaisir\"", "output": "[false]", "fn_name": "starts_with"}, {"input": "\"\"\n\"abc\"", "output": "[false]", "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\nAbsent-minded Masha got set of n... | [{"type": "stdin_stdout", "input": "3\n5 1 2 9 6 4\n9 0 6 4 2 8\n4 6 2 8 3 7\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "3\n1 1 1 0 2 3\n4 5 6 7 8 9\n0 0 0 0 0 0\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "3\n1 1 1 1 1 1\n0 2 3 4 5 6\n7 8 9 2 3 4\n", "output": "10\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\nMeikyokan University is very fam... | [{"type": "stdin_stdout", "input": "8\n2\nomura\ntoshio\nraku\ntanaka\ninura\nyoshoi\nhayashi\nmiura\n3\n1\ntasaka\nnakata\ntanaka\n1\n1\nfoo\n5\n2\npsqt\nabcdef\nabzdefa\npqrst\nabdxcef\n0", "output": "inura,miura\ninura,omura\nmiura,omura\ntoshio,yoshoi\n4\ntanaka,tasaka\n1\n0\nabcdef,abdxcef\nabcdef,abzdefa\npqrst,p... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and $m$ roa... | [{"type": "stdin_stdout", "input": "39 40 38\n4 8\n24 28\n16 17\n7 25\n4 29\n34 35\n16 24\n21 10\n23 36\n36 14\n28 16\n34 19\n15 21\n22 38\n22 37\n37 27\n28 33\n3 29\n32 22\n12 30\n9 15\n5 19\n23 27\n19 17\n25 17\n24 11\n39 10\n6 20\n16 6\n3 18\n34 21\n15 38\n11 19\n11 3\n32 4\n15 13\n16 11\n11 7\n33 7\n3 33\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn 1862, the lord of Aizu was or... | [{"type": "stdin_stdout", "input": "1 3\n3 4\n3 5\n3 6\n4 6\n4 7\n4 6\n5 6\n6 3\n5 8\n1 16\n1 8\n2 14\n7 0\n11 9\n9 2\n0 0\n1 3\n3 4\n5 5\n4 2\n0 0", "output": "NG\nOK\n"}, {"type": "stdin_stdout", "input": "1 3\n3 4\n3 5\n3 6\n4 6\n4 7\n4 6\n5 6\n6 3\n5 8\n1 16\n3 8\n6 14\n7 0\n8 9\n9 2\n0 0\n1 3\n3 4\n5 5\n4 2\n0 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\nIlya is very fond of graphs, esp... | [{"type": "stdin_stdout", "input": "10\n2 3 4 5 6 7 11 9 10 11\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n4 8\n8 9\n9 10\n", "output": "2 3 2 1 1 1 1 1 1 1 \n"}, {"type": "stdin_stdout", "input": "10\n2 3 4 5 6 7 11 9 10 11\n1 2\n2 3\n3 4\n4 5\n5 6\n9 7\n4 8\n8 9\n9 10\n", "output": "2 3 2 1 1 1 1 1 1 1 \n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Math, an improper fraction is... | [{"input": "\"-21511/21\"", "output": "[\"-1024 7/21\"]", "fn_name": "convert_to_mixed_numeral"}, {"input": "\"9999/24\"", "output": "[\"416 15/24\"]", "fn_name": "convert_to_mixed_numeral"}, {"input": "\"-504/26\"", "output": "[\"-19 10/26\"]", "fn_name": "convert_to_mixed_numeral"}, {"input": "\"74/30\"", "output": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\nA cake is sliced with `n... | [{"input": "10", "output": "[56]", "fn_name": "cake_slice"}, {"input": "0", "output": "[1]", "fn_name": "cake_slice"}, {"input": "1", "output": "[2]", "fn_name": "cake_slice"}, {"input": "2", "output": "[4]", "fn_name": "cake_slice"}, {"input": "3", "output": "[7]", "fn_name": "cake_slice"}] | 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\nDolphin loves programming contes... | [{"type": "stdin_stdout", "input": "23 23\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "405 14", "output": "11\n"}, {"type": "stdin_stdout", "input": "9 12\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "19 0\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "22 1\n", "output": "23\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInput\n\nThe input contains two ... | [{"type": "stdin_stdout", "input": "33 16\n", "output": "\nYES\n"}, {"type": "stdin_stdout", "input": "11 11\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "12 16\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11 20\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "15 11\n", "output": "Y... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDid you ever hear about 'crossin... | [{"type": "stdin_stdout", "input": "2\nQ 0\nP 14\n\n2\nO -1\nM -16\n\n0", "output": "13\n15\n"}, {"type": "stdin_stdout", "input": "2\nQ -1\nP 14\n\n2\nN -1\nM -3\n\n0", "output": "13\n2\n"}, {"type": "stdin_stdout", "input": "2\nQ -1\nP 8\n\n2\nM -1\nM -14\n\n0", "output": "7\n13\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\nIn computing, there are two prim... | [{"input": "859983475894789589772983457982345896389458937589738945435\n1024", "output": "[10935879118170253467575045997837531765542549198363770264806105328514144954155675005294370560789173602325403413189569286370255297035043193807918631267898110032789194315444561922202783069416581989858234400991054570729329260875447493... | 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\nTakahashi has two integers X and... | [{"type": "stdin_stdout", "input": "-100 -100\n", "output": "-100 0\n"}, {"type": "stdin_stdout", "input": "-100 100\n", "output": "0 -100\n"}, {"type": "stdin_stdout", "input": "-39 -69\n", "output": "-54 15\n"}, {"type": "stdin_stdout", "input": "100 -100\n", "output": "0 100\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\n# The die is cast!\n\nYour task ... | [{"input": "\"2d6+3 abc\"", "output": "[false]", "fn_name": "roll"}, {"input": "\"abc 2d6+3\"", "output": "[false]", "fn_name": "roll"}, {"input": "\"2d6++4\"", "output": "[false]", "fn_name": "roll"}, {"input": "\"abc\"", "output": "[false]", "fn_name": "roll"}, {"input": "\"\"", "output": "[false]", "fn_name": "roll"... | 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\nArkady invited Anna for a dinner... | [{"type": "stdin_stdout", "input": "100\n2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "54\n"}, {"type": "stdin_stdout", "input": "100\n1 2 2 2 2 2 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPeter got a new snow blower as a... | [{"type": "stdin_stdout", "input": "29 -999961 689169\n-999960 689169\n-999927 -938525\n-999735 -989464\n-993714 -997911\n-870186 -999686\n-796253 -999950\n-139940 -1023635\n969552 -999972\n985446 -999398\n992690 -997295\n999706 -973137\n999898 -848630\n999997 -192297\n999969 773408\n999495 960350\n1685305 981671\n9983... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReducing Problems - Bug Fixing #... | [{"input": "[6, 45, 1]\n[1, 55, 0]", "output": "[false]", "fn_name": "calculate_total"}, {"input": "[1, 2, 2]\n[1, 0, 0]", "output": "[true]", "fn_name": "calculate_total"}, {"input": "[57, 2, 1]\n[]", "output": "[true]", "fn_name": "calculate_total"}, {"input": "[]\n[3, 4, 3]", "output": "[false]", "fn_name": "calcula... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the minimum area of a squar... | [{"type": "stdin_stdout", "input": "8\n3 2\n4 2\n1 1\n3 1\n4 13\n1 3\n12 4\n100 100\n", "output": "16\n16\n4\n9\n169\n9\n144\n40000\n"}, {"type": "stdin_stdout", "input": "8\n3 2\n2 2\n1 1\n4 2\n2 11\n1 4\n7 4\n100 101\n", "output": "16\n16\n4\n16\n121\n16\n64\n40000\n"}, {"type": "stdin_stdout", "input": "8\n3 2\n4 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\nDefine a \"prime prime\" number ... | [{"input": "1000", "output": "[[14028, 6266]]", "fn_name": "prime_primes"}, {"input": "666", "output": "[[7260, 3213]]", "fn_name": "prime_primes"}, {"input": "65", "output": "[[153, 63]]", "fn_name": "prime_primes"}, {"input": "10", "output": "[[6, 3]]", "fn_name": "prime_primes"}, {"input": "6", "output": "[[3, 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\nThere are N integers written on ... | [{"type": "stdin_stdout", "input": "5\n1 18 1 14 0", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n2 18 0 14 0", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n4 3 -1 16 4", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n2 3 -1 16 4", "output": "YES\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nAt IOI Confectionery,... | [{"type": "stdin_stdout", "input": "2 5\n0 1 1 1 0\n1 0 0 0 1\n3 6\n1 0 0 0 1 0\n1 1 1 0 1 0\n1 0 1 1 0 1\n0 0", "output": "10\n15\n"}, {"type": "stdin_stdout", "input": "2 5\n1 1 1 1 0\n0 0 0 0 1\n3 6\n1 0 0 0 0 1\n0 1 1 0 1 0\n1 0 1 1 0 1\n0 0", "output": "10\n16\n"}, {"type": "stdin_stdout", "input": "2 5\n1 1 1 1 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\nEverybody in Russia uses Gregori... | [{"type": "stdin_stdout", "input": "24\n31 28 31 30 31 30 31 31 30 31 30 31 31 29 31 30 31 30 31 31 30 31 30 31\n", "output": "Yes\n\n"}, {"type": "stdin_stdout", "input": "24\n31 28 31 30 31 30 31 31 30 31 30 31 31 28 31 30 31 30 31 31 30 31 30 31\n", "output": "Yes\n\n"}, {"type": "stdin_stdout", "input": "24\n28 31 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice is visiting New York City.... | [{"type": "stdin_stdout", "input": "50\n5 42 16 13 20 2 39 49 33 1 11 4 46 3 48 44 12 7 27 41 35 38 26 6 31 37 10 50 24 9 32 15 47 30 17 28 22 29 23 34 8 18 40 21 19 36 25 43 45 14\n427 -3 -165 -161 302 -337 285 -418 227 -78 -453 -122 -162 -249 -194 119 -127 322 -238 467 -236 254 263 -57 225 391 270 -96 -173 329 -45 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\n# Summary:\nGiven a number, `num... | [{"input": "10000", "output": "[17]", "fn_name": "shortest_steps_to_num"}, {"input": "1500", "output": "[16]", "fn_name": "shortest_steps_to_num"}, {"input": "1534", "output": "[18]", "fn_name": "shortest_steps_to_num"}, {"input": "1978", "output": "[17]", "fn_name": "shortest_steps_to_num"}, {"input": "2763", "output"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is an integer S.\nFind how... | [{"type": "stdin_stdout", "input": "1729\n", "output": "294867501\n"}, {"type": "stdin_stdout", "input": "2000\n", "output": "883312678\n"}, {"type": "stdin_stdout", "input": "1445\n", "output": "157799856\n"}, {"type": "stdin_stdout", "input": "1447\n", "output": "185357934\n"}, {"type": "stdin_stdout", "input": "1497... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 variation of determining leap ... | [{"input": "2016", "output": "[\"2016 has 366 days\"]", "fn_name": "year_days"}, {"input": "1974", "output": "[\"1974 has 365 days\"]", "fn_name": "year_days"}, {"input": "1857", "output": "[\"1857 has 365 days\"]", "fn_name": "year_days"}, {"input": "2000", "output": "[\"2000 has 366 days\"]", "fn_name": "year_days"},... | 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 building with 2N floo... | [{"type": "stdin_stdout", "input": "100\n65 165\n6 106\n41 141\n1 101\n4 104\n33 133\n5 105\n57 157\n98 198\n15 115\n52 152\n53 153\n46 146\n29 129\n42 142\n8 108\n12 112\n69 169\n47 147\n87 187\n79 179\n88 188\n67 167\n26 126\n55 155\n73 173\n72 172\n74 174\n95 195\n36 136\n61 161\n10 110\n17 117\n7 107\n23 123\n30 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\nMr. Square is going on a holiday... | [{"input": "10\n10\n11\n11", "output": "[false]", "fn_name": "fit_in"}, {"input": "1\n2\n2\n1", "output": "[false]", "fn_name": "fit_in"}, {"input": "3\n2\n3\n2", "output": "[false]", "fn_name": "fit_in"}, {"input": "1\n2\n1\n2", "output": "[false]", "fn_name": "fit_in"}, {"input": "6\n5\n8\n7", "output": "[false]", "f... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function `insertDash(num... | [{"input": "1003567", "output": "[\"1003-567\"]", "fn_name": "insert_dash"}, {"input": "454793", "output": "[\"4547-9-3\"]", "fn_name": "insert_dash"}, {"input": "13579", "output": "[\"1-3-5-7-9\"]", "fn_name": "insert_dash"}, {"input": "123456", "output": "[\"123456\"]", "fn_name": "insert_dash"}, {"input": "24680", "... | 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 recently got a job as ... | [{"type": "stdin_stdout", "input": "1 1000000000 1\n0 1000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1 1000000000 1\n0 1000000000\n", "output": "0"}, {"type": "stdin_stdout", "input": "0 1000000000 1\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "0 1000000000 1000000000\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBridge Removal\n\nICPC islands o... | [{"type": "stdin_stdout", "input": "4\n1 2 3\n10 37 30\n10\n1 2 2 1 1 5 1 10 8\n10 2 1 20 2 1 30 1 1\n3\n1 1\n1 1\n0", "output": "114\n139\n2\n"}, {"type": "stdin_stdout", "input": "4\n1 2 3\n10 37 52\n10\n1 2 2 1 1 5 1 10 8\n10 2 1 20 2 1 30 1 1\n3\n1 1\n1 1\n0", "output": "136\n139\n2\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\nWhy would we want to stop to onl... | [{"input": "5000", "output": "[[\"#010101\", \"#020202\", \"#030303\", \"#040404\", \"#050505\", \"#060606\", \"#070707\", \"#080808\", \"#090909\", \"#0a0a0a\", \"#0b0b0b\", \"#0c0c0c\", \"#0d0d0d\", \"#0e0e0e\", \"#0f0f0f\", \"#101010\", \"#111111\", \"#121212\", \"#131313\", \"#141414\", \"#151515\", \"#161616\", \"... | 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 get a \"text\" and have to s... | [{"input": "\"This is a test!\"\n-1", "output": "[\"This as e tist!\"]", "fn_name": "vowel_shift"}, {"input": "\"This is a test!\"\n-5", "output": "[\"This as e tist!\"]", "fn_name": "vowel_shift"}, {"input": "\"This is a test!\"\n0", "output": "[\"This is a test!\"]", "fn_name": "vowel_shift"}, {"input": "\"This is 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\nAri the monster is not an ordina... | [{"type": "stdin_stdout", "input": "63 20\n35 26\n54 5\n32 56\n56 53\n59 46\n37 31\n46 8\n4 1\n2 47\n59 42\n55 11\n62 6\n30 7\n60 24\n41 36\n34 22\n24 34\n21 2\n12 52\n8 44\n60 21\n24 30\n48 35\n48 25\n32 57\n20 37\n11 54\n11 62\n42 58\n31 43\n12 23\n55 48\n51 55\n41 27\n25 33\n21 18\n42 12\n4 15\n51 60\n62 39\n46 41\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n Consider the following ... | [{"input": "156", "output": "[5]", "fn_name": "factor_sum"}, {"input": "31", "output": "[31]", "fn_name": "factor_sum"}, {"input": "24", "output": "[5]", "fn_name": "factor_sum"}, {"input": "35", "output": "[7]", "fn_name": "factor_sum"}, {"input": "4", "output": "[4]", "fn_name": "factor_sum"}] | 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\nTakahashi recorded his daily lif... | [{"type": "stdin_stdout", "input": "10\n43196 57600\n4800 9600\n6000 1200\n600 600\n300 600\n5400 600\n6000 5760\n6760 2880\n6000 12000\n9000 600", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n43196 57600\n4800 9600\n6000 1200\n600 600\n300 600\n5400 600\n6000 5760\n6760 2880\n6000 12000\n9000 794", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s of leng... | [{"type": "stdin_stdout", "input": "10 30\naccbaaccac\n6 8 3\n2 9 1\n6 8 3\n10 5 1\n6 2 2\n1 4 7\n3 10 1\n6 9 1\n7 7 3\n7 3 2\n8 4 1\n4 9 1\n7 6 4\n6 8 2\n10 2 1\n1 3 5\n5 10 1\n7 10 1\n4 1 2\n8 5 3\n9 8 1\n8 6 2\n6 9 2\n10 3 1\n3 9 1\n5 5 5\n1 5 6\n4 2 6\n10 7 1\n9 8 2\n", "output": "NO\nYES\nNO\nYES\nNO\nNO\nYES\nYES... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ of le... | [{"type": "stdin_stdout", "input": "8\n6 15 35 129 143 221 34 26\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "8\n6 15 35 129 143 221 3 26\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "8\n6 15 35 129 143 221 3 51\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "8\n6 11 35 129 143 221 3 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 only difference between easy... | [{"type": "stdin_stdout", "input": "25 4 15\n172043124 384297369 650214870 426077944 587045971 576701397 865475689 261462255 763837593 285228401 629011531 611623799 456424430 820020943 166915939 903479811 357808031 561107351 177427070 14589838 994169358 1227795556 193684940 439658261 237500762\n", "output": "1051264450... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYet another education system ref... | [{"type": "stdin_stdout", "input": "50 50 1\n1 1 1\n1 1 2\n1 1 3\n1 1 4\n1 1 5\n1 1 6\n1 1 7\n1 1 8\n1 1 9\n1 1 10\n1 1 11\n1 1 12\n1 1 13\n1 1 14\n1 1 15\n1 1 16\n1 1 17\n1 1 18\n1 1 19\n1 1 20\n1 1 21\n1 1 22\n1 1 23\n1 1 24\n1 1 25\n1 1 26\n1 1 27\n1 1 28\n1 1 29\n1 1 30\n1 1 31\n1 1 32\n1 1 33\n1 1 34\n1 1 35\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\nProblem statement\n\nAOR Ika got... | [{"type": "stdin_stdout", "input": "16 6 10 -1\n24 1 4 -1 0", "output": "1\n"}, {"type": "stdin_stdout", "input": "16 6 10 -1\n24 1 5 -1 0", "output": "1\n"}, {"type": "stdin_stdout", "input": "21 10 0 4\n5 2 13 -1 0", "output": "3\n"}, {"type": "stdin_stdout", "input": "16 6 10 -1\n24 1 4 0 1", "output": "1\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\nShe catched the thrown coin that... | [{"type": "stdin_stdout", "input": "10.328181706040372\n1.2129508820938308 0.8573113359511872 1.4723271231711133 0.8719653577025106\n2.7936576829562947\n1.6284720172281655 0.042076349022347914 1.0082063051036116 0.8077902409181328\n0", "output": "impossible\nimpossible\n"}, {"type": "stdin_stdout", "input": "11.3176862... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 HR manager was disappointed ... | [{"type": "stdin_stdout", "input": "2000000000000000000\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "1000001000000000000\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "1440563777463828705\n", "output": "25\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently a serious bug has been ... | [{"type": "stdin_stdout", "input": "10 2\n10 2\n9 3\n9 4\n7 2\n4 6\n10 1\n9 2\n3 10\n7 1\n5 1\n", "output": "43\n"}, {"type": "stdin_stdout", "input": "10 3\n6 3\n6 10\n2 5\n5 7\n6 2\n9 2\n8 1\n10 5\n5 10\n7 6\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "10 2\n10 2\n9 3\n9 4\n7 2\n4 6\n10 1\n9 2\n3 10\n7 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\nA `Nice array` is defined to be ... | [{"input": "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[true]", "fn_name": "is_nice"}, {"input": "[1, -1, 2, -2, 3, -3, 6]", "output": "[false]", "fn_name": "is_nice"}, {"input": "[3, 2, 10, 4, 1, 6]", "output": "[false]", "fn_name": "is_nice"}, {"input": "[0, 1, 3, -2, 5, 4]", "output": "[false]", "fn_name": "is_nice... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "100 1000000000000\ndjgykfqaywhkhpocyxcpvbiiouyielmighclnuopadzuvrirbecucwnzwahahagvfstbxxaednajfauscxwttiglbbxtomnnalcl\n", "output": "8854753825335\n"}, {"type": "stdin_stdout", "input": "100 1000000000000\ndjgykfqaywhkhpocyxcpvbiiouyielmighclnuopadzuvrirbecucwnzwahahagvfstbxxaednaj... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nC: Only one subsequence --Unique... | [{"type": "stdin_stdout", "input": "aziucamp\nazu", "output": "yes\n"}, {"type": "stdin_stdout", "input": "azjucamp\nazu", "output": "yes\n"}, {"type": "stdin_stdout", "input": "aizucamp\nuza", "output": "no\n"}, {"type": "stdin_stdout", "input": "azjucamp\nazt", "output": "no\n"}, {"type": "stdin_stdout", "input": "az... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose you are given a string $... | [{"type": "stdin_stdout", "input": "255 3880 4590\nwgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwkwgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwawgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwkwgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgw\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\nThe statement of this problem is... | [{"type": "stdin_stdout", "input": "100\n2\n4\n6\n8\n17\n12\n14\n16\n18\n20\n22\n24\n26\n28\n30\n32\n16\n36\n38\n40\n42\n44\n46\n48\n50\n80\n54\n56\n58\n60\n62\n64\n66\n68\n70\n72\n74\n11\n78\n80\n82\n84\n78\n17\n90\n92\n94\n96\n55\n100\n102\n104\n106\n108\n110\n139\n114\n229\n118\n120\n122\n124\n126\n128\n130\n132\n13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 central dogma of molecular b... | [{"input": "\"AUGUAUCCUUCCAUCAAGGAAACCAUGCGCGUUCAGCUUUCUAUGGAGGGUAGUGUUAACUACCACGCCUUCAAGUGCACUGGAAAAGGAGAGGGAAAACCAUACGAAGGCACCCAAAGCCUGAAUAUUACAAUAACUGAAGGAGGUCCUCUGCCAUUUGCUUUUGACAUUCUGUCACACGCCUUUCAGUAUGGCAUCAAGGUCUUCGCCAAGUACCCCAAAGAAAUUCCUGACUUCUUUAAGCAGUCUCUACCUGGUGGUUUUUCUUGGGAAAGAGUAAGCACCUAUGAAGAUGGAGGAGUGCUU... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a grid of squares with N... | [{"type": "stdin_stdout", "input": "155776 1 112696\n", "output": "837491985\n"}, {"type": "stdin_stdout", "input": "200000 1 134405\n", "output": "945631888\n"}, {"type": "stdin_stdout", "input": "491 405 148903\n", "output": "206234613\n"}, {"type": "stdin_stdout", "input": "435 448 126173\n", "output": "779238467\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\nGiven two integers `a` and `b`, ... | [{"input": "-321\n123", "output": "[-44055]", "fn_name": "get_sum"}, {"input": "-505\n4", "output": "[-127755]", "fn_name": "get_sum"}, {"input": "321\n123", "output": "[44178]", "fn_name": "get_sum"}, {"input": "505\n4", "output": "[127759]", "fn_name": "get_sum"}, {"input": "-50\n0", "output": "[-1275]", "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\nGiven a number, write a function... | [{"input": "98989898", "output": "[89898989]", "fn_name": "reverse_number"}, {"input": "4321234", "output": "[4321234]", "fn_name": "reverse_number"}, {"input": "-123", "output": "[-321]", "fn_name": "reverse_number"}, {"input": "123", "output": "[321]", "fn_name": "reverse_number"}, {"input": "1000", "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\n\"Point reflection\" or \"point ... | [{"input": "[1000, 15]\n[-7, -214]", "output": "[[-1014, -443]]", "fn_name": "symmetric_point"}, {"input": "[10, -10]\n[-10, 10]", "output": "[[-30, 30]]", "fn_name": "symmetric_point"}, {"input": "[1, -35]\n[-12, 1]", "output": "[[-25, 37]]", "fn_name": "symmetric_point"}, {"input": "[2, 6]\n[-2, -6]", "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\nMad scientist Mike has just fini... | [{"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\nVasya is studying number theory.... | [{"type": "stdin_stdout", "input": "999999999989 999999999988\n", "output": "999999999988\n"}, {"type": "stdin_stdout", "input": "414654652183 366894205623\n", "output": "366894205623\n"}, {"type": "stdin_stdout", "input": "999999999958 999999999957\n", "output": "499999999979\n"}, {"type": "stdin_stdout", "input": "99... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tycoon of a winery empire in... | [{"type": "stdin_stdout", "input": "10\n9\nDDDDDDKDD\n10\nKKDDDDKKDK\n7\nKKDDKDK\n13\nKKKDDKDDDKKKD\n14\nKDDDDKDDKDKDKK\n9\nKKDDKDDKD\n14\nDKDKKKKKDDDKKK\n10\nKDKKDKKKKD\n11\nDDKDKKDDKKD\n3\nKKK\n", "output": "1 2 3 4 5 6 1 1 1 \n1 2 1 1 1 1 1 2 1 3 \n1 2 1 1 1 2 1 \n1 2 3 1 1 1 1 1 1 2 1 1 1 \n1 1 1 1 1 2 1 2 3 1 1 4 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA competitive eater, Alice is sc... | [{"type": "stdin_stdout", "input": "5\n5 4\n2 4\n5 1\n13 9\n1010000 14106652\n", "output": "10\n2\n1\n45\n510049495001\n"}, {"type": "stdin_stdout", "input": "5\n6 4\n3 2\n3 1\n13 7\n1010000 14106652\n", "output": "10\n3\n1\n28\n510049495001\n"}, {"type": "stdin_stdout", "input": "5\n5 4\n2 4\n5 1\n13 9\n1010000 129640... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 string is called bracket seque... | [{"type": "stdin_stdout", "input": "1000000000\n1000000000\n1000000000\n1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000000000\n1000000000\n1000000000\n1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000000000\n1000000000\n1000000000\n999999999\n", "output": "0\n"}, {"type":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an array of 4 integers \n... | [{"input": "[15, -3, 15, -3]", "output": "[\"undefined\"]", "fn_name": "find_slope"}, {"input": "[-6, 57, -6, 84]", "output": "[\"undefined\"]", "fn_name": "find_slope"}, {"input": "[17, -3, 17, 8]", "output": "[\"undefined\"]", "fn_name": "find_slope"}, {"input": "[90, 54, 90, 2]", "output": "[\"undefined\"]", "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\nMasha has three sticks of length... | [{"type": "stdin_stdout", "input": "100 100 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 10 10\n", "output": "81\n"}, {"type": "stdin_stdout", "input": "100 100 99\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 100 99... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 two strings $s$ and $... | [{"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 4\n2 4\n2 2\n2 9\n2 7\n1 5\n", "output": "Yes\nYes\nYes\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 4\n2 4\n2 2\n2 9\n5 7\n1 5\n", "output": "Yes\nYes\nYes\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 4\n2 4\n2 2\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\nHQ9+ is a joke programming langu... | [{"type": "stdin_stdout", "input": "mzbmweyydiadtlcouegmdbyfwurpwbpuvhifnuapwyndmhtqvkgkbhtytszotwflegsjzzszfwtzfpnscguemwrczqxycivdqnkH\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "Qzbmweyydiadtlcouegmdbyfwurpwbpuvhifnuapwyndmhtqvkgkbhtytszotwflegsjzzszfwtzfpnscguemwrczqxycivdqnky\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\nPolycarp has $n$ coins, the valu... | [{"type": "stdin_stdout", "input": "1 10\n8\n1\n2\n3\n4\n5\n6\n7\n13\n17\n16\n", "output": "-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "1 10\n8\n1\n2\n3\n4\n5\n6\n7\n13\n9\n16\n", "output": "-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "1 10\n8\n1\n2\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe define the score of permutati... | [{"input": "348", "output": "[3675]", "fn_name": "sc_perm_comb"}, {"input": "340", "output": "[1631]", "fn_name": "sc_perm_comb"}, {"input": "333", "output": "[369]", "fn_name": "sc_perm_comb"}, {"input": "6", "output": "[6]", "fn_name": "sc_perm_comb"}, {"input": "0", "output": "[0]", "fn_name": "sc_perm_comb"}] | code_functional |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.