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\nBizon the Champion isn't just a bison. He also is a favorite of the \"Bizons\" team.\n\nAt a competition the ... | [{"input": "itwtyhhsdjjffmmoqkkhxjouypznewstyorotxhozlytndehmaxogrohccnqcgkrjrdmnuaogiwmnmsbdaizqkxnkqxxiihbwepc\nsnixfywvcntitcefsgqxjcodwtumurcglfmnamnowzbjzmfzspbfuldraiepeeiyasmrsneekydsbvazoqszyjxkjiotushsddet\n", "output": "need tree\n"}, {"input": "yyyyxxxxyxyyxxxyxxyxxxyyxxxxxyyxxxyxxyxxyyyxxxyxxxyxyxyyxyyxyxxy... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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: IP Address (Internet Protocol Address)\n\nproblem\n\nSince one number string is given, find the number of ... | [{"input": "243960381", "output": "0\n"}, {"input": "268287680", "output": "0\n"}, {"input": "108144550", "output": "3\n"}, {"input": "143647862", "output": "1\n"}, {"input": "120906486", "output": "1\n"}, {"input": "270129441", "output": "0\n"}, {"input": "17566177", "output": "8\n"}, {"input": "1544196", "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\nKyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are labeled ... | [{"input": "47\n20\n21\n16\n18\n24\n20\n25\n13\n20\n22\n26\n24\n17\n18\n21\n22\n21\n23\n17\n15\n24\n19\n18\n21\n20\n19\n26\n25\n20\n17\n17\n17\n26\n32\n20\n21\n25\n28\n24\n21\n21\n17\n28\n20\n20\n31\n19\n", "output": "295545118\n"}, {"input": "47\n20\n21\n16\n18\n24\n20\n25\n13\n20\n22\n26\n24\n17\n18\n21\n22\n21\n23\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\nTaro's Shopping\n\nMammy decided to give Taro his first shopping experience. Mammy tells him to choose any tw... | [{"input": "3 13\n17 20 30\n6 7\n1 2 5 1 4 11\n7 000\n22 34 102 94 59 39 61\n4 100\n133 98 100 50\n4 5\n10 5 10 13\n0 0", "output": "NONE\n7\nNONE\nNONE\nNONE\n"}, {"input": "3 48\n17 20 30\n6 1\n1 2 5 1 4 11\n7 000\n22 34 102 94 59 39 70\n4 100\n80 70 119 50\n4 20\n10 5 10 16\n0 0", "output": "47\nNONE\nNONE\nNONE\n20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne day Vasya went out for a walk in the yard but there weren't any of his friends outside and he had no one ... | [{"input": "1000 2000\n226 566\n20\n0 -100\n-100 100\n100 0\n42 0\n-100 -79\n-66 -16\n0 -7\n-1 0\n0 100\n100 91\n99 0\n1 0\n-100 0\n70 -100\n-100 100\n100 1\n66 0\n-100 1\n-47 -100\n-42 0\n", "output": "708\n"}, {"input": "1010 2000\n226 566\n20\n0 -100\n-100 100\n100 0\n42 0\n-100 -79\n-66 -16\n0 -7\n-1 0\n0 100\n100 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 got an array consisting of $n$ integers, and two integers $k$ and $len$ in addition. All numbers in... | [{"input": "10 42 7\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "645711643\n"}, {"input": "10 42 7\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "645711643\n"}, {"input": "10 32 7\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "61884984"}, {"input": "10 32 1\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "0"}, {"input": "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\n# Bubblesort Algorithm\n\n## Overview\n\nThe Bubblesort Algorithm is one of many algorithms used to sort a li... | [{"input": "[6, 3, 4, 15, 14, 9, 1, 2, 7, 8, 5, 14, 11, 15, 17, 19]", "output": "[[3, 4, 6, 14, 9, 1, 2, 7, 8, 5, 14, 11, 15, 15, 17, 19]]", "fn_name": "bubblesort_once"}, {"input": "[9, 7, 5, 3, 1, 2, 4, 6, 8]", "output": "[[7, 5, 3, 1, 2, 4, 6, 8, 9]]", "fn_name": "bubblesort_once"}, {"input": "[6, 3, 4, 9, 1, 2, 7, ... | 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\nFind the convex hull of a given set of points P. In other words, find the smallest convex polygon containing ... | [{"input": "7\n4 0\n0 -1\n1 2\n2 -2\n4 2\n0 0\n2 3", "output": "7\n2 -2\n4 0\n4 2\n2 3\n1 2\n0 0\n0 -1\n"}, {"input": "7\n4 0\n0 -1\n1 2\n2 -2\n7 2\n-1 0\n2 3", "output": "6\n2 -2\n7 2\n2 3\n1 2\n-1 0\n0 -1\n"}, {"input": "7\n4 1\n0 -1\n1 2\n2 -2\n4 2\n-1 3\n2 3", "output": "6\n2 -2\n4 1\n4 2\n2 3\n-1 3\n0 -1\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\nThe ICPC committee would like to have its meeting as soon as possible to address every little issue of the ne... | [{"input": "3 2\n2 1 2\n-1\n3 3 8 8\n3 2\n4 1 5 0 9\n3 2 5 9\n5 2 4 5 7 12\n3 3\n0 1 4\n3 2 5 9\n2 2 4\n3 3\n2 1 1\n3 1 2 9\n2 2 4\n0 0", "output": "8\n5\n0\n1\n"}, {"input": "3 2\n2 1 2\n-1\n3 3 8 8\n3 2\n4 1 5 0 9\n3 2 5 9\n5 2 4 5 7 12\n3 3\n0 1 4\n3 2 5 9\n2 2 4\n3 3\n2 2 1\n3 1 2 9\n2 2 4\n0 0", "output": "8\n5\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\nDivide and rule\n\nTaro, Hanako, and Jiro rule the JAG Kingdom together. There are N cities in the JAG Kingdo... | [{"input": "6 7\n1 2\n1 4\n2 3\n2 5\n3 4\n4 5\n4 6\n2 1\n1 2\n3 3\n1 2\n2 3\n2 3\n4 3\n1 2\n2 3\n3 4\n5 4\n1 2\n2 3\n3 4\n4 5\n0 0", "output": "2\n1\n2\n0\n1\n1\n1\n1\n1\n1\n"}, {"input": "6 7\n1 2\n1 4\n2 3\n2 6\n3 4\n4 5\n4 6\n2 1\n1 2\n3 3\n1 2\n2 3\n2 3\n4 3\n1 2\n2 3\n3 4\n5 4\n1 2\n2 3\n3 4\n4 5\n0 0", "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\nLetβs play a stone removing game.\n\nInitially, n stones are arranged on a circle and numbered 1, ... , n clo... | [{"input": "12 2 3\n100 15522 98\n10000 10000 10000\n0 0 0", "output": "10\n89\n2019\n"}, {"input": "12 2 3\n100 15914 98\n10000 10000 10000\n0 0 0", "output": "10\n16\n2019\n"}, {"input": "12 2 3\n100 15914 98\n10001 10000 10000\n0 0 0", "output": "10\n16\n2018\n"}, {"input": "12 2 3\n100 15914 12\n10001 10000 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\nThe country of Byalechinsk is running elections involving n candidates. The country consists of m cities. We ... | [{"input": "100 1\n439 158 619 538 187 153 973 781 610 475 94 1829 449 531 220 51 788 118 189 501 54 434 465 902 280 635 688 214 737 327 682 690 683 519 261 923 254 388 529 659 662 276 376 735 976 664 521 285 42 147 187 259 407 977 879 465 522 17 550 701 114 921 577 265 668 812 232 267 135 371 426 228 608 373 771 358 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\nLet's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c.... | [{"input": "100 100 100\n", "output": "51103588\n"}, {"input": "100 100 100\n", "output": "51103588"}, {"input": "98 34 100\n", "output": "13589991\n"}, {"input": "90 82 100\n", "output": "35482866\n"}, {"input": "67 90 100\n", "output": "27880104\n"}, {"input": "98 34 100\n", "output": "13589991\n"}, {"input": "41 82 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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$ products in the shop. The price of the $i$-th product is $a_i$. The owner of the shop wants to ... | [{"input": "5\n8 19551489\n31131899 17585660 3913937 14521321 9846714 96097161 115568124 35051437\n1 93900441\n15578410\n7 19560555\n124492495 53703939 20259503 99698023 98868060 83313210 5487534\n6 72321938\n59271765 72426489 16625497 51598082 31475864 20946400\n7 44965081\n49955408 62397026 39981552 92586939 6608008 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAndrew was very excited to participate in Olympiad of Metropolises. Days flew by quickly, and Andrew is alrea... | [{"input": "100000000\n30\n30\n", "output": "10\n"}, {"input": "100000000\n30\n30\n", "output": "10\n"}, {"input": "100000000\n60\n30\n", "output": "10\n"}, {"input": "100000000\n31\n33\n", "output": "0\n"}, {"input": "23456789\n66\n100\n", "output": "1\n"}, {"input": "99999999\n90\n100\n", "output": "9\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\nDZY loves collecting special strings which only contain lowercase letters. For each lowercase letter c DZY kn... | [{"input": "pplkqmluhfympkjfjnfdkwrkpumgdmbkfbbldpepicbbmdgafttpopzdxsevlqbtywzkoxyviglbbxsohycbdqksrhlumsldiwzjmednbkcjishkiekfrchzuztkcxnvuykhuenqojrmzaxlaoxnljnvqgnabtmcftisaazzgbmubmpsorygyusmeonrhrgphnfhlaxrvyhuxsnnezjxmdoklpquzpvjbxgbywppmegzxknhfzyygrmejleesoqfwheulmqhonqaukyuejtwxskjldplripyihbfpookxkuehiwqthbf... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 the sum and gcd of two numbers, return those two numbers in ascending order. If the numbers do not exis... | [{"input": "1000\n5", "output": "[[5, 995]]", "fn_name": "solve"}, {"input": "50\n10", "output": "[[10, 40]]", "fn_name": "solve"}, {"input": "100\n5", "output": "[[5, 95]]", "fn_name": "solve"}, {"input": "12\n4", "output": "[[4, 8]]", "fn_name": "solve"}, {"input": "10\n5", "output": "[[5, 5]]", "fn_name": "solve"}, ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nLeha is playing a very inte... | [{"input": "1\n16 -10", "output": "-326\n"}, {"input": "1\n32 -10", "output": "-662\n"}, {"input": "1\n23 -10", "output": "-473\n"}, {"input": "1\n23 -20", "output": "-923\n"}, {"input": "1\n17 -20", "output": "-677\n"}, {"input": "1\n17 -12", "output": "-413\n"}, {"input": "1\n17 -10", "output": "-347\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\nThe Fibonacci numbers are the numbers in the following integer sequence (Fn):\n>0, 1, 1, 2, 3, 5, 8, 13, 21, ... | [{"input": "203023208030065646654504166904697594722576", "output": "[[573147844013817084101, 927372692193078999176, false]]", "fn_name": "productFib"}, {"input": "203023208030065646654504166904697594722575", "output": "[[354224848179261915075, 573147844013817084101, true]]", "fn_name": "productFib"}, {"input": "2563195... | 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\nYou have recently fallen through a hole and, after several hours of unconsciousness, have realized you are in... | [{"input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nhdgra 7\nakm 12\nrakm 5\na 15\n3\n", "output": "52\n"}, {"input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nargdh 7\nakm 12\nrakm 5\na 15\n3\n", "output": "52\n"}, {"input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nargdh 7\nakm 12\nrakm 5\na 15\n6\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLong is a huge fan of CFC (Codeforces Fried Chicken). But the price of CFC is increasing, so he decides to br... | [{"input": "4\n3 5 3\n..R..\n...R.\n....R\n6 4 12\nR..R\nR..R\nRRRR\nRRRR\nR..R\nR..R\n5 5 4\nRRR..\nR.R..\nRRR..\nR..R.\nR.R..\n2 31 62\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n", "output": "aaabb\ncccbb\nccccc\naaaa\nbbbb\nccdd\nhgfe\nijjj\nlllk\naaabb\nbbbbb\nbcccc\ndddcc\nddddd\nabcdefghij... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\n You're standing at the top left corner of an `n Γ m` grid and facing towards the `right`. \n \n Then... | [{"input": "100\n100", "output": "[\"L\"]", "fn_name": "direction_in_grid"}, {"input": "1\n1", "output": "[\"R\"]", "fn_name": "direction_in_grid"}, {"input": "2\n2", "output": "[\"L\"]", "fn_name": "direction_in_grid"}, {"input": "2\n3", "output": "[\"L\"]", "fn_name": "direction_in_grid"}, {"input": "2\n4", "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\nYour job is to create a calculator which evaluates expressions in [Reverse Polish notation](http://en.wikiped... | [{"input": "\"5 1 2 + 4 * + 3 -\"", "output": "[14]", "fn_name": "calc"}, {"input": "\"10000 123 +\"", "output": "[10123]", "fn_name": "calc"}, {"input": "\"1 3 -\"", "output": "[-2]", "fn_name": "calc"}, {"input": "\"3.5\"", "output": "[3.5]", "fn_name": "calc"}, {"input": "\"1 3 +\"", "output": "[4]", "fn_name": "cal... | 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\nYou are given $n$ integer numbers $a_1, a_2, \\dots, a_n$. Consider graph on $n$ nodes, in which nodes $i$, $... | [{"input": "150\n0 0 0 0 0 0 0 2537672836907008 0 0 0 0 0 0 16384 0 0 0 0 34360787232 0 0 70871155232 0 0 0 0 0 0 0 0 0 0 0 2256197860262016 0 0 0 0 0 0 0 0 0 0 536872961 0 0 0 0 0 0 0 0 0 0 33619968 0 0 0 0 0 0 0 0 0 0 0 0 37189881297899520 0 18031990695526400 0 0 1099511627776 0 0 0 0 0 0 0 0 2097152 0 0 0 134217984 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nAs hex values can include letters `A` through to `F`, certain English words can be spelled o... | [{"input": "\"DO YOU SEE THAT BEE DRINKING DECAF COFFEE\"", "output": "[13565769]", "fn_name": "hex_word_sum"}, {"input": "\"ASSESS ANY BAD CODE AND TRY AGAIN\"", "output": "[10889952]", "fn_name": "hex_word_sum"}, {"input": "\"DEFACE\"", "output": "[14613198]", "fn_name": "hex_word_sum"}, {"input": "\"SAFE\"", "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\nWe define a spanning tree of a graph to be a BFS tree rooted at vertex s if and only if for every node t the ... | [{"input": "8 9\n1 2\n1 3\n1 4\n2 7\n3 5\n3 6\n4 8\n2 3\n3 4\n", "output": "\n1 0 0 0 0 0 0 0\n0 2 0 0 0 0 2 0\n0 0 1 0 1 1 0 0\n0 0 0 2 0 0 0 2\n0 0 1 0 1 1 0 0\n0 0 1 0 1 1 0 0\n0 2 0 0 0 0 2 0\n0 0 0 2 0 0 0 2\n"}, {"input": "8 9\n1 2\n1 3\n2 4\n2 7\n3 5\n3 6\n4 8\n2 3\n3 4\n", "output": "2 0 0 0 0 0 0 0\n0 1 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\nA 3Γ3 grid with a integer written in each square, is called a magic square if and only if the integers in eac... | [{"input": "8\n-28\n1", "output": "8 -28 23\n16 1 -14\n-21 30 -6\n"}, {"input": "8\n-22\n4", "output": "8 -22 26\n22 4 -14\n-18 30 0\n"}, {"input": "8\n-28\n4", "output": "8 -28 32\n28 4 -20\n-24 36 0\n"}, {"input": "8\n-1\n10", "output": "8 -1 23\n25 10 -5\n-3 21 12\n"}, {"input": "1\n0\n13", "output": "1 0 38\n50 13 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya plays the sleuth with his friends. The rules of the game are as follows: those who play for the first t... | [{"input": "ARIWmwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiyjBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\n", "output": "YES\n"}, {"input": "ARIWmwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiykBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\n", "output": "YES\n"}, {"input": "KLLsZYGUIOFuXNdYPneszWtDzUPGAttCOxjF... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 educational program (AHK Education) of the Aiz Broadcasting Association broadcasts a handicraft program f... | [{"input": "-1 -2 1 11", "output": "no\n"}, {"input": "-1 -2 1 19", "output": "no\n"}, {"input": "-2 -2 1 1", "output": "yes\n"}, {"input": "-1 4 4 10", "output": "no\n"}, {"input": "-1 1 4 10", "output": "no\n"}, {"input": "-2 1 4 10", "output": "no\n"}, {"input": "-2 1 8 10", "output": "no\n"}, {"input": "0 -1 0 11",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou play your favourite game yet another time. You chose the character you didn't play before. It has $str$ p... | [{"input": "5\n1 1 100000000\n100000000 100000000 100000000\n100000000 1 100000000\n1 100000000 100000000\n100000000 100000000 1\n", "output": "50000000\n50000000\n100000000\n1\n1\n"}, {"input": "5\n1 1 100000000\n100000000 100000000 100000000\n100000000 1 100000000\n1 100000000 100000000\n100000000 100000000 1\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEach evening after the dinner the SIS's students gather together to play the game of Sport Mafia. \n\nFor the... | [{"input": "1000000000 846040702\n", "output": "999939239\n"}, {"input": "1000000000 315152540\n", "output": "999948715\n"}, {"input": "1000000000 315152540\n", "output": "999948715"}, {"input": "1000000000 846040702\n", "output": "999939239"}, {"input": "999999998 434363581\n", "output": "999946439\n"}, {"input": "999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCan the greatest common divisor and bitwise operations have anything in common? It is time to answer this que... | [{"input": "9\n30\n11\n12\n122\n136\n92\n1984716\n217\n14628115\n", "output": "31\n15\n15\n127\n255\n127\n2097151\n255\n16777215\n"}, {"input": "9\n30\n7\n12\n122\n136\n92\n1984716\n204\n14628115\n", "output": "31\n1\n15\n127\n255\n127\n2097151\n255\n16777215\n"}, {"input": "9\n30\n7\n12\n122\n136\n92\n1984716\n169\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\nWe have N points in a two-dimensional plane.\n\nThe coordinates of the i-th point (1 \\leq i \\leq N) are (x_... | [{"input": "4 3\n-1000000000 -1000000000\n1000000000 1000000000\n-999999999 999999999\n999999999 -999999999\n", "output": "3999999996000000001\n"}, {"input": "4 3\n-1000000000 -1000000000\n1000000000 1000000000\n-999999999 999999999\n999999999 -1704052742", "output": "4000000000000000000\n"}, {"input": "4 3\n-100000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLeonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He al... | [{"input": "5 30 10\nH 8\nH 9\nV 1\nH 2\nH 5\nH 3\nH 1\nV 2\nH 13\nV 3\n", "output": "110\n105\n84\n84\n84\n84\n84\n63\n51\n34\n"}, {"input": "5 15 10\nH 8\nH 9\nV 1\nH 2\nH 6\nH 4\nH 1\nV 2\nH 13\nV 3\n", "output": "40\n40\n32\n24\n24\n24\n24\n18\n12\n8\n"}, {"input": "15 5 10\nV 13\nV 10\nV 3\nH 2\nV 9\nV 7\nV 2\nH 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\nAsmany strings are strings of '0's and '1's that have as many 00 as 11. A string such as 00110001 consists of... | [{"input": "2\n12\n12", "output": "YES\nYES\n"}, {"input": "2\n12\n4", "output": "YES\nYES\n"}, {"input": "2\n18\n12", "output": "NO\nYES\n"}, {"input": "2\n12\n6", "output": "YES\nYES\n"}, {"input": "2\n2\n12", "output": "YES\nYES\n"}, {"input": "2\n19\n12", "output": "NO\nYES\n"}, {"input": "2\n2\n4", "output": "YES\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n[Image] \n\n\n-----Input-----\n\nThe input consists of four lines, each line containing a single digit 0 or 1... | [{"input": "0\n1\n1\n0\n", "output": "0\n"}, {"input": "0\n0\n0\n0\n", "output": "0\n"}, {"input": "1\n0\n0\n0\n", "output": "1\n"}, {"input": "0\n1\n0\n0\n", "output": "0\n"}, {"input": "1\n1\n0\n0\n", "output": "1\n"}, {"input": "0\n0\n1\n0\n", "output": "0\n"}, {"input": "1\n0\n1\n0\n", "output": "0\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\nproblem\n\nGiven a sequence of n integers a1, a2, ..., an and a positive integer k (1 β€ k β€ n), then the sum ... | [{"input": "5 1\n-1\n18\n-4\n17\n2\n0 0", "output": "18\n"}, {"input": "5 1\n-1\n3\n-4\n30\n2\n0 0", "output": "30\n"}, {"input": "5 3\n2\n13\n-3\n27\n1\n0 0", "output": "37\n"}, {"input": "5 1\n2\n10\n-4\n14\n2\n0 0", "output": "14\n"}, {"input": "5 1\n2\n10\n-4\n14\n0\n0 0", "output": "14\n"}, {"input": "5 1\n3\n10\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\nYou are given the array of integer numbers a_0, a_1, ..., a_{n} - 1. For each element find the distance to th... | [{"input": "15\n1000000000 -1000000000 -1000000000 1000000000 -1000000000 -1000000000 -1000000000 1000000000 1000000000 -1000000000 -1000000000 -1000000000 -1000000000 1000000000 0\n", "output": "14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 "}, {"input": "15\n1000000000 -1000000000 -1000000000 1000000000 -1000000000 -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\nEverybody knows of spaghetti sort. You decided to implement an analog sorting algorithm yourself, but as you ... | [{"input": "10\n67 67 67 67 67 67 67 67 67 67\n", "output": "YES\n"}, {"input": "10\n16 17 16 15 14 15 16 17 16 15\n", "output": "YES\n"}, {"input": "10\n105 39 93 63 97 40 36 38 11 97\n", "output": "NO\n"}, {"input": "10\n105 39 79 63 97 40 36 38 11 97\n", "output": "NO\n"}, {"input": "10\n109 91 22 29 23 22 33 42 13 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya loves computer games. Finally a game that he's been waiting for so long came out!\n\nThe main character... | [{"input": "100 10000\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 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 a grid with $n$ rows and $m$ columns, where each cell has a positive integer written on it. Let... | [{"input": "4\n1 10\n1 2 3 2 2 2 2 2 3 3\n1 10\n1 2 3 3 3 3 3 2 3 3\n1 10\n1 2 3 3 3 3 2 2 3 3\n1 5\n1 4 3 2 5\n", "output": "3 8\n3 8\n-1\n2 4\n"}, {"input": "5\n2 3\n1 2 3\n1 1 1\n2 2\n4 1\n2 3\n2 2\n2 1\n1 1\n2 3\n6 2 1\n5 4 3\n2 1\n1\n2\n", "output": "1 1\n-1\n1 2\n1 3\n1 1\n"}, {"input": "1\n2 4\n2 1 1 1\n2 2 2 1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a string s, consisting of lowercase English letters, and the integer m.\n\nOne should choose so... | [{"input": "5\nwjjdqawypvtgrncmqvcsergermprauyevcegjtcrrblkwiugrcjfpjyxngyryxntauxlouvwgjzpsuxyxvhavgezwtuzknetdibv\n", "output": "aaaabbcccccddeeeeeefggggggghiijjjjjjkkllmmnnnnoppppqqrrrrrrrrsstttttu\n"}, {"input": "5\nvbidtenkzctwzegvahvxyxuspzjgwutolxuatnxyrygnxyjpfjcrguiwklbrrcujgeuveyuarplsegrescvqmynrgtvpcwaqdjjw... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 board, consisting of $n$ rows and $n$ columns. Each tile in it should be colored eithe... | [{"input": "500 125000\n", "output": "337093334\n"}, {"input": "500 250000\n", "output": "510735313\n"}, {"input": "499 249001\n", "output": "377244915\n"}, {"input": "499 249000\n", "output": "377244915\n"}, {"input": "499 248999\n", "output": "377244915\n"}, {"input": "500 125000\n", "output": "337093334\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\nEnter a positive integer n of 4,000 or less, with a pair of integers a, b, c, d in the range 0-1000.\n\n\na +... | [{"input": "2\n-1\n207", "output": "10\n0\n1521520\n"}, {"input": "2\n-1\n254", "output": "10\n0\n2796160\n"}, {"input": "2\n-1\n326", "output": "10\n0\n5881204\n"}, {"input": "2\n-1\n100", "output": "10\n0\n176851\n"}, {"input": "2\n-2\n110", "output": "10\n0\n234136\n"}, {"input": "2\n-2\n111", "output": "10\n0\n2404... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nHaving learned (not without some help from the Codeforces participants) to play the card game from the previo... | [{"input": "15 31 1\n--------R---------G------------\n-G----------------------------R\n--------------G--------------R-\n---G--------------------------R\n-----R---------G---------------\n--R--G-------------------------\n-----G-----------------R-------\n--R-------------------G--------\n-R----------------------------G\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 prime numbers are not regularly spaced. For example from `2` to `3` the step is `1`.\nFrom `3` to `5` the... | [{"input": "2\n10000000\n11000000", "output": "[[10000139, 10000141]]", "fn_name": "step"}, {"input": "2\n104000\n105000", "output": "[[104087, 104089]]", "fn_name": "step"}, {"input": "4\n30000\n100000", "output": "[[30109, 30113]]", "fn_name": "step"}, {"input": "6\n30000\n100000", "output": "[[30091, 30097]]", "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\nLet $f_{x} = c^{2x-6} \\cdot f_{x-1} \\cdot f_{x-2} \\cdot f_{x-3}$ for $x \\ge 4$.\n\nYou have given integer... | [{"input": "1000000000000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "607659049\n"}, {"input": "1000000000000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "607659049"}, {"input": "1440135023384277212 298741808 401572465 730243936 632306255\n", "output": "694201657\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\nProblem I Starting a Scenic Railroad Service\n\nJim, working for a railroad company, is responsible for plann... | [{"input": "4\n1 3\n1 11\n10 2\n3 12", "output": "4 2\n"}, {"input": "4\n2 1\n1 11\n10 2\n16 3", "output": "2 0\n"}, {"input": "4\n1 3\n1 11\n10 2\n4 12", "output": "4 2\n"}, {"input": "4\n2 2\n1 11\n10 1\n3 10", "output": "3 1\n"}, {"input": "4\n3 1\n1 11\n10 2\n16 3", "output": "2 0\n"}, {"input": "4\n1 3\n2 11\n10 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\nThere are N cards. The i-th card has an integer A_i written on it. For any two cards, the integers on those c... | [{"input": "5 5\n3 5 7 11 13\n1\n14\n9\n10\n13", "output": "31\n23\n27\n23\n23\n"}, {"input": "5 5\n3 5 7 11 13\n1\n7\n9\n10\n13", "output": "31\n27\n27\n23\n23\n"}, {"input": "5 5\n3 5 7 11 13\n1\n4\n12\n5\n13", "output": "31\n31\n23\n31\n23\n"}, {"input": "5 5\n3 5 7 11 13\n1\n6\n12\n5\n13", "output": "31\n27\n23\n31... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPolycarp found $n$ segments on the street. A segment with the index $i$ is described by two integers $l_i$ an... | [{"input": "4\n3\n1 4\n2 3\n3 6\n4\n1 2\n2 3\n3 5\n2 5\n5\n0 0\n1 13\n4 1\n6 14\n9 10\n5\n1 5\n2 4\n3 5\n2 8\n4 8\n", "output": "0\n0\n1\n0\n"}, {"input": "4\n3\n1 4\n2 3\n3 6\n4\n1 2\n2 3\n3 5\n2 5\n5\n0 0\n1 13\n4 1\n6 14\n9 10\n5\n1 5\n2 4\n3 5\n2 9\n4 8\n", "output": "0\n0\n1\n0\n"}, {"input": "4\n3\n1 4\n2 3\n3 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\nThe Smart Beaver from ABBYY was offered a job of a screenwriter for the ongoing TV series. In particular, he ... | [{"input": "10 50 200\n10 1 22\n2 9 6\n4 2 98\n6 6 38\n5 1 67\n6 7 17\n10 4 29\n6 5 97\n3 8 51\n1 6 31\n5 9 72\n4 5 50\n2 1 3\n10 2 27\n1 10 78\n9 9 48\n8 7 81\n5 8 64\n9 4 78\n7 5 90\n9 8 83\n7 1 99\n5 5 43\n1 2 37\n3 3 6\n4 3 61\n9 6 25\n1 3 46\n2 10 18\n1 4 68\n2 4 75\n3 10 67\n7 8 82\n5 7 1\n5 6 6\n1 8 50\n8 10 50\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBoboniu has a directed graph with n vertices and m edges.\n\nThe out-degree of each vertex is at most k.\n\nE... | [{"input": "9 63 8\n6 9 1\n3 6 2\n5 9 3\n1 9 4\n4 9 5\n9 6 6\n4 3 7\n7 1 8\n1 7 9\n2 1 10\n4 8 11\n8 5 12\n7 6 13\n7 4 14\n3 9 15\n6 8 16\n7 2 17\n7 5 18\n4 6 19\n2 4 20\n5 4 21\n3 4 22\n7 3 23\n2 9 24\n2 6 25\n3 5 26\n2 8 27\n9 1 28\n6 5 29\n2 3 30\n8 4 31\n3 2 32\n1 6 33\n7 9 34\n9 8 35\n8 2 36\n4 1 37\n1 3 38\n9 3 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\nThe only difference between easy and hard versions is the constraints.\n\nVova likes pictures with kittens. T... | [{"input": "200 103 37\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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nChouti is working on a strange math problem.\n\nThere was a sequence of $n$ positive integers $x_1, x_2, \\ld... | [{"input": "80\n24 192 896 1568 2907 4840 7475 9775 11109 29939 22475 45951 46552 36859 66787 106329 85211 94423 65627 147436 143259 128699 139277 167743 178063 192167 150133 162719 177103 160732 139859 157301 176681 199291 152867 182611 199632 199535 199905 199959\n", "output": "Yes\n1 24 39 192 144 896 385 1568 1240 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 will be given a list of strings and your task will be to find the strings that have the sam... | [{"input": "[\"gkeeekkgggg\", \"gkeeekkgg\", \"bzfffffff\", \"uoboooooo\", \"gkeeekk\", \"uobooo\", \"bzffff\", \"gkeee\"]", "output": "[[8, 8, 12]]", "fn_name": "solve"}, {"input": "[\"ayqqqq\", \"epqqqqqqq\", \"epqqqqqqqqqq\", \"rdsddss\", \"ayqqqqqqq\", \"epqqqq\", \"rdsdd\"]", "output": "[[4, 8, 9]]", "fn_name": "s... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the clas... | [{"input": "43951 66098\n1604 35654\n", "output": "-1\n"}, {"input": "35413 75637\n4087 30166\n", "output": "-1\n"}, {"input": "28473 80380\n2568 95212\n", "output": "-1\n"}, {"input": "43951 66098\n1604 35654\n", "output": "-1\n"}, {"input": "28473 80380\n2568 95212\n", "output": "-1\n"}, {"input": "35413 75637\n4087 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 problem uses a simplified network topology model, please read the problem statement carefully and use it... | [{"input": "10 14\n3 2\n7 2\n6 4\n8 1\n3 9\n5 6\n6 3\n4 1\n2 5\n7 10\n9 5\n7 1\n8 10\n3 4\n", "output": "unknown topology\n"}, {"input": "10 14\n3 2\n7 2\n6 4\n8 1\n3 9\n5 6\n6 3\n4 1\n2 5\n7 10\n9 5\n7 1\n8 10\n3 4\n", "output": "unknown topology\n"}, {"input": "10 14\n3 2\n7 2\n6 4\n8 1\n3 9\n5 6\n6 3\n4 1\n2 1\n7 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\nSome natural number was written on the board. Its sum of digits was not less than k. But you were distracted ... | [{"input": "900\n13595314340746721027884681972026445045155446054797436718350397773609081581610067818125738383867204953\n", "output": "86\n"}, {"input": "200\n1000000010000000000000000000010000000000000001000001000000000000000000000000000000000000000000000000\n", "output": "22\n"}, {"input": "700\n9307216756404590162143... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 of a Merge Sort algorithm implemented by the following pseudocode. You should also report the... | [{"input": "10\n11 -1 -2 7 16 5 20 1 -1 12", "output": "-2 -1 -1 1 5 7 11 12 16 20\n34\n"}, {"input": "10\n11 -1 -3 7 16 5 20 1 -1 12", "output": "-3 -1 -1 1 5 7 11 12 16 20\n34\n"}, {"input": "10\n11 -1 -3 7 16 5 23 1 -1 12", "output": "-3 -1 -1 1 5 7 11 12 16 23\n34\n"}, {"input": "10\n11 -1 -3 7 29 5 23 1 -1 12", "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\nYou are given a positive integer $x$. Check whether the number $x$ is representable as the sum of the cubes o... | [{"input": "8\n420587971613\n681238648792\n817378345476\n509923060101\n202232821384\n387799635832\n215157629382\n698361920355\n", "output": "NO\nYES\nYES\nYES\nYES\nYES\nNO\nNO\n"}, {"input": "8\n420587971613\n681238648792\n817378345476\n509923060101\n202232821384\n387799635832\n215157629382\n698361920355\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\nYou are playing a new computer game in which you have to fight monsters. In a dungeon you are trying to clear... | [{"input": "13\n3 2 4\n10 2 4\n10 3 5\n5 4 6\n7 1 1\n3 3 3\n6 6 6\n14 2 2\n16 1 1\n9 9 9\n26 3 3\n9 8 10\n4 1 4\n", "output": "YES\nNO\nYES\nNO\nYES\nYES\nYES\nYES\nNO\nYES\nNO\nYES\nYES\n"}, {"input": "13\n3 2 4\n10 2 4\n10 3 5\n5 4 6\n7 1 1\n3 3 3\n6 6 6\n14 2 2\n16 1 1\n9 9 9\n26 3 3\n9 8 10\n4 1 4\n", "output": "YE... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 festival will be held in a town's main street. There are n sections in the main street. The sections are nu... | [{"input": "100 20 5\n47 93 3\n61 49 10\n14 69 10\n88 2 14\n35 86 18\n63 16 20\n39 49 22\n32 45 23\n66 54 25\n77 2 36\n96 85 38\n33 28 45\n29 78 53\n78 13 60\n58 96 64\n74 39 71\n18 80 80\n18 7 85\n97 82 96\n74 99 97\n", "output": " 877\n"}, {"input": "100 20 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 new generation external memory contains an array of integers $a[1 \\ldots n] = [a_1, a_2, \\ldots, a_n]$.... | [{"input": "4\n2\n2 -1\n3\n1 2 1\n4\n1 4 -1 3\n5\n1 28 -1 4 5\n", "output": "1\n1 2 1\n1\n2 3 1\n2\n1 3 2\n3 4 1\n3\n1 3 2\n3 4 1\n4 5 1\n"}, {"input": "4\n2\n2 -1\n3\n1 2 1\n4\n1 4 -1 3\n5\n2 14 -1 4 3\n", "output": "1\n1 2 1\n1\n2 3 1\n2\n1 3 2\n3 4 1\n3\n1 3 2\n3 5 2\n4 5 1\n"}, {"input": "4\n2\n2 -1\n3\n1 2 1\n4\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\nDuring the lesson small girl Alyona works with one famous spreadsheet computer program and learns how to edit... | [{"input": "11 1\n501465490\n366941771\n415080944\n385243536\n445132523\n697044413\n894369800\n812743722\n23684788\n466526046\n953916313\n45\n2 4\n8 9\n7 7\n4 9\n2 9\n2 11\n4 4\n5 7\n1 2\n5 10\n5 6\n1 7\n4 4\n1 6\n2 7\n10 11\n1 8\n6 11\n8 8\n8 10\n1 1\n5 10\n9 10\n6 9\n6 11\n1 1\n9 9\n10 11\n1 2\n9 11\n2 6\n4 7\n11 11\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given two integers $x$ and $y$ (it is guaranteed that $x > y$). You may choose any prime integer $p$ ... | [{"input": "69\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n4 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 1\n2 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\nIn 2300, the Life Science Division of Federal Republic of Space starts a very ambitious project to complete t... | [{"input": "ABC 3\nABC 2\n2(4()B)3(XY)A10C 30\n1000(1000(1000(1000(1000(1000(OM)))))) 1090860\n0 0", "output": "0\nC\n0\nO\n"}, {"input": "CBA 3\nABC 0\n2(4(AB)3(XY))10C 10\n1000(1000(1000(1000(1000(1000(NM)))))) 1889091\n0 0", "output": "0\nA\nX\nM\n"}, {"input": "CBA 2\nABC 0\n2(4(AB)3(XY))10C 10\n1000(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\nqd ucyhf yi q fhycu dkcruh mxeiu huluhiu yi q tyvvuhudj fhycu dkcruh. oekh jqia yi je vydt jxu djx ucyhf.\n\n... | [{"input": "10526\n", "output": "971513\n"}, {"input": "11183\n", "output": "999931\n"}, {"input": "10107\n", "output": "953077\n"}, {"input": "10476\n", "output": "969481\n"}, {"input": "10962\n", "output": "990511\n"}, {"input": "11184\n", "output": "999983\n"}, {"input": "11182\n", "output": "999853\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 string S consisting of lowercase English letters.\nDetermine whether we can turn S into a pal... | [{"input": "ataatmma\n", "output": "4\n"}, {"input": "aatltmaa", "output": "-1\n"}, {"input": "aamtltaa", "output": "-1\n"}, {"input": "aamaltta", "output": "-1\n"}, {"input": "attlamaa", "output": "-1\n"}, {"input": "alttamaa", "output": "-1\n"}, {"input": "aamattla", "output": "-1\n"}, {"input": "aamautla", "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\nOmkar and Akmar are playing a game on a circular board with n (2 β€ n β€ 10^6) cells. The cells are numbered fr... | [{"input": "1000000\n", "output": "948343669\n"}, {"input": "999993\n", "output": "111654003\n"}, {"input": "999989\n", "output": "612908369\n"}, {"input": "999972\n", "output": "305611803\n"}, {"input": "999996\n", "output": "864247083\n"}, {"input": "999994\n", "output": "529477162\n"}, {"input": "999975\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\nThe prime numbers are not regularly spaced. For example from `2` to `3` the gap is `1`.\nFrom `3` to `5` the ... | [{"input": "2\n10000000\n11000000", "output": "[[10000139, 10000141]]", "fn_name": "gap"}, {"input": "4\n30000\n100000", "output": "[[30109, 30113]]", "fn_name": "gap"}, {"input": "6\n30000\n100000", "output": "[[30091, 30097]]", "fn_name": "gap"}, {"input": "8\n30000\n100000", "output": "[[30161, 30169]]", "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\nIahub is so happy about inventing bubble sort graphs that he's staying all day long at the office and writing... | [{"input": "20\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "927799753\n"}, {"input": "10\n4 10 -1 1 6 8 9 2 -1 -1\n", "output": "4\n"}, {"input": "10\n3 10 -1 1 6 8 9 2 -1 -1\n", "output": "6\n"}, {"input": "10\n3 10 -1 1 7 8 9 2 -1 -1\n", "output": "6\n"}, {"input": "10\n4 10 -1 1 3 8 9 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite function alternateCase which switch every letter in string from upper to lower and from lower to upper.... | [{"input": "\"Jack JUMPED over THE CaNdLeStIcK\"", "output": "[\"jACK jumped OVER the cAnDlEsTiCk\"]", "fn_name": "alternateCase"}, {"input": "\"i LIKE MAKING KATAS VERY MUCH\"", "output": "[\"I like making katas very much\"]", "fn_name": "alternateCase"}, {"input": "\"HuMpTy DuMpTy SaT On A WaLl\"", "output": "[\"hUmP... | 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\nTakahashi wants to print a document with N pages double-sided, where two pages of data can be printed on one ... | [{"input": "1073", "output": "537\n"}, {"input": "100\n", "output": "50\n"}, {"input": "282", "output": "141\n"}, {"input": "557", "output": "279\n"}, {"input": "284", "output": "142\n"}, {"input": "276", "output": "138\n"}, {"input": "231", "output": "116\n"}, {"input": "487", "output": "244\n"}, {"input": "210", "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\nTakahashi, Nakahashi and Hikuhashi have integers A, B and C, respectively. After repeating the following oper... | [{"input": "0001111110 1110000110 0011101101 1010001101001100000", "output": "-1108889000\n"}, {"input": "0101111110 1110000110 1011100101 1010001101001100000", "output": "-1008889000\n"}, {"input": "1000010000 0000000010 1100000010 1000010100000000000", "output": "1000009990\n"}, {"input": "1000110000 0000000010 11000... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 that has exactly four digits in base ten. How many times does `2` occur in the bas... | [{"input": "12257", "output": "2\n"}, {"input": "16763", "output": "0\n"}, {"input": "18919", "output": "0\n"}, {"input": "12428", "output": "2\n"}, {"input": "36955", "output": "0\n"}, {"input": "43731", "output": "0\n"}, {"input": "74636", "output": "0\n"}, {"input": "69338", "output": "0\n"}, {"input": "14727", "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\n## Task\n\nGiven a positive integer as input, return the output as a string in the following format: \n\nEach... | [{"input": "8964631", "output": "[\"8*1000000+9*100000+6*10000+4*1000+6*100+3*10+1\"]", "fn_name": "simplify"}, {"input": "196587", "output": "[\"1*100000+9*10000+6*1000+5*100+8*10+7\"]", "fn_name": "simplify"}, {"input": "10104", "output": "[\"1*10000+1*100+4\"]", "fn_name": "simplify"}, {"input": "999", "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\nYou are given an integer number $n$. The following algorithm is applied to it:\n\n if $n = 0$, then end algo... | [{"input": "10000000000\n", "output": "5000000000\n"}, {"input": "10000000000\n", "output": "5000000000\n"}, {"input": "10000000010\n", "output": "5000000005\n"}, {"input": "10010000010\n", "output": "5005000005\n"}, {"input": "10010000110\n", "output": "5005000055\n"}, {"input": "10000000110\n", "output": "5000000055\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVictor tries to write his own text editor, with word correction included. However, the rules of word correcti... | [{"input": "90\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n", "output": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n"}, {"input": "90\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAndrzej was given a task:\nThere are n jars with pills. In every jar there is a different type of pill and th... | [{"input": "16", "output": "[3]", "fn_name": "friends"}, {"input": "0", "output": "[0]", "fn_name": "friends"}, {"input": "1", "output": "[0]", "fn_name": "friends"}, {"input": "2", "output": "[0]", "fn_name": "friends"}, {"input": "4", "output": "[1]", "fn_name": "friends"}, {"input": "3", "output": "[1]", "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\nWe make a tower by stacking up blocks. The tower consists of several stages and each stage is constructed by ... | [{"input": "11 16", "output": "11\n"}, {"input": "31 16", "output": "24\n"}, {"input": "27 16", "output": "22\n"}, {"input": "23 60", "output": "23\n"}, {"input": "31 23", "output": "27\n"}, {"input": "21 61", "output": "21\n"}, {"input": "47 16", "output": "29\n"}, {"input": "37 23", "output": "30\n"}, {"input": "39 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\nDecades have passed since the beginning of AtCoder Beginner Contest.\nThe contests are labeled as ABC001, ABC... | [{"input": "1000\n", "output": "ABD\n"}, {"input": "1481\n", "output": "ABD\n"}, {"input": "1998\n", "output": "ABD\n"}, {"input": "1513\n", "output": "ABD\n"}, {"input": "1285\n", "output": "ABD\n"}, {"input": "999\n", "output": "ABC\n"}, {"input": "514\n", "output": "ABC\n"}, {"input": "1001", "output": "ABD\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\nBerland National Library has recently been built in the capital of Berland. In addition, in the library you c... | [{"input": "50\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 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\nEmuskald is addicted to Codeforces, and keeps refreshing the main page not to miss any changes in the \"recen... | [{"input": "132\n13 7 33 124 118 76 94 92 16 107 130 1 46 58 28 119 42 53 102 81 99 29 57 70 125 45 100 68 10 63 34 38 19 49 56 30 103 72 106 3 121 110 78 2 31 129 128 24 77 61 87 47 15 21 88 60 5 101 82 108 84 41 86 66 79 75 54 97 55 12 69 44 83 131 9 95 11 85 52 35 115 80 111 27 109 36 39 104 105 62 32 40 98 50 64 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Little Elephant loves to play with color cards.\n\nHe has n cards, each has exactly two colors (the color... | [{"input": "100\n1 2\n2 1\n2 1\n1 2\n1 1\n1 2\n2 1\n1 1\n2 2\n2 1\n2 1\n1 1\n1 1\n2 1\n2 1\n2 1\n2 1\n2 1\n1 1\n2 1\n1 1\n1 1\n2 2\n1 2\n1 2\n1 2\n2 2\n1 2\n1 2\n2 1\n1 2\n2 1\n1 2\n2 2\n1 1\n2 1\n1 2\n2 1\n2 1\n1 2\n2 1\n2 1\n1 2\n2 1\n1 1\n1 2\n1 1\n1 1\n2 2\n2 2\n2 1\n2 1\n1 2\n2 2\n1 1\n2 1\n2 2\n1 1\n1 1\n1 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\nIn order to make the \"Sea Battle\" game more interesting, Boris decided to add a new ship type to it. The sh... | [{"input": "100000000 100000000 100000000 100000000\n", "output": "600000004\n"}, {"input": "100000000 100000000 100000000 100000000\n", "output": "600000004\n"}, {"input": "100000000 100000000 99999999 100000000\n", "output": "600000004\n"}, {"input": "100000000 100000000 99999999 100000000\n", "output": "600000004\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\nYou are given a sequence $a_1, a_2, \\dots, a_n$ consisting of $n$ non-zero integers (i.e. $a_i \\ne 0$). \n\... | [{"input": "10\n-27433367 -21216390 1 303383863 -799030648 -1 160141051 -1 -342089574 -215298491\n", "output": "28 27\n"}, {"input": "10\n-27433367 -21216390 1 303383863 -799030648 -1 160141051 -1 -342089574 -215298491\n", "output": "28 27\n"}, {"input": "10\n4 2 -11 4 1 3 -4 9 2 3\n", "output": "28 27\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\nWe will say that two integer sequences of length N, x_1, x_2, ..., x_N and y_1, y_2, ..., y_N, are similar wh... | [{"input": "10\n105 101 94 98 114 7 6 27 114 120", "output": "58985\n"}, {"input": "10\n105 100 94 98 114 7 6 27 114 120", "output": "58921\n"}, {"input": "10\n105 100 94 98 114 7 6 43 114 120", "output": "58921\n"}, {"input": "10\n105 100 11 98 114 7 6 43 114 120", "output": "58985\n"}, {"input": "10\n105 100 11 98 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripe... | [{"input": "100\n", "output": "YES\n"}, {"input": "010\n", "output": "YES\n"}, {"input": "98\n", "output": "YES\n"}, {"input": "90\n", "output": "YES\n"}, {"input": "10\n", "output": "YES\n"}, {"input": "32\n", "output": "YES\n"}, {"input": "88\n", "output": "YES\n"}, {"input": "44\n", "output": "YES\n"}, {"input": "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\nWrite a program which reads relations in a SNS (Social Network Service), and judges that given pairs of users... | [{"input": "16 9\n0 1\n0 2\n3 4\n5 7\n5 2\n3 7\n6 13\n11 12\n8 9\n3\n0 1\n5 9\n1 3", "output": "yes\nno\nyes\n"}, {"input": "16 9\n0 1\n0 2\n3 4\n5 7\n5 2\n3 7\n6 13\n7 8\n8 9\n3\n0 1\n5 9\n1 3", "output": "yes\nyes\nyes\n"}, {"input": "16 9\n0 1\n0 2\n6 4\n5 7\n5 2\n3 7\n6 13\n7 8\n8 9\n3\n0 1\n5 9\n1 3", "output": "y... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 size n, and q queries to it. There are queries of two types: 1 l_{i} r_{i} β pe... | [{"input": "6 3 5\n1 2 3 4 10 6\n2 1 3\n2 3 6\n1 1 6\n2 2 1 5 3\n", "output": "3 3 1 10 2\n"}, {"input": "6 3 5\n1 2 3 4 5 12\n2 1 3\n2 3 6\n1 1 6\n2 2 1 5 4\n", "output": "3 3 1 5 12\n"}, {"input": "6 3 5\n1 2 3 4 10 6\n2 2 3\n2 3 6\n1 1 6\n2 2 1 5 3\n", "output": "1 1 2 10 3\n"}, {"input": "6 3 5\n0 2 3 4 10 6\n2 1 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\nLo and Behold! For you may be surprised by what our chief chef Noodle has in mind for this season! Today, Noo... | [{"input": "2\n18\n229", "output": "6\n10\n"}, {"input": "2\n18\n344", "output": "6\n11\n"}, {"input": "2\n128\n46", "output": "10\n8\n"}, {"input": "2\n11\n493", "output": "6\n12\n"}, {"input": "2\n246\n83", "output": "10\n9\n"}, {"input": "2\n368\n38", "output": "11\n8\n"}, {"input": "2\n246\n11", "output": "10\n6\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are two lists of different length. The first one consists of keys, the second one consists of values. W... | [{"input": "[\"a\", \"b\", \"c\", \"d\", \"e\"]\n[1, 2]", "output": "[{\"a\": 1, \"b\": 2, \"c\": null, \"d\": null, \"e\": null}]", "fn_name": "createDict"}, {"input": "[\"a\", \"b\", \"c\"]\n[1, 2, 3]", "output": "[{\"a\": 1, \"b\": 2, \"c\": 3}]", "fn_name": "createDict"}, {"input": "[\"a\", \"b\"]\n[1, 2, 3, 4]", "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an integer N. Among the integers between 1 and N (inclusive), how many Shichi-Go-San numbers (l... | [{"input": "999999999\n", "output": "26484\n"}, {"input": "500000000\n", "output": "14384\n"}, {"input": "777757375\n", "output": "26423\n"}, {"input": "777777752\n", "output": "26483\n"}, {"input": "777777753\n", "output": "26484\n"}, {"input": "1260308870", "output": "26484\n"}, {"input": "1450760047", "output": "264... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 N. Find the number of positive integers less than or equal to N that have an odd number o... | [{"input": "100000\n", "output": "90909\n"}, {"input": "45901\n", "output": "36811\n"}, {"input": "99924\n", "output": "90834\n"}, {"input": "99999\n", "output": "90909\n"}, {"input": "100010", "output": "90909\n"}, {"input": "100000", "output": "90909"}, {"input": "10000\n", "output": "910\n"}, {"input": "3124\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTo get on the Shinkansen, you need two tickets, a \"ticket\" and a \"limited express ticket\". These are sepa... | [{"input": "0 0 0", "output": "Close\n"}, {"input": "1 0 0", "output": "Close\n"}, {"input": "0 1 0", "output": "Close\n"}, {"input": "0 0 0", "output": "Close\n"}, {"input": "0 1 0", "output": "Close\n"}, {"input": "1 0 0", "output": "Close\n"}, {"input": "1 1 0", "output": "Open\n"}, {"input": "1 1 0", "output": "Ope... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nICPC Calculator\n\nIn mathematics, we usually specify the order of operations by using parentheses. For examp... | [{"input": "1\n4\n0\n+\n2.115262384218664\n1.6946524456220797\n1.2494077125386351\n0\n+\n2.4871472060127386\n+.\n.-*\n3...\n...)\n--.+1\n2....\n1.1146316365084887\n-1\n*\n0\n1.4326064398520582\n.3.\n)/\n0.6657411913142146\n*/.\n.7..\n...6\n1.7891160931823404\n-1", "output": "4\n"}, {"input": "1\n2\n0\n+\n2.115262384218... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 beacons located at distinct positions on a number line. The i-th beacon has position ai and power... | [{"input": "11\n110 90\n100 70\n90 10\n155 15\n130 1\n60 1\n71 10\n40 1\n30 1\n10 1\n20 1\n", "output": "4\n"}, {"input": "11\n110 90\n100 70\n90 10\n155 15\n70 1\n60 1\n71 10\n40 1\n30 1\n10 1\n20 1\n", "output": "4\n"}, {"input": "11\n110 90\n100 70\n90 10\n80 10\n70 1\n60 1\n50 10\n40 1\n30 1\n10 1\n20 1\n", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are n cities and m bidirectional roads in the country. The roads in the country form an undirected weig... | [{"input": "18 20\n10 1 25\n7 1 32\n5 3 45\n4 9 14\n3 4 19\n6 8 5\n9 6 18\n5 3 38\n10 7 12\n7 6 29\n10 6 12\n6 2 40\n8 9 19\n7 8 11\n7 4 19\n2 1 38\n10 14 3\n6 1 50\n10 3 41\n1 8 3\n", "output": "0 2694 1573 1088 4337 64 196 1013 484 1302 -1 -1 -1 289 -1 -1 -1 -1\n"}, {"input": "18 20\n10 1 25\n7 1 32\n5 3 45\n4 9 14\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\nMary wrote a recipe book and is about to publish it, but because of a new European law, she needs to update a... | [{"input": "\"In another bowl, add 2 tsp of vanilla extract, 3 tsp of baking soda and 1/2 tsp of salt\"", "output": "[\"In another bowl, add 2 tsp (10g) of vanilla extract, 3 tsp (15g) of baking soda and 1/2 tsp (3g) of salt\"]", "fn_name": "convert_recipe"}, {"input": "\"Add to the mixing bowl and coat well with 1 tbs... | 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\nColossal!Β β exclaimed Hawk-nose.Β β A programmer! That's exactly what we are looking for.Arkadi and Boris Stru... | [{"input": "9\n3\n2\n2\n228\n1\n1\n0\n16\n1488\n", "output": "4\n2\n2\n16\n2\n2\n1\n2\n32\n"}, {"input": "9\n2\n1\n2\n228\n1\n6\n8\n16\n1488\n", "output": "2\n2\n2\n16\n2\n4\n2\n2\n32\n"}, {"input": "9\n3\n2\n2\n272\n1\n1\n15\n3\n1488\n", "output": "4\n2\n2\n4\n2\n2\n16\n4\n32\n"}, {"input": "9\n13\n4\n0\n228\n2\n0\n1\... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.