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\nThe __Hamming weight__ of a stri... | [{"input": "2048", "output": "[1]", "fn_name": "hamming_weight"}, {"input": "10", "output": "[2]", "fn_name": "hamming_weight"}, {"input": "21", "output": "[3]", "fn_name": "hamming_weight"}, {"input": "0", "output": "[0]", "fn_name": "hamming_weight"}, {"input": "1", "output": "[1]", "fn_name": "hamming_weight"}, {"in... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTraining is indispensable for ac... | [{"type": "stdin_stdout", "input": "3\n10 40\n15 40\n20 30", "output": "110\n"}, {"type": "stdin_stdout", "input": "3\n10 40\n15 40\n40 30", "output": "120\n"}, {"type": "stdin_stdout", "input": "3\n10 40\n15 40\n20 32", "output": "112\n"}, {"type": "stdin_stdout", "input": "3\n10 36\n15 40\n20 32", "output": "108\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n Smartphones software se... | [{"input": "\"4334\"", "output": "[\"impossible\"]", "fn_name": "decrypt"}, {"input": "\"123456\"", "output": "[\"738496\"]", "fn_name": "decrypt"}, {"input": "\"353\"", "output": "[\"123\"]", "fn_name": "decrypt"}, {"input": "\"444\"", "output": "[\"404\"]", "fn_name": "decrypt"}, {"input": "\"147\"", "output": "[\"37... | 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\"What are your shoe sizes?\"\n\... | [{"type": "stdin_stdout", "input": "27.100228165013633\n158.95452966627283\n-0.21569613349567962", "output": "NA\nNA\n"}, {"type": "stdin_stdout", "input": "27.432484603703674\n158.95452966627283\n-0.21569613349567962", "output": "NA\nNA\n"}, {"type": "stdin_stdout", "input": "27.932276079901406\n158.95452966627283\n-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# Task\n Consider the following ... | [{"input": "12", "output": "[\"c\"]", "fn_name": "abacaba"}, {"input": "16", "output": "[\"e\"]", "fn_name": "abacaba"}, {"input": "1", "output": "[\"a\"]", "fn_name": "abacaba"}, {"input": "2", "output": "[\"b\"]", "fn_name": "abacaba"}, {"input": "3", "output": "[\"a\"]", "fn_name": "abacaba"}, {"input": "4", "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\nSlime and his $n$ friends are at... | [{"type": "stdin_stdout", "input": "100\n4364 698 1003 1128 1513 39 4339 969 7452 3415 1154 1635 6649 136 1442 50 834 1680 107 978 983 3176 4017 1692 1113 1504 1118 396 1975 2053 2366 3022 3007 167 610 4649 14659 2331 4565 318 7232 204 7131 6122 2885 5748 1998 3833 6799 4219 8454 8698 4964 1736 1554 1665 2425 4227 1967... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 certainly can tell which is ... | [{"input": "[1024, 97]\n[1024, 81]", "output": "[-1]", "fn_name": "compare_powers"}, {"input": "[34, 98]\n[51, 67]", "output": "[-1]", "fn_name": "compare_powers"}, {"input": "[2, 100]\n[2, 150]", "output": "[1]", "fn_name": "compare_powers"}, {"input": "[2, 100]\n[3, 100]", "output": "[1]", "fn_name": "compare_powers"... | 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\nZS the Coder is playing a game. ... | [{"type": "stdin_stdout", "input": "7816\n", "output": "2\n17\n46\n97\n176\n289\n442\n641\n892\n1201\n1574\n2017\n2536\n3137\n3826\n4609\n5492\n6481\n7582\n8801\n10144\n11617\n13226\n14977\n16876\n18929\n21142\n23521\n26072\n28801\n31714\n34817\n38116\n41617\n45326\n49249\n53392\n57761\n62362\n67201\n72284\n77617\n8320... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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[Run-length encoding](http://en.... | [{"input": "\"QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... | 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\nPetya loves lucky numbers. We al... | [{"type": "stdin_stdout", "input": "544958\n", "output": "4477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDr. A of the Aizu Institute of B... | [{"type": "stdin_stdout", "input": "rbgrg\nbbbrbgr\nrbg\nrgbbrgrb\nrrgbgrggb\nggrgbrbggr\nrrrrr\nbgbr\n0", "output": "5\n7\n1\n6\nNA\n11\n0\n4\n"}, {"type": "stdin_stdout", "input": "grgbr\nrbbgbbr\nbgr\nbgbrrgbr\nbggrgbgrr\ngggbrggrbr\nrrrrr\nbgbr\n0", "output": "5\n7\n1\n9\nNA\n11\n0\n4\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "4\n1111\n1000\n1000\n1000", "output": "6\n"}, {"type": "stdin_stdout", "input": "4\n0111\n1100\n0000\n1001", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n1111\n1010\n1000\n1010", "output": "4\n"}, {"type": "stdin_stdout", "input": "4\n0011\n0000\n0000\n1001", "output": "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\nPetr stands in line of n people,... | [{"type": "stdin_stdout", "input": "100 81 58\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "100 81 54\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "100 81 91\n", "output": "19"}, {"type": "stdin_stdout", "input": "100 11 88\n", "output": "89"}, {"type": "stdin_stdout", "input": "59 12 33\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\nWe have a sequence of N \\times ... | [{"type": "stdin_stdout", "input": "11 97\n0 1 8 2 5 4 2 6 2 3 5", "output": "0 1 8 6 2 3 5\n"}, {"type": "stdin_stdout", "input": "11 47\n0 1 0 3 10 5 1 36 2 2 0", "output": "10 5 1 36 0\n"}, {"type": "stdin_stdout", "input": "11 101\n0 2 4 1 5 4 4 6 0 3 5", "output": "2 4 6 0 3 5\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n```if-not:julia,racket\nWrite a ... | [{"input": "10\n10\n10", "output": "[[600, 1000]]", "fn_name": "get_size"}, {"input": "4\n2\n6", "output": "[[88, 48]]", "fn_name": "get_size"}, {"input": "1\n2\n1", "output": "[[10, 2]]", "fn_name": "get_size"}, {"input": "1\n2\n2", "output": "[[16, 4]]", "fn_name": "get_size"}, {"input": "1\n1\n1", "output": "[[6, 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\nTakahashi will take part in an e... | [{"type": "stdin_stdout", "input": "11 14\n3 1 4 1 0 9 0 20 1 2 10\n15 6 7 26 3 2 3 8 4 8 2", "output": "20\n"}, {"type": "stdin_stdout", "input": "11 14\n3 1 4 1 0 9 0 20 1 2 10\n15 6 7 26 3 4 3 8 4 8 2", "output": "22\n"}, {"type": "stdin_stdout", "input": "11 14\n3 1 4 1 2 9 2 11 1 3 10\n15 9 7 26 3 2 3 8 4 8 2", "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\nYou are given two integers $n$ a... | [{"type": "stdin_stdout", "input": "2\n69 120\n11 9\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n34 230\n4 15\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n34 230\n4 27\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n11 101\n13 4\n", "output": "NO\nNO\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\nArkady decided to buy roses for ... | [{"type": "stdin_stdout", "input": "30 15\n7926 577 5009 7237 4395 3239 8994 4429 8126 2925 139 320 4442 3397 1292 2800 9505 6043 5946 8058 4031 6871 4689 1977 73 440 5320 5290 4707 387\nOOWOWWORRWOWORWRRRRWORROOWWROW\n", "output": "91633\n"}, {"type": "stdin_stdout", "input": "30 15\n7926 577 5009 7237 4395 3239 8994 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "904132655 827386249 118827660 334\n+++-+++++--+++----+-+-+-+-+--+-+---++--++--++--+-+-+++-+++--+-+-+----+-+-++++-----+--++++------+++-+-+-++-++++++++-+-++-+++--+--++------+--+-+++--++--+---++-++-+-+-++---++-++--+-+-++-+------+-+----+++-+++--+-+-+--+--+--+------+--+---+--+-++--+++---+... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA one-dimensional Japanese cross... | [{"type": "stdin_stdout", "input": "10 1\n5 78 3 87 4 9 5 8 9 1235\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10 1\n5 78 3 87 4 9 5 8 9 1235\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10 1\n5 24 3 87 4 9 5 8 9 1235\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10 1\n5 24 3 0 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 an undirected unwe... | [{"type": "stdin_stdout", "input": "8 28\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n3 4\n3 5\n3 6\n3 7\n3 8\n4 5\n4 6\n4 7\n4 8\n5 6\n5 7\n5 8\n6 7\n6 8\n7 8\n", "output": "5040\n"}, {"type": "stdin_stdout", "input": "8 27\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n2 3\n2 4\n2 5\n2 6\n2 7\n3 4\n3 5\n3 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\nExample\n\nInput\n\nmmemewwemeww... | [{"type": "stdin_stdout", "input": "mmemwweemeww", "output": "Rabbit\n"}, {"type": "stdin_stdout", "input": "wwemeewwmemm", "output": "Rabbit\n"}, {"type": "stdin_stdout", "input": "mmemwweeneww", "output": "Rabbit\n"}, {"type": "stdin_stdout", "input": "mnemwweeneww", "output": "Rabbit\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\nDevu has an array A consisting o... | [{"type": "stdin_stdout", "input": "2 4\n1 18\n1\n2\n5\n4", "output": "Yes\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "2 4\n1 3\n1\n2\n3\n4\n", "output": "Yes\nYes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "2 4\n1 3\n1\n2\n3\n3", "output": "Yes\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "2 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've come to your favorite sto... | [{"type": "stdin_stdout", "input": "12345678 87654321 12345678 87654321\n226515686", "output": "2796489721305108\n"}, {"type": "stdin_stdout", "input": "12345678 87654321 12873114 87654321\n226515686", "output": "2915962248666204\n"}, {"type": "stdin_stdout", "input": "12345678 87654321 12345678 87654321\n123456789", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Physical education teacher a... | [{"type": "stdin_stdout", "input": "100\n246 485 -940 -186 -841 -98 711 429 -154 164 -244 -111 886 -447 22 480 224 -132 927 812 -243 -152 -843 403 -320 -346 -407 827 645 -903 -172 540 -359 498 270 18 374 -52 -983 -164 -707 -242 -159 -825 -889 661 -629 212 849 -891 -622 810 957 897 -110 -293 -257 822 690 369 -914 212 -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\nPeter can see a clock in the mir... | [{"input": "\"06:35\"", "output": "[\"05:25\"]", "fn_name": "what_is_the_time"}, {"input": "\"11:59\"", "output": "[\"12:01\"]", "fn_name": "what_is_the_time"}, {"input": "\"12:02\"", "output": "[\"11:58\"]", "fn_name": "what_is_the_time"}, {"input": "\"04:00\"", "output": "[\"08:00\"]", "fn_name": "what_is_the_time"},... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a non-empty string... | [{"type": "stdin_stdout", "input": "10\nonetwonetwooneooonetwooo\ntwo\none\ntwooooo\nttttwo\nttwwoo\neoono\nonnne\noneeeee\noneeeeeeetwooooo\n", "output": "6\n2 6 10 13 18 21 \n1\n2 \n1\n2 \n1\n2 \n1\n5 \n0\n\n0\n\n0\n\n1\n2 \n2\n2 11 \n"}, {"type": "stdin_stdout", "input": "10\nonetwonetwooneooonetwooo\nuwo\none\ntwoo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an integer N, find the bas... | [{"type": "stdin_stdout", "input": "-1000000000\n", "output": "11000101101001010100101000000000\n"}, {"type": "stdin_stdout", "input": "-790013317\n", "output": "11010001001111101010111110001111\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1001100111011111101111000000000\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\nLittle Vasya has received a youn... | [{"type": "stdin_stdout", "input": "123\n112 277 170 247 252 115 157 293 256 143 196 90 12 164 164 42 8 223 167 109 175 232 239 111 148 51 9 254 93 32 268 162 231 91 47 162 161 191 195 145 247 292 129 199 230 94 144 217 18 205 176 20 143 198 121 243 211 262 230 277 195 255 108 290 220 275 158 2 286 200 60 267 278 207 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\nTreeland is a country in which t... | [{"type": "stdin_stdout", "input": "35 15\n6 12 32 18 11 10 29 9 30 27 31 14 8 24 28 25 19 15 21 3 4 1 33 22 23 17 16 13 7 2\n1 2\n20 3\n1 4\n20 5\n20 6\n1 7\n13 8\n4 9\n1 10\n1 11\n1 12\n1 13\n18 14\n10 15\n1 16\n16 17\n1 18\n1 19\n1 20\n20 21\n1 22\n27 23\n25 24\n1 25\n20 26\n20 27\n18 28\n4 29\n13 30\n4 31\n1 32\n20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is playing a computer g... | [{"type": "stdin_stdout", "input": "1\n43\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\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "1\n30\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\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "3\n4\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\nFor this kata, you are given thr... | [{"input": "0.25\n0.5\n0.75\n3.25\n-0.5\n-0.25\n1.0\n0.25\n0.5", "output": "[3]", "fn_name": "middle_point"}, {"input": "-1\n0\n2\n-2\n4\n-1\n-3\n8\n-4", "output": "[2]", "fn_name": "middle_point"}, {"input": "0\n2\n0\n6\n-2\n8\n3\n0\n4", "output": "[3]", "fn_name": "middle_point"}, {"input": "1\n0\n4\n5\n0\n6\n-7\n0\n... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMad scientist Mike has just fini... | [{"type": "stdin_stdout", "input": "+--+--+------+++++++-+-+++--++---+--+-+---+--+++-+++-------+++++-+-++++--+-+-+++++++----+----+++----+-+++-+++-----+++-+-++-+-+++++-+--++----+--+-++-----+-+-++++---+++---+-+-+-++++--+--+++---+++++-+---+-----+++-++--+++---++-++-+-+++-+-+-+---+++--+--++++-+-+--++-------+--+---++-----+++... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNick has n bottles of soda left ... | [{"type": "stdin_stdout", "input": "90\n4 2 21 69 53 39 2 2 8 58 7 5 2 82 7 9 13 10 2 44 1 7 2 1 50 42 36 17 14 46 19 1 50 20 51 46 9 59 73 61 76 4 19 22 1 43 53 2 5 5 32 7 5 42 30 14 32 6 6 15 20 24 13 8 5 19 9 9 7 20 7 2 55 36 5 33 64 20 22 22 9 30 67 38 68 2 13 19 2 9\n48 4 39 85 69 70 11 42 65 77 61 6 60 84 67 15 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike is the president of country... | [{"type": "stdin_stdout", "input": "20\n452405440 586588704 509061481 392584366 16115810 148658854 66743034 290624691 677780684 519361360 208050516 401554301 954478790 989443769 387546138 832279893 1081316002 80960260 846049648 588066499\n", "output": "1081316002 954478790 452405440 392584366 387546138 387546138 208050... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAdilbek's house is located on a ... | [{"type": "stdin_stdout", "input": "20 16 16\n1 2 3 4 5 6 8 9 10 11 13 14 15 16 18 19\n2 1 1 1 1 1 3 3 2 2 1 3 3 3 3 2\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "20 16 16\n1 2 3 4 5 6 8 9 10 11 13 14 15 16 18 19\n2 1 1 1 1 1 3 3 2 2 1 3 3 3 3 2\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "20 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\nIf the girl doesn't go to Denis,... | [{"type": "stdin_stdout", "input": "30 8\n0 1 7 10 23 24 26 30\n40 13\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "30 8\n0 1 7 10 23 24 26 30\n40 7\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "30 8\n0 1 7 12 23 24 26 30\n40 7\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "30 8\n0 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\nSnuke has an integer sequence A ... | [{"type": "stdin_stdout", "input": "5574\n150872158 2 6 1 3 8 10 4 9 3 5 2 10 2 8 4 2 3 10 8 4 3 1 8 3 5 8 3 7 3 10 7 4 6 1 1 8 10 1 1 10 9 7 9 1 3 7 7 8 6 7 8 6 10 5 2 1 2 2 2 6 10 3 6 6 2 8 1 9 3 6 8 10 10 5 1 8 4 5 1 6 2 7 7 5 3 6 10 6 9 2 9 9 10 1 10 9 10 5 3 10 8 6 10 2 3 1 7 2 7 2 5 8 7 10 3 10 4 1 2 2 1 2 9 2 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\nA sequence of $n$ numbers is cal... | [{"type": "stdin_stdout", "input": "1\n50 870\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n3 13\n3 1 4\n1 1\n1\n3 3\n1 4 2\n2 1\n4 3\n5 6\n1 2 3 4 5\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\nThere is a triangle formed by th... | [{"type": "stdin_stdout", "input": "2.5236948660396488 1.2449675008007697 3.467160130839816 2.2489154237675044 4.3267713977209254 3.696599910445261 2.778529750649784 0.5428461273225557\n0.3648696681668867 1.6775294144371997 2.646749575901687 5.368903351235283 5.958977255484857 4.673632823800934 -0.048505034276450476 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# Task\n You're given a two-dime... | [{"input": "[[4, 5, 3, -4, 3, 8], [2, 0, 6, 5, 4, 9], [7, 5, 6, 8, 2, 6], [1, 4, 7, 8, 9, 11], [1, 3, 10, 5, 5, 1], [12, 7, 3, 4, 4, 3]]", "output": "[13]", "fn_name": "smallest_integer"}, {"input": "[[4, 5, 3, 21, 3, 8], [2, 2, 6, 5, 10, 9], [7, 5, 6, 8, 2, 6], [1, 4, 7, 8, 9, 0], [1, 3, 6, 5, 5, 1], [2, 7, 3, 4, 4, 3... | 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 N integers; the i-... | [{"type": "stdin_stdout", "input": "5\n52\n-1\n-2\n-2\n-1", "output": "110\n"}, {"type": "stdin_stdout", "input": "5\n89\n-1\n-2\n-2\n-1", "output": "184\n"}, {"type": "stdin_stdout", "input": "5\n46\n-1\n-4\n-2\n-1", "output": "102\n"}, {"type": "stdin_stdout", "input": "5\n115\n-1\n0\n-2\n-1", "output": "236\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\nTriangular number is the amount ... | [{"input": "14", "output": "[false]", "fn_name": "is_triangular"}, {"input": "27", "output": "[false]", "fn_name": "is_triangular"}, {"input": "10", "output": "[true]", "fn_name": "is_triangular"}, {"input": "15", "output": "[true]", "fn_name": "is_triangular"}, {"input": "21", "output": "[true]", "fn_name": "is_triang... | 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 permutation of i... | [{"type": "stdin_stdout", "input": "100\n30 99 96 51 67 72 33 35 93 70 25 24 6 9 22 83 86 5 79 46 29 88 66 20 87 47 45 71 48 52 61 37 19 40 44 11 8 42 63 92 31 94 2 4 28 77 21 75 13 95 76 14 53 69 54 38 59 60 98 55 39 68 85 23 15 18 58 78 43 49 16 1 82 91 7 84 34 89 17 27 90 26 36 81 64 74 50 57 10 73 12 62 3 100 80 32... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 standard ways to r... | [{"type": "stdin_stdout", "input": "4\n1 1 0 4\n2 1 1\n-1 -1\n4 1 2", "output": "0 0 0 1\n1 0 0 0\n0 0 0 0\n0 1 0 0\n"}, {"type": "stdin_stdout", "input": "4\n1 2 2 4\n2 1 4\n3 -1\n4 1 3", "output": "0 1 0 1\n0 0 0 1\n0 0 0 0\n0 0 1 0\n"}, {"type": "stdin_stdout", "input": "4\n1 2 1 4\n2 1 4\n1 -1\n4 1 3", "output": "1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven are integers A, B, and N.\... | [{"type": "stdin_stdout", "input": "1000000 1000000000000 1000000000000\n", "output": "999999\n"}, {"type": "stdin_stdout", "input": "1000000 948240928204 329810943092\n", "output": "347813\n"}, {"type": "stdin_stdout", "input": "133333 329230329032 493028310923\n", "output": "133332\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\nEverybody seems to think that th... | [{"type": "stdin_stdout", "input": "36 81\n4 5 7 8 13 14 16 17 22 23 25 26 31 32 34 35 40 41 43 44 49 50 52 53 58 59 61 62 67 68 70 71 76 77 79 80\n", "output": "9\n3 12 21 30 39 48 57 66 75\n"}, {"type": "stdin_stdout", "input": "36 156\n8 1 8 9 26 14 13 33 22 32 24 70 31 32 34 35 40 41 52 44 49 50 36 53 46 56 61 62 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProfessor Pathfinder is a distin... | [{"type": "stdin_stdout", "input": "5 6\n/home/ACM/index.html\nlmth.xedni/CPCI/\n/ICPC/general.html\n/ICPC/japanese/index.html\n/ICPC/secret/confidential/2005/index.html\n/home/ACM/\n/ho/e/ICPC/..mACM/\n/ICPC/secret/\n/ICPC/secret/index.html\n/ICPC\n/ICPC/../ICPC/index.html\n/ICPC\n/ICPC/general.html\n/ICPC/japanese/..... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFrom Wikipedia : \"The n-back ta... | [{"input": "1\n[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, 1, 1, 1, 1, 1, 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\nUtkarsh is forced to play yet an... | [{"type": "stdin_stdout", "input": "5\n16 1\n3 2\n9 1\n65 19\n14195 55\n", "output": "Utkarsh\nUtkarsh\nUtkarsh\nUtkarsh\nUtkarsh\n"}, {"type": "stdin_stdout", "input": "5\n10 1\n3 2\n9 1\n65 19\n14195 55\n", "output": "Utkarsh\nUtkarsh\nUtkarsh\nUtkarsh\nUtkarsh\n"}, {"type": "stdin_stdout", "input": "5\n16 1\n4 2\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\nSnuke loves constructing integer... | [{"type": "stdin_stdout", "input": "10\n1 3 2 6 2 4 4 5 8 1", "output": "10\n14\n0\n10\n0\n0\n0\n0\n2\n0\n"}, {"type": "stdin_stdout", "input": "10\n1 3 1 6 3 4 6 6 4 1", "output": "10\n14\n0\n11\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "10\n1 4 0 1 1 4 4 0 22 1", "output": "8\n12\n0\n0\n0\n0\n0\n0\n18\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 given three integers $a, b, ... | [{"type": "stdin_stdout", "input": "-30 -1 -1", "output": "-30 -1\n"}, {"type": "stdin_stdout", "input": "-22 -1 -1", "output": "-22 -1\n"}, {"type": "stdin_stdout", "input": "-22 -2 -2", "output": "-22 -2\n"}, {"type": "stdin_stdout", "input": "-2 10 -1", "output": "-2 10\n"}, {"type": "stdin_stdout", "input": "-2 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\nAnia has a large integer S. Its ... | [{"type": "stdin_stdout", "input": "400 224\n34034718296316650556302576767095880542740697596682657060609028712014739414658241556774411582749368771597248873201583574900424227251655547840887764275893533353440635216728376201808545879398359535670372855472971530695051695650262058940466340529417646357776899296790403916961389... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDetermine if we can choose K dif... | [{"type": "stdin_stdout", "input": "135 27", "output": "YES\n"}, {"type": "stdin_stdout", "input": "135 47", "output": "YES\n"}, {"type": "stdin_stdout", "input": "149 47", "output": "YES\n"}, {"type": "stdin_stdout", "input": "149 50", "output": "YES\n"}, {"type": "stdin_stdout", "input": "151 50", "output": "YES\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Chef has prepared the appeti... | [{"type": "stdin_stdout", "input": "2\n2 chef\n4 eipelpparuoyojne", "output": "cehf\nerlopopniupjeyae\n"}, {"type": "stdin_stdout", "input": "2\n2 chef\n4 enjoyourappmepie", "output": "cehf\neayejpuinpopomre\n"}, {"type": "stdin_stdout", "input": "2\n2 cief\n4 enjoyourappmepie", "output": "ceif\neayejpuinpopomre\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N observatories in AtC... | [{"type": "stdin_stdout", "input": "6 5\n8 6 9 1 2 1\n1 3\n4 2\n4 3\n4 6\n4 6\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "6 5\n8 6 18 1 4 1\n1 3\n4 0\n4 0\n4 6\n4 6", "output": "3\n"}, {"type": "stdin_stdout", "input": "6 5\n8 6 18 1 4 0\n1 3\n4 0\n4 0\n4 6\n4 6", "output": "4\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\nGiven is a positive integer L.\n... | [{"type": "stdin_stdout", "input": "1000\n", "output": "37037037.037037037313\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "36926037.000000000000\n"}, {"type": "stdin_stdout", "input": "430\n", "output": "2944703.703703703824\n"}, {"type": "stdin_stdout", "input": "392\n", "output": "2230973.629629629664\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\nRecently you have bought a snow ... | [{"type": "stdin_stdout", "input": "6\nLRU\nDURLDRUDRULRDURDDL\nLRUDDLRUDRUL\nLLLLRRRR\nURDUR\nLLL\n", "output": "2\nLR\n14\nLLLUUUURRRDDDD\n12\nLLLUUURRRDDD\n2\nLR\n2\nUD\n0\n\n"}, {"type": "stdin_stdout", "input": "6\nLRU\nDURLDRUDRULRDURDDL\nLRUDDLRUDRUL\nLLLLRRRR\nURDUR\nLLL\n", "output": "2\nLR\n14\nLLLUUUURRRDDDD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMaxim has opened his own restaur... | [{"type": "stdin_stdout", "input": "50\n15 28 34 29 17 21 20 34 37 17 10 20 37 10 18 25 31 25 16 1 37 27 39 3 5 18 2 32 10 35 20 17 29 20 3 29 3 25 9 32 37 5 25 23 25 33 35 8 31 29\n39\n", "output": "1.4997987526\n"}, {"type": "stdin_stdout", "input": "50\n15 28 34 29 17 21 20 34 37 17 10 20 37 10 18 25 31 25 16 1 37 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\nBritish mathematician John Littl... | [{"type": "stdin_stdout", "input": "1\n69\n2 4 10 16 22 28 19 40 37 52 92 43 70 76 118 88 94 100 106 112 118 124 130 200 142 148 154 160 166 324 178 184 190 196 300 208 214 129 226 167 238 244 250 209 262 322 274 280 286 462 298 304 310 316 322 328 169 110 591 352 358 364 370 376 382 388 391 397 403\n", "output": "25\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOur hardworking chef is bored of... | [{"type": "stdin_stdout", "input": "3\n5\n0 0\n-1 -1\n2 0\n-1 1\n0 -2\n5\n31 11\n30 -41\n20 13\n25 28\n25 38\n2\n-1 0\n1 2", "output": "1\n1\n9\n"}, {"type": "stdin_stdout", "input": "3\n5\n-1 0\n-1 0\n1 4\n0 0\n0 -1\n5\n31 11\n52 -41\n18 1\n25 18\n25 60\n2\n-1 -1\n2 5", "output": "1\n1\n28\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\nSagheer is playing a game with h... | [{"type": "stdin_stdout", "input": "21\n6194737 6429360 6047962 1014039 9196042 2483033 9232471 5444322 4437778 6614229 4791649 7417126 7679607 790939 3062370 174847 8404336 832859 2083127 9041108 3074902\n1 2 3 4 4 6 7 2 9 10 9 12 12 1 15 1 17 1 19 19\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "21\n619473... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 participate in a prize draw e... | [{"input": "\"Addison,Jayden,Sofia,Michael,Andrew,Lily,Benjamin\"\n[4, 2, 1, 4, 3, 1, 2]\n8", "output": "[\"Not enough participants\"]", "fn_name": "rank"}, {"input": "\"Addison,Jayden,Sofia,Michael,Andrew,Lily,Benjamin\"\n[4, 2, 1, 4, 3, 1, 2]\n4", "output": "[\"Benjamin\"]", "fn_name": "rank"}, {"input": "\"Avery,Oli... | 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 started as a discussion with ... | [{"input": "[1, 0, 3]\n[1, 2, 3]\n3", "output": "[[1, 2, 3]]", "fn_name": "or_arrays"}, {"input": "[1, 2, 3]\n[1, 2, 3]", "output": "[[1, 2, 3]]", "fn_name": "or_arrays"}, {"input": "[1, 2, 3]\n[4, 5, 6]", "output": "[[5, 7, 7]]", "fn_name": "or_arrays"}, {"input": "[1, 2, 3]\n[1, 2]", "output": "[[1, 2, 3]]", "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\nCompute A + B.\n\nConstraints\n\... | [{"type": "stdin_stdout", "input": "1 2\n10 5\n101 20", "output": "3\n15\n121\n"}, {"type": "stdin_stdout", "input": "1 2\n10 4\n101 20", "output": "3\n14\n121\n"}, {"type": "stdin_stdout", "input": "1 2\n10 4\n101 37", "output": "3\n14\n138\n"}, {"type": "stdin_stdout", "input": "1 2\n11 4\n101 37", "output": "3\n15\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 city of Saint Petersburg,... | [{"type": "stdin_stdout", "input": "1000010011100010111000001101000011001010011101011001101100000001011011000000101101101011101111011011\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\n", "output": "50\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 rooted tree cons... | [{"type": "stdin_stdout", "input": "10 6\n1 2\n1 3\n1 4\n2 5\n2 6\n5 7\n7 8\n7 9\n9 10\n4 3 8 9 10\n3 2 4 6\n3 4 1 5\n3 4 8 2\n2 6 10\n3 5 4 7\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "10 6\n1 2\n1 3\n1 4\n2 5\n2 6\n5 7\n7 8\n7 9\n9 10\n4 3 8 9 10\n3 2 4 6\n3 4 1 5\n3 4 8 1\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\nTwo positive integers a and b ha... | [{"type": "stdin_stdout", "input": "549755813887 549755813887\n", "output": "549755813886\n"}, {"type": "stdin_stdout", "input": "549755813888 549755813886\n", "output": "274877906944\n"}, {"type": "stdin_stdout", "input": "547616456703 547599679487\n", "output": "68719476736\n"}, {"type": "stdin_stdout", "input": "274... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKoto Municipal Subway\n\nKoto Mu... | [{"type": "stdin_stdout", "input": "2 1\n11 5\n7 6\n5 0\n76 1\n1 41\n0 0", "output": "0.414213562373\n2.81024967591\n0.0827625302982\n3.60555127546\n52.7401153702\n40.0\n"}, {"type": "stdin_stdout", "input": "2 1\n14 6\n5 4\n7 7\n76 3\n9 000\n0 0", "output": "0.414213562373\n3.89949493661\n0.123105625618\n0.0\n50.74011... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFailed Sort - Bug Fixing #4\nOh ... | [{"input": "\"12345\"", "output": "[\"12345\"]", "fn_name": "sort_array"}, {"input": "\"54321\"", "output": "[\"12345\"]", "fn_name": "sort_array"}, {"input": "\"34251\"", "output": "[\"12345\"]", "fn_name": "sort_array"}, {"input": "\"11111\"", "output": "[\"11111\"]", "fn_name": "sort_array"}, {"input": "\"10101\"", ... | 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 slimes standing on a... | [{"type": "stdin_stdout", "input": "12\n367101616 467388357 159541726 1477792495 1190847685 1723370727 668687333 270216579 135685914 125686970 1191846896 1765707086", "output": "469392584\n"}, {"type": "stdin_stdout", "input": "12\n367101616 467388357 127795962 1640220090 1190847685 1723370727 402149677 270216579 13568... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 binary string is a string that... | [{"type": "stdin_stdout", "input": "6\n01\n1111\n01100\n101\n0000\n01010\n", "output": "1\n0\n2\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6\n01\n1111\n01100\n100\n0000\n01010\n", "output": "1\n0\n2\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6\n01\n1011\n01100\n100\n0000\n01010\n", "output": "1\n1\n2\n1\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\nA Bingo game is played by one ga... | [{"type": "stdin_stdout", "input": "4 3\n10 25 11 20 6 2 1 15 23\n5 21 1 12 23 17 7 26 2\n8 18 4 22 13 27 16 5 11\n19 9 24 2 11 5 14 28 16\n4 3\n12 13 20 24 28 32 15 16 17\n12 13 21 25 29 33 16 17 18\n12 13 22 26 30 34 17 18 15\n12 13 23 27 31 35 18 15 16\n4 3\n11 12 13 14 15 16 17 18 19\n21 22 23 24 25 26 27 28 29\n31... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 average miner Vaganych took ... | [{"type": "stdin_stdout", "input": "50\n515844718 503470143 928669067 209884122 322869098 241621928 844696197 105586164 552680307 968792756 135928721 842094825 298782438 829020472 791637138 285482545 811025527 428952878 887796419 11883658 546401594 6272027 100292274 308219869 372132044 955814846 644008184 521195760 919... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArpa is taking a geometry exam. ... | [{"type": "stdin_stdout", "input": "-947393823 -495674431 211535284 -877153626 -522763219 -778236665\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-947393823 -495674431 211535284 -877153626 -522763219 -778236665\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-211700879 -495674431 211535284 -87715... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ways to choos... | [{"type": "stdin_stdout", "input": "-2373", "output": "1407782\n"}, {"type": "stdin_stdout", "input": "-1265", "output": "400056\n"}, {"type": "stdin_stdout", "input": "-1867", "output": "871422\n"}, {"type": "stdin_stdout", "input": "-1056", "output": "278784\n"}, {"type": "stdin_stdout", "input": "-1235", "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 n kangaroos with pocke... | [{"type": "stdin_stdout", "input": "100\n154\n60\n97\n638\n139\n150\n570\n579\n601\n647\n804\n237\n245\n549\n288\n347\n778\n282\n916\n441\n974\n145\n957\n1006\n655\n702\n930\n618\n132\n520\n972\n48\n94\n54\n682\n433\n896\n134\n845\n636\n242\n842\n125\n141\n240\n130\n409\n666\n948\n938\n604\n110\n474\n484\n364\n40\n807\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJohny likes numbers n and k very... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000010 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1398941105 1000000001\n", "output": "2000000002\n"}, {"type": "stdin_stdout", "input": "1000100010 100001000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 not good at problem... | [{"type": "stdin_stdout", "input": "10 0\n1 1\n2 6\n11 2\n-1 4\n0 10", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 -1\n1 1\n2 6\n11 2\n-1 5\n0 5", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 -1\n1 1\n2 3\n11 2\n-1 5\n0 5", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 0\n1 1\n11 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 city of Fishtopia can be ima... | [{"type": "stdin_stdout", "input": "100 80\n", "output": "YES\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\nVasya is about to take his first... | [{"type": "stdin_stdout", "input": "100 1\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 99\n1\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "10 50\n10 10 10 10 10 10 10 10 10 10\n", "output": "0 0 0 0 0 1 2 3 4 5 \n"}, {"type": "stdin_stdout", "input": "10 50\n10 10 10 10 10 10 10 10 10 10\n", "output": "0 0 0 0 0 1 2 3 4 5 "}, {"type": "stdin_stdout", "input": "10 71\n10 10 10 10 10 10 10 10 10 10\n", "output": "0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSome new animals have arrived at... | [{"input": "\"Giraffe\"\n\"d\"", "output": "[false]", "fn_name": "correct_tail"}, {"input": "\"Meerkat\"\n\"t\"", "output": "[true]", "fn_name": "correct_tail"}, {"input": "\"Badger\"\n\"s\"", "output": "[false]", "fn_name": "correct_tail"}, {"input": "\"Rhino\"\n\"o\"", "output": "[true]", "fn_name": "correct_tail"}, ... | 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\nDima got into number sequences. ... | [{"type": "stdin_stdout", "input": "8\n851991424 32517099 310793856 776130403 342626527 58796623 49544509 517126753\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "8\n851991424 32517099 310793856 771296843 342626527 58796623 49544509 517126753\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "8\n8519914... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n5\n13\n106", "output": "2\n4\n14\n"}, {"type": "stdin_stdout", "input": "3\n5\n13\n68", "output": "2\n4\n11\n"}, {"type": "stdin_stdout", "input": "3\n5\n1\n106", "output": "2\n1\n14\n"}, {"type": "stdin_stdout", "input": "3\n5\n1\n122", "output": "2\n1\n15\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour goal in this kata is to imp... | [{"input": "[1, 2, 2]\n[]", "output": "[[1, 2, 2]]", "fn_name": "array_diff"}, {"input": "[1, 2, 2]\n[1]", "output": "[[2, 2]]", "fn_name": "array_diff"}, {"input": "[1, 2, 2]\n[2]", "output": "[[1]]", "fn_name": "array_diff"}, {"input": "[1, 2]\n[1]", "output": "[[2]]", "fn_name": "array_diff"}, {"input": "[]\n[1, 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\nMisha and Vanya have played seve... | [{"type": "stdin_stdout", "input": "1 1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "2 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consists of three s... | [{"type": "stdin_stdout", "input": "10 4\n2\n7\n1\n9\n8\n10\n5\n10\n1\n20\n", "output": "38\n"}, {"type": "stdin_stdout", "input": "10 4\n1\n7\n1\n9\n8\n10\n5\n10\n1\n20\n", "output": "39\n"}, {"type": "stdin_stdout", "input": "10 5\n2\n13\n3\n9\n8\n7\n9\n7\n1\n18\n", "output": "36\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\nThis is the easy version of the ... | [{"type": "stdin_stdout", "input": "5\n2 2\n10\n11\n3 3\n011\n101\n110\n4 4\n1111\n0110\n0110\n1111\n5 5\n01011\n11001\n00010\n11011\n10000\n2 3\n011\n101\n", "output": "1\n1 1 2 1 2 2 \n6\n1 1 1 2 2 2 \n1 1 2 1 2 2 \n1 2 1 3 2 2 \n1 2 2 2 2 3 \n2 1 2 2 3 1 \n2 1 2 2 3 2 \n20\n1 1 1 2 2 2 \n1 2 1 3 2 2 \n1 2 2 2 2 3 \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 finite set of integers X, ... | [{"type": "stdin_stdout", "input": "10 6\n1000000000 1000000000 1000000000 1000000000 1000000000 0 0 0 0 0\n", "output": "999998537\n"}, {"type": "stdin_stdout", "input": "10 8\n1000000000 1100000000 1000001010 1000000000 1000000000 0 0 -2 0 0", "output": "600007816\n"}, {"type": "stdin_stdout", "input": "10 8\n1000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSome time ago Leonid have known ... | [{"type": "stdin_stdout", "input": "142\n34 88 88 88 88 88 131 53 88 130 131 88 88 130 88 131 53 130 130 34 88 88 131 130 53 88 88 34 131 130 88 131 130 34 130 53 53 34 53 34 130 34 88 88 130 88 131 130 34 53 88 34 53 88 130 53 34 53 88 131 130 34 88 88 130 88 130 130 131 131 130 53 131 130 131 130 53 34 131 34 88 53 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHow Many Divisors?\n\nWrite a pr... | [{"type": "stdin_stdout", "input": "4 32 120", "output": "10\n"}, {"type": "stdin_stdout", "input": "13 14 107", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 14 149", "output": "0\n"}, {"type": "stdin_stdout", "input": "13 14 80", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 14 241", "output": "0\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGilbert is the network admin of ... | [{"type": "stdin_stdout", "input": "4\n 0 2 2 2\n 2 0 2 2\n 2 2 -1 2\n 2 2 2 0\n4\n -1 2 4 4\n 2 -1 4 4\n 4 4 -1 2\n 4 4 2 0\n2\n 0 12\n 12 0\n0", "output": "4\n2 3 3\n2 2 2 2 2 2 2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "4\n -1 2 2 2\n 2 0 2 2\n 2 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\nAccording to a new ISO standard,... | [{"type": "stdin_stdout", "input": "1 500\nwljexjwjwsxhascgpyezfotqyieywzyzpnjzxqebroginhlpsvtbgmbckgqixkdveraxlgleieeagubywaacncxoouibbhwyxhjiczlymscsqlttecvundzjqtuizqwsjalmizgeekugacatlwhiiyaamjuiafmyzxadbxsgwhfawotawfxkpyzyoceiqfppituvaqmgfjinulkbkgpnibaefqaqiptctoqhcnnfihmzijnwpxdikwefpxicbspdkppznpiqrpkyvcxapoaof... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCan you imagine our life if we r... | [{"type": "stdin_stdout", "input": "1000000000\n1000000000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000000000\n1000010000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1000000000\n1001010000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "999999999\n999999999\n", "output": "YES\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou've had a baby.\n\nWell done.... | [{"input": "\"Why the hell are there so many babies?!\"", "output": "[1]", "fn_name": "baby_count"}, {"input": "\"Anyone remember life before babies?\"", "output": "[1]", "fn_name": "baby_count"}, {"input": "\"none here\"", "output": "[\"Where's the baby?!\"]", "fn_name": "baby_count"}, {"input": "\"Happy babies boom 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\nSereja loves all sorts of algori... | [{"type": "stdin_stdout", "input": "yxzyzxzzxyyzzxxxzyyzzyzxxzxyzyyzxyzxyxxyzxyxzyzxyzxyyxzzzyzxyyxyzxxy\n10\n17 67\n6 35\n12 45\n56 56\n14 30\n25 54\n1 1\n46 54\n3 33\n19 40\n", "output": "NO\nNO\nNO\nYES\nYES\nNO\nYES\nNO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "yxzyzxzzxyyzzxxxzyyzzyzxxzxyzyyzxyzxyxxyzxyxzyz... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, who is a novice in co... | [{"type": "stdin_stdout", "input": "12 12 48311\n2997 79802 84238 34346 35199 2284 77696 46340 54797 36702 97764 42765 11582\n82923 47331 39508 81928 63775 90952 64439 99662 74546 15843 11552 23897 87476\n26261 21259 714 72469 92132 94958 69101 38760 4916 38769 60706 90149 70017\n35433 97674 53722 44881 95786 42614 799... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 All-Berland National Olympia... | [{"type": "stdin_stdout", "input": "20\nphp8vy 1\nkeeona 0\n8 0\nwzf4eb 0\n16 1\n9 0\nf2548d 0\n11 0\nyszsig 0\nyyf4q2 0\n1pon1p 1\njvpwuo 0\nd9stsx 0\ne14bkx 1\n5 0\n17 0\nsbklx4 0\nsfms2u 1\n6 0\n18 1\n", "output": "16\nmove 16 1\nmove 18 2\nmove 5 20\nmove 6 19\nmove php8vy 3\nmove 1pon1p 4\nmove e14bkx 5\nmove sfms... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.