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\nThere is a frog living in a big ... | [{"type": "stdin_stdout", "input": "10 10\n.o....o...\no.oo......\n..oo..oo..\n..o.......\n..oo..oo..\n.o.o...o..\no..U.o....\noo......oo\noo........\noo..oo....", "output": "RDLLLURUUURDDLLUURRDDLULLDDRR\n"}, {"type": "stdin_stdout", "input": "10 10\n.o....o...\no.oo......\n..oo..oo..\n..o.......\n..oo..oo..\n..o...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\nGiven any integer x, Aoki can do... | [{"type": "stdin_stdout", "input": "999999482938498888 1000000000000000000\n", "output": "517061501112\n"}, {"type": "stdin_stdout", "input": "34439284758432890 4389039281938432\n", "output": "673029497074566\n"}, {"type": "stdin_stdout", "input": "542309233112233445 542309233112233445\n", "output": "0\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSince you are the best Wraith Ki... | [{"type": "stdin_stdout", "input": "100 20\n9149 9142 7686 5769 1871 4565 5670 8587 663 637 3421 4267 6884 8142 7634 5748 936 316 9300 771 6906 9230 8994 9690 7155 9393 6274 3183 932 7460 1611 6122 4031 6922 5466 1499 5290 4907 4673 5665 9744 1602 9891 8260 6351 4640 9930 9756 5242 3752 82 3287 824 6897 5579 9095 883 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\nConsider a sequence of digits of... | [{"type": "stdin_stdout", "input": "20\n4 8 6 6 3 0 1 8 3 6 1 4 3 2 1 3 6 4 5 4\n15\n16 19\n3 10\n9 9\n3 18\n6 7\n15 18\n12 19\n17 18\n12 12\n6 9\n3 10\n1 2\n2 3\n4 19\n16 16\n", "output": "1\n3\n0\n5\n0\n1\n2\n1\n0\n1\n3\n1\n1\n5\n0\n"}, {"type": "stdin_stdout", "input": "20\n4 8 6 6 3 0 1 8 3 6 1 4 3 2 1 3 6 4 5 4\n1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Nastya has a hobby, she l... | [{"type": "stdin_stdout", "input": "aaaaaaaadbaaabbbbbddaaabdadbbbbbdbbabbbabaabdbbdababbbddddbdaabbddbbbbabbbbbabadaadabaaaadbbabbbaddb\naaaaaaaaaaaaaa\n61 91 5 43 53 81 7 96 6 9 34 78 79 12 8 63 22 76 18 46 41 56 3 20 57 21 75 73 100 94 35 69 32 4 70 95 88 44 68 10 71 98 23 89 36 62 28 51 24 30 74 55 27 80 38 48 93 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 permutation of N numbers from ... | [{"type": "stdin_stdout", "input": "10\n3 -1 5 1 7 4 14 6 17 13", "output": "9\n"}, {"type": "stdin_stdout", "input": "10\n3 -1 5 1 7 4 14 6 17 8", "output": "9\n"}, {"type": "stdin_stdout", "input": "10\n2 -1 5 1 7 4 14 6 17 8", "output": "9\n"}, {"type": "stdin_stdout", "input": "10\n2 -1 5 1 7 4 12 6 17 8", "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\nThere are many blue cards and re... | [{"type": "stdin_stdout", "input": "4 3\n2 6 6 15\n2 3 5\n2 3\n4 9\n8 16 32\n4 2\n4 9 11 13\n2 7\n5 5\n2 3 5 1001 1001\n7 11 13 17 34\n10 10\n2 3 5 7 12 11 13 15 17 29\n3 11 1 22 18 22 26 30 34 38\n20 20\n314 144 903 63 137 609 44 626 75 473\n876 421 909 519 755 840 374 368 570 872\n363 650 155 265 64 26 426 391 15 421... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 her tantrums the princess... | [{"type": "stdin_stdout", "input": "1 68\n100 26 58 15 8 69 66 49 97 18 74 27 39 19 76 37 25 4 88 75 17 79 41 21 44 39 7 42 63 82 92 87 41 85 25 30 43 80 165 106 98 88 16 15 97 74 81 76 33 19 64 3 14 72 17 36 33 21 34 59 38 75 48 1 57 20 81 56 74 67 14 89 51 30 1 66 20 58 64 58 16 99 33 97 31 5 54 87 6 64 70 40 93 25 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\nYou are given a integer $n$ ($n ... | [{"type": "stdin_stdout", "input": "4\n7648\n1421\n37753\n53050\n", "output": "2333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 boy Petya loves chess very muc... | [{"type": "stdin_stdout", "input": "6\nK.......\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\n..####.K\n\n.......K\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\nK.####..\n\nK.......\n........\n.##..##.\n#..##..#\n........\n...##...\n.#....#.\nK.####..\n\n.......K\n........\n.##..##.\n#..##... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, Ikta, an elementary sch... | [{"type": "stdin_stdout", "input": "(198876743*1-210*4-89)", "output": "3533045339395\n"}, {"type": "stdin_stdout", "input": "(198876744*1-210*4-89)", "output": "3533045357160\n"}, {"type": "stdin_stdout", "input": "(198776744*1-210*4-89)", "output": "3531268857160\n"}, {"type": "stdin_stdout", "input": "(198777744*1-2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\n$ M $ students will b... | [{"type": "stdin_stdout", "input": "2 0\n-1 -1 0 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "3 0\n-1 2 -1 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "11 2\n1 4 10 6", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 2\n0 2 4 10", "output": "0\n"}, {"type": "stdin_stdout", "input": "3 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\nACM countries have rivers that f... | [{"type": "stdin_stdout", "input": "1 1 100\n50 200 20 40 0\n1\n2 4 101\n7 4 2 4 1\n19 5 1 4 0\n5\n3\n10\n1\n1 2 3\n2 1 1 1 0\n1\n3\n1 2 6\n5 16 1 1 1\n2\n3\n0 0 0", "output": "110.0000000000\n111.1500000000\n5.3333333333\n64.3333333333\n"}, {"type": "stdin_stdout", "input": "1 1 110\n50 200 20 40 0\n1\n2 4 101\n7 4 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\nExample\n\nInput\n\n6\n2\n3\n1\n... | [{"type": "stdin_stdout", "input": "6\n2\n3\n2\n1\n11\n2", "output": "Yes\nYes\nYes\nNo\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "6\n2\n10\n0\n4\n4\n1", "output": "Yes\nYes\nNo\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "6\n6\n8\n1\n2\n5\n3", "output": "Yes\nYes\nYes\nYes\nYes\nYes\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA famous Berland's painter Kalev... | [{"type": "stdin_stdout", "input": "BBBBBBBB\nBBBBBBBB\nBBBBBBBB\nBBBBBBBB\nBBBBBBBB\nBBBBBBBB\nBBBBBBBB\nBWBBWBWB\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "BWBBBWWB\nBWBBBWWB\nBBBBBBBB\nBBBBBBBB\nBWBBBWWB\nBBBBBBBB\nBBBBBBBB\nBBBBBBBB\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "BBBBBBBB\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\nIt's now the season of TAKOYAKI ... | [{"type": "stdin_stdout", "input": "50\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\n", "output": "12250000\n"}, {"type": "stdin_stdout", "input": "41\n49 91 82 7 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\nThere are four points: $A(x_1, y... | [{"type": "stdin_stdout", "input": "2\n2.926287414400688 0.6174638399148507 2.2117258079089996 2.51039017960215 2.2432914589132955 0.3458310450303873 3.950438914943076 1.6292131026754104\n5.957858300757107 3.314602021400227 10.473008708157936 7.081122407685485 15.460510197185764 6.858362845609268 7.533578119892425 12.1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n Suppose there are `n` p... | [{"input": "15", "output": "[15]", "fn_name": "circle_slash"}, {"input": "31", "output": "[31]", "fn_name": "circle_slash"}, {"input": "11", "output": "[7]", "fn_name": "circle_slash"}, {"input": "16", "output": "[1]", "fn_name": "circle_slash"}, {"input": "5", "output": "[3]", "fn_name": "circle_slash"}, {"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\nTo introduce the problem think t... | [{"input": "3\n10\n7853", "output": "[1981]", "fn_name": "tankvol"}, {"input": "4\n10\n7853", "output": "[2933]", "fn_name": "tankvol"}, {"input": "2\n10\n7853", "output": "[1118]", "fn_name": "tankvol"}, {"input": "5\n7\n3848", "output": "[2940]", "fn_name": "tankvol"}, {"input": "4\n9\n6361", "output": "[2731]", "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're given a string of dominos... | [{"input": "\"||| ||||//| |/\"", "output": "[\"/// ||||//| |/\"]", "fn_name": "domino_reaction"}, {"input": "\"||||| |||\"", "output": "[\"///// |||\"]", "fn_name": "domino_reaction"}, {"input": "\"|||||/|||\"", "output": "[\"//////|||\"]", "fn_name": "domino_reaction"}, {"input": "\"|||||\"", "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\nThere are N people numbered 1 to... | [{"type": "stdin_stdout", "input": "15\n14\n2 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n14\n1 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n14\n1 1\n2 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n14\n1 1\n2 1\n3 1\n5 1\n6 1\n7 1\n8 1\n9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nLet $ f (x) $ be the ... | [{"type": "stdin_stdout", "input": "10830", "output": "13\n"}, {"type": "stdin_stdout", "input": "1663", "output": "10\n"}, {"type": "stdin_stdout", "input": "2604", "output": "11\n"}, {"type": "stdin_stdout", "input": "5020", "output": "12\n"}, {"type": "stdin_stdout", "input": "170", "output": "7\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAll cities of Lineland are locat... | [{"type": "stdin_stdout", "input": "50\n-50000 -49459 -48875 -48456 -48411 -48096 -47901 -47500 -47150 -46808 -46687 -46679 -46337 -45747 -45604 -45194 -44752 -44242 -44231 -44122 -43636 -43274 -42916 -42881 -42386 -42095 -41830 -41618 -41145 -40897 -40534 -40007 -39761 -39389 -39104 -38909 -38630 -38561 -38364 -38255 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positi... | [{"type": "stdin_stdout", "input": "1\n97\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n97\n1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a grid with H rows and ... | [{"type": "stdin_stdout", "input": "15 10\nsnake snake snake snake snake snake snake snake snake snake\nsnake snake snake snake snake snake snake snake snake snake\nsnake snake snake snake snake snake snake snake snake snake\nsnake snake snake snake snake snake snake snake snake snake\nsnake snake snake snake snake sna... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn some other world, today is De... | [{"type": "stdin_stdout", "input": "-1279", "output": "Christmas Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "3\n120 75\n184 16\n16 18", "output": "Yes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "3\n120 75\n184 16\n16 36", "output": "Yes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "3\n120 75\n184 16\n0 11", "output": "Yes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "3\n120 75\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe brave Knight came to the Kin... | [{"type": "stdin_stdout", "input": "15\n11 22 13 24 15 26 17 28 19 30 21 2 23 4 25 6 27 8 29 10 1 12 3 14 5 16 7 18 9 20\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "15\n11 22 13 24 15 26 17 28 19 30 21 2 23 4 25 6 27 8 29 10 1 12 3 14 5 16 7 18 9 20\n", "output": "10\n"}, {"type": "stdin_stdout", "input":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe are still with squared intege... | [{"input": "7\n96\n-1\n81", "output": "[[[471, 7783], [663, 7769]]]", "fn_name": "prod2sum"}, {"input": "-14\n12\n-10\n8", "output": "[[[8, 236], [44, 232]]]", "fn_name": "prod2sum"}, {"input": "10\n11\n12\n13", "output": "[[[2, 263], [23, 262]]]", "fn_name": "prod2sum"}, {"input": "1\n20\n-4\n-5", "output": "[[[75, 10... | 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 new attraction in Sin... | [{"type": "stdin_stdout", "input": "5\n1 4\n3 12\n2 15\n6 6\n10 5\n", "output": "YES\nYES\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "5\n1 4\n3 6\n1 8\n10 3\n5 5\n", "output": "YES\nYES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "5\n1 2\n3 12\n2 6\n3 4\n3 5\n", "output": "YES\nYES\nNO\nYES\nYES\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\nComplete the solution so that it... | [{"input": "\"apples, pears # and bananas\\ngrapes\\navocado @apples\"\n[\"@\", \"!\"]", "output": "[\"apples, pears # and bananas\\ngrapes\\navocado\"]", "fn_name": "solution"}, {"input": "\"apples, pears # and bananas\\ngrapes\\nbananas !apples\"\n[]", "output": "[\"apples, pears # and bananas\\ngrapes\\nbananas !app... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem.\... | [{"type": "stdin_stdout", "input": "1 2\n\nseY\n\nNo\n\nYes\n\nYds\n", "output": "1 1\n1 1\n1 1\n"}, {"type": "stdin_stdout", "input": "10 2\n\nYes\n\nNo\n\nYes\n\nYes\n", "output": "2 2\n"}, {"type": "stdin_stdout", "input": "1 2\n\nYes\n\nNo\n\nYer\n\nYes\n", "output": "1 1\n"}, {"type": "stdin_stdout", "input": "1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMost C/C++ programmers know abou... | [{"type": "stdin_stdout", "input": "5\n#define iiXEqDYeyVmIYsOaO fj/x-9-6/x*x+ 1/ 7*2-x -x+9+235*23*Ww+x-2*K+2-x/70\n#define XVgLzhoTUxoBr ( x+x/x/x*6-x)* x+K/24206-2 /5/8-x-7/Ww/K-x+6 \n#define QdfRBaJk 470551685-( 54-x)-30\n#define gEJcAGnF x+x-x+(x/x+9)/x-41-1/fj/1157561+x/x -x/26/x+K*x\n#define lO 7-1*(x*58 )-K*fj... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 length between 2 co-ord... | [{"input": "[[0, 0], [10, 15]]", "output": "[\"18.03\"]", "fn_name": "length_of_line"}, {"input": "[[-3, 4], [10, 5]]", "output": "[\"13.04\"]", "fn_name": "length_of_line"}, {"input": "[[0, 0], [-5, -6]]", "output": "[\"7.81\"]", "fn_name": "length_of_line"}, {"input": "[[0, 0], [-7, 4]]", "output": "[\"8.06\"]", "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\nA connected undirected graph is ... | [{"type": "stdin_stdout", "input": "40 43\n1 2\n1 3\n1 4\n4 5\n5 6\n1 7\n5 8\n7 9\n2 10\n10 11\n11 12\n2 13\n13 14\n14 15\n15 16\n16 17\n17 18\n18 19\n19 20\n20 21\n21 22\n22 23\n23 24\n24 25\n25 2\n3 26\n26 27\n27 28\n28 29\n29 30\n30 31\n31 32\n32 3\n4 33\n33 34\n34 35\n35 36\n36 37\n37 4\n5 38\n38 39\n39 40\n40 5\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\nThere are n points marked on the... | [{"type": "stdin_stdout", "input": "10\n0 1 1 0 -1 -2 1 0 0 0\n1 0 0 0 1 0 0 0 0 0\n0 0 1 2 1 0 1 1 0 0\n0 0 1 0 0 0 0 -1 0 0\n-1 0 -1 0 0 0 0 0 1 0\n0 0 -1 0 0 1 -1 0 0 1\n2 0 0 0 0 0 1 0 0 2\n0 -1 0 0 0 0 0 0 0 0\n0 0 0 0 0 -1 0 0 0 0\n0 1 0 -2 0 0 -1 -1 0 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "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\nLet's define the permutation of ... | [{"type": "stdin_stdout", "input": "50 20365011074\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49\n"}, {"type": "stdin_stdout", "input": "50 5608642004\n", "output": "1 2 4 3 5 6 8 7 9 10 11 13 12 15 14 17 16 18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 named `divisor... | [{"input": "24", "output": "[[2, 3, 4, 6, 8, 12]]", "fn_name": "divisors"}, {"input": "13", "output": "[\"13 is prime\"]", "fn_name": "divisors"}, {"input": "29", "output": "[\"29 is prime\"]", "fn_name": "divisors"}, {"input": "3", "output": "[\"3 is prime\"]", "fn_name": "divisors"}, {"input": "253", "output": "[[11,... | 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```if-not:sql\nImplement a funct... | [{"input": "\"180.0.0.0\"\n\"181.0.0.0\"", "output": "[16777216]", "fn_name": "ips_between"}, {"input": "\"10.11.12.13\"\n\"10.11.13.0\"", "output": "[243]", "fn_name": "ips_between"}, {"input": "\"170.0.0.0\"\n\"170.1.0.0\"", "output": "[65536]", "fn_name": "ips_between"}, {"input": "\"1.2.3.4\"\n\"5.6.7.8\"", "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\nThis problem is same as the prev... | [{"type": "stdin_stdout", "input": "25\n-10000 -10000\n-10000 -5000\n-10000 0\n-10000 5000\n-10000 10000\n-7452 -10000\n-5000 -5000\n-5000 0\n-5000 5000\n-5000 10000\n-1 -10000\n0 -5000\n0 0\n0 5000\n0 10000\n5000 -13650\n5000 -5000\n5000 0\n5000 5000\n5000 10000\n10000 -10000\n10000 -5000\n10000 0\n10000 5000\n10000 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "0111001100111011101000\n", "output": "0011001100001011101000\n"}, {"type": "stdin_stdout", "input": "0111001100111111101000\n", "output": "0011001100000011101000\n"}, {"type": "stdin_stdout", "input": "0111011100111111101000\n", "output": "0001001100000011101000\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider some set of distinct ch... | [{"type": "stdin_stdout", "input": "1000000000 2 2\n1 500000000\n", "output": "933660593\n"}, {"type": "stdin_stdout", "input": "1000000000 2 2\n1 500000000\n", "output": "933660593\n"}, {"type": "stdin_stdout", "input": "1000000000 2 2\n2 500000000\n", "output": "811805447\n"}, {"type": "stdin_stdout", "input": "10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n employees in Alterna... | [{"type": "stdin_stdout", "input": "100\nRDRRDRDDDDRDRRDDRDRRDDRRDDRRRDRRRDDDRDDRDDRRDRDRRRDRDRRRDRRDDDRDDRRRDRDRRRDDRDRDDDDDDDRDRRDDDDDDRRDD\n", "output": "D\n"}, {"type": "stdin_stdout", "input": "100\nRRDRRDDDDDDDRDRRRDRDRDDDRDDDRDDRDRRDRRRDRRDRRRRRRRDRRRRRRDDDRRDDRRRDRRRDDRRDRRDDDDDRRDRDDRDDRRRDRRDD\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\nIahub is so happy about inventin... | [{"type": "stdin_stdout", "input": "20\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "927799753\n"}, {"type": "stdin_stdout", "input": "20\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "927799753\n"}, {"type": "stdin_stdout", "input": "10\n4 10 -1 1 6 8 9 2 -1 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasily the Programmer loves roma... | [{"type": "stdin_stdout", "input": "1000 1000\n", "output": "1001\n"}, {"type": "stdin_stdout", "input": "1000 1000\n", "output": "1001\n"}, {"type": "stdin_stdout", "input": "1000 2\n", "output": "1999\n"}, {"type": "stdin_stdout", "input": "1000 3\n", "output": "1499\n"}, {"type": "stdin_stdout", "input": "1000 4\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\nEve is a beginner stand-up comed... | [{"type": "stdin_stdout", "input": "15\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 100000000 100000000\n1 100000000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 their adventure with the m... | [{"type": "stdin_stdout", "input": "6 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n", "output": "7000000000 0\n"}, {"type": "stdin_stdout", "input": "6 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n", "output": "7000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "5\n6\n1 6 1 1 4 4\n2\n1 2\n2\n1 1\n5\n4 5 4 5 4\n6\n2 3 2 1 3 1\n", "output": "\n0\n0\n2\n1\n0\n"}, {"type": "stdin_stdout", "input": "5\n6\n1 6 1 1 4 4\n2\n1 2\n2\n1 1\n5\n4 5 4 5 4\n6\n2 3 2 1 3 1\n", "output": "0\n0\n2\n1\n0\n"}, {"type": "stdin_stdout", "input": "5\n6\n2 6 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\nYou are given a set of points on... | [{"type": "stdin_stdout", "input": "aaaaaaaaabbbbbaaaabaaaaaaaaaaaaaaaaabaaaaaabbbbbbbaaabbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "bbbbbbbbbbbbbbbbbbbbbbddddddddddddddddaaaaaaaaaaaaaccccccccbbbbbbbaaaaaaaaaabbbbbbbbaaaaaaaaaacccccc\n", "output": "11\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 is a positive integer N.\n... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "266\n"}, {"type": "stdin_stdout", "input": "523968956449\n", "output": "385\n"}, {"type": "stdin_stdout", "input": "145329450841\n", "output": "289\n"}, {"type": "stdin_stdout", "input": "642507465600\n", "output": "12\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\nDuring a New Year special offer ... | [{"type": "stdin_stdout", "input": "58\n145410\n686144\n766870\n859775\n922809\n470967\n034349\n318920\n019664\n667953\n295078\n908733\n691385\n774622\n325695\n443254\n817406\n984471\n512092\n635832\n303546\n189826\n128551\n720334\n569318\n377719\n281502\n956352\n758447\n207280\n583935\n246631\n160045\n452683\n594100\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a given sequence $A = \\\\{a... | [{"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-3\n4\n14", "output": "0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-2\n4\n14", "output": "0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-4\n4\n14", "output": "0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-4\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\nSquirrel Liss is interested in s... | [{"type": "stdin_stdout", "input": "49\n10 34 58 72 126 166 176 180 198 200 208 228 238 248 302 332 340 344 350 354 380 406 418 428 438 442 482 532 536 544 546 554 596 626 642 682 684 704 714 792 804 820 862 880 906 946 954 966 970\n", "output": "49\n"}, {"type": "stdin_stdout", "input": "44\n1 5 37 97 107 147 185 187 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 knows that if the sum o... | [{"type": "stdin_stdout", "input": "1000\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "1000\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "997\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "997\n", "output": "1003\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the Kingdom of AtCoder, only ... | [{"type": "stdin_stdout", "input": "314159265358979323846264338327950288419716939937551058209749445923078164062862089986280348253421170\n", "output": "243\n"}, {"type": "stdin_stdout", "input": "476640020082194381531155118436783393866726953614433851622190777875571135215042541028243752681838573", "output": "259\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\nLet's denote a function $f(x)$ i... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "91\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "91\n"}, {"type": "stdin_stdout", "input": "1472811722\n", "output": "57\n"}, {"type": "stdin_stdout", "input": "1660033091\n", "output": "63\n"}, {"type": "stdin_stdout", "input": "11000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImplement the function which sho... | [{"input": "\"lol\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"ou\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"z\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"a\"", "output": "[true]", "fn_name": "is_vowel"}... | 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's bicycle chain drive cons... | [{"type": "stdin_stdout", "input": "50\n159 880 1070 1139 1358 1608 1691 1841 2073 2171 2213 2597 2692 2759 2879 2931 3173 3217 3441 4201 4878 5106 5129 5253 5395 5647 5968 6019 6130 6276 6286 6330 6409 6728 7488 7713 7765 7828 7899 8064 8264 8457 8483 8685 8900 8946 8965 9133 9187 9638\n45\n57 159 1070 1139 1391 1608 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 following process. ... | [{"type": "stdin_stdout", "input": "3\n100110\n2\n01\n1\n111\n1\n", "output": "011001\n10\n111\n"}, {"type": "stdin_stdout", "input": "3\n100110\n2\n01\n1\n101\n1\n", "output": "011001\n10\n010\n"}, {"type": "stdin_stdout", "input": "3\n100110\n2\n01\n0\n101\n1\n", "output": "011001\n01\n010\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 number is called powerful if i... | [{"type": "stdin_stdout", "input": "100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151\n152\n153\n154\n155\n156\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTheatre Square in the capital ci... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 987654321 1\n", "output": "987654321000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 989104164 1\n", "output": "989104164000000000\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\nYou're given an array $b$ of len... | [{"type": "stdin_stdout", "input": "2\n6\n4 3 0 1 2 0\n2\n2 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n6\n0 3 0 1 2 0\n2\n2 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n6\n4 3 0 1 2 0\n2\n4 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n6\n4 3 0 1 2 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\nOn the Planet AtCoder, there are... | [{"type": "stdin_stdout", "input": "A\n", "output": "T\n"}, {"type": "stdin_stdout", "input": "G\n", "output": "C\n"}, {"type": "stdin_stdout", "input": "C\n", "output": "G\n"}, {"type": "stdin_stdout", "input": "T\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "C", "output": "G\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\nWhen Mr. Kay was browsing a cert... | [{"type": "stdin_stdout", "input": "2286", "output": "3\n"}, {"type": "stdin_stdout", "input": "1020", "output": "2\n"}, {"type": "stdin_stdout", "input": "1809", "output": "1\n"}, {"type": "stdin_stdout", "input": "2465", "output": "0\n"}, {"type": "stdin_stdout", "input": "4598", "output": "2\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\nWrite a program which prints $n$... | [{"type": "stdin_stdout", "input": "44", "output": "1134903170\n"}, {"type": "stdin_stdout", "input": "44", "output": "1134903170\n"}, {"type": "stdin_stdout", "input": "41", "output": "267914296\n"}, {"type": "stdin_stdout", "input": "42", "output": "433494437\n"}, {"type": "stdin_stdout", "input": "43", "output": "70... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEverlasting Sa-Ga, a new, hot an... | [{"type": "stdin_stdout", "input": "10 24\n30 20\n0 0", "output": "a\nb\n"}, {"type": "stdin_stdout", "input": "19 24\n30 20\n0 0", "output": "a\nb\n"}, {"type": "stdin_stdout", "input": "10 3\n11 106\n0 0", "output": "b\nb\n"}, {"type": "stdin_stdout", "input": "10 3\n11 150\n0 0", "output": "b\na\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTanechka is shopping in the toy ... | [{"type": "stdin_stdout", "input": "100000000000000 100000000000000\n", "output": "49999999999999\n"}, {"type": "stdin_stdout", "input": "100000000000000 100000000000000\n", "output": "49999999999999\n"}, {"type": "stdin_stdout", "input": "100000000010000 100000000000000\n", "output": "49999999999999\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCaptain Flint and his crew keep ... | [{"type": "stdin_stdout", "input": "2\n11405\n58469\n", "output": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 forgotten the passw... | [{"type": "stdin_stdout", "input": "12\n8\n1 2 3 5 6 7 8 9\n6\n4 5 6 7 8 9\n7\n0 4 5 6 7 8 9\n7\n1 4 5 6 7 8 9\n8\n0 1 4 5 6 7 8 9\n7\n2 4 5 6 7 8 9\n8\n0 2 4 5 6 7 8 9\n8\n1 2 4 5 6 7 8 9\n7\n3 4 5 6 7 8 9\n8\n0 3 4 5 6 7 8 9\n8\n1 3 4 5 6 7 8 9\n8\n2 3 4 5 6 7 8 9\n", "output": "6\n36\n18\n18\n6\n18\n6\n6\n18\n6\n6\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Hedgehog recently remembered... | [{"type": "stdin_stdout", "input": "20 20\nABBBAAABABAAAAABBABB\nBABABBAABAABBAAABABB\nBABBBAABAABBABBBBABA\nBAAABBAAABABBABBAAAA\nABBAABAABBBBAAABBBAA\nBAAAAAAAABABBAAAAABB\nAAAAAAABABBBBBAABAAB\nABBBBABAABBAAAAABAAA\nBAAAAABBABAAAAABAAAB\nABABAABABBBABBAABBAA\nBAAABBBAAAABBBBBABAA\nAAABBABABAABBABAABAB\nABBABABABABAA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nThere are $ N $ propo... | [{"type": "stdin_stdout", "input": "211 0\n4 2\n0 3", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\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\nInternational Center for Picasso... | [{"type": "stdin_stdout", "input": "5 5\n1 2 3 2 5\n1 2 1 4 5\n5 5\n2 3 3 1 3\n4 1 5 3 2\n5 5\n1 2 3 4 5\n3 3 1 4 5\n3 3\n7 7 7\n7 14 7\n3 3\n2 4 4\n4 3 4\n4 3\n4 0 2 5\n0 2 1\n4 4\n2 8 8 8\n2 3 8 3\n10 10\n9 9 9 9 17 9 9 17 9 9\n9 16 9 9 9 9 9 9 9 3\n10 9\n20 1 20 20 20 20 20 18 20 20\n20 20 20 20 7 17 20 20 4\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\nProblem\n\nYamano Mifune Gakuen'... | [{"type": "stdin_stdout", "input": "5 10 5\n0 1 1 2\n0 2 1 2\n0 1 2 3\n1 2 0 2\n1 4 2 3\n2 1 1 1\n2 1 1 2\n3 3 2 3\n4 1 1 2\n4 2 1 2", "output": "13\n"}, {"type": "stdin_stdout", "input": "5 10 5\n0 1 1 2\n0 2 1 2\n0 1 2 3\n1 2 0 2\n1 4 2 3\n2 1 1 1\n2 1 1 2\n3 3 2 4\n4 1 1 2\n4 2 0 2", "output": "14\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently, you bought a brand new... | [{"type": "stdin_stdout", "input": "7 1000000000\n1 10001 10011 20011 20021 40021 40031\n", "output": "999999969\n"}, {"type": "stdin_stdout", "input": "7 1000000000\n3 10001 10011 20011 20021 40021 40031\n", "output": "999999969\n"}, {"type": "stdin_stdout", "input": "7 1000000000\n1 10001 10011 20011 20021 40021 4003... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBackgorund\n\nThe super popular ... | [{"type": "stdin_stdout", "input": "4 5\nBYYGG\nRRRRR\nRRBRR\nYYGGB\n2\n4 1\n3 1", "output": ".....\nBYYBG\n..G..\nYYGBG\n"}, {"type": "stdin_stdout", "input": "4 5\nBYYGG\nRRRRR\nRBRRR\nYYGGB\n2\n3 1\n3 1", "output": ".....\nBYY..\n.B...\nYYB..\n"}, {"type": "stdin_stdout", "input": "4 5\nBYYGG\nRRRRR\nRBRRR\nYYGGB\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\nYou went to the store, selling $... | [{"type": "stdin_stdout", "input": "19\n11 10 2 12 1 1 9 13 8 40 16 27 18 22 33 1 14 32 12\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "19\n11 10 2 12 1 1 9 13 8 40 8 27 18 22 33 1 14 32 12\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "19\n11 10 6 11 2 1 6 13 8 38 8 27 9 22 18 7 14 20 12\n", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is the easier version of th... | [{"type": "stdin_stdout", "input": "5\n3 1 4 1 2\n15\n5 5\n5 4\n5 3\n5 2\n5 1\n4 4\n4 3\n4 2\n4 1\n3 3\n3 2\n3 1\n2 2\n2 1\n1 1\n", "output": "2\n1\n4\n1\n3\n2\n4\n1\n3\n2\n4\n3\n4\n3\n4\n"}, {"type": "stdin_stdout", "input": "5\n3 1 4 1 2\n15\n5 5\n5 4\n5 3\n5 2\n5 1\n4 4\n4 3\n4 2\n4 1\n3 3\n3 2\n3 1\n2 2\n2 1\n1 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\nOne day you wanted to read somet... | [{"type": "stdin_stdout", "input": "100\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 77... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEfim just received his grade for... | [{"type": "stdin_stdout", "input": "320 142\n2704701300865535.432223312233434114130011113220102420131323010344144201124303144444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447444444444444444444444444444444615444444482101673308979557675074444444444444446... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKISS stands for Keep It Simple S... | [{"input": "\"Joe listened to the noises and there were some onamonapias\"", "output": "[\"Keep It Simple Stupid\"]", "fn_name": "is_kiss"}, {"input": "\"Joe listened to the noise and it was an onamonapia\"", "output": "[\"Good work Joe!\"]", "fn_name": "is_kiss"}, {"input": "\"Sometimes joe cries for hours\"", "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\nThere is an array with some numb... | [{"input": "[4, 4, 4, 3, 4, 4, 4, 4]", "output": "[3]", "fn_name": "find_uniq"}, {"input": "[5, 5, 5, 5, 4, 5, 5, 5]", "output": "[4]", "fn_name": "find_uniq"}, {"input": "[6, 6, 6, 6, 6, 5, 6, 6]", "output": "[5]", "fn_name": "find_uniq"}, {"input": "[7, 7, 7, 7, 7, 7, 6, 7]", "output": "[6]", "fn_name": "find_uniq"},... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given $a$ uppercase Lati... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1999936805\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1999936805\n"}, {"type": "stdin_stdout", "input": "1000000000 956817411\n", "output": "1956733985\n"}, {"type": "stdin_stdout", "input": "1000000000 839933539\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJohnny has recently found an anc... | [{"type": "stdin_stdout", "input": "10\n10 5\n11 73\n17 21\n1 1\n96 3\n2 128\n0001 1100611139403776\n1000000000000000000 1000000001000000000\n7 1\n10 8\n", "output": "1\n-1\n-1\n0\n2\n2\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "10\n10 5\n11 73\n17 18\n1 1\n96 3\n2 128\n0001 1100611139403776\n1000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKirito is stuck on a level of th... | [{"type": "stdin_stdout", "input": "9983 34\n6626 5976\n4448 3568\n2794 2309\n3741 8806\n4754 129\n2780 9275\n5785 9243\n3915 6159\n2609 4331\n238 6756\n6987 3887\n3384 5711\n4349 5563\n1135 4483\n9151 1584\n1500 766\n1608 4440\n7768 5005\n7205 2360\n9088 2933\n3923 7814\n7538 9372\n7504 165\n5277 1636\n2061 4384\n7668... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "3\n2\n3 1\n3\n3 1 5\n5\n3 1 4 10 2\n", "output": "1\n2\n3\n"}, {"type": "stdin_stdout", "input": "3\n2\n2 1\n3\n4 2 5\n5\n3 1 4 10 2\n", "output": "0\n0\n3\n"}, {"type": "stdin_stdout", "input": "3\n2\n3 2\n3\n3 1 5\n5\n3 1 4 10 2\n", "output": "0\n2\n3\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\nOur bear's forest has a checkere... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 100 -100 1000000000000000000\n", "output": "969796608 969796608\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000001 100 -100 1000000000000000000\n", "output": "599261184 599261185\n"}, {"type": "stdin_stdout", "input": "1000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Dormi received a histogra... | [{"type": "stdin_stdout", "input": "2\n4\n0 16 14 1\n6\n2 1 14 4 0 0\n", "output": "30\n19\n"}, {"type": "stdin_stdout", "input": "2\n4\n0 16 17 1\n6\n2 1 14 4 0 0\n", "output": "33\n19\n"}, {"type": "stdin_stdout", "input": "2\n4\n13 8 15 13\n6\n2 1 7 8 1 0\n", "output": "33\n16\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\nA way to make a new task is to m... | [{"type": "stdin_stdout", "input": "6\nzfnkpxaavrcvqhhkclcuiswawpghlqrlq wnvbzhvsjozlkwxowcvyclmehjkkvkxin\nzkxkvlnovnloxjdydujkjydaegzjypsgrzq dmiilhmkspokltabpvwalijhlitbfp\nldfbfggqsdqethdgkmbcwloluguxiluqjyr fewoondewvndcxticvpiqnvvdhsnzfd\nepokfmixjnawdfgkmqlcyirxuprrvudh xvijbdzqdyjwsyhjucytuxrxuiynxf\nxntrjusjwb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nI chose creature obse... | [{"type": "stdin_stdout", "input": "5\n00000\n01010\n00000\n00100\n00000\n\n00000\n01010\n00000\n01010\n00000\n\n00000\n00100\n00000\n01010\n00000\n\n00000\n01110\n00000\n00100\n00000\n\n00000\n00000\n00100\n00000\n00000\n\n1 2\n2 3 4\n4\n01110\n00100\n00100\n00100\n01110\n\n01110\n10001\n10000\n10001\n01110\n\n11111\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\nwHAT DO WE NEED cAPS LOCK FOR?\n... | [{"type": "stdin_stdout", "input": "cTKDZNWVYRTFPQLDAUUNSPKTDJTUPPFPRXRSINTVFVNNQNKXWUZUDHZBUSOKTABUEDQKUIVRTTVUREEOBJTSDKJKVEGFXVHXEYPE\n", "output": "Ctkdznwvyrtfpqldauunspktdjtuppfprxrsintvfvnnqnkxwuzudhzbusoktabuedqkuivrttvureeobjtsdkjkvegfxvhxeype\n"}, {"type": "stdin_stdout", "input": "KETAXTSWAAOBKUOKUQREHIOMVMM... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 getMean that ta... | [{"input": "[1, 3, 2, 4]\n2\n3", "output": "[2.5]", "fn_name": "get_mean"}, {"input": "[1, -1, 2, -1]\n2\n3", "output": "[0]", "fn_name": "get_mean"}, {"input": "[1, 3, 2, 4]\n1\n2", "output": "[-1]", "fn_name": "get_mean"}, {"input": "[1, 3, 2, 4]\n2\n8", "output": "[-1]", "fn_name": "get_mean"}, {"input": "[1, 3, 2]\... | 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 and Aoki will have a b... | [{"type": "stdin_stdout", "input": "100 1 100 1\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "85 7 30 19\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "85 7 23 19\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "38 11 7 79\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "45 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 stowaway and a controller play... | [{"type": "stdin_stdout", "input": "50 42 13\nto head\n00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\n", "output": "Controller 61\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOur fruit guy has a bag of fruit... | [{"input": "[\"rottenApple\", \"rottenBanana\", \"rottenApple\", \"rottenPineapple\", \"rottenKiwi\"]", "output": "[[\"apple\", \"banana\", \"apple\", \"pineapple\", \"kiwi\"]]", "fn_name": "remove_rotten"}, {"input": "[\"apple\", \"rottenBanana\", \"rottenApple\", \"pineapple\", \"kiwi\"]", "output": "[[\"apple\", \"b... | 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\nReverse and invert all integer v... | [{"input": "[1, 12, \"a\", 3.4, 87, 99.9, -42, 50, 5.6]", "output": "[[-1, -21, -78, 24, -5]]", "fn_name": "reverse_invert"}, {"input": "[1, 2, 3, 4, 5]", "output": "[[-1, -2, -3, -4, -5]]", "fn_name": "reverse_invert"}, {"input": "[-9, -18, 99]", "output": "[[9, 81, -99]]", "fn_name": "reverse_invert"}, {"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\nVolodya likes listening to heavy... | [{"type": "stdin_stdout", "input": "trueheavymetalissotruewellitisalsosoheavythatyoucanalmosteeeltheweightofmetalonyou\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "trueheavymetalissotrufwellitisalsosoheavythatyoucanalmosteeeltheweightofmetalonyou\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "uoyn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# Write Number in Expanded Form\... | [{"input": "4982342", "output": "[\"4000000 + 900000 + 80000 + 2000 + 300 + 40 + 2\"]", "fn_name": "expanded_form"}, {"input": "70304", "output": "[\"70000 + 300 + 4\"]", "fn_name": "expanded_form"}, {"input": "12", "output": "[\"10 + 2\"]", "fn_name": "expanded_form"}, {"input": "42", "output": "[\"40 + 2\"]", "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\nIn recent years John has very su... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000 1000000000000000000\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000 1000000000000000000\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\nNow Serval is a junior high scho... | [{"type": "stdin_stdout", "input": "100\n0 1 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1\n1 2 3 4 2 6 5 5 4 8 10 8 1 14 5 16 3 11 13 11 12 8 11 22 8 17 19 5 15 27 14 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\nTakahashi is about to assemble a... | [{"type": "stdin_stdout", "input": "44242\n1 2 1 1 3 2 2 1 1 2 1 1 3 3 2 1 3 3 1 1 2 4 2 1 3 3 1 2 1 4 2 1 4 1 1 3 1 1 1 2 3 1 3 1 1 3 2 2 2 1 2 2 2 2 3 1 3 2 2 2 2 2 2 1 4 3 1 2 1 2 2 1 2 5 1 1 3 5 2 2 1 3 6 2 1 2 1 1 3 1 1 1 1 4 1 2 2 1 1 1 2 1 2 3 1 4 1 1 1 2 2 3 1 1 1 2 3 1 1 4 1 1 2 2 2 4 2 3 1 1 2 3 2 2 2 2 2 2 1... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.