messages
listlengths
1
1
ground_truth
stringlengths
156
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\nMojtaba and Arpa are playing a game. They have a list of n numbers in the game.\n\nIn a player's turn, he cho...
[{"input": "63\n16807 1 1419857 59049 1 2187 6859 1 33554432 129140163 11 1 16777216 3 9765625 1331 2197 268435456 2 169 390625 343 1048576 536870912 19683 125 16384 27 40353607 815730721 32 130321 43046721 524288 17 8388608 7 4782969 15625 282475249 134217728 1 25 4913 9 19 131072 244140625 625 2476099 1 2048 21435888...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTask:\nGiven an array arr of strings complete the function landPerimeter by calculating the total perimeter o...
[{"input": "[\"OXOOOX\", \"OXOXOO\", \"XXOOOX\", \"OXXXOO\", \"OOXOOX\", \"OXOOOO\", \"OOXOOX\", \"OOXOOO\", \"OXOOOO\", \"OXOOXX\"]", "output": "[\"Total land perimeter: 60\"]", "fn_name": "land_perimeter"}, {"input": "[\"OXOOO\", \"OOXXX\", \"OXXOO\", \"XOOOO\", \"XOOOO\", \"XXXOO\", \"XOXOO\", \"OOOXO\", \"OXOOX\", ...
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\nSergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row fr...
[{"input": "100\nfAfhfNNNhfffAfNffNANhffNffffffNfffffhNfffNfefNfffNfNNNffNfffNfhNNNffffNfNfffAffNffNffNNfhfffNhNffNNN\n", "output": "26\n"}, {"input": "100\nfAfhfNNNhfffAfNffNANhffNffffffNfffffhNfffNfffNfffNfNNNffNfffNfhNNNffffNfNfffAffNffNffNNfhfffNhNffNNN\n", "output": "4\n"}, {"input": "100\nfAfhfNNNhfffAfNffNANhffN...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAtCoDeer the deer found N rectangle lying on the table, each with height 1.\nIf we consider the surface of th...
[{"input": "5\n999999999 1000000000\n1 2\n314 315\n500000 500001\n999999999 1000000000\n", "output": "1999999680\n"}, {"input": "5\n999999999 1000001000\n1 -1\n269 106\n500000 500001\n999999999 1000000000", "output": "1999999892\n"}, {"input": "5\n999999999 1000001000\n1 -1\n269 101\n500000 500001\n999999999 1000000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCurrently, people's entertainment is limited to programming contests. The activity of the entertainment club ...
[{"input": "1 2 1 1 1 0\n1 2 1 0 0 -1\n1 0 0 0 1 1\n3 -1 0 0 2 0\n3 1 0 1 3 1\n0 2 0 2 -1 0\n0 0 1 1 0 7\n2 0 0 1 0 0\n0 0 0 0 0 0", "output": "1\n0\n1\n1\n3\n0\n2\n1\n"}, {"input": "1 2 1 1 1 0\n1 2 1 0 0 -1\n1 0 0 0 1 1\n3 -1 0 0 2 0\n3 0 0 1 3 1\n0 2 0 2 -1 0\n0 0 1 1 0 7\n2 0 0 1 0 0\n0 0 0 0 0 0", "output": "1\n0\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nM-kun is a student in Aoki High School, where a year is divided into N terms.\nThere is an exam at the end of...
[{"input": "15 1\n4 1 4 0 6 9 2 6 5 3 5 7 9 1 9", "output": "No\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo\nYes\nYes\nYes\nNo\nYes\n"}, {"input": "15 1\n3 0 8 1 6 9 1 6 5 5 9 7 2 7 16", "output": "No\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo\nYes\nNo\nNo\nYes\nYes\n"}, {"input": "15 2\n6 1 8 2 12 9 1 8 1 6 9 15 9 3 28", "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\nAllen is hosting a formal dinner party. 2n people come to the event in n pairs (couples). After a night of fu...
[{"input": "86\n33 6 22 8 54 43 57 85 70 41 20 17 35 12 66 25 45 78 67 55 50 19 31 75 77 29 58 78 34 15 40 48 14 82 6 37 44 53 62 23 56 22 34 18 71 83 21 80 47 38 3 42 60 9 73 49 84 7 76 30 5 4 11 28 69 16 26 10 59 48 64 46 32 68 24 63 79 36 13 1 27 61 39 74 2 51 51 2 74 39 61 27 1 13 36 79 86 24 68 32 46 64 63 59 10 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\nA plurality of trampolines are arranged in a line at 10 m intervals. Each trampoline has its own maximum hori...
[{"input": "4\n163\n51\n2\n32", "output": "yes\n"}, {"input": "4\n001\n103\n-1\n0", "output": "no\n"}, {"input": "4\n001\n136\n-1\n0", "output": "no\n"}, {"input": "4\n001\n155\n-1\n0", "output": "no\n"}, {"input": "4\n20\n51\n1\n20", "output": "yes\n"}, {"input": "4\n37\n51\n1\n20", "output": "yes\n"}, {"input": "4\n5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this kata you should simply determine, whether a given year is a leap year or not. In case you don't know ...
[{"input": "1234", "output": "[false]", "fn_name": "isLeapYear"}, {"input": "1100", "output": "[false]", "fn_name": "isLeapYear"}, {"input": "1194", "output": "[false]", "fn_name": "isLeapYear"}, {"input": "1984", "output": "[true]", "fn_name": "isLeapYear"}, {"input": "2000", "output": "[true]", "fn_name": "isLeapYear...
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\nAnn has recently started commuting by subway. We know that a one ride subway ticket costs a rubles. Besides, ...
[{"input": "1000 1 1000 1000\n", "output": "1000000\n"}, {"input": "1000 1 1000 1000\n", "output": "1000000\n"}, {"input": "1000 3 1000 1000\n", "output": "334000\n"}, {"input": "1000 3 1000 1000\n", "output": "334000\n"}, {"input": "1000 3 1001 1000\n", "output": "334000\n"}, {"input": "1000 5 1000 1000\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\nGiven is a lowercase English letter C that is not z. Print the letter that follows C in alphabetical order.\n...
[{"input": "a\n", "output": "b\n"}, {"input": "y\n", "output": "z\n"}, {"input": "c\n", "output": "d\n"}, {"input": "p\n", "output": "q\n"}, {"input": "d\n", "output": "e\n"}, {"input": "t\n", "output": "u\n"}, {"input": "z", "output": "{\n"}, {"input": "b", "output": "c\n"}, {"input": "x", "output": "y\n"}, {"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\nGiven are an integer N and four characters c_{\\mathrm{AA}}, c_{\\mathrm{AB}}, c_{\\mathrm{BA}}, and c_{\\mat...
[{"input": "1000\nB\nA\nA\nA\n", "output": "589888339\n"}, {"input": "1000\nA\nB\nA\nA\n", "output": "336052903\n"}, {"input": "1000\nB\nB\nA\nA\n", "output": "336052903\n"}, {"input": "1000\nB\nA\nB\nA\n", "output": "336052903\n"}, {"input": "1000\nA\nB\nB\nA\n", "output": "589888339\n"}, {"input": "1000\nB\nB\nB\nA\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\nAn autumn sports festival is held. There are four events: foot race, ball-carrying, obstacle race, and relay....
[{"input": "8\n65541 3 20 3 8 6 27 2 25\n20941 3 5 2 41 7 19 2 42\n90585 4 8 3 12 11 46 2 34\n92201 3 28 2 47 6 37 2 58\n10001 3 50 2 42 7 12 4 54\n63812 4 11 3 11 6 98 2 22\n54092 3 33 2 54 6 18 2 19\n25012 3 44 2 58 6 45 2 46\n4\n1 3 23 1 23 1 34 4 69\n2 5 12 2 12 3 41 2 29\n3 5 24 1 24 2 0 3 35\n4 4 49 2 22 4 41 4 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\nYou are given an alphabet consisting of n letters, your task is to make a string of the maximum possible leng...
[{"input": "26\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "259...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given nonnegative integers a and b (a ≤ b), and a positive integer x.\nAmong the integers between a a...
[{"input": "1 1000000000000000000 3\n", "output": "333333333333333333\n"}, {"input": "-1 1010010100000100000 4", "output": "252502525000025001\n"}, {"input": "-1 1010010110000100000 3", "output": "336670036666700001\n"}, {"input": "-1 1010010111000100000 3", "output": "336670037000033334\n"}, {"input": "1 1000010000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou were dreaming that you are traveling to a planet named Planetforces on your personal spaceship. Unfortuna...
[{"input": "6\n10 5\nRRRRRRRRRRUUUUU\n1 -1\nUDDDRLLL\n-3 -5\nLDLDLDDDR\n-1 2\nUULLLL\n6 -2\nRDULRLLDR\n-1 6\nRUDURUUUUR\n", "output": "YES\nYES\nYES\nYES\nNO\nNO\n"}, {"input": "6\n10 5\nRRRRRRRRRRUUUUU\n1 -1\nUDDDRLLL\n-3 -5\nLDLDLDDDR\n0 2\nUULLLL\n6 -2\nRDULRLLDR\n-1 6\nRUDURUUUUR\n", "output": "YES\nYES\nYES\nYES\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAfter his wife's tragic death, Eurydice, Orpheus descended to the realm of death to see her. Reaching its gat...
[{"input": "7\nbabba\nabaac\ncodeforces\nzeroorez\nabcdcba\nbbbbbbb\na\n", "output": "\n1\n1\n0\n1\n1\n4\n0\n"}, {"input": "7\nbabba\nabaac\ncodeforces\nzeroorez\nabcdcba\nbbbbbbb\na\n", "output": "1\n1\n0\n1\n1\n4\n0\n"}, {"input": "7\nabbab\nabaac\ncodeforces\nzeroorez\nabcdcba\nbbbbbbb\na\n", "output": "1\n1\n0\n1\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\nYet another round on DecoForces is coming! Grandpa Maks wanted to participate in it but someone has stolen hi...
[{"input": "6\n10 10\n3 6 3 7\n4 9 5 9\n5 4 5 3\n7 1 8 1\n9 10 8 10\n7 7 7 8\n0 5 2 3\n", "output": "1\n"}, {"input": "6\n10 10\n3 6 3 7\n4 9 5 9\n5 4 5 3\n7 1 8 1\n9 10 8 10\n7 7 7 8\n0 5 2 3\n", "output": "1\n"}, {"input": "5\n4 6\n4 3 3 3\n4 2 4 1\n3 6 2 6\n2 4 2 3\n1 1 1 2\n1 2 2 1\n", "output": "-1\n"}, {"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\nChef changed the password of his laptop a few days ago, but he can't remember it today. Luckily, he wrote the...
[{"input": "4\n2\n2 3\n1 1\n8\n0\n1800.7150295041072\n0\n0.42064717124502127\n3\nx 1\nc 2\n# .\n0xd21#dc/98x", "output": "8\n1800.7150295041072\n.42064717124502127\n1d21.d2/981\n"}, {"input": "4\n2\n7 3\n3 1\n10\n0\n1800.0493927440593\n0\n0.9085107376538183\n3\ny 0\nd 3\n# .\n0xd21#xd098d", "output": "10\n1800.04939274...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nn evenly spaced points have been marked around the edge of a circle. There is a number written at each point....
[{"input": "488\n453349582488862562152454328120974624021885842759505659322561694358728150516204337664755243733316681382547751353198982127441183878962690095592236469807087207161691714104527568781618875688104415243715506909284770554256616642020503116458540489226220383015748323400356936736149732496461685474945266209347338...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a program which solve a simultaneous equation:\n\nax + by = c\ndx + ey = f\n\nThe program should print ...
[{"input": "3 -1 -3 1 0 -3\n2 -1 -3 -9 18 27", "output": "-3.000 -6.000\n-1.000 1.000\n"}, {"input": "3 -2 -3 1 0 -3\n2 -1 -3 -9 18 27", "output": "-3.000 -3.000\n-1.000 1.000\n"}, {"input": "3 -1 -3 1 0 -3\n2 -1 -3 -9 13 27", "output": "-3.000 -6.000\n-0.706 1.588\n"}, {"input": "3 -2 -6 1 0 -3\n2 -1 -3 -9 18 27", "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\nN people are standing in a queue, numbered 1, 2, 3, ..., N from front to back. Each person wears a hat, which...
[{"input": "54\n0 0 1 0 1 2 1 2 3 2 3 3 4 4 5 4 6 5 7 8 5 6 6 7 7 8 8 9 9 10 10 11 9 12 10 13 14 11 11 12 12 13 13 14 14 15 15 15 16 16 16 17 17 17", "output": "115295190"}, {"input": "54\n0 0 1 0 1 2 1 2 3 2 3 3 4 4 5 4 6 5 7 8 5 6 6 7 7 8 8 9 9 10 10 11 9 12 10 13 14 11 11 12 12 20 13 14 14 15 15 15 16 16 16 17 17 17...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a string $a$, consisting of $n$ characters, $n$ is even. For each $i$ from $1$ to $n$ $a_i$ is ...
[{"input": "28\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nAABBAC\nCACA\n", "output": "YES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLee just became Master in Codeforces, and so, he went out to buy some gifts for his friends. He bought $n$ in...
[{"input": "3\n4 2\n1 13 7 17\n1 3\n6 2\n10 10 10 10 11 11\n3 3\n4 4\n1000000000 1000000000 1000000000 1000000000\n1 1 1 1\n", "output": "48\n42\n8000000000\n"}, {"input": "3\n4 2\n1 13 12 1\n1 3\n6 2\n10 10 10 10 11 11\n3 3\n4 4\n1000000000 1000000000 1000000000 1000000000\n1 1 1 1\n", "output": "39\n42\n8000000000\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\nM-kun is a competitor in AtCoder, whose highest rating is X.\nIn this site, a competitor is given a kyu (clas...
[{"input": "1359", "output": "4\n"}, {"input": "1855", "output": "1\n"}, {"input": "1485", "output": "3\n"}, {"input": "1125", "output": "5\n"}, {"input": "1764", "output": "2\n"}, {"input": "1596", "output": "3\n"}, {"input": "1543", "output": "3\n"}, {"input": "1815", "output": "1\n"}, {"input": "1307", "output": "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\nYou are given an array $a$ consisting of $n$ integers. Each $a_i$ is one of the six following numbers: $4, 8,...
[{"input": "100\n4 42 23 23 16 42 16 23 42 16 42 8 4 23 4 4 23 42 16 42 23 23 23 42 4 42 8 8 16 23 15 23 16 4 42 15 15 23 16 15 16 4 4 15 23 42 42 15 8 23 8 23 4 15 16 15 42 8 23 16 15 42 23 8 4 16 15 16 23 16 16 4 23 16 8 23 16 15 23 4 4 8 15 4 4 15 8 23 23 4 4 8 8 4 42 15 4 4 42 16\n", "output": "64\n"}, {"input": "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\nJohn has some amount of money of which he wants to deposit a part `f0` to the bank at the beginning\nof year ...
[{"input": "100000000\n1.5\n10000000\n50\n1", "output": "[false]", "fn_name": "fortune"}, {"input": "9998.5\n61.8155\n10000.0\n3\n0", "output": "[false]", "fn_name": "fortune"}, {"input": "9999\n61.8161\n10000.0\n3\n0", "output": "[false]", "fn_name": "fortune"}, {"input": "100000000\n5\n1000000\n50\n1", "output": "[tr...
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\nAutocomplete is a program function that enables inputting the text (in editors, command line shells, browsers...
[{"input": "hzkqvwliymwjbejfpnydrbwskhyrtrlsdinfrgwmnbdpwytcnjeoowxrfgfuaffzayjylvzu\n1\nhzkqvwliymwjbejfpnydrbwskhyrtrlsdinfrgwmnbdpwytcnjeoowxrfgfuaffzayjylvzubwjlvhhsfurqb\n", "output": "hzkqvwliymwjbejfpnydrbwskhyrtrlsdinfrgwmnbdpwytcnjeoowxrfgfuaffzayjylvzubwjlvhhsfurqb\n"}, {"input": "uzvlyjyazffaufgfrxwooejnctyw...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nManao is trying to open a rather challenging lock. The lock has n buttons on it and to open it, you should pr...
[{"input": "2000\n", "output": "1333335000\n"}, {"input": "1999\n", "output": "1331335999\n"}, {"input": "1837\n", "output": "1033182073\n"}, {"input": "2000\n", "output": "1333335000\n"}, {"input": "1837\n", "output": "1033182073\n"}, {"input": "1999\n", "output": "1331335999\n"}, {"input": "1747\n", "output": "888644...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOver time, Alexey's mail box got littered with too many letters. Some of them are read, while others are unre...
[{"input": "213\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 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe next lecture in a high school requires two topics to be discussed. The $i$-th topic is interesting by $a_...
[{"input": "14\n137698508 528184026 54130884 239033739 1038011779 720680829 605286542 89272810 284191042 179359950 186766648 570400677 107541072 25121211\n195343970 709242622 422954170 980941827 265963618 812646456 943660193 344102432 295006337 221455256 203711937 632473368 334173424 49206958\n", "output": "13\n"}, {"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\nIt has been noted that if some ants are put in the junctions of the graphene integer lattice then they will a...
[{"input": "30000 39\n2650 -1515\n-3169 4818\n-1896 2727\n1323 -2335\n-387 901\n-4299 1481\n-2114 4435\n3654 -2730\n4569 3801\n-3815 -3355\n4777 1749\n4486 -780\n-3936 -158\n717 -3518\n4765 -909\n-3032 3726\n-2970 3346\n2067 -1560\n-521 -1331\n-4953 -2098\n-849 580\n-4941 4018\n1338 -2629\n-1444 -3550\n1502 4995\n1156 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou have a list of numbers from $1$ to $n$ written from left to right on the blackboard.\n\nYou perform an al...
[{"input": "2\n1000000000 1\n1000000000 500000000\n", "output": "2\n1000000000\n"}, {"input": "2\n1000000000 1\n1000000000 500000000\n", "output": "2\n1000000000\n"}, {"input": "3\n3 1\n4 2\n69 6\n", "output": "2\n4\n12\n"}, {"input": "3\n3 1\n5 2\n69 6\n", "output": "2\n4\n12\n"}, {"input": "3\n3 1\n5 2\n34 6\n", "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\nZS the Coder is playing a game. There is a number displayed on the screen and there are two buttons, ' + ' (p...
[{"input": "6723\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\n83206\n89057\n95176\n101569\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn the State of Takahashi in AtCoderian Federation, there are N cities, numbered 1, 2, ..., N.\nM bidirection...
[{"input": "10 39\n7 2\n7 1\n5 6\n5 8\n9 10\n2 8\n8 7\n3 10\n10 1\n8 10\n2 3\n7 4\n3 9\n4 10\n3 4\n6 1\n6 7\n9 5\n9 7\n6 9\n9 4\n4 6\n7 5\n8 3\n2 5\n9 2\n10 7\n8 6\n8 9\n7 3\n5 3\n4 5\n6 3\n2 10\n5 10\n4 2\n6 2\n8 4\n10 6\n", "output": "21\n"}, {"input": "10 39\n7 2\n7 1\n5 6\n5 8\n9 10\n2 8\n8 7\n3 10\n10 1\n8 10\n2 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\nWe will call a non-negative integer increasing if, for any two adjacent digits in its decimal representation,...
[{"input": "3704579452095997258280591217784156184311155893966777597430447796450532", "output": "32\n"}, {"input": "4271374355872521214646189206931447259915557225329718337053006899386612", "output": "33\n"}, {"input": "4636365955583185577236629139430025754175155260406833067161877454344706", "output": "37\n"}, {"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\nA: Many Kinds of Apples\n\nProblem Statement\n\nApple Farmer Mon has two kinds of tasks: \"harvest apples\" a...
[{"input": "2\n1 0\n0\n-1 -1 1\n-1 1 0\n3 1 3\n-1 1 2", "output": "0\n"}, {"input": "2\n1 0\n0\n-1 -1 1\n-1 1 3\n3 1 3\n0 3 2", "output": "0\n"}, {"input": "2\n1 0\n0\n-1 -1 1\n-1 1 0\n3 1 3\n0 3 2", "output": "0\n"}, {"input": "2\n1 0\n0\n-1 -1 1\n-1 1 0\n2 1 3\n0 3 2", "output": "0\n"}, {"input": "2\n1 -1\n0\n0 -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\nYou are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 d...
[{"input": "-17 -91 -17 -27 -81 -27 -81 -91\n-48 -21 -12 -57 -48 -93 -84 -57\n", "output": "YES\n"}, {"input": "-100 -100 -100 -99 -99 -99 -99 -100\n-10 -10 -9 -9 -10 -8 -11 -9\n", "output": "NO\n"}, {"input": "-100 -100 -100 100 100 100 100 -100\n-100 0 0 100 100 0 0 -100\n", "output": "YES\n"}, {"input": "-12 -54 -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\nThe following sorting operation is repeated for the stacked blocks as shown in Fig. A.\n\n1. Stack all the bo...
[{"input": "6\n1 4 1 3 2 4\n5\n1 2 5 4 5\n10\n1 1 1 1 1 1 1 1 1 1\n9\n1 1 1 1 1 1 1 1 1\n12\n1 4 1 3 2 4 3 3 2 1 2 2\n1\n5050\n3\n10000 10000 100\n0", "output": "24\n-1\n10\n-1\n48\n5049\n-1\n"}, {"input": "6\n1 4 1 3 2 4\n5\n1 2 5 4 5\n10\n1 1 1 1 1 1 1 1 1 1\n9\n1 1 1 1 1 1 1 1 1\n12\n1 4 1 3 2 4 3 1 2 1 2 2\n1\n5050...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTranslator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher ...
[{"input": "100\n3 2 4 3 3 3 4 2 3 5 5 2 5 2 3 2 4 4 4 5 5 4 2 5 4 3 2 5 3 4 3 4 2 4 5 4 2 4 3 4 5 2 5 3 3 4 2 2 4 4 4 5 4 3 3 3 2 5 2 2 2 3 5 4 3 2 4 5 5 5 2 2 4 2 3 3 3 5 3 2 2 4 5 5 4 5 5 4 2 3 2 2 2 2 5 3 5 2 3 4\n", "output": "40\n"}, {"input": "100\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCompute A \\times B.\n\n-----Constraints-----\n - 1 \\leq A \\leq 100\n - 1 \\leq B \\leq 100\n - All values ...
[{"input": "100 100\n", "output": "10000\n"}, {"input": "101 110", "output": "11110\n"}, {"input": "101 111", "output": "11211\n"}, {"input": "101 101", "output": "10201\n"}, {"input": "100 110", "output": "11000\n"}, {"input": "100 111", "output": "11100\n"}, {"input": "100 101", "output": "10100\n"}, {"input": "111 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\nTonio has a keyboard with only two letters, \"V\" and \"K\".\n\nOne day, he has typed out a string s with onl...
[{"input": "VVKKVKKVVKKVKKVKVVKKVKKVVKKVKVVKKVKKVKVVKKVVKKVKVVKKVKVVKKVVKVVKKVKKVKKVKKVKKVKVVKKVKKVKKVKKVKKVVKVK\n", "output": "32\n"}, {"input": "VVVVVKKVKVKVKVVKVVKKVVKVKKKKKKKVKKKVVVVVVKKVVVKVKVVKVKKVVKVVVKKKKKVVVVVKVVVVKVVVKKVKKVKKKVKKVKKVVKKV\n", "output": "25\n"}, {"input": "KKVVKKVVVKKVKKVKKVVVKVVVKKVKKVVVKKVVVK...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Task\nWe know that some numbers can be split into two primes. ie. `5 = 2 + 3, 10 = 3 + 7`. But some numbers...
[{"input": "100", "output": "[2491]", "fn_name": "prime_product"}, {"input": "10", "output": "[25]", "fn_name": "prime_product"}, {"input": "12", "output": "[35]", "fn_name": "prime_product"}, {"input": "20", "output": "[91]", "fn_name": "prime_product"}, {"input": "7", "output": "[10]", "fn_name": "prime_product"}, {"...
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\nVasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into two non-em...
[{"input": "100\n27 95 57 29 91 85 83 36 72 86 39 5 79 61 78 93 100 97 73 23 82 66 41 92 38 92 100 96 48 23 66 47 5 32 69 13 95 23 46 62 99 83 57 66 98 82 81 57 37 37 81 64 45 76 72 43 99 76 86 22 37 39 93 80 99 36 53 83 3 32 52 9 78 34 47 100 33 72 19 40 29 56 77 32 79 72 15 88 100 98 56 50 22 81 88 92 58 70 21 19\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\nVasya thinks that lucky tickets are the tickets whose numbers are divisible by 3. He gathered quite a large c...
[{"input": "10\n146767769 71795210 50866429 35232438 22664883 56785812 91050433 75677099 84393937 43832346\n", "output": "5\n"}, {"input": "10\n146767769 71795210 50866429 35232438 22664883 56785812 91050433 75677099 18053121 43832346\n", "output": "4\n"}, {"input": "10\n146767769 71795210 50866429 35232438 22664883 56...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAn integer X is called a Harshad number if X is divisible by f(X), where f(X) is the sum of the digits in X w...
[{"input": "12\n", "output": "Yes\n"}, {"input": "148\n", "output": "No\n"}, {"input": "112", "output": "Yes\n"}, {"input": "224", "output": "Yes\n"}, {"input": "133", "output": "Yes\n"}, {"input": "162", "output": "Yes\n"}, {"input": "190", "output": "Yes\n"}, {"input": "171", "output": "Yes\n"}, {"input": "375", "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\nKevin and Nicky Sun have invented a new game called Lieges of Legendre. In this game, two players take turns ...
[{"input": "10 2\n3 10 10 8 6 10 9 9 5 7\n", "output": "Kevin\n"}, {"input": "10 2\n3 10 10 7 6 10 9 9 5 7\n", "output": "Nicky\n"}, {"input": "10 2\n3 10 10 7 6 10 9 9 1 7\n", "output": "Kevin\n"}, {"input": "10 1\n5 6 3 10 6 6 1 1 5 3\n", "output": "Kevin\n"}, {"input": "2 3\n1000000000 1000000000\n", "output": "Nick...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nQuickly after finishing the tutorial of the online game ATChat, you have decided to visit a particular place ...
[{"input": "7\n-1 100 -2 1 -1 -1 18", "output": "137\n"}, {"input": "7\n-1 111 -2 2 -1 -16 3", "output": "120\n"}, {"input": "7\n-1 111 -2 2 -1 -24 4", "output": "122\n"}, {"input": "7\n-1 111 -2 2 -2 -16 6", "output": "126\n"}, {"input": "7\n0 101 -2 4 -1 -16 10", "output": "129\n"}, {"input": "7\n0 100 -2 4 -1 -27 10...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFor his computer science class, Jacob builds a model tree with sticks and balls containing n nodes in the sha...
[{"input": "10 10\n794273 814140 758469 932911 607860 683826 1479233 652494 952171 698608\n1 3\n3 8\n2 7\n2 1\n2 9\n3 10\n6 4\n9 6\n3 5\n", "output": "607860\n"}, {"input": "10 10\n794273 594029 758469 932911 607860 683826 1479233 652494 952171 698608\n1 3\n3 8\n2 7\n2 1\n2 9\n3 10\n6 4\n9 6\n3 5\n", "output": "594029\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Story&Task\n There are three parties in parliament. The \"Conservative Party\", the \"Reformist Party\", an...
[{"input": "13\n4\n7", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "11\n4\n6", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "16\n7\n8", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "16\n1\n8", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "11\n4\n1", "output": "[2]", "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\nAn army of n droids is lined up in one row. Each droid is described by m integers a_1, a_2, ..., a_{m}, where...
[{"input": "49 2 1971\n794 866\n401 575\n341 83\n103 208\n352 134\n260 878\n497 931\n630 570\n885 464\n23 663\n60 1461\n416 870\n955 405\n392 961\n530 258\n73 404\n736 923\n44 436\n594 314\n904 138\n980 163\n76 720\n879 809\n81 838\n263 599\n218 139\n659 493\n1044 754\n679 302\n490 7\n204 530\n184 758\n114 849\n113 649...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLuba has a ticket consisting of 6 digits. In one move she can choose digit in any position and replace it wit...
[{"input": "000000\n", "output": "0\n"}, {"input": "123456\n", "output": "2\n"}, {"input": "111000\n", "output": "1\n"}, {"input": "120111\n", "output": "0\n"}, {"input": "999999\n", "output": "0\n"}, {"input": "199880\n", "output": "1\n"}, {"input": "899889\n", "output": "1\n"}, {"input": "899888\n", "output": "1\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a game called Packet Monster. A game that catches, raises, fights and exchanges monsters, and is ver...
[{"input": "10\n4 17 1 9 5 18 2 3 2 1\n8 12 6 5 10 5 4 4 7 6\n5\n4 3 2 1 1\n2 4 4 4 4\n4\n1 1 3 2\n5 3 2 1\n0", "output": "1\nNA\nNA\n"}, {"input": "10\n4 17 1 9 5 18 2 3 2 1\n8 12 6 5 10 5 4 4 7 6\n5\n4 3 2 1 1\n2 4 4 4 4\n4\n2 1 3 2\n5 3 2 1\n0", "output": "1\nNA\nNA\n"}, {"input": "10\n4 17 1 9 5 18 2 3 2 1\n8 12 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\nConsider a game, wherein the player has to guess a target word. All the player knows is the length of the tar...
[{"input": "\"abcde\"\n\"abcde\"", "output": "[5]", "fn_name": "count_correct_characters"}, {"input": "\"same\"\n\"same\"", "output": "[4]", "fn_name": "count_correct_characters"}, {"input": "\"dog\"\n\"car\"", "output": "[0]", "fn_name": "count_correct_characters"}, {"input": "\"dog\"\n\"god\"", "output": "[1]", "fn_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\nThe Zoo in the Grid Kingdom is represented by an infinite grid. The Zoo has n observation binoculars located ...
[{"input": "3 10\n1000000000 1000000000\n1000000000 999999999\n1000000000 999999998\n1000010000 1199925182\n1000000000 999999996\n1000000000 999999995\n1000000000 999999994\n1000000000 999999993\n1000000000 999999992\n1000000000 999999991\n", "output": "3\n"}, {"input": "3 10\n1000000000 1000000000\n1000000000 99999999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNew Year is coming! Vasya has prepared a New Year's verse and wants to recite it in front of Santa Claus.\n\n...
[{"input": "1\n50 1\n2 1 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 10000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAfter Vitaly was expelled from the university, he became interested in the graph theory.\n\nVitaly especially...
[{"input": "5 5\n1 2\n2 3\n3 4\n4 5\n5 1\n", "output": "0 1\n"}, {"input": "6 5\n1 2\n2 3\n3 4\n4 5\n5 1\n", "output": "0 1\n"}, {"input": "9 5\n1 2\n2 3\n3 4\n4 5\n5 1\n", "output": "0 1\n"}, {"input": "100000 0\n", "output": "3 166661666700000\n"}, {"input": "59139 1\n10301 5892\n", "output": "2 59137\n"}, {"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\nYou are given a simple connected undirected graph consisting of N vertices and M edges. The vertices are numb...
[{"input": "18 27\n17 9\n12 15\n18 17\n13 18\n13 1\n5 7\n12 1\n14 5\n15 11\n14 6\n1 9\n5 1\n18 16\n4 6\n7 2\n7 11\n6 3\n12 14\n5 3\n10 5\n5 8\n10 15\n3 15\n9 8\n7 15\n2 16\n18 15", "output": "No\n"}, {"input": "18 15\n17 9\n12 15\n18 17\n13 18\n13 1\n5 7\n12 1\n14 5\n15 11\n14 6\n1 9\n5 1\n18 16\n4 6\n7 2\n7 11\n6 3\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\nA long time ago in some far country lived king Copa. After the recent king's reform, he got so large powers t...
[{"input": "-1 -512 10\n", "output": "No solution\n"}, {"input": "-3 -768 13\n", "output": "No solution\n"}, {"input": "-173 373 3\n", "output": "No solution\n"}, {"input": "-521 526 1\n", "output": "No solution\n"}, {"input": "-1 -512 19\n", "output": "No solution\n"}, {"input": "-2 -768 13\n", "output": "No solution\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou're given a row with $n$ chairs. We call a seating of people \"maximal\" if the two following conditions h...
[{"input": "459\n000111000101010000100001001010111110011011010001100101111010111011101110111101111101100101100011011001100110001001111001101000111001011100110100011111011111000010000110010011100110011011111110011100001101001111000100111011001000001011111100110100001001001100101011100001110110100101011011110100100111101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven an array of integers your solution should find the smallest integer. \n\nFor example:\n\n- Given `[34, ...
[{"input": "[0, 18446744073709551616, -18446744073709551617, 18446744073709551616, 18446744073709551616]", "output": "[-18446744073709551617]", "fn_name": "find_smallest_int"}, {"input": "[0, -18446744073709551615, 18446744073709551616]", "output": "[-18446744073709551615]", "fn_name": "find_smallest_int"}, {"input": "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nXenia the vigorous detective faced n (n ≥ 2) foreign spies lined up in a row. We'll consider the spies number...
[{"input": "100000 1 11500 86289\n1 86 75626\n", "output": "XRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAppleman and Toastman play a game. Initially Appleman gives one group of n numbers to the Toastman, then they...
[{"input": "10\n1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000\n", "output": "64000000\n"}, {"input": "10\n1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000\n", "output": "64000000\n"}, {"input": "10\n1000000 1000000 1000000 1000000 1000000 1000000 1000000 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn Aizu prefecture, we decided to create a new town to increase the population. To that end, we decided to cu...
[{"input": "10 29 10", "output": "2900\n"}, {"input": "10 29 13", "output": "3770\n"}, {"input": "4 -1 104", "output": "-416\n"}, {"input": "20 -1 18", "output": "-360\n"}, {"input": "12 -1 14", "output": "-168\n"}, {"input": "3 -1 43", "output": "-129\n"}, {"input": "10 29 5", "output": "1450\n"}, {"input": "10 7 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\nAnfisa the monkey learns to type. She is yet unfamiliar with the \"space\" key and can only type in lower-cas...
[{"input": "200 1 200\nlycjpjrpkgxrkfvutlcwglghxadttpihmlpphwfttegfpimjxintjdxgqfhzrmxfcfojnxruhyfynlzgpxjeobjyxarsfxaqeogxfzvdlwsimupkwujudtfenryulzvsiazneyibqtweeuxpzrbumqqswjasliyjnnzfzuvthhzcsgfljikkajqkpjftztrzpjneaxqg\n", "output": "l\ny\nc\nj\np\nj\nr\np\nk\ng\nx\nr\nk\nf\nv\nu\nt\nl\nc\nw\ng\nl\ng\nh\nx\na\nd\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\nThe famous global economic crisis is approaching rapidly, so the states of Berman, Berance and Bertaly formed...
[{"input": "10 10\n##.#..#.#2\n...###....\n#..#....##\n.....#....\n.#........\n.....#####\n...#..#...\n....###...\n###.##...#\n.#...1#.3.\n", "output": "-1\n"}, {"input": "10 10\n#...33.#.#\n#.#.33.#1.\n2.....#.11\n222#.#.#..\n####...#.#\n#.........\n.#....#...\n..#..#.##.\n##.....#.#\n#..#....#.\n", "output": "12\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\nProblem statement\n\nA $ 2 $ human-player match-up game tournament is about to take place in front of Kyoto U...
[{"input": "2\n010\n-2 1 1 -1", "output": "-2\n-2\n-2\n-2\n"}, {"input": "2\n001\n-2 1 0 -1", "output": "-1\n-2\n-1\n-2\n"}, {"input": "2\n100\n-2 1 0 -1", "output": "-2\n-1\n-2\n-1\n"}, {"input": "2\n001\n-1 1 0 0", "output": "-1\n-1\n-1\n-1\n"}, {"input": "2\n010\n-2 1 0 -1", "output": "-2\n0\n-2\n0\n"}, {"input": "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\nAs a New Year's gift, Dolphin received a string s of length 19.\n\nThe string s has the following format: [fi...
[{"input": "happy,newyear,enjoy\n", "output": "happy newyear enjoy\n"}, {"input": "haiku,atcoder,tasks\n", "output": "haiku atcoder tasks\n"}, {"input": "abcde,fghihgf,edcba\n", "output": "abcde fghihgf edcba\n"}, {"input": "mzbmw,yydiadt,coueg\n", "output": "mzbmw yydiadt coueg\n"}, {"input": "dbyfw,rpwbpuv,ifnua\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\nIn the year of $30XX$ participants of some world programming championship live in a single large hotel. The h...
[{"input": "10 10 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n2 1 15 1\n7 1 4 1\n10 1 7 1\n2 1 7 1\n3 1 2 1\n5 1 2 1\n10 1 5 1\n6 1 9 1\n", "output": "3\n4\n6\n3\n3\n4\n3\n3\n4\n3\n"}, {"input": "10 10 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n2 1 15 1\n7 1 4 1\n10 1 7 1\n2 1 7 1\n3 1 2 1\n5 1 2 1\n10 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\nYou have N items that you want to put them into a knapsack. Item i has value vi and weight wi.\n\nYou want to...
[{"input": "1 10\n15 4\n0 3\n4 1\n13 3", "output": "15\n"}, {"input": "1 10\n27 4\n0 0\n6 1\n13 3", "output": "27\n"}, {"input": "1 10\n39 4\n1 0\n6 1\n13 3", "output": "39\n"}, {"input": "1 10\n24 4\n0 3\n5 1\n13 5", "output": "24\n"}, {"input": "1 10\n29 4\n0 3\n5 1\n16 5", "output": "29\n"}, {"input": "2 8\n33 1\n4 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven a time in AM/PM format as a string, convert it to military (24-hour) time as a string.\n\nMidnight is 1...
[{"input": "\"12:00:01AM\"", "output": "[\"00:00:01\"]", "fn_name": "get_military_time"}, {"input": "\"01:02:03AM\"", "output": "[\"01:02:03\"]", "fn_name": "get_military_time"}, {"input": "\"02:04:05AM\"", "output": "[\"02:04:05\"]", "fn_name": "get_military_time"}, {"input": "\"03:06:07AM\"", "output": "[\"03:06:07\"...
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\nWrite a function that returns the index of the first occurence of the word \"Wally\". \"Wally\" must not be ...
[{"input": "\"Walley ,Wally -Wally ;Wally +Wally :Wally\"", "output": "[-1]", "fn_name": "wheres_wally"}, {"input": "\"Walley Wally, Wally- Wally: Wally+ Wally:\"", "output": "[7]", "fn_name": "wheres_wally"}, {"input": "\"wally mollyWally Wallybrolly 'Wally\"", "output": "[-1]", "fn_name": "wheres_wally"}, {"input": "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are N dishes of cuisine placed in front of Takahashi and Aoki. For convenience, we call these dishes Di...
[{"input": "6\n-1 0000110001\n0 0110011010\n-1 1110000001\n-1 0100100000\n2 1100111110\n-1 1000010001", "output": "-1210232124\n"}, {"input": "6\n-1 0000110011\n0 0110011010\n-1 1110000001\n-1 0100100100\n2 1100111110\n-1 1000010001", "output": "-1210232134\n"}, {"input": "6\n-2 1000010101\n-1 0110011010\n0 1100000001\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYour company, [Congo Pizza](http://interesting-africa-facts.com/Africa-Landforms/Congo-Rainforest-Facts.html)...
[{"input": "32\n64\n16", "output": "[13824]", "fn_name": "box_capacity"}, {"input": "80\n40\n20", "output": "[27000]", "fn_name": "box_capacity"}, {"input": "70\n60\n15", "output": "[25740]", "fn_name": "box_capacity"}, {"input": "20\n20\n20", "output": "[3375]", "fn_name": "box_capacity"}, {"input": "53\n21\n13", "out...
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\nAlice and Bob are playing a game. They are given an array $A$ of length $N$. The array consists of integers. ...
[{"input": "6\n7 4 0 0 17 11\n", "output": "Alice\n"}, {"input": "6\n7 6 0 0 17 11\n", "output": "Alice\n"}, {"input": "6\n7 6 0 0 17 12\n", "output": "Alice\n"}, {"input": "6\n6 6 0 0 17 12\n", "output": "Alice\n"}, {"input": "6\n4 3 2 0 12 11\n", "output": "Alice\n"}, {"input": "6\n4 3 0 -1 12 9\n", "output": "Alice\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSagheer is working at a kindergarten. There are n children and m different toys. These children use well-defi...
[{"input": "13 18 27 13\n1 1\n1 2\n1 3\n1 4\n1 17\n2 5\n2 1\n3 6\n3 2\n5 14\n5 3\n4 4\n6 9\n6 3\n7 8\n7 3\n8 7\n8 9\n10 11\n10 14\n11 10\n11 15\n11 11\n9 12\n9 11\n12 10\n13 15\n6 8\n6 14\n6 1\n6 17\n6 18\n11 12\n11 1\n11 1\n11 17\n1 18\n1 12\n1 7\n1 14\n", "output": "3\n0\n0\n0\n0\n4\n0\n0\n0\n0\n13\n13\n13\n"}, {"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\nYou are given an array a of n positive integers.\n\nYou can use the following operation as many times as you ...
[{"input": "4\n3\n1 2 1\n5\n11 14 9 10 8\n5\n0 3 1 4 1\n4\n5 2 1 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"input": "4\n3\n1 2 1\n5\n11 14 9 6 10\n5\n0 3 1 2 1\n4\n5 2 1 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"input": "4\n3\n0 2 1\n5\n11 14 9 10 8\n5\n0 3 1 4 1\n4\n5 2 1 10\n", "output": "NO\nYES\nNO\nYES\n"}, {"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\nYou are playing a very popular game called Cubecraft. Initially, you have one stick and want to craft $k$ tor...
[{"input": "5\n2 1 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n", "output": "14\n33\n25\n2000000003\n1000000001999999999\n"}, {"input": "5\n2 2 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n", "output": "19\n33\n25\n2000000003\n100000000199999999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this Kata, we are going to see how a Hash (or Map or dict) can be used to keep track of characters in a st...
[{"input": "\"abcdexyz\"\n\"yxz\"", "output": "[5]", "fn_name": "solve"}, {"input": "\"abdegfg\"\n\"ffdb\"", "output": "[0]", "fn_name": "solve"}, {"input": "\"aabcdefg\"\n\"fbd\"", "output": "[5]", "fn_name": "solve"}, {"input": "\"abcxyz\"\n\"ayxz\"", "output": "[2]", "fn_name": "solve"}, {"input": "\"xyz\"\n\"yxxz\"...
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\nArkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It sh...
[{"input": "2132 164\n", "output": "26\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n1 11\n1 12\n1 13\n1 14\n1 15\n1 16\n1 17\n1 18\n1 19\n1 20\n1 21\n1 22\n1 23\n1 24\n1 25\n1 26\n1 27\n1 28\n1 29\n1 30\n1 31\n1 32\n1 33\n1 34\n1 35\n1 36\n1 37\n1 38\n1 39\n1 40\n1 41\n1 42\n1 43\n1 44\n1 45\n1 46\n1 47\n1 48\n1 49\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\nA new airplane SuperPuperJet has an infinite number of rows, numbered with positive integers starting with 1 ...
[{"input": "1000000000000000000d\n", "output": "3999999999999999994\n"}, {"input": "1000000000000000000a\n", "output": "3999999999999999995\n"}, {"input": "1000000000000000000e\n", "output": "3999999999999999993\n"}, {"input": "1000000000000000000f\n", "output": "3999999999999999992\n"}, {"input": "1000000000000000000c...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNikephoros and Polycarpus play rock-paper-scissors. The loser gets pinched (not too severely!).\n\nLet us rem...
[{"input": "1457057352\nR\nPSRSRSSRPSRRSSSRSRRPRSPPSPPRPSRRPPRSRRSPPSPPSPRPRPRPSSRPRPRRPSSSSSPSRRRPSRSPPSPSRRSPSSRSRPSPRRRSRRRPSPRPPRPPPPPRPPRRRRRRPPRRSPSPSSPSSPRPRSPPRRRPSPSRSRRRRRPPPSRPRSPPSSRRRRPRPPRSPSSPRRRPPPPPRRSRSPRPPSRPRSRSRRPRRRPRSRSPRRRSRSSRPPPRRSRRSSRRPSRPPRSPSPRPRSSSRSSRRPSRRRRPSRRPPRPPRRPRSRPRSRRPPPPPSPPPS...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Smart Beaver from ABBYY invented a new message encryption method and now wants to check its performance. ...
[{"input": "80 6 99\n48 97 9 77 73 21 86 78 48 5 71 16 42 67 90 27 30 52 41 86 53 4 60 17 66 38 94 46 51 51 70 11 1 16 74 53 17 12 82 95 51 33 83 70 45 27 90 57 67 2 68 15 20 61 47 90 11 5 95 33 69 35 79 51 95 45 10 17 12 88 93 43 31 31 85 68 85 81 70 43\n47 92 59 85 73 38\n", "output": "95 38 9 63 33 19 84 76 46 3 69 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAn array is called `zero-balanced` if its elements sum to `0` and for each positive element `n`, there exists...
[{"input": "[-1, 1, -2, 2, -2, -2, -4, 4]", "output": "[false]", "fn_name": "is_zero_balanced"}, {"input": "[0, 0, 0, 0, 0, 0]", "output": "[true]", "fn_name": "is_zero_balanced"}, {"input": "[0, 0, 0, 0, 0]", "output": "[true]", "fn_name": "is_zero_balanced"}, {"input": "[3, -2, -1]", "output": "[false]", "fn_name": "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven a tree T with non-negative weight, find the height of each node of the tree. For each node, the height ...
[{"input": "4\n0 2 2\n1 2 2\n2 3 12", "output": "14\n14\n12\n14\n"}, {"input": "4\n0 2 2\n1 2 2\n2 3 21", "output": "23\n23\n21\n23\n"}, {"input": "4\n0 2 2\n1 2 2\n2 3 31", "output": "33\n33\n31\n33\n"}, {"input": "4\n0 2 2\n1 2 3\n2 3 31", "output": "33\n34\n31\n34\n"}, {"input": "4\n0 2 4\n1 2 3\n2 3 31", "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\nAndrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containin...
[{"input": "9\n011111101\n", "output": "5\n"}, {"input": "9\n011111111\n", "output": "7\n"}, {"input": "9\n011101111\n", "output": "5\n"}, {"input": "9\n011101101\n", "output": "3\n"}, {"input": "9\n001101101\n", "output": "1\n"}, {"input": "9\n001111101\n", "output": "3\n"}, {"input": "9\n001011101\n", "output": "1\n"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# RegExp Fun #1 - When I miss few days of gym\n\n## Disclaimer\n\nThe background story of this Kata is 100% f...
[{"input": "\"probably Probably probably Probably probably Probably probably Probably probably Probably\"", "output": "[\"prolly Prolly prolly Prolly prolly Prolly prolly Prolly prolly Prolly\"]", "fn_name": "gym_slang"}, {"input": "\"instagram Instagram instagram Instagram instagram Instagram instagram Instagram insta...
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\nIn this problem, we use the 24-hour clock.\n\nTakahashi gets up exactly at the time H_1 : M_1 and goes to bed...
[{"input": "17 -4 435 10 -1", "output": "25095\n"}, {"input": "17 -4 722 10 -1", "output": "42315\n"}, {"input": "-1 -3 436 11 -1", "output": "26235\n"}, {"input": "-1 -3 239 11 -1", "output": "14415\n"}, {"input": "-1 -5 239 11 -1", "output": "14417\n"}, {"input": "10 -1 206 6 -1", "output": "11768\n"}, {"input": "15 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAn elementary school student Takahashi has come to a variety store.\nHe has two coins, A-yen and B-yen coins ...
[{"input": "1977 001 1111", "output": "Yes\n"}, {"input": "1977 011 1111", "output": "Yes\n"}, {"input": "1977 011 1110", "output": "Yes\n"}, {"input": "1977 011 0110", "output": "Yes\n"}, {"input": "1677 011 0110", "output": "Yes\n"}, {"input": "1677 011 0100", "output": "Yes\n"}, {"input": "1677 111 0100", "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\nYou are given a square grid with $n$ rows and $n$ columns, where each cell has a non-negative integer written...
[{"input": "7\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1\n1000000000 1000000000 1000000000 1000000000 1000000000 1 1000000000\n1000000000 1000000000 1000000000 1000000000 1 1000000000 1000000000\n1000000000 1000000000 1000000000 1 1000000000 1000000000 1000000000\n1000000000 1000000000 1 10000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne day little Vasya found mom's pocket book. The book had n names of her friends and unusually enough, each ...
[{"input": "30 10\nUTNTGOKZYJ\nQHOUHNYZVW\nLTVGHJRZVW\nMZHYHOLZYJ\nERYEUEPZYE\nUZDBFTURYJ\nRVSMQTIZGW\nWDJQHMIRYY\nKCORHQPZYE\nRRPLFOZZVY\nJTXMFNNNYJ\nMVTGGOZZVV\nEHAFFNUZVF\nLBRNWJZNYE\nJVMOHTPZYJ\nWTARFJLZVV\nLVJCWOURVW\nLCLQFJYRVV\nQVBVGNJRYF\nNTZGHOLRYE\nMGQKHOUPYJ\nRRSSBXPZYJ\nRYCRGTLZYJ\nJRDEGNKRVW\nRZKFGHYRVG\nM...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a program that extracts n different numbers from the numbers 0 to 100 and outputs the number of combina...
[{"input": "4 133\n-1 0\n0 0", "output": "15011\n0\n"}, {"input": "4 102\n-1 0\n0 0", "output": "7153\n0\n"}, {"input": "8 80\n2 -2\n0 0", "output": "37638\n0\n"}, {"input": "3 133\n-1 0\n0 0", "output": "1202\n0\n"}, {"input": "6 80\n2 -1\n0 0", "output": "28009\n0\n"}, {"input": "6 98\n2 -1\n0 0", "output": "81979\n0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe capital of Berland looks like a rectangle of size n × m of the square blocks of same size.\n\nFire!\n\nIt...
[{"input": "1000000000 1010000000 10\n668983398 843926244\n730038846 389721428\n400508549 779159281\n683648123 559948749\n105869012 181419826\n391396726 503295408\n248489591 686114055\n102102370 108241714\n610800354 28286278\n587730768 379340837\n", "output": "331016602\n"}, {"input": "1000000000 1000000000 10\n9462185...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA string is called bracket sequence if it does not contain any characters other than \"(\" and \")\". A brack...
[{"input": "20\n(())(()()())(())()()\n", "output": "01100111111001100000\n"}, {"input": "20\n(()()()())(()())()()\n", "output": "01111111100111100000\n"}, {"input": "20\n(())(())(())()(())()\n", "output": "01100110011000011000\n"}, {"input": "20\n()((())((()))())(())\n", "output": "00010011011011100110\n"}, {"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\nThere are many freight trains departing from Kirnes planet every day. One day on that planet consists of $h$ ...
[{"input": "10 24 60 8\n10 59\n21 56\n0 42\n21 27\n5 24\n5 53\n16 5\n5 22\n10 11\n10 46\n", "output": "1 5\n1 \n"}, {"input": "10 24 60 8\n10 59\n21 56\n0 42\n21 27\n5 24\n5 53\n16 5\n5 22\n10 11\n10 46\n", "output": "1 5\n1 \n"}, {"input": "9 24 60 21\n1 36\n2 35\n2 16\n2 55\n1 16\n0 35\n0 55\n1 56\n0 15\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\n# A History Lesson\n\nThe Pony Express was a mail service operating in the US in 1859-60.\n\n\n\n\nIt reduced...
[{"input": "[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,...
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\nIt's well known that the best way to distract from something is to do one's favourite thing. Job is such a th...
[{"input": "15 17\n1 10 8\n5 19 1\n12 14 6\n9 19 8\n6 7 3\n5 11 9\n7 12 5\n17 20 8\n6 12 6\n11 19 4\n3 14 1\n15 19 10\n3 20 5\n5 19 9\n10 18 10\n", "output": "11\n"}, {"input": "15 17\n1 10 8\n5 19 1\n12 14 6\n9 19 8\n6 7 3\n5 11 9\n7 12 5\n17 20 8\n6 12 6\n11 19 4\n3 14 1\n15 19 10\n3 20 5\n5 19 9\n10 18 10\n", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nInternational Carpenters Professionals Company (ICPC) is a top construction company with a lot of expert carp...
[{"input": "3\n-1 ( 10\n10 ) 5\n10 ) 5", "output": "No\nNo\nYes\n"}, {"input": "3\n-1 ( 0\n10 ) 4\n20 ( 4", "output": "Yes\nNo\nYes\n"}, {"input": "3\n-1 ) 10\n10 ( 12\n10 ( 7", "output": "No\nNo\nNo\n"}, {"input": "3\n-1 ( 10\n10 ( 12\n10 ( 7", "output": "No\nNo\nNo\n"}, {"input": "3\n-1 ) 10\n14 ( 12\n10 ( 7", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou have unweighted tree of $n$ vertices. You have to assign a positive weight to each edge so that the follo...
[{"input": "7\n1 2\n2 7\n3 4\n4 7\n5 6\n6 7\n", "output": "1 6\n"}, {"input": "7\n1 2\n2 6\n3 4\n4 7\n5 6\n6 7\n", "output": "3 6\n"}, {"input": "7\n1 2\n2 6\n3 4\n4 7\n5 6\n1 7\n", "output": "1 6\n"}, {"input": "7\n1 2\n2 7\n3 4\n4 7\n5 6\n6 1\n", "output": "1 6\n"}, {"input": "7\n1 2\n2 6\n3 4\n4 7\n5 6\n2 7\n", "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\nFox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers ...
[{"input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"input": "1000000000 1100000000 1000000000\n", "output": "1033333333\n"}, {"input": "1137468270 1106087921 972974334\n", "output": "1072176841\n"}, {"input": "109786360...
code_stdio