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\nFind the minimum prime number gr... | [{"type": "stdin_stdout", "input": "100000\n", "output": "100003\n"}, {"type": "stdin_stdout", "input": "99992\n", "output": "100003\n"}, {"type": "stdin_stdout", "input": "64993\n", "output": "64997\n"}, {"type": "stdin_stdout", "input": "90371\n", "output": "90371\n"}, {"type": "stdin_stdout", "input": "92227\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\nCalculate the value of the sum: ... | [{"type": "stdin_stdout", "input": "10000000000000 10000000000000\n", "output": "869957328\n"}, {"type": "stdin_stdout", "input": "10000000000000 10000000000000\n", "output": "869957328\n"}, {"type": "stdin_stdout", "input": "7244641009859 6300054748096\n", "output": "955368330\n"}, {"type": "stdin_stdout", "input": "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\nLittle Lesha loves listening to ... | [{"type": "stdin_stdout", "input": "100000 99999 4\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "100000 1 10000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10028 13 10000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "100000 99999 2\n", "output": "1\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are two popular keyboard l... | [{"type": "stdin_stdout", "input": "buneohqdgxjsafrmwtzickvlpy\nzblwamjxifyuqtnrgdkchpoves\n4RZf8YivG6414X1GdDfcCbc10GA0Wz8514LI9D647XzPb66UNh7lX1rDQv0hQvJ7aqhyh1Z39yABGKn24g185Y85ER5q9UqPFaQ2JeK97wHZ78CMSuU8Zf091mePl2OX61BLe5KdmUWodt4BXPiseOZkZ4SZ27qtBM4hT499mCirjy6nB0ZqjQie4Wr3uhW2mGqBlHyEZbW7A6QnsNX9d3j5aHQN0H6GF8J0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMany students live in a dormitor... | [{"type": "stdin_stdout", "input": "0 14299 32984 96001 30445\n77723 0 75669 14101 55389\n30897 17295 0 52675 29987\n36518 108118 11343 0 64020\n91242 50085 86272 62454 0\n", "output": "747422\n"}, {"type": "stdin_stdout", "input": "0 14299 32984 96001 30445\n77723 0 75669 14101 55389\n30897 17295 0 52675 29987\n36518 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 solve the puzzle by progra... | [{"type": "stdin_stdout", "input": "3\n-3 1 1\n2 -4 1\n2 1 -1\n3\n-2 1 1\n1 0 -6\n1 -5 3\n4\n-8 11 -2 1\n2 -7 -2 2\n1 -1 1 2\n1 1 1 -1\n6\n2 0 3 -7 0 2\n1 -10 1 1 4 2\n2 10 5 2 -6 0\n2 4 -23 2 1 8\n3 3 -8 2 3 7\n-7 2 5 2 -3 -18\n6\n3 2 3 -7 1 2\n1 -10 1 0 3 2\n2 6 5 0 -6 1\n0 4 -23 2 2 5\n4 3 -2 2 3 5\n-7 2 4 1 -5 -12\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will check if ... | [{"input": "\"abba\"", "output": "[false]", "fn_name": "solve"}, {"input": "\"abbaa\"", "output": "[true]", "fn_name": "solve"}, {"input": "\"abcba\"", "output": "[true]", "fn_name": "solve"}, {"input": "\"abbx\"", "output": "[true]", "fn_name": "solve"}, {"input": "\"aa\"", "output": "[false]", "fn_name": "solve"}, {"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSasha and Ira are two best frien... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "627314155\n"}, {"type": "stdin_stdout", "input": "1000000\n", "output": "627314155\n"}, {"type": "stdin_stdout", "input": "999999\n", "output": "192151599\n"}, {"type": "stdin_stdout", "input": "524287\n", "output": "295397547\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Let's watch a parade!\n## Brie... | [{"input": "[\"a\", \"b\", \"c\", \"c\", \"e\", \"c\"]\n7\n1\n\"c\"", "output": "[[10, 11, 13]]", "fn_name": "parade_time"}, {"input": "[\"c\", \"b\", \"c\", \"d\", \"e\", \"f\"]\n3\n2\n\"c\"", "output": "[[2, 3]]", "fn_name": "parade_time"}, {"input": "[\"a\", \"b\", \"c\", \"d\", \"e\", \"b\"]\n1\n2\n\"b\"", "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\nTranspose means is to interchang... | [{"input": "[[true, false, true], [false, true, false]]", "output": "[[[true, false], [false, true], [true, false]]]", "fn_name": "transpose"}, {"input": "[[\"a\", \"b\", \"c\"], [\"d\", \"e\", \"f\"]]", "output": "[[[\"a\", \"d\"], [\"b\", \"e\"], [\"c\", \"f\"]]]", "fn_name": "transpose"}, {"input": "[[1, 2, 3, 4, 5,... | 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\nAs most of you might know alread... | [{"input": "143", "output": "[false]", "fn_name": "is_prime"}, {"input": "529", "output": "[false]", "fn_name": "is_prime"}, {"input": "-1", "output": "[false]", "fn_name": "is_prime"}, {"input": "1", "output": "[false]", "fn_name": "is_prime"}, {"input": "29", "output": "[true]", "fn_name": "is_prime"}, {"input": "53"... | 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 this Kata, you will count the... | [{"input": "\"defg\"\n\"dvsxvevdvsvfvsvgvsvgg\"", "output": "[3]", "fn_name": "solve"}, {"input": "\"code\"\n\"cozzdezodeczzode\"", "output": "[11]", "fn_name": "solve"}, {"input": "\"kata\"\n\"kataxxxxkatak\"", "output": "[7]", "fn_name": "solve"}, {"input": "\"code\"\n\"codeodecode\"", "output": "[11]", "fn_name": "s... | 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\nIt's finally summer in Chefland!... | [{"type": "stdin_stdout", "input": "2\n5\n1 -1 0 1 10\n4\n2 1 -2 -1", "output": "12\n6\n"}, {"type": "stdin_stdout", "input": "2\n5\n0 0 3 10 5\n4\n4 1 0 -5", "output": "18\n10\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 2 3 11 10\n4\n2 1 0 -1", "output": "25\n4\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 2 3 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 an Amidakuji that consi... | [{"type": "stdin_stdout", "input": "10 8 10\n10 4\n4 4\n5 1\n6 2\n3 3\n1 3\n2 4\n8 2\n7 5\n7 1", "output": "1\n2\n3\n7\n8\n5\n4\n6\n"}, {"type": "stdin_stdout", "input": "10 6 10\n10 4\n4 4\n5 1\n4 2\n7 3\n1 3\n2 4\n8 2\n3 5\n7 1", "output": "1\n4\n3\n5\n6\n2\n"}, {"type": "stdin_stdout", "input": "10 6 10\n10 4\n4 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\nYou are given two arithmetic pro... | [{"type": "stdin_stdout", "input": "1789433851 -633540112 1286318222 -1728151682 1438333624 1538194890\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1789433851 -633540112 1286318222 -1728151682 1438333624 1538194890\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1955378240 -837482305 1743607821 -16... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence $a_1, a... | [{"type": "stdin_stdout", "input": "3\n7\n3 1 6 6 3 1 1\n8\n1 1 4 4 4 7 8 8\n7\n4 2 5 2 6 2 7\n", "output": "2\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n7\n3 1 6 6 3 1 1\n8\n1 1 4 4 4 7 8 8\n7\n4 2 5 2 6 2 5\n", "output": "2\n0\n2\n"}, {"type": "stdin_stdout", "input": "3\n7\n3 1 6 6 3 1 1\n8\n1 1 4 4 4 7 8 8\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 City administration has no re... | [{"type": "stdin_stdout", "input": "1000 1000 1000\n", "output": "655056222.989098310000"}, {"type": "stdin_stdout", "input": "999 997 998\n", "output": "650782658.915145640000"}, {"type": "stdin_stdout", "input": "709 328 709\n", "output": "157775455.683012100000"}, {"type": "stdin_stdout", "input": "982 948 879\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\nRonald's uncle left him 3 fertil... | [{"input": "0\n5", "output": "[\"No chickens yet!\"]", "fn_name": "egged"}, {"input": "74\n10", "output": "[3984]", "fn_name": "egged"}, {"input": "4\n8", "output": "[2655]", "fn_name": "egged"}, {"input": "1\n15", "output": "[900]", "fn_name": "egged"}, {"input": "2\n1", "output": "[900]", "fn_name": "egged"}] | 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\nScreen resolution of Polycarp's ... | [{"type": "stdin_stdout", "input": "6\n8 8 0 0\n1 11 0 3\n17 10 10 4\n2 4 0 0\n4 10 3 9\n15 18 3 12\n", "output": "56\n7\n100\n6\n36\n198\n"}, {"type": "stdin_stdout", "input": "6\n8 8 0 0\n1 11 0 3\n17 10 10 4\n2 4 0 0\n4 10 3 6\n15 18 3 12\n", "output": "56\n7\n100\n6\n30\n198\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\nBrief\n=====\nSometimes we need ... | [{"input": "[11, 22, 33.33, 44.44, \"hasan\", \"ahmad\"]", "output": "[[[6], [2], [2], [2], [null]]]", "fn_name": "array_info"}, {"input": "[1, 2, 3.33, 4, 5.01, \"bass\", \"kick\", \" \"]", "output": "[[[8], [3], [2], [2], [1]]]", "fn_name": "array_info"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[[[9], [9]... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a tree (an undirec... | [{"type": "stdin_stdout", "input": "7\n2 1 1\n3 2 0\n4 2 1\n5 2 0\n6 7 1\n7 2 1\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "7\n2 1 1\n3 2 0\n4 2 1\n5 4 0\n6 7 1\n7 2 1\n", "output": "32\n"}, {"type": "stdin_stdout", "input": "7\n2 1 1\n3 2 1\n4 2 1\n5 2 0\n6 7 1\n7 2 1\n", "output": "37\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\nAndrew and Jerry are playing a g... | [{"type": "stdin_stdout", "input": "20\n11 37 81 56 61 2 26 27 59 69 24 7 71 76 45 54 89 17 95 20\n", "output": "0.1931218837\n"}, {"type": "stdin_stdout", "input": "20\n12 37 81 56 61 2 26 27 59 69 24 7 71 76 45 54 89 17 95 20\n", "output": "0.1930989940\n"}, {"type": "stdin_stdout", "input": "20\n12 37 81 56 61 2 36 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 prime number p, ... | [{"type": "stdin_stdout", "input": "7 7 3\n4 0 5 3 1 2 6\n", "output": "0"}, {"type": "stdin_stdout", "input": "6 11 2\n1 2 3 4 5 6\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6 10 2\n1 2 3 4 5 6\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6 10 2\n1 2 3 4 5 0\n", "output": "1\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe goal is to write a pair of f... | [{"input": "\"1010 1010 0010 0010 1110 1010 0010 1110\"\n32", "output": "[-1440552402]", "fn_name": "to_twos_complement"}, {"input": "\"1000 0000 1110 1111 0011 0100 1100 1010\"\n32", "output": "[-2131807030]", "fn_name": "to_twos_complement"}, {"input": "\"10110001000100000101100011111000\"\n32", "output": "[-13243287... | 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 fearless Ikta has finally hu... | [{"type": "stdin_stdout", "input": "1 3 1000 1000 1 0 0 4", "output": "1047197552288\n"}, {"type": "stdin_stdout", "input": "1 2 1000 1000 1 0 0 4", "output": "1570796325024\n"}, {"type": "stdin_stdout", "input": "1 3 1000 1000 0 0 0 4", "output": "1047197542296\n"}, {"type": "stdin_stdout", "input": "1 3 1001 1000 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\n# Background\n\nMy TV remote con... | [{"input": "\"mississippi\"", "output": "[35]", "fn_name": "tv_remote"}, {"input": "\"codewars\"", "output": "[36]", "fn_name": "tv_remote"}, {"input": "\"solution\"", "output": "[33]", "fn_name": "tv_remote"}, {"input": "\"these\"", "output": "[27]", "fn_name": "tv_remote"}, {"input": "\"words\"", "output": "[25]", "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\nThe circle line of the Roflanpol... | [{"type": "stdin_stdout", "input": "100 26 63 60 23\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 26 63 60 20\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 26 77 60 20\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 45 77 77 20\n", "output": "YES\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\nOrac is studying number theory, ... | [{"type": "stdin_stdout", "input": "5\n497347 19283\n2568 1000000000\n499979 123987\n93 19\n13 5\n", "output": "536584\n2000002568\n1247930\n132\n34\n"}, {"type": "stdin_stdout", "input": "5\n497347 19283\n2568 1000000000\n499979 123987\n93 19\n13 5\n", "output": "536584\n2000002568\n1247930\n132\n34\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\n<image>\n\nYou can preview the i... | [{"type": "stdin_stdout", "input": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\n", "output": "-1300\n"}, {"type": "stdin_stdout", "input": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzyzzzzzzzzzzzzzzzzzz\n", "output": "-1299\n"}, {"type": "stdin_stdout", "input": "zzzzzzyzzzzzzzzzzzzzzzzzzzzzzzzyzzzzzzzzzzzzzzzzzz\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\n# Task\n You are given integer `... | [{"input": "20\n10", "output": "[\"EVEN\"]", "fn_name": "subsets_parity"}, {"input": "48\n12", "output": "[\"EVEN\"]", "fn_name": "subsets_parity"}, {"input": "2\n1", "output": "[\"EVEN\"]", "fn_name": "subsets_parity"}, {"input": "3\n2", "output": "[\"ODD\"]", "fn_name": "subsets_parity"}, {"input": "1\n1", "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\nGrigoriy, like the hero of one f... | [{"type": "stdin_stdout", "input": "dqcpcobpcobnznamznamzlykxkxlxlylzmaobnaobpbnanbpcoaobnboaoboanzlymzmykylymylzlylymanboanaocqdqesfrfs\n", "output": "1236\n"}, {"type": "stdin_stdout", "input": "uhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuh\n", "output": "1293\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\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 -999968\n969552 -999972\n985446 -999398\n992690 -997295\n999706 -973137\n999898 -848630\n999997 -192297\n999969 773408\n999495 960350\n999143 981671\n998324... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNastya received one more array o... | [{"type": "stdin_stdout", "input": "94 58\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 29 58 1 1 1 29 58 58 1 1 29 1 1 1 1 2 1 58 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 29 1 1 1 1 1 58 1 29 1 1 1 1 1 1 1 1 1 1 1 1 58 1 1 1 1 1 2 1 1 1\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "94 58\n1 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\nTonight is brain dinner night an... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "500000000\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "500000000\n"}, {"type": "stdin_stdout", "input": "1001000000\n", "output": "500500000\n"}, {"type": "stdin_stdout", "input": "1393488002\n", "output": "696744001\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe administration of the Tomsk ... | [{"type": "stdin_stdout", "input": "30 505231\n-18 16 88130\n-10 16 15693\n16 -32 660\n-27 17 19042\n30 -37 6680\n36 19 299674\n-45 21 3300\n11 27 76\n-49 -34 28649\n-1 11 31401\n25 42 20858\n-40 6 455660\n-29 43 105001\n-38 10 6042\n19 -45 65551\n20 -9 148533\n-5 -24 393442\n-43 2 8577\n-39 18 97059\n12 28 39189\n35 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\nSince most contestants do not re... | [{"type": "stdin_stdout", "input": "3\n184 222 102\n", "output": "BitAryo\n"}, {"type": "stdin_stdout", "input": "3\n101 186 223\n", "output": "BitAryo\n"}, {"type": "stdin_stdout", "input": "3\n101 186 223\n", "output": "BitAryo\n"}, {"type": "stdin_stdout", "input": "3\n184 222 102\n", "output": "BitAryo\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\n# RoboScript #1 - Implement Synt... | [{"input": "\"FF(LF6(RF3)2)3\"", "output": "[\"<span style=\\\"color: pink\\\">FF</span>(<span style=\\\"color: red\\\">L</span><span style=\\\"color: pink\\\">F</span><span style=\\\"color: orange\\\">6</span>(<span style=\\\"color: green\\\">R</span><span style=\\\"color: pink\\\">F</span><span style=\\\"color: orang... | 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\nLеt's create function to play ca... | [{"input": "\"3\\u2663\"\n\"Q\\u2663\"\n\"\\u2666\"", "output": "[\"The second card won.\"]", "fn_name": "card_game"}, {"input": "\"A\\u2660\"\n\"2\\u2666\"\n\"\\u2666\"", "output": "[\"The second card won.\"]", "fn_name": "card_game"}, {"input": "\"Q\\u2663\"\n\"3\\u2663\"\n\"\\u2666\"", "output": "[\"The first card w... | 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 non-empty string is called pal... | [{"type": "stdin_stdout", "input": "21\narozauprlanalapuazoaa\n", "output": "aaaaaaaallnoopprruuzz\n"}, {"type": "stdin_stdout", "input": "21\narozbuprlanalapuazoaa\n", "output": "aaaaaaabllnoopprruuzz\n"}, {"type": "stdin_stdout", "input": "21\narozbuarlpnalapuayoaa\n", "output": "aaaaaaabllnoopprruuyz\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\nThis is the performance version ... | [{"input": "16777216\n14348907", "output": "[23951671]", "fn_name": "spinning_rings"}, {"input": "2\n10", "output": "[13]", "fn_name": "spinning_rings"}, {"input": "10\n2", "output": "[10]", "fn_name": "spinning_rings"}, {"input": "5\n5", "output": "[3]", "fn_name": "spinning_rings"}, {"input": "7\n9", "output": "[4]",... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider a 32-bit real type with... | [{"type": "stdin_stdout", "input": "8\n00101110\n66920828\n00000080\n00000040\n000000c0\n00100110\n45306216\n07f00009", "output": "8226.125\n13444112.3125\n1.0\n0.5\n1.5\n8194.125\n9068740.171875\n1040384.0703125\n"}, {"type": "stdin_stdout", "input": "8\n00100100\n45780507\n00000080\n00000040\n0c000000\n00000101\n1533... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOnce a Mathematician was trapped... | [{"type": "stdin_stdout", "input": "952\n2320756\n29322199\n69962176\n35597905\n77503600\n16044585\n78680494\n87353756\n46901578\n54533600\n56732835\n52356252\n3139727\n67375042\n39918429\n47546657\n55270670\n75055313\n37482942\n4607646\n3592454\n42195046\n6958164\n92680150\n74100365\n67455070\n78497675\n79514245\n3736... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n3\n()(()((\n... | [{"type": "stdin_stdout", "input": "3\n()(()((\n))()(((()\n)())(())", "output": "No\n"}, {"type": "stdin_stdout", "input": "3\n()(()((\n))()(((()\n))(())()", "output": "No\n"}, {"type": "stdin_stdout", "input": "3\n()(()((\n))()(((()\n)())((*)", "output": "No\n"}, {"type": "stdin_stdout", "input": "3\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\nYou are given a number $n$ (divi... | [{"type": "stdin_stdout", "input": "4\n6\n0 2 5 5 4 1\n6\n2 0 2 0 0 0\n9\n14 1 3 4 2 10 3 1 12\n6\n1 1 2 3 4 5\n", "output": "1\n2\n1\n2\n"}, {"type": "stdin_stdout", "input": "4\n6\n0 2 1 4 4 1\n6\n0 0 2 1 0 0\n9\n7 1 3 0 2 12 2 13 5\n6\n1 0 2 10 1 8\n", "output": "3\n3\n0\n2\n"}, {"type": "stdin_stdout", "input": "4\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHave a look at the following num... | [{"input": "10000", "output": "[2500250000]", "fn_name": "get_score"}, {"input": "12345", "output": "[3810284250]", "fn_name": "get_score"}, {"input": "1000", "output": "[25025000]", "fn_name": "get_score"}, {"input": "1234", "output": "[38099750]", "fn_name": "get_score"}, {"input": "100", "output": "[252500]", "fn_na... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n3\n20 4 14\n4\n15 72 -1 12", "output": "-1 15 5\n17 -40 33 20\n"}, {"type": "stdin_stdout", "input": "2\n3\n20 4 14\n4\n15 72 -1 8", "output": "-1 15 5\n16 -41 32 23\n"}, {"type": "stdin_stdout", "input": "2\n3\n20 4 14\n4\n4 72 -1 12", "output": "-1 15 5\n25 -43 30 17\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\nThere is a very long bench. The ... | [{"type": "stdin_stdout", "input": "100\n-X-X-X--X-X--X--X-X--X-X-X--X-X-X--X--X-X-X-X--X--X-X-X-X-X-X-X-X-X-X-X-X-X-X-X--X-X-X-X-X-X-X-X-X-X", "output": "0 0 435664291\n"}, {"type": "stdin_stdout", "input": "100\nX-X-X-X-X-X-X-X-X-X--X-X-X-X-X-X-X-X-X-X-X-X-X-X-X--X--X-X-X-X--X--X-X-X--X-X-X--X-X--X--X-X--X-X-X-", "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\n# Task\n\n**_Given_** *an array ... | [{"input": "[19, 98, 69, 28, 75, 45, 17, 98, 67]\n464", "output": "[8]", "fn_name": "minimum_steps"}, {"input": "[8, 9, 10, 4, 2]\n23", "output": "[3]", "fn_name": "minimum_steps"}, {"input": "[10, 9, 9, 8]\n17", "output": "[1]", "fn_name": "minimum_steps"}, {"input": "[4, 6, 3]\n7", "output": "[1]", "fn_name": "minimu... | 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[Chopsticks (singular: chopstick... | [{"type": "stdin_stdout", "input": "5 3\n13\n-2\n3\n9\n1", "output": "1\n"}, {"type": "stdin_stdout", "input": "5 3\n13\n-3\n3\n9\n1", "output": "1\n"}, {"type": "stdin_stdout", "input": "5 3\n13\n-3\n3\n1\n1", "output": "1\n"}, {"type": "stdin_stdout", "input": "5 4\n17\n-1\n3\n9\n2", "output": "1\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\nAfter defeating a Blacklist Riva... | [{"type": "stdin_stdout", "input": "10\n0.1000 0.1000 0.8000 0.5460931614544986\n0.1111 0.1111 0.7778 0.1111\n0.0001 0.0001 0.9998 1.174827513717328\n0.8000 0.1000 0.1000 0.1000\n0.1000 0.8000 0.1000 0.992075111118174\n0.9000 0.0999 0.0001 0.9000\n0.0999 0.9000 0.0001 0.9000\n0.3333 0.6666 0.0001 0.873181103672425\n0.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\nProblem statement\n\nThere is a ... | [{"type": "stdin_stdout", "input": "4\n1 2\n2 3\n1 4\n1 3 2 -1\n-5 2 9 -1", "output": "33\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n2 3\n1 4\n0 3 0 -1\n-4 2 5 -1", "output": "23\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n1 4\n3 4\n-1 3 2 0\n-8 4 8 -1", "output": "27\n"}, {"type": "stdin_stdout", "input": "4\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n*SCHEDULE YOUR DA(RRA)Y*\n ... | [{"input": "8\n5\n30", "output": "[[30, 82, 30, 82, 30, 82, 30, 82, 30]]", "fn_name": "day_plan"}, {"input": "3\n5\n60", "output": "[\"You're not sleeping tonight!\"]", "fn_name": "day_plan"}, {"input": "2\n2\n60", "output": "[[60, 0, 60]]", "fn_name": "day_plan"}, {"input": "2\n1\n60", "output": "[[60]]", "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\nYou are given array a with n ele... | [{"type": "stdin_stdout", "input": "100 343\n999 284 486 785 176 742 856 415 992 601 600 122 460 214 338 92 627 913 376 835 384 914 335 179 409 957 96 784 531 43 584 206 971 799 592 801 870 978 437 517 466 952 1 327 731 689 816 681 383 969 452 298 114 687 314 436 267 154 827 197 805 207 284 550 351 700 94 567 524 329 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\nDenis, after buying flowers and ... | [{"type": "stdin_stdout", "input": "10 10\n1101001\n0110000\n0111010\n0010000\n1010000\n0111000\n1011011\n1010010\n1101011\n1111110\n", "output": "9941743758\n"}, {"type": "stdin_stdout", "input": "10 10\n0101111\n0000000\n1111011\n1011011\n1011011\n1111011\n0010010\n1010010\n1101111\n0000000\n", "output": "8993391761\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 long corridor which c... | [{"type": "stdin_stdout", "input": "3\n25 2 3 5\n2 7\n11 2 11 10\n1 1\n4 2 3 6\n4 4\n", "output": "1\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n11 2 3 20\n4 4\n7 2 3 -1\n5 1\n1 2 4 10\n0 1\n", "output": "2\n2\n2\n"}, {"type": "stdin_stdout", "input": "3\n13 2 3 1\n1 8\n7 2 1 6\n13 2\n7 2 3 12\n2 4\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\nIt is well known that Berland ha... | [{"type": "stdin_stdout", "input": "100 50\n79 24\n65 69\n44 6\n49 53\n26 22\n24 76\n10 2\n19 44\n44 10\n87 82\n91 87\n23 92\n69 66\n95 30\n90 24\n95 20\n76 36\n82 24\n63 80\n70 72\n34 76\n42 40\n17 100\n66 64\n85 96\n34 30\n36 69\n45 56\n36 62\n26 38\n31 28\n79 64\n78 69\n41 62\n36 40\n64 67\n21 13\n90 88\n28 30\n59 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\nGerald bought two very rare pain... | [{"type": "stdin_stdout", "input": "1000 1000\n999 999\n1 1000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "808 1000\n583 676\n527 416\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "965 1000\n606 895\n533 394\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "958 1000\n326 461\n836 674... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "100 1019 35\n34 50 60 47 49 49 59 60 37 51 3 86 93 33 78 31 75 87 26 74 32 30 52 57 44 10 33 52 78 16 36 77 53 49 98 82 93 85 16 86 19 57 17 24 73 93 37 46 27 87 35 76 33 91 96 55 34 65 97 66 7 30 45 68 18 51 77 43 99 76 35 47 6 1 83 49 67 85 89 17 20 7 49 33 43 59 53 71 86 71 3 47 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\nTakahashi is playing with N card... | [{"type": "stdin_stdout", "input": "15 10\n1 5 6 10 11 11 11 20 21 25 25 26 99 124 99", "output": "6\n"}, {"type": "stdin_stdout", "input": "15 10\n0 5 6 10 11 11 11 20 21 25 25 26 99 131 99", "output": "5\n"}, {"type": "stdin_stdout", "input": "15 10\n0 5 6 10 11 11 11 20 21 46 25 26 99 131 99", "output": "5\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour task is to ___Reverse and C... | [{"input": "\"234hh54 53455 sdfqwzrt rtteetrt hjhjh lllll12 44\"", "output": "[\"trzwqfdstrteettr45hh4325543544hjhjh21lllll\"]", "fn_name": "reverse_and_combine_text"}, {"input": "\"sdfsdf wee sdffg 342234 ftt\"", "output": "[\"gffds432243fdsfdseewttf\"]", "fn_name": "reverse_and_combine_text"}, {"input": "\"abc def g... | 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 are an N \\times N matrix ... | [{"type": "stdin_stdout", "input": "49 4643\n1 50 99 148 197 246 295 344 393 442 491 540 589 638 687 736 785 834 883 932 981 1030 1079 1128 1177 1226 1275 1324 1373 1422 1471 1520 1569 1618 1667 1716 1765 1814 1863 1912 1961 2010 2059 2108 2157 2185 2255 2304 2353\n2 51 742 149 198 247 296 345 394 443 1148 541 590 639 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ block towers in a ... | [{"type": "stdin_stdout", "input": "3\n3\n10 14 10\n4\n4 1 1 2\n5\n2 1 3 1 10\n", "output": "1\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n3\n10 10 10\n4\n3 2 1 2\n5\n1 2 3 1 5\n", "output": "0\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n3\n10 10 10\n4\n3 2 0 2\n5\n1 2 3 1 5\n", "output": "0\n1\n1\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\nThere is a complete graph of m v... | [{"type": "stdin_stdout", "input": "5\n2\n3\n4\n10\n6", "output": "17\n"}, {"type": "stdin_stdout", "input": "5\n2\n3\n3\n5\n6", "output": "11\n"}, {"type": "stdin_stdout", "input": "5\n2\n3\n5\n5\n6", "output": "13\n"}, {"type": "stdin_stdout", "input": "5\n2\n3\n3\n2\n6", "output": "9\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\nGiven are two strings S and T.\n... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given three integers, A,... | [{"type": "stdin_stdout", "input": "-100 100 100\n", "output": "-100\n"}, {"type": "stdin_stdout", "input": "-123 100 100", "output": "-123\n"}, {"type": "stdin_stdout", "input": "-157 100 100", "output": "-157\n"}, {"type": "stdin_stdout", "input": "-100 100 100", "output": "-100"}, {"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\nYou are given an integer sequenc... | [{"type": "stdin_stdout", "input": "6\n-1 22 1 75 15 0", "output": "0 75 22 -1 1 15\n"}, {"type": "stdin_stdout", "input": "6\n2 20 0 59 10 1", "output": "1 59 20 2 0 10\n"}, {"type": "stdin_stdout", "input": "6\n2 20 0 59 10 0", "output": "0 59 20 2 0 10\n"}, {"type": "stdin_stdout", "input": "6\n2 20 0 59 12 0", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the number of integers betw... | [{"type": "stdin_stdout", "input": "98765432109876543210\n66", "output": "678072802\n"}, {"type": "stdin_stdout", "input": "98765432109876543210\n18", "output": "852803440\n"}, {"type": "stdin_stdout", "input": "98765432109876543210\n11", "output": "501683936\n"}, {"type": "stdin_stdout", "input": "98765432109876543210... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Dwango Co., Ltd., there is a ... | [{"type": "stdin_stdout", "input": "54\nDIALUPWIDEAREADETWORKGAMINGOPERATIONCORPORATIONLIMITEN\n3\n20 30 40", "output": "0\n2\n3\n"}, {"type": "stdin_stdout", "input": "54\nDIALUPWIDEAREADETWORKGAMINGOPERATIONCORPORATIONLIMITEN\n3\n20 38 40", "output": "0\n3\n3\n"}, {"type": "stdin_stdout", "input": "54\nDIALUPWIDEAREA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Let's say that `\"g\" i... | [{"input": "\"A half of a half is a quarter.\"", "output": "[true]", "fn_name": "happy_g"}, {"input": "\"bigger is ggooder\"", "output": "[true]", "fn_name": "happy_g"}, {"input": "\"ggg ggg g ggg\"", "output": "[false]", "fn_name": "happy_g"}, {"input": "\"gg0gg3gg0gg\"", "output": "[true]", "fn_name": "happy_g"}, {"i... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "10\n1\n2\n1\n10\n5\n11\n10\n8\n14\n4", "output": "0\n0\n0\n0\n0\n0\n0\n1\n2\n1\n"}, {"type": "stdin_stdout", "input": "10\n2\n2\n1\n7\n5\n13\n14\n8\n18\n5", "output": "0\n0\n0\n1\n0\n0\n2\n1\n0\n0\n"}, {"type": "stdin_stdout", "input": "10\n2\n2\n1\n10\n5\n11\n7\n8\n14\n4", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA complete binary tree is a bina... | [{"type": "stdin_stdout", "input": "5\n-3 -1 -1 1 -3", "output": "node 1: key = -3, left key = -1, right key = -1, \nnode 2: key = -1, parent key = -3, left key = 1, right key = -3, \nnode 3: key = -1, parent key = -3, \nnode 4: key = 1, parent key = -1, \nnode 5: key = -3, parent key = -1, \n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nShe is an extraordinary girl. Sh... | [{"type": "stdin_stdout", "input": "2\n2\nYYZNNNNY\n4\nNNNYYNYNNNYYONYN", "output": "6\n10\n"}, {"type": "stdin_stdout", "input": "2\n2\nYYZNYNNN\n4\nNNNYYNYNNNYYNNYN", "output": "5\n10\n"}, {"type": "stdin_stdout", "input": "2\n2\nYYZNNNNY\n4\nNNNYNNYNYNYYONYN", "output": "6\n11\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\nToday, hedgehog Filya went to sc... | [{"type": "stdin_stdout", "input": "10\n1 1 1 1 1 2 2 2 2 2\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10\n1 1 1 1 1 2 2 2 2 2\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10\n1 1 1 1 1 3 2 2 2 2\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "3\n99999999 1 50000000\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\nAtCoder Mart sells 1000000 of ea... | [{"type": "stdin_stdout", "input": "386", "output": "0\n"}, {"type": "stdin_stdout", "input": "115", "output": "0\n"}, {"type": "stdin_stdout", "input": "173", "output": "0\n"}, {"type": "stdin_stdout", "input": "145", "output": "0\n"}, {"type": "stdin_stdout", "input": "192", "output": "0\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nForgotten languages (also known ... | [{"type": "stdin_stdout", "input": "2\n3 2\npiygu ezyfo rzotm\n1 piygu\n6 tefwz tefwz piygu ezyfo tefwz piygu\n4 1\nkssdy tjzhy ljzym kegqz\n4 kegqz kegqz kegqz vxvzj", "output": "YES YES NO \nNO NO NO YES \n"}, {"type": "stdin_stdout", "input": "2\n3 2\npiygu ezyfo rzotm\n1 piygu\n6 tefwz zwfet piygu ezyfo tefwz piygu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is so boring in the summer ho... | [{"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 555489806 1596475927 1262387014 1000000000\n", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 555489806 1596475927 1262387014 1000000100\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\nReal stupidity beats artificial ... | [{"type": "stdin_stdout", "input": "4\n3 2\naab\n3 3\naab\n7 1\nabacaba\n2 0\nab\n", "output": "2\n2\n1\n1\n"}, {"type": "stdin_stdout", "input": "1\n4 1\nabcd\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\n4 2\nabca\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\n3 1\naab\n", "output": "2\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 \"Russian Peasant Method\" i... | [{"input": "2500\n123", "output": "[307500]", "fn_name": "russian_peasant_multiplication"}, {"input": "1.001\n2", "output": "[2.002]", "fn_name": "russian_peasant_multiplication"}, {"input": "175\n18", "output": "[3150]", "fn_name": "russian_peasant_multiplication"}, {"input": "10\n5", "output": "[50]", "fn_name": "rus... | 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 had three strings $a$, $b$... | [{"type": "stdin_stdout", "input": "100 200\ndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\nddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is building a... | [{"type": "stdin_stdout", "input": "999999999999999999 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "999999999999999999 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "999999999999999991 1000000000000000000\n", "output": "11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya has n positive integers a_... | [{"type": "stdin_stdout", "input": "50\ng\nha\nhd\ndi\nac\nfdhhb\ng\nhgeag\nafafb\nb\nb\najjj\ncaiadi\nhciifa\nhb\ncaih\ncdbbi\ngjff\nbfe\neddci\ndijfie\nacjj\nef\ng\njdc\nahg\ne\nhbbh\ncdc\njifdc\ne\nffaehj\nhjhi\ng\neag\nfbbc\nchg\njhahfg\nbb\njd\njchh\nbefifj\nejac\ne\nh\njfhb\nedhe\nf\nag\nca\n", "output": "2673136... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers $a$ a... | [{"type": "stdin_stdout", "input": "11\n5 5\n13 42\n18 4\n1337 420\n123456789 1000000000\n100500 9000\n5 5\n13 42\n18 4\n2524 420\n123456789 1000000000\n", "output": "0\n3\n2\n92\n87654322\n9150\n0\n3\n2\n211\n87654322\n"}, {"type": "stdin_stdout", "input": "11\n10 5\n4 42\n17 4\n1337 420\n123456789 1000000000\n100500 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTom is interested in power consu... | [{"type": "stdin_stdout", "input": "30 3 50 32 1 18\n46 60\n66 94\n99 141\n162 239\n309 334\n400 550\n594 630\n659 663\n664 701\n735 736\n741 755\n756 801\n823 854\n865 915\n937 964\n984 986\n990 1007\n1008 1031\n1052 1064\n1073 1080\n1190 1191\n1192 1254\n1265 1266\n1272 1273\n1274 1277\n1284 1302\n1308 1312\n1358 138... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 next... | [{"type": "stdin_stdout", "input": "42\n-5391 -2932\n-5391 -2868\n-5391 1744\n-5391 2236\n-5391 4148\n-5391 5217\n-5391 6188\n-3584 -2932\n-3584 -2868\n-3584 1744\n-3584 2236\n-3584 4148\n-3584 5217\n-3584 6188\n-1657 -2932\n-1657 -2868\n-1657 1744\n-1657 2236\n-1657 4148\n-1657 5217\n-1657 6188\n3218 -2932\n3218 -2868... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rush of modern life, peop... | [{"type": "stdin_stdout", "input": "20 20\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n"}, {"type": "stdin_stdout", "input": "20 20\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 organizing a party.... | [{"type": "stdin_stdout", "input": "100000 99999\n", "output": "9999900000\n"}, {"type": "stdin_stdout", "input": "110000 99999", "output": "10999890000\n"}, {"type": "stdin_stdout", "input": "110001 118998", "output": "4363299666\n"}, {"type": "stdin_stdout", "input": "110000 138162", "output": "7598910000\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\nA widely known among some people... | [{"type": "stdin_stdout", "input": "10 10\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 1585 1564 3603 1095 1364 1029 3189 1331\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 1749\n0 3495 1540 641 1093 702 2249 983 1218 2108\n0 1397 1105 3119 1194 839 1286 2979 2941 1911\n0 1818 2264... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ cities in Berland ... | [{"type": "stdin_stdout", "input": "3\n7 7 3 5\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 5\n4 5 2 3\n1 2\n2 3\n3 4\n4 1\n4 2\n4 3 2 1\n1 2\n2 3\n4 1\n", "output": "4\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n7 7 3 5\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 5\n4 5 2 3\n1 2\n2 3\n4 4\n4 1\n4 2\n4 3 2 1\n1 2\n2 3\n4 1\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\nConstanze is the smartest girl i... | [{"type": "stdin_stdout", "input": "nnnnnnnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuunnnnnnnnnnnnnnnnnnnnnuuuuuuuuuunnunnu\n", "output": "281595619\n"}, {"type": "stdin_stdout", "input": "nnnnnnnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuunnnnnnnnnnnnnnnnnnnnnuuuuuuuuuunnunnu\n", "output": "28... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLengths are measures in Baden in... | [{"type": "stdin_stdout", "input": "10000\n", "output": "277 9\n"}, {"type": "stdin_stdout", "input": "18864\n", "output": "524 0\n"}, {"type": "stdin_stdout", "input": "13473\n", "output": "374 3\n"}, {"type": "stdin_stdout", "input": "25368\n", "output": "704 8\n"}, {"type": "stdin_stdout", "input": "9999\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\nVery soon there will be a parade... | [{"type": "stdin_stdout", "input": "10\n18 18\n71 471\n121 362\n467 107\n138 254\n13 337\n499 373\n337 387\n147 417\n76 417\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n18 18\n71 471\n121 362\n467 107\n138 254\n13 337\n499 373\n337 387\n147 417\n76 417\n", "output": "4\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nICPC Ranking\n\nYour mission in ... | [{"type": "stdin_stdout", "input": "300 19 8 5\n50 5 2 1\n70 5 2 0\n75 1 1 0\n100 3 1 0\n150 2 2 0\n240 5 5 7\n50 1 1 0\n60 2 2 0\n41 2 3 0\n90 1 3 0\n120 3 5 0\n196 4 1 0\n150 2 4 1\n180 3 5 4\n15 2 2 1\n20 2 2 1\n25 2 2 0\n60 1 1 0\n120 5 5 4\n15 5 4 1\n20 5 4 0\n40 1 1 0\n40 2 2 0\n120 2 3 4\n30 1 1 0\n40 2 1 0\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\nPolycarp has a favorite sequence... | [{"type": "stdin_stdout", "input": "6\n7\n1324 4 5 2 9 1 1\n4\n9 2 7 1\n11\n8 4 3 1 2 7 8 7 9 4 2\n1\n42\n2\n11 7\n8\n1 1 1 1 1 1 1 1\n", "output": "1324 1 4 1 5 9 2 \n9 1 2 7 \n8 2 4 4 3 9 1 7 2 8 7 \n42 \n11 7 \n1 1 1 1 1 1 1 1 \n"}, {"type": "stdin_stdout", "input": "6\n7\n1324 4 5 2 9 1 1\n4\n9 2 7 1\n11\n8 4 3 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\nIn this Kata, you will create a ... | [{"input": "\"1a2b3c4d5e6f7g8h9i10j11k12l13m14n15o16p17q18r19s20t21u22v23w24x25y26z\"", "output": "[\"a1b2c3d4e5f6g7h8i9j10k11l12m13n14o15p16q17r18s19t20u21v22w23x24y25z26\"]", "fn_name": "AlphaNum_NumAlpha"}, {"input": "\"abcdefghijklmnopqrstuvwxyz\"", "output": "[\"1234567891011121314151617181920212223242526\"]", "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 bracketed sequence is called c... | [{"type": "stdin_stdout", "input": "100\n)()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "101\n(())))))()))()())(()))((())))((())(()()()(()()((()()((()((())))((()))()(())(()(())((()))(()))()(((()(\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\nA mischievous notice has arrived... | [{"type": "stdin_stdout", "input": "4\n03:05\n05:11\n11:54\n10:40", "output": "warning\nwarning\nwarning\nwarning\n"}, {"type": "stdin_stdout", "input": "4\n03:25\n10:61\n11:65\n10:41", "output": "warning\nwarning\nalert\nwarning\n"}, {"type": "stdin_stdout", "input": "4\n12:15\n10:50\n11:44\n10:40", "output": "warning... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tree with n node... | [{"type": "stdin_stdout", "input": "2\n4\n0 1\n0 2\n2 3\n2\n1 0\n", "output": "\n1 2 1 1 1 \n0 0 1 \n"}, {"type": "stdin_stdout", "input": "2\n4\n0 1\n1 2\n2 3\n2\n1 0\n", "output": "3 0 1 1 1\n0 0 1\n"}, {"type": "stdin_stdout", "input": "2\n4\n0 1\n1 2\n1 3\n2\n1 0\n", "output": "3 0 2 1 0\n0 0 1\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\nIn this Kata, you will be given ... | [{"input": "6668844536485\n0\n0\n6", "output": "[true]", "fn_name": "check_digit"}, {"input": "67845123654\n4\n2\n4", "output": "[true]", "fn_name": "check_digit"}, {"input": "9999999999\n2\n5\n1", "output": "[false]", "fn_name": "check_digit"}, {"input": "1234567\n1\n0\n1", "output": "[true]", "fn_name": "check_digit"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob are playing One Ca... | [{"type": "stdin_stdout", "input": "1 13\n", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "11 11\n", "output": "Draw\n"}, {"type": "stdin_stdout", "input": "-1 -4", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "-2 -3", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "-2 -4", "output": "Ali... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 break in the buffet of ... | [{"type": "stdin_stdout", "input": "30\n61 23\n30 93\n4 18\n34 97\n63 77\n45 95\n51 13\n41 8\n86 19\n38 24\n2 67\n20 61\n95 48\n95 1\n28 26\n92 110\n6 78\n64 28\n1 82\n61 37\n77 35\n152 21\n10 24\n52 12\n80 63\n64 61\n16 87\n118 19\n21 34\n54 49\n", "output": "29529\n"}, {"type": "stdin_stdout", "input": "30\n61 23\n30... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.