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\nThe store sells $n$ items, the price of the $i$-th item is $p_i$. The store's management is going to hold a p... | [{"input": "13 3\n5 3 1 5 2 5 3 1 5 2 5 3 1\n3 2\n1 1\n5 3\n", "output": "10\n5\n15\n"}, {"input": "5 3\n100 200 300 400 500\n2 1\n1 1\n3 2\n", "output": "400\n500\n700\n"}, {"input": "5 3\n100 200 300 400 500\n1 1\n3 2\n2 2\n", "output": "500\n700\n900\n"}, {"input": "5 2\n100 200 300 400 500\n1 1\n3 2\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\nAlena has successfully passed the entrance exams to the university and is now looking forward to start studyi... | [{"input": "100\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "100\n"}, {"input": "100\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... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 an integer sequence A_1, ..., A_N of length N.\nWe will choose exactly \\left\\lfloor \\frac{N}{2} \... | [{"input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "5000000000\n"}, {"input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 1000000000", "output": "5000000000\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 n cities numbered from 1 to n in Berland. Some of them are connected by two-way roads. Each road ha... | [{"input": "5\n0 954 1255 266 751\n954 0 1677 688 1173\n1255 1677 0 989 504\n266 688 989 0 485\n751 1173 504 485 0\n5\n5 2 1509\n3 4 692\n3 5 756\n3 1 151\n2 5 262\n", "output": "8742 7851 7851 6398 5111 "}, {"input": "5\n0 954 1255 266 751\n954 0 1677 688 1173\n1255 1677 0 989 504\n266 688 989 0 485\n751 1173 504 485 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEmuskald is an avid horticulturist and owns the world's longest greenhouse β it is effectively infinite in le... | [{"input": "20 15\n7 8720.017100830131\n2 13067.215819731118\n8 58623.690996\n9 184322.3412850205\n6 227999.61123331118\n2 279836.330518\n9 282807.34217112145\n2 311057.23684687156\n1 312315.562927\n5 459200.373445\n14 563454.265947\n11 647366.9355815595\n13 679761.613732\n4 684192.647497\n3 733121.2686885264\n4 748638... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nLittle Egor is a huge movie... | [{"input": "2\n2\n2 2\n3 2\n3\n-1 1 4 1\n1 4 1 4", "output": "1\n2\n"}, {"input": "2\n2\n2 2\n3 2\n3\n-1 1 2 1\n1 4 1 4", "output": "1\n2\n"}, {"input": "2\n2\n1 2\n2 1\n4\n1 2 1 1\n2 10 1 3", "output": "1\n2\n"}, {"input": "2\n1\n2 3\n2 1\n4\n2 1 4 1\n2 10 1 4", "output": "1\n2\n"}, {"input": "2\n2\n1 2\n2 1\n4\n1 4 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYukiya, the owner of Aizuyama Ski Resort, has prepared a course for advanced skiers with obstacles and jumpin... | [{"input": "5 5\n0 0 0 0 1\n2 1 0 2 0\n1 0 0 1 1\n0 2 1 2 0\n0 1 -1 0 0\n5 5\n0 0 1 0 0\n2 1 0 2 0\n1 0 0 0 1\n0 2 1 2 0\n0 1 0 0 0\n15 15\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 1 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 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\nThere are N one-off jobs available. If you take the i-th job and complete it, you will earn the reward of B_i... | [{"input": "7791 7791\n7791 7707\n7789 2110\n7791 1594\n7791 2921\n7791 9233\n7791 9612\n7789 8647\n7790 5898\n7791 5096\n7789 9048\n7791 1635\n7790 623\n7790 7404\n7791 5805\n7790 9498\n7789 2644\n7791 1482\n7791 5994\n7791 1562\n7790 120\n7789 5327\n7789 9548\n7790 6224\n7791 5478\n7789 6056\n7789 1262\n7790 6328\n77... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 positive integers $a$ and $b$. In one move you can increase $a$ by $1$ (replace $a$ with $a... | [{"input": "21\n1 3218\n28 10924\n908802 141084\n82149 7374\n893257 19784\n3535315 802705\n2857 176\n691 227749\n1 3218\n28 10924\n436302 141084\n82149 9274\n893257 10248\n4004924 1003579\n2857 142\n114 209385\n1 1131\n28 10924\n1144405 141084\n132660 9274\n2346605 10248\n", "output": "3217\n10896\n78786\n6339\n16807\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\nDr. Hedro is astonished. According to his theory, we can make sludge that can dissolve almost everything on t... | [{"input": "2\n14\n0", "output": "24\n328\n"}, {"input": "2\n12\n0", "output": "24\n264\n"}, {"input": "2\n10\n0", "output": "24\n216\n"}, {"input": "2\n18\n0", "output": "24\n440\n"}, {"input": "2\n24\n0", "output": "24\n608\n"}, {"input": "2\n10\n0", "output": "24\n216\n"}, {"input": "2\n12\n0", "output": "24\n264\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\nUjan has a lot of numbers in his boxes. He likes order and balance, so he decided to reorder the numbers.\n\n... | [{"input": "5\n10 -251 650 475 -114 364 -75754 -982 -532 -151 -484\n10 -623 -132 -317561 -438 20 -275 -323 -530089 -311 -587\n10 450900 -519 903 -401 -789 -606529 277 -267 -682 -161\n10 -246 873 -641 838 719 234 789 -74 -287288 -772972\n10 186 741 -927 -866 -855 578 -1057019 202 162962 -458\n", "output": "Yes\n650 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\nKamil likes streaming the competitive programming videos. His MeTube channel has recently reached $100$ milli... | [{"input": "32\n402528994560 0 0 0 0 0 0 932646223872 893192888700 0 813583026900 0 0 0 0 143521875000 0 177570054144 186624000000 0 517655600000 202145625000 341007975000 0 116252718750 0 148561875000 0 304819200000 248474688000 0 103125000000\n29 25\n20 24\n8 21\n23 3\n32 14\n29 30\n31 24\n28 12\n7 10\n18 1\n11 7\n29... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAnastasia loves going for a walk in Central Uzhlyandian Park. But she became uninterested in simple walking, ... | [{"input": "9 13\n132 166 200 62 168 51 185 192 118\n", "output": "51\n"}, {"input": "9 13\n132 166 200 62 168 58 185 192 118\n", "output": "52\n"}, {"input": "9 13\n132 166 200 62 168 58 106 192 118\n", "output": "49\n"}, {"input": "9 13\n132 166 200 62 168 58 299 192 118\n", "output": "56\n"}, {"input": "9 13\n186 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\nThere are N blocks arranged in a row. Let us paint these blocks.\nWe will consider two ways to paint the bloc... | [{"input": "200000 200000 199999\n", "output": "703273590\n"}, {"input": "178720 187658 129518\n", "output": "963607179\n"}, {"input": "189770 199455 133747\n", "output": "971381227\n"}, {"input": "189992 49130 122242\n", "output": "956044281\n"}, {"input": "146600 147466 95872\n", "output": "932390522\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\nVasya plays a computer game with ninjas. At this stage Vasya's ninja should get out of a deep canyon.\n\nThe ... | [{"input": "101 1\n----------------------------------------------------------------------------------------------------X\n----------------------------------------------------------------------------------------------------X\n", "output": "NO\n"}, {"input": "100 10\n-X------XXX--XXX-XXXXXX---XXX---X-XX--XXX----------XX-... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 will be given a string S of length 3 representing the weather forecast for three days in the past.\nThe i... | [{"input": "CSS\nCSR\n", "output": "2\n"}, {"input": "SSR\nSSR\n", "output": "3\n"}, {"input": "RRR\nSSS\n", "output": "0\n"}, {"input": "SSS\nSSS\n", "output": "3\n"}, {"input": "CCC\nSSS\n", "output": "0\n"}, {"input": "RSC\nRCS\n", "output": "1\n"}, {"input": "CCC\nSCS\n", "output": "1\n"}, {"input": "RRC\nCRS\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\nThis is the easy version of this problem. The only difference is the constraint on $k$ β the number of gifts ... | [{"input": "8\n5 11 2\n2 4 3 5 14\n5 11 2\n2 4 3 5 7\n3 3 3\n4 2 6\n5 2 3\n10 1 3 9 2\n2 10000 2\n10100 10000\n2 9999 2\n10000 10000\n4 6 4\n3 2 3 2\n5 5 3\n1 2 2 1 2\n", "output": "4\n4\n1\n2\n1\n0\n4\n5\n"}, {"input": "8\n5 11 2\n2 3 3 5 13\n5 11 2\n2 4 3 5 7\n3 2 3\n4 2 6\n5 2 6\n10 1 3 9 2\n2 10000 2\n10100 10000\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\nPolycarp is a beginner programmer. He is studying how to use a command line.\n\nPolycarp faced the following ... | [{"input": "2 1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac\n1\n", "output": "Yes\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 S of length 3 consisting of a, b and c. Determine if S can be obtained by permuting ab... | [{"input": "bac\n", "output": "Yes\n"}, {"input": "abc\n", "output": "Yes\n"}, {"input": "bab\n", "output": "No\n"}, {"input": "aaa\n", "output": "No\n"}, {"input": "cab", "output": "Yes\n"}, {"input": "acb", "output": "Yes\n"}, {"input": "cba", "output": "Yes\n"}, {"input": "bca", "output": "Yes\n"}, {"input": "bba", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nStatistics claims that students sleep no more than three hours a day. But even in the world of their dreams, ... | [{"input": "100 100\n50 50\n", "output": "NO\n"}, {"input": "82 60\n100 38\n", "output": "YES\n"}, {"input": "100 100\n36 50\n", "output": "NO\n"}, {"input": "82 60\n100 64\n", "output": "YES\n"}, {"input": "150 35\n53 79\n", "output": "YES\n"}, {"input": "82 60\n100 52\n", "output": "YES\n"}, {"input": "166 12\n87 103... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nKate and Michael want to buy a pizza and share it. Depending on the price of the pizza, they are going to div... | [{"input": "28.789", "output": "[19.19]", "fn_name": "michael_pays"}, {"input": "5.9181", "output": "[3.95]", "fn_name": "michael_pays"}, {"input": "4.325", "output": "[4.33]", "fn_name": "michael_pays"}, {"input": "4.99", "output": "[4.99]", "fn_name": "michael_pays"}, {"input": "22", "output": "[14.67]", "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\nNumbers $1, 2, 3, \\dots n$ (each integer from $1$ to $n$ once) are written on a board. In one operation you ... | [{"input": "1\n275\n", "output": "2\n275 274\n275 273\n274 272\n273 271\n272 270\n271 269\n270 268\n269 267\n268 266\n267 265\n266 264\n265 263\n264 262\n263 261\n262 260\n261 259\n260 258\n259 257\n258 256\n257 255\n256 254\n255 253\n254 252\n253 251\n252 250\n251 249\n250 248\n249 247\n248 246\n247 245\n246 244\n245 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 rectangular field of n Γ m cells. Each cell is either empty or impassable (contains an obstac... | [{"input": "10 10\n*.*...*.**\n..*...*.**\n.**.***...\n....*.*.**\n***....***\n.*..*...*.\n.***.*..*.\n.*****.*.*\n*.***.*...\n..*..*....\n", "output": "9.9...5.71\n..9...5.77\n.99.997...\n....9.5.77\n299....513\n.2..0...1.\n.490.0..9.\n.71120.7.1\n7.434.8...\n..6..2....\n"}, {"input": "10 10\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\nInput\n\nThe only line of input contains three integers a1, a2, a3 (1 β€ a1, a2, a3 β€ 20), separated by spaces... | [{"input": "20 20 20\n", "output": "218920\n"}, {"input": "1 19 20\n", "output": "132716\n"}, {"input": "10 11 15\n", "output": "10480\n"}, {"input": "10 11 12\n", "output": "2474\n"}, {"input": "12 9 18\n", "output": "42420\n"}, {"input": "1 19 15\n", "output": "11967\n"}, {"input": "1 19 17\n", "output": "31330\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\nLeha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two players play... | [{"input": "4\n1000000000 1000000000 1000000000 99999999\n", "output": "First\n"}, {"input": "4\n1000000000 1000000000 1000000000 99999999\n", "output": "First\n"}, {"input": "4\n1000000000 1000000001 1000000000 99999999\n", "output": "First\n"}, {"input": "4\n1000000000 1000000001 1000000000 80256192\n", "output": "Fi... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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$ consecutive seat places in a railway carriage. Each place is either empty or occupied by a pass... | [{"input": "64 59 2\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "23\n"}, {"input": "64 59 2\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "23\n"}, {"input": "64 59 3\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "24\... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 dragon symbolizes wisdom, power and wealth. On Lunar New Year's Day, people model a dragon with bamboo stri... | [{"input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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_stdio |
[
{
"content": "You are an expert Python programmer. 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've got string s, consisting of only lowercase English letters. Find its lexicographically maximum subsequ... | [{"input": "zyxzxzwyxywxxwabcdabdacdbcacdbcacabaaba\n", "output": "zzzyyxxwddddccbba\n"}, {"input": "zyxzxzwyxybxxwabcdawdacdccacdbcacabaaba\n", "output": "zzzyyxxwwdddccbba\n"}, {"input": "thankstosamarasauteddybearsforthiscontest\n", "output": "yttt\n"}, {"input": "thamkstosamarasauteddybearsforthiscontest\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\nA string $s$ of length $n$ ($1 \\le n \\le 26$) is called alphabetical if it can be obtained using the follow... | [{"input": "11\na\nba\nab\nbac\nihfcbadeg\nz\naa\nca\nacb\nxyz\nddcba\n", "output": "YES\nYES\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\nNO\n"}, {"input": "11\na\nba\nab\ncac\nihfcbadeg\nz\nab\nca\nbca\nxyz\nddcba\n", "output": "YES\nYES\nYES\nNO\nYES\nNO\nYES\nNO\nNO\nNO\nNO\n"}, {"input": "11\na\nba\nab\nbac\nihfcbadeg\nz\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\nWrite a function \n```javascript \ntripledouble(num1,num2)\n```\n```python\ntriple_double(num1, num2)\n```\nw... | [{"input": "451999277\n41177722899", "output": "[1]", "fn_name": "triple_double"}, {"input": "666789\n12345667", "output": "[1]", "fn_name": "triple_double"}, {"input": "1222345\n12345", "output": "[0]", "fn_name": "triple_double"}, {"input": "10560002\n100", "output": "[1]", "fn_name": "triple_double"}, {"input": "123... | 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 many anime that are about \"love triangles\": Alice loves Bob, and Charlie loves Bob as well, but A... | [{"input": "28567 13\n28079 24675 1\n18409 26720 1\n980 10815 1\n20794 16571 1\n7376 19861 1\n11146 706 1\n4255 16391 1\n27376 18263 1\n10019 28444 1\n6574 28053 1\n5036 16610 1\n3543 7122 1\n512 9554 1\n", "output": " 928433852\n"}, {"input": "28567 13\n28079 24675... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 sequence of integers $a_1, a_2, \\dots, a_n$. You need to paint elements in colors, so that: ... | [{"input": "100\n94 83 55 57 63 89 73 59 75 97 77 54 77 81 70 81 99 52 88 76 98 88 79 67 76 80 89 50 60 60 53 83 96 87 75 99 61 91 75 85 88 80 90 54 84 88 98 93 69 97 93 54 83 59 57 92 88 78 53 55 99 63 60 70 61 52 60 55 100 85 80 58 53 97 59 61 50 90 75 85 86 63 91 96 67 68 86 96 79 98 51 83 82 92 65 100 76 83 57 100\... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 Abbreviation Olympiad takes place annually starting from 1989. Each year the competition receiv... | [{"input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"input": "5\nIAO'15\nIAO'2015\nIAO'1\nIAO'9\nIAO'0\n", "output": "2015\n12015\n1991\n1989\n1990\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 garland consisting of $n$ lamps. States of the lamps are represented by the string $s$ of len... | [{"input": "6\n9 2\n010001010\n9 3\n111100000\n7 4\n1111111\n10 3\n1001110101\n1 1\n1\n1 1\n0\n", "output": "1\n2\n5\n4\n0\n0\n"}, {"input": "6\n9 2\n010001010\n9 3\n111100000\n7 4\n1111111\n10 3\n1001110101\n1 1\n0\n1 1\n0\n", "output": "1\n2\n5\n4\n0\n0\n"}, {"input": "6\n9 2\n010001010\n9 5\n111100000\n7 4\n1111111\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nKolya loves putting gnomes at the circle table and giving them coins, and Tanya loves studying triplets of gn... | [{"input": "100000\n", "output": "192156836"}, {"input": "100000\n", "output": "192156836"}, {"input": "100000\n", "output": "192156836"}, {"input": "10701\n", "output": "198227529\n"}, {"input": "10010\n", "output": "495680028\n"}, {"input": "62113\n", "output": "786955632\n"}, {"input": "48613\n", "output": "33515912... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 problemset consisting of $n$ problems. The difficulty of the $i$-th problem is $a_i$. It is g... | [{"input": "9\n4 6 9 12 100 150 200 400 800\n", "output": "5\n"}, {"input": "9\n4 6 9 12 100 150 200 400 800\n", "output": "5\n"}, {"input": "9\n4 6 9 12 100 150 200 400 612\n", "output": "5\n"}, {"input": "9\n4 2 9 12 100 150 200 400 612\n", "output": "5\n"}, {"input": "10\n1 2 5 11 12 24 25 26 27 28\n", "output": "7\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne company of IT City decided to create a group of innovative developments consisting from 5 to 7 people and... | [{"input": "700\n", "output": "16017044425409540\n"}, {"input": "776\n", "output": "33019955679376860\n"}, {"input": "666\n", "output": "11292070960994226\n"}, {"input": "777\n", "output": "33319741730082870\n"}, {"input": "756\n", "output": "27490983258573432\n"}, {"input": "666\n", "output": "11292070960994226"}, {"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\nYou are given an integer $n$ and an integer $k$.\n\nIn one step you can do one of the following moves: decr... | [{"input": "93\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 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\n# Task\nN lamps are placed in a line, some are switched on and some are off. What is the smallest number of l... | [{"input": "[1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1]", "output": "[5]", "fn_name": "lamps"}, {"input": "[1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0]", "output": "[5]", "fn_name": "lamps"}, {"input": "[1, 0, 1, 0, 0, 1, 0, 1]", "output": "[4]", "fn_name": "lamps"}, {"input": "[0, 1, 0, 1, 0]", "output": "[0]", "fn_name": "lamps"}, {"inpu... | 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 string, capitalize the letters that occupy even indexes and odd indexes separately, and return as sho... | [{"input": "\"codingisafunactivity\"", "output": "[[\"CoDiNgIsAfUnAcTiViTy\", \"cOdInGiSaFuNaCtIvItY\"]]", "fn_name": "capitalize"}, {"input": "\"indexinglessons\"", "output": "[[\"InDeXiNgLeSsOnS\", \"iNdExInGlEsSoNs\"]]", "fn_name": "capitalize"}, {"input": "\"codewarriors\"", "output": "[[\"CoDeWaRrIoRs\", \"cOdEwAr... | 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\nDr. Sato, a botanist, invented a number of special fertilizers for seedlings. When you give the fertilizer to... | [{"input": "3 3\n1.8036677694351575 3.7376015310643522 0.9359006248557373\n4.789021816134845 2.456993805979323 1.0\n3.0 1.470921439035275 1.5624820640788264\n2 7\n1.2643980385584639 1.3805003041132355\n2.3877376705228617 1.9499455465451372\n0 0", "output": "17.90\n67.31\n"}, {"input": "3 3\n1.8036677694351575 3.6908040... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAyush is a cashier at the shopping center. Recently his department has started a ''click and collect\" servic... | [{"input": "10 1 100\n1 55 67 75 40 86 24 84 82 26 81 23 70 79 51 54 21 78 31 98 68 93 66 88 99 65 20 52 35 85 16 12 94 100 59 56 18 33 47 46 71 8 38 57 2 92 3 95 6 4 87 22 48 80 15 29 11 45 72 76 44 60 91 90 39 74 41 36 13 27 53 83 32 10 30 63 89 64 49 17 9 97 69 14 50 77 37 96 10 42 28 34 61 19 73 7 62 43 58 25\n33\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\nConsider an array containing cats and dogs. Each dog can catch only one cat, but cannot catch a cat that is m... | [{"input": "[\"C\", \"C\", \"C\", \"D\", \"D\", \"D\", \"C\", \"D\", \"D\", \"D\", \"C\", \"D\", \"C\", \"C\"]\n2", "output": "[5]", "fn_name": "solve"}, {"input": "[\"C\", \"C\", \"D\", \"D\", \"C\", \"D\"]\n2", "output": "[3]", "fn_name": "solve"}, {"input": "[\"C\", \"C\", \"D\", \"D\", \"C\", \"D\"]\n1", "output": ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are n animals in the queue to Dr. Dolittle. When an animal comes into the office, the doctor examines h... | [{"input": "150 2476\n70 21 114 127 22 11 29 59 51 59 35 3 53 88 5 8 44 4 12 100 1 27 1 25 27 56 48 22 23 103 85 66 14 58 20 7 176 11 19 26 154 97 83 3 29 30 52 92 59 11 135 37 59 8 66 20 47 19 143 16 93 18 57 71 1 13 141 1 119 6 2 87 40 68 28 22 20 53 31 19 15 33 32 9 70 63 16 26 77 7 45 52 73 25 22 21 68 79 16 3 164 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 n segments on the coordinate axis Ox and the number k. The point is satisfied if it belongs to ... | [{"input": "10 1\n-260424665 -168566709\n299109864 663179811\n769984405 942516913\n-998905510 -707148023\n-167958021 60599275\n658861231 718845364\n79407402 279078536\n13652788 79756488\n-676213666 -339118351\n-349156760 -258185154\n", "output": "5\n-998905510 -707148023\n-676213666 -168566709\n-167958021 279078536\n29... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 a number of ways to shuffle a deck of cards. Riffle shuffle is one such example. The following is h... | [{"input": "17 1\n1\n28 4\n1 1 6 4", "output": "16\n19\n"}, {"input": "17 1\n1\n28 4\n1 2 6 4", "output": "16\n12\n"}, {"input": "6 1\n3\n18 4\n2 1 11 11", "output": "2\n13\n"}, {"input": "10 1\n3\n18 4\n2 2 12 4", "output": "4\n13\n"}, {"input": "16 1\n3\n11 4\n1 2 6 4", "output": "7\n10\n"}, {"input": "14 1\n2\n11 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\nThere is enough money available on ATM in nominal value 10, 20, 50, 100, 200 and 500 dollars.\n\nYou are give... | [{"input": "1250", "output": "[4]", "fn_name": "solve"}, {"input": "125", "output": "[-1]", "fn_name": "solve"}, {"input": "666", "output": "[-1]", "fn_name": "solve"}, {"input": "770", "output": "[4]", "fn_name": "solve"}, {"input": "550", "output": "[2]", "fn_name": "solve"}, {"input": "42", "output": "[-1]", "fn_nam... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMr. Bender has a digital table of size n Γ n, each cell can be switched on or off. He wants the field to have... | [{"input": "1000000000 999999938 999999936 384381709\n", "output": "27600\n"}, {"input": "1000000000 999999946 999999941 715189365\n", "output": "37707\n"}, {"input": "1000000000 999999916 999999940 857945620\n", "output": "41279\n"}, {"input": "1000000000 504951981 646612086 602763371\n", "output": "17360\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 an array $a$ consisting of $n$ integers. Let's denote monotonic renumeration of array $a$ as an... | [{"input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 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\nLuba has to do n chores today. i-th chore takes a_{i} units of time to complete. It is guaranteed that for ev... | [{"input": "100 1 99\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 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\nWe have a string s consisting of lowercase English letters. Snuke can perform the following operation repeate... | [{"input": "bxbax", "output": "-1\n"}, {"input": "xxabb", "output": "-1\n"}, {"input": "xyabb", "output": "-1\n"}, {"input": "bbayx", "output": "-1\n"}, {"input": "bb`yx", "output": "-1\n"}, {"input": "bb`xx", "output": "-1\n"}, {"input": "bc`xx", "output": "-1\n"}, {"input": "cc`xx", "output": "-1\n"}, {"input": "xx`c... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPolycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Polica... | [{"input": "1000 12\n", "output": "1\n"}, {"input": "1000 18\n", "output": "1\n"}, {"input": "1000 19\n", "output": "1\n"}, {"input": "1100 19\n", "output": "1\n"}, {"input": "1010 13\n", "output": "1\n"}, {"input": "1100 22\n", "output": "1\n"}, {"input": "0010 13\n", "output": "1\n"}, {"input": "1000 3\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\nA schoolboy named Vasya loves reading books on programming and mathematics. He has recently read an encyclope... | [{"input": "168\n0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 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\nChef has learned a new technique for comparing two recipes. A recipe contains a list of ingredients in increa... | [{"input": "3\nelax axle\nesidarap djapers\nalice bob", "output": "YES\nYES\nYES\n"}, {"input": "3\nelax ayle\nesidarap djapers\nalice bob", "output": "YES\nYES\nYES\n"}, {"input": "3\nelax ayle\nesidarap srepajd\nalice bob", "output": "YES\nYES\nYES\n"}, {"input": "3\nelax ayle\netidarap srepajd\nalice bob", "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 keyboard that consists of $26$ keys. The keys are arranged sequentially in one row in a certa... | [{"input": "5\nabcdefghijklmnopqrstuvwxyz\nnlleh\nabcxefghijklmnopqrstuvwdyz\ni\nabcdefghhjllmnzpqrstuvwxyo\ncodeforecs\nmnbvcxzlkjhefdsapoiuytrgwq\nqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\nqwertyuiopasdfghjklzxcvbnm\nabacaba\n", "output": "12\n0\n106\n18\n74\n"}, {"input": "5\nabcdefghijklmnopqrstuvwxyz\nhe... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThis is the hard version of the problem. The difference between versions is the constraints on $n$ and $a_i$.... | [{"input": "87 83\n40 6 7 50 16 65 47 90 94 65 79 29 41 76 80 13 87 37 92 71 54 53 93 79 14 53 71 78 50 50 74 40 30 92 66 86 94 60 37 65 82 14 61 48 68 71 91 99 74 88 89 34 57 74 25 2 79 72 92 37 61 16 32 85 29 74 6 69 50 74 76 48 31 42 40 95 29 27 28 31 38 60 52 45 14 78 59\n", "output": "75\n17 18 19 20 21 22 23 24 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\nGiven is a string S consisting of lowercase English letters. Find the maximum positive integer K that satisfi... | [{"input": "aaaccacabaababb", "output": "11\n"}, {"input": "abbccacabaababa", "output": "13\n"}, {"input": "abbccaaabaababc", "output": "12\n"}, {"input": "`abab`cbbba`c`b", "output": "14\n"}, {"input": "`_b`ab`_babcdba", "output": "15\n"}, {"input": "aabccacabaababb", "output": "11\n"}, {"input": "bbabaabacaccbaa", "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\nn hobbits are planning to spend the night at Frodo's house. Frodo has n beds standing in a row and m pillows ... | [{"input": "1000000000 1000000000 1000000000\n", "output": "1\n"}, {"input": "100000000 999834114 93836827\n", "output": "29998\n"}, {"input": "1000000000 1000000000 1000000000\n", "output": "1\n"}, {"input": "100000000 999834114 93836827\n", "output": "29998\n"}, {"input": "1000000000 1000000010 1000000000\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\nproblem\n\nJOI decided to make a signboard for the store.\n\nThere are N old signboards with letters written ... | [{"input": "4\nbar\nabracadabra\nbear\nbar\nbbraxbara", "output": "3\n"}, {"input": "4\nrab\nabracadabra\nbear\nbar\nbbraxbara", "output": "1\n"}, {"input": "4\nrab\nabracadabra\nbear\nbar\narabxarbb", "output": "2\n"}, {"input": "4\nqab\nabracadabra\nbear\nbar\narabxarbb", "output": "0\n"}, {"input": "4\nqab\nabracada... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 wise king declared a new calendar. \"Tomorrow shall be the first day of the calendar, that is, the day 1 of... | [{"input": "8\n-1 1 1\n344 4 0\n738 4 2\n182 9 5\n992 5 6\n344 5 26\n696 6 19\n231 8 25", "output": "196865\n128957\n51469\n160715\n1492\n128912\n59672\n151076\n"}, {"input": "8\n-1 1 1\n344 3 0\n738 4 2\n182 9 5\n998 5 7\n344 5 26\n696 6 19\n231 10 25", "output": "196865\n128977\n51469\n160715\n311\n128912\n59672\n151... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\n\nA city in Canada where JOI lives is divided into a grid pattern by w roads that extend straight in... | [{"input": "10 4\n13 70\n0 0", "output": "26\n55422\n"}, {"input": "10 4\n13 80\n0 0", "output": "26\n77629\n"}, {"input": "4 5\n13 34\n0 0", "output": "11\n61707\n"}, {"input": "8 4\n15 33\n0 0", "output": "20\n41241\n"}, {"input": "4 7\n12 40\n0 0", "output": "17\n43422\n"}, {"input": "6 5\n13 38\n0 0", "output": "26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAlexey, a merry Berland entrant, got sick of the gray reality and he zealously wants to go to university. The... | [{"input": "50\n69 6 6\n22 1 1\n23 3 3\n60 13 13\n13 3 3\n7 4 7\n6 1 1\n49 7 9\n68 8 8\n20 2 2\n34 1 1\n143 5 5\n22 1 1\n77 58 65\n10 3 3\n72 5 5\n47 1 1\n82 3 3\n92 8 8\n34 1 1\n42 9 10\n63 14 14\n10 3 3\n38 2 2\n80 6 6\n79 5 5\n53 5 5\n44 7 7\n85 2 2\n24 2 2\n57 3 3\n95 29 145\n77 6 6\n24 1 1\n33 4 4\n93 6 6\n55 22 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\nproblem\n\nAOR Ika is studying to pass the test.\n\nAOR Ika-chan solved the $ N $ question. After that, round... | [{"input": "3\nnxx", "output": "2\n"}, {"input": "3\nnwx", "output": "3\n"}, {"input": "3\nxxo", "output": "1\n"}, {"input": "3\nxwn", "output": "3\n"}, {"input": "3\nowx", "output": "3\n"}, {"input": "3\npxx", "output": "2\n"}, {"input": "3\npyx", "output": "3\n"}, {"input": "3\npzx", "output": "3\n"}, {"input": "3\np... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting c... | [{"input": "))())))))))())))))()()))()()))))())))))()))))))))))))(()))())(()))))(()))))())))((((()()))))()))()))\n", "output": "48\n"}, {"input": ")))()))()))))()((((())))()))))(()))))(())()))(()))))))))))))())))))()))))()()))()())))))())))))))())\n", "output": "48\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\nTomya is a girl. She loves Chef Ciel very much.\n\nTomya like a positive integer p, and now she wants to get ... | [{"input": "4\n10\n1012\n255\n4096", "output": "2\n7\n8\n2\n"}, {"input": "4\n12\n379\n297\n6095", "output": "2\n7\n4\n11\n"}, {"input": "4\n10\n376\n255\n4096", "output": "2\n5\n8\n2\n"}, {"input": "4\n10\n376\n255\n3088", "output": "2\n5\n8\n3\n"}, {"input": "4\n11\n376\n255\n3088", "output": "3\n5\n8\n3\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\nStudent Vladislav came to his programming exam completely unprepared as usual. He got a question about some s... | [{"input": "10 15\n900000007 1\n900000002 1\n900000004 0\n900000002 1\n900000006 1\n900000000 1\n900000006 1\n900000008 1\n900000002 0\n1419868175 0\n900000002 0\n900000005 0\n900000001 0\n900000000 1\n900000008 1\n", "output": "1 8\n1 4\n2 5\n1 5\n1 6\n1 2\n1 7\n1 9\n2 4\n4 5\n3 4\n3 5\n2 3\n1 3\n1 10\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\nFox Ciel is playing a card game with her friend Jiro.\n\nJiro has n cards, each one has two attributes: posit... | [{"input": "36 30\nATK 116\nATK 120\nATK 122\nATK 120\nATK 116\nATK 118\nATK 123\nDEF 2564\nATK 123\nDEF 1810\nATK 124\nATK 120\nDEF 2598\nATK 119\nDEF 2103\nATK 123\nATK 118\nATK 118\nATK 123\nDEF 1988\nATK 122\nATK 120\nDEF 2494\nATK 122\nATK 124\nATK 117\nATK 121\nATK 118\nATK 117\nATK 122\nATK 119\nATK 122\nDEF 248... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMad scientist Mike is building a time machine in his spare time. To finish the work, he needs a resistor with... | [{"input": "999999999999999999 1000000000000000000\n", "output": "1000000000000000000\n"}, {"input": "999999999999999991 1000000000000000000\n", "output": "111111111111111120\n"}, {"input": "999999999999999993 999999999999999991\n", "output": "499999999999999998\n"}, {"input": "999999999999999999 1010000000000000000\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 frog staying to the left of the string $s = s_1 s_2 \\ldots s_n$ consisting of $n$ characters (to ... | [{"input": "6\nLRLRRLL\nL\nLLR\nRRRR\nLLLLLL\nR\n", "output": "3\n2\n3\n1\n7\n1\n"}, {"input": "6\nRRLRLLL\nL\nLLR\nRRRR\nLLLLLL\nR\n", "output": "4\n2\n3\n1\n7\n1\n"}, {"input": "6\nMRLRRLL\nL\nLLR\nRRRR\nLLLLLL\nR\n", "output": "3\n2\n3\n1\n7\n1\n"}, {"input": "6\nLLLRLRR\nL\nLRL\nRRRR\nLLLLLL\nR\n", "output": "4\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\nSnuke is making sugar water in a beaker.\nInitially, the beaker is empty. Snuke can perform the following fou... | [{"input": "17 19 22 26 55 2802\n", "output": "2634 934\n"}, {"input": "28 29 22 26 55 4180", "output": "4180 1380\n"}, {"input": "41 29 22 26 55 4180", "output": "4180 1280\n"}, {"input": "17 19 22 26 55 3359", "output": "2944 1044\n"}, {"input": "26 19 22 26 55 2802", "output": "2802 902\n"}, {"input": "26 29 22 26 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form... | [{"input": "6\n3\n175\n101\n1057\n17888\n11057064", "output": "0\n43\n24\n262\n4469\n2764261\n"}, {"input": "6\n3\n175\n111\n1057\n17888\n11057064", "output": "0\n43\n26\n262\n4469\n2764261\n"}, {"input": "6\n1\n60\n100\n1526\n23456\n17396335", "output": "0\n14\n24\n380\n5861\n4349078\n"}, {"input": "6\n3\n117\n111\n97... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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ΠΠ°ΠΊ ΠΈΠ·Π²Π΅ΡΡΠ½ΠΎ, Π² ΡΠ΅ΠΏΠ»ΡΡ ΠΏΠΎΠ³ΠΎΠ΄Ρ ΠΌΠ½ΠΎΠ³ΠΈΠ΅ ΠΆΠΈΡΠ΅Π»ΠΈ ΠΊΡΡΠΏΠ½ΡΡ
Π³ΠΎΡΠΎΠ΄ΠΎΠ² ΠΏΠΎΠ»ΡΠ·ΡΡΡΡΡ ΡΠ΅ΡΠ²ΠΈΡΠ°ΠΌΠΈ Π³ΠΎΡΠΎΠ΄ΡΠΊΠΎΠ³ΠΎ Π²Π΅Π»ΠΎΠΏΡΠΎΠΊΠ°ΡΠ°. ΠΠΎΡ ... | [{"input": "50 15001\n1269 1580 5431 5916 6642 14145 15760 19922 20589 22062 24138 33454 33505 35916 37012 42577 43140 49457 54720 55188 56205 56639 56870 57997 58379 59088 59297 61805 61861 63005 64013 68848 71182 71497 72715 73008 75616 76042 76614 80690 83089 85033 86408 92392 92763 93833 95085 95815 97152 99379\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\nGiven are strings s and t of length N each, both consisting of lowercase English letters.\nLet us form a new ... | [{"input": "100\naernvaoeiuraxmueiwovioxmuaioervuaionuxiaomuahlhakaqduwbuvpgrrgreiufwuiaubewobsjdhfbajkslfhjcaklyuwee aibfaeqpwidbcuoifnydukfbavysknxyualdyksayfkjdafqiryekucyuwepaasfdasdfiocaudmiovuandksfucnaldsfumioxa\n", "output": "aaeirbnfvaaeoqepiwuirdabxcmuuoeiifwnoyvdiuokxfmbuaaviyosekrnvxuyauiaolnduyxkisaaoymfuk... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese and Russian as well. \n\nGiven n words w[1..n], which originate ... | [{"input": "1\n4\ngrace gracefuk disgraceful gracefully", "output": "grace\n"}, {"input": "1\n4\ngrace graceful disgraceful gracefully", "output": "grace\n"}, {"input": "1\n4\ngrace graceful disgraceful gracefully", "output": "grace"}, {"input": "1\n4\ngracd gracefuk disgraceful gracefully", "output": "grac\n"}, {"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\nThis is the hard version of the problem. The difference is the constraint on the sum of lengths of strings an... | [{"input": "10\nu\nxqpczgnzazxyrvx\ncfjgfhxmzqmjgzzjthziuomldylspyfuxvjlgdc\nooydbldio\nyvaamavy\nrzjjebcgotjffuzr\nhtfkwvihzuwxczopzqujdnaorgxibjfcmlzntskawxhyoymwynitukttewfpajuph\nfactnjajntcaf\nywowyovhrgradhtrqkgurkjpudnrrqhmmwiaqicfxnoyejdsmmurusdzqgjjntocryhqsgr\nqq\n", "output": "u\nxqx\ncfc\nooo\nyvaaavy\nrzjj... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 a dynamic array $A = \\\\{a_0, a_1, ...\\\\}$ of integers, perform a sequence of the following operations... | [{"input": "11\n0 1 0\n0 0 2\n0 1 3\n1 1\n1 1\n1 0\n2 -1\n1 1\n0 1 4\n1 0\n1 0", "output": "0\n0\n2\n0\n2\n2\n"}, {"input": "11\n0 1 1\n0 0 2\n0 1 3\n1 1\n1 1\n1 0\n2 0\n1 1\n0 0 4\n1 0\n1 0", "output": "1\n1\n2\n3\n4\n4\n"}, {"input": "11\n0 0 1\n0 0 3\n0 1 3\n1 0\n1 1\n1 0\n2 0\n1 1\n0 0 4\n1 0\n1 1", "output": "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\nThere is a sequence of length N: a = (a_1, a_2, ..., a_N). Here, each a_i is a non-negative integer.\n\nSnuke... | [{"input": "4\n-1 0 3 -1\n2 -1 1 4", "output": "-1\n"}, {"input": "4\n-1 2 5 -1\n2 0 0 4", "output": "-1\n"}, {"input": "4\n-1 2 5 -1\n2 0 1 4", "output": "-1\n"}, {"input": "4\n-1 2 7 -1\n2 0 1 4", "output": "-1\n"}, {"input": "4\n-1 3 2 0\n2 -1 1 4", "output": "-1\n"}, {"input": "4\n-1 3 3 0\n2 -1 1 4", "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\nImplement a function/class, which should return an integer if the input string is in one of the formats speci... | [{"input": "\"0xDEADbeef\"", "output": "[3735928559]", "fn_name": "to_integer"}, {"input": "\"0B1010\"", "output": "[null]", "fn_name": "to_integer"}, {"input": "\"-0x123\"", "output": "[-291]", "fn_name": "to_integer"}, {"input": "\"-0b1010\"", "output": "[-10]", "fn_name": "to_integer"}, {"input": "\"-0o123\"", "outp... | 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 kata, you'll be given an integer of range `0 <= x <= 99` and have to return that number spelt out in ... | [{"input": "23", "output": "[\"twenty three\"]", "fn_name": "name_that_number"}, {"input": "99", "output": "[\"ninety nine\"]", "fn_name": "name_that_number"}, {"input": "53", "output": "[\"fifty three\"]", "fn_name": "name_that_number"}, {"input": "76", "output": "[\"seventy six\"]", "fn_name": "name_that_number"}, {"... | 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 your Birthday. Your colleagues buy you a cake. The numbers of candles on the cake is provided (x). Pleas... | [{"input": "871\n\"gnlyvknjga\"", "output": "[\"That was close!\"]", "fn_name": "cake"}, {"input": "900\n\"abcdef\"", "output": "[\"That was close!\"]", "fn_name": "cake"}, {"input": "583\n\"slhacx\"", "output": "[\"That was close!\"]", "fn_name": "cake"}, {"input": "0\n\"jpipe\"", "output": "[\"That was close!\"]", "f... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a matrix A of size x Γ y filled with integers. For every $i \\in [ 1 . . x ]$, $j \\in [ 1 . . y ]$ ... | [{"input": "10\n999999999 999999998 999999997 999999996 999999995 999999994 999999993 999999992 999999991 62465930\n", "output": "YES\n1000000000 937534061"}, {"input": "10\n999999999 999999998 999999997 999999996 999999995 999999994 999999993 999999992 999999991 999999990\n", "output": "YES\n1000000000 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\nYou are given N real values A_1, A_2, \\ldots, A_N. Compute the number of pairs of indices (i, j) such that i... | [{"input": "11\n0.9\n1\n1\n1.25\n2.7527267588296525\n5\n70\n0.000000001\n9999.999999999\n0.999999999\n1.7676771981771382", "output": "7\n"}, {"input": "11\n0.9\n1\n1\n1.25\n2.30000\n5\n70\n0.000000001\n9999.999999999\n0.999999999\n1.7676771981771382", "output": "8\n"}, {"input": "5\n14.596573229675469\n11.6891813242635... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 trapezoid. The lengths of its upper base, lower base, and height are a, b, and h, respectivel... | [{"input": "3\n1\n-135", "output": "-270\n"}, {"input": "3\n2\n-135", "output": "-338\n"}, {"input": "3\n10\n-65", "output": "-423\n"}, {"input": "3\n5\n-103", "output": "-412\n"}, {"input": "3\n5\n-107", "output": "-428\n"}, {"input": "3\n5\n-168", "output": "-672\n"}, {"input": "3\n1\n-168", "output": "-336\n"}, {"in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCounting sort can be used for sorting elements in an array which each of the n input elements is an integer i... | [{"input": "7\n4 11 2 3 4 3 1", "output": "1 2 3 3 4 4 11\n"}, {"input": "7\n8 9 2 0 12 3 3", "output": "0 2 3 3 8 9 12\n"}, {"input": "7\n10 9 3 0 6 3 3", "output": "0 3 3 3 6 9 10\n"}, {"input": "7\n6 5 3 0 12 3 3", "output": "0 3 3 3 5 6 12\n"}, {"input": "7\n4 11 2 3 4 6 1", "output": "1 2 3 4 4 6 11\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 have a string S consisting of N uppercase English letters. You are allowed to perform at most one operati... | [{"input": "2\n4\nDCBA\n7\nXYZZYZY", "output": "ADCB\nXYYZZYZ\n"}, {"input": "2\n4\nDCBA\n7\nXZZZYZZ", "output": "ADCB\nXYZZZZZ\n"}, {"input": "2\n4\nABCD\n7\nXYZZYZY", "output": "ABCD\nXYYZZYZ\n"}, {"input": "2\n4\nCBAD\n7\nXYZZYZY", "output": "ACBD\nXYYZZYZ\n"}, {"input": "2\n4\nCBAD\n7\nYZYZZYX", "output": "ACBD\nXY... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 Women's Day is coming soon! Polycarp is preparing for the holiday.\n\nThere are $n$ candy boxes... | [{"input": "8 2\n1 2 2 3 2 4 6 10\n", "output": "8\n"}, {"input": "8 2\n2 2 2 2 2 4 6 10\n", "output": "8\n"}, {"input": "8 2\n1 2 2 2 2 4 6 10\n", "output": "6\n"}, {"input": "8 2\n2 2 2 2 2 4 7 10\n", "output": "6\n"}, {"input": "8 2\n1 2 2 3 3 4 6 10\n", "output": "6\n"}, {"input": "8 2\n1 4 2 2 2 4 6 10\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\nProblem\n\nGiven the strings $ s $, $ t $.\nFirst, let the string set $ A = $ {$ s $}, $ B = \\ phi $.\nAt th... | [{"input": "abaabbabaab`abbabbabaabbab\nab", "output": "2\n"}, {"input": "abaabbbbaab`abbabbabaabaab\nab", "output": "2\n"}, {"input": "abaabbbbaab`abbabbabaabaab\n`b", "output": "1\n"}, {"input": "abaabbbbaaa`abbabbabbabaab\n`b", "output": "1\n"}, {"input": "abaabbbaaab`abbabbabbabaab\n`b", "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\nYou've gotten an n Γ m sheet of squared paper. Some of its squares are painted. Let's mark the set of all pai... | [{"input": "20 20\n.....######.........\n.....#....#.........\n.....#....#.........\n.....#....#.........\n.....############...\n.........##.....#...\n..........#.....#...\n..........#.....#...\n..........###...#...\n............#...#...\n............#...#...\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\nThere are $n$ persons who initially don't know each other. On each morning, two of them, who were not friends... | [{"input": "16 20 2\n10 4\n5 3\n10 5\n12 7\n7 6\n9 12\n9 6\n1 10\n11 16\n11 1\n16 3\n10 2\n14 4\n15 14\n4 13\n13 15\n1 8\n7 15\n1 7\n8 15\n", "output": "0\n0\n0\n0\n0\n0\n4\n4\n4\n4\n10\n10\n10\n10\n10\n14\n14\n14\n14\n15\n"}, {"input": "16 20 2\n10 4\n5 3\n10 5\n12 7\n7 6\n9 12\n9 6\n1 10\n11 16\n11 1\n16 3\n10 3\n14 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTwo people are playing a game with a string $s$, consisting of lowercase latin letters. \n\nOn a player's tur... | [{"input": "pogfjssywv\n", "output": "Yes\n"}, {"input": "axxxxbbaaa\n", "output": "Yes\n"}, {"input": "axxxxbbaaa\n", "output": "Yes\n"}, {"input": "pogfjssywv\n", "output": "Yes\n"}, {"input": "aaabbxxxxa\n", "output": "Yes\n"}, {"input": "pogfjssywu\n", "output": "Yes\n"}, {"input": "axabbxaxxa\n", "output": "Yes\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWhen Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes ... | [{"input": "100 100\n75 92 18 7 81 67 7 92 100 65 57 32 50 131 85 31 80 91 84 63 39 52 92 81 1 98 24 12 84 48 17 86 51 72 48 95 81 50 12 66 19 79 49 89 34 1 193 75 20 33 96 27 42 23 133 71 93 1 85 19 66 14 13 13 20 39 36 33 42 61 56 64 23 91 37 99 40 74 13 18 98 85 74 39 62 84 46 74 50 23 38 11 83 14 9 25 66 100 25 52\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOm Nom is the main character of a game \"Cut the Rope\". He is a bright little monster who likes visiting fri... | [{"input": "6\n87 62 58 32 81 92 12 50 23 27 38 39 64 74 16 35 84 59 91 87 14 48 90 47 44 95 64 45 31 11 67 5 80 60 36 15 91 3 21 2 40 24 37 69 5 50 23 37 49 19 68 21 49 9 100 94 45 41 22 31 31 48 25 70 25 25 95 88 82 1 37 53 49 31 57 74 94 45 55 93 43 37 13 85 59 72 15 68 3 90 96 55 100 64 63 69 43 33 66 84 57 97 87 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\nVlad enjoys listening to music. He lives in Sam's Town. A few days ago he had a birthday, so his parents gave... | [{"input": "3\n4\n-1 16 14 1\n2\n5\n1 4 0 17 8\n3\n5\n-1 1 -1 18 4 \n0", "output": "4\n1\n4\n"}, {"input": "3\n4\n0 4 5 2\n-1\n5\n1 1 5 11 4\n-1\n5\n1 2 3 9 -1 \n2", "output": "4\n5\n3\n"}, {"input": "3\n4\n1 3 11 2\n2\n5\n1 2 -1 6 4\n-1\n5\n1 2 0 9 4 \n2", "output": "3\n5\n3\n"}, {"input": "3\n4\n1 3 4 2\n-1\n5\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\nOne day n cells of some array decided to play the following game. Initially each cell contains a number which... | [{"input": "82\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 59 17 18 19 20 21 22 23 24 25 26 27 28 29 61 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 16 60 30 79 63 64 65 66 67 68 69 70 71 72 73 74 75 76 82 78 62 80 81 77\n8 79 66 53 45 15 70 17 53 28 30 70 14 49 51 43 45 14 27 30 37 51 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 three sticks with positive integer lengths of a, b, and c centimeters. You can increase length ... | [{"input": "300000 300000 300000 300000\n", "output": "4500090000549998\n"}, {"input": "300000 300000 300000 300000\n", "output": "4500090000549998\n"}, {"input": "300000 300000 300000 300000\n", "output": "4500090000549998\n"}, {"input": "300000 300000 433625 300000\n", "output": "4400668305451891\n"}, {"input": "5355... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 three words s_1, s_2 and s_3, each composed of lowercase English letters, with spaces in betwee... | [{"input": "atcoder beginner contest\n", "output": "ABC\n"}, {"input": "resident register number\n", "output": "RRN\n"}, {"input": "resident retsiger number", "output": "RRN\n"}, {"input": "atcoder beginner contdst", "output": "ABC\n"}, {"input": "resident setsiger nuebmr", "output": "RSN\n"}, {"input": "resident setsi... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 came up with another splendid problem for the ABBYY Cup participants! This time t... | [{"input": "24000\nN.Y. BANK DISCOUNT BORROWINGS 169 MLN DLRS\nNEW YORK, April 9 - The eight major New York City banks had\ndaily average borrowings of 169 mln dlrs from the Federal\nReserve in the week ended April 8, a Fed spokesman said.\nA Fed spokesman said that all of the borrowings were made\nyesterday by fewer 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\nHow to make a cake you'll never eat.\n\nIngredients. \n\n * 2 carrots\n * 0 calories\n * 100 g chocolate s... | [{"input": "100 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1010 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFurik loves math lessons very much, so he doesn't attend them, unlike Rubik. But now Furik wants to get a goo... | [{"input": "12\n3 1 2 3 2 0 2 2 3 0 2 1\n", "output": "333222221100\n"}, {"input": "12\n3 1 2 3 2 0 2 2 2 0 2 3\n", "output": "33322222200\n"}, {"input": "12\n3 1 2 3 2 0 2 2 3 0 2 3\n", "output": "33332222100\n"}, {"input": "12\n0 1 4 4 2 1 7 7 1 2 5 1\n", "output": "77544211110\n"}, {"input": "12\n3 1 4 3 2 0 2 2 3 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n## Description\nYour job is to create a simple password validation function, as seen on many websites. \n\nTh... | [{"input": "\"AbcdefGhijKlmnopQRsTuvwxyZ1234567890\"", "output": "[true]", "fn_name": "password"}, {"input": "\"Ab1!@#$%^&*()-_+={}[]|\\\\:;?/>.<,\"", "output": "[true]", "fn_name": "password"}, {"input": "\"!@#$%^&*()-_+={}[]|\\\\:;?/>.<,\"", "output": "[false]", "fn_name": "password"}, {"input": "\"abcd1234\"", "outp... | code_functional |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.