messages listlengths 1 1 | ground_truth stringlengths 88 726k | dataset stringclasses 2
values |
|---|---|---|
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider a table of size n Γ m, ... | [{"type": "stdin_stdout", "input": "96 1\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nB\nW\nW\nW\nW\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEverybody seems to think that th... | [{"type": "stdin_stdout", "input": "36 81\n4 5 7 8 13 14 16 17 22 23 25 26 31 32 34 35 40 41 43 44 49 50 52 53 58 59 61 62 67 68 70 71 76 77 79 80\n", "output": "9\n3 12 21 30 39 48 57 66 75\n"}, {"type": "stdin_stdout", "input": "36 156\n8 1 8 9 26 14 13 33 22 32 24 70 31 32 34 35 40 41 52 44 49 50 36 53 46 56 61 62 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nElections in Berland are coming.... | [{"type": "stdin_stdout", "input": "54\n10 13\n10 45\n10 51\n01 44\n10 24\n10 26\n10 39\n10 38\n10 41\n10 33\n10 18\n10 12\n10 38\n10 30\n11 31\n10 46\n11 50\n00 26\n00 29\n00 50\n10 16\n10 40\n10 50\n00 43\n10 48\n10 32\n10 18\n10 8\n10 24\n10 32\n10 52\n00 41\n10 37\n10 38\n10 49\n00 35\n10 52\n00 44\n10 41\n10 36\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\nSolve the following coding problem using the programming language python:\n\nThere are n students in a univer... | [{"type": "stdin_stdout", "input": "100\n1 1 100 100 1 100 1 1 1 1 1 1 100 1 100 100 100 1 1 100 100 100 100 100 1 100 1 100 1 1 1 100 1 1 100 1 100 1 1 1 100 100 1 1 1 100 100 100 100 100 1 100 100 1 1 1 1 100 1 1 100 1 1 1 1 100 100 100 1 100 1 100 100 100 1 1 100 100 100 100 1 100 1 100 100 1 100 1 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\nSolve the following coding problem using the programming language python:\n\nLet's denote that some array b i... | [{"type": "stdin_stdout", "input": "10 11\n-1 11 -1 -1 -1 -1 10 -1 -1 -1\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "10 17\n-1 11 -1 -1 -1 -1 10 -1 -1 -1\n", "output": "301989884\n"}, {"type": "stdin_stdout", "input": "10 11\n-1 1 -1 -1 -1 -1 10 -1 -1 -1\n", "output": "100000000\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInnokenty works at a flea market... | [{"type": "stdin_stdout", "input": "10 10\naaaaaaaaaa\nbbbbbbbbbb\ncccccccccc\ndddddddddd\neeeeeeeeee\nffffffffff\ngggggggggg\nhhhhhhhhhh\niiiiiiiiii\njjjjjjjjjj\n", "output": "440\n"}, {"type": "stdin_stdout", "input": "10 10\naaaaarpppp\nbbbbsssssu\ncciiiiiiqq\nddmmgggggg\neeebbbbbbb\nfffffqoooo\ngxxxxrrrrr\nhhfuuuuu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is about to take his first... | [{"type": "stdin_stdout", "input": "100 1\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 99\n1\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou work as a system administrat... | [{"type": "stdin_stdout", "input": "200 10\n10000010101010110011110010100010010000001100101111011001010010001101001011111110011010111101000101011110101001001101101011010011100000100101000010110111000110000010101110110000110000100000101110111100\n", "output": "989\n"}, {"type": "stdin_stdout", "input": "200 16\n10000010... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWelcome! Everything is fine.\n\n... | [{"type": "stdin_stdout", "input": "2\n3\n1 2 3\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n", "output": "15 33\n6 6\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 2 0\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n", "output": "12 30\n6 6\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 2 0\n3 1 4\n2 4 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWarawreh created a great company... | [{"type": "stdin_stdout", "input": "8 8 8\nRRRRGGGG\nRRRRGGGG\nRRRRGGGG\nRRRRGGGG\nYYYYBBBB\nYYYYBBBB\nYYYYBBBB\nYYYYBBBB\n1 1 8 8\n5 2 5 7\n3 1 8 6\n2 3 5 8\n1 2 6 8\n2 1 5 5\n2 1 7 7\n6 5 7 5\n", "output": "64\n0\n16\n4\n16\n4\n36\n0\n"}, {"type": "stdin_stdout", "input": "8 8 8\nRRRRGGGG\nRRRRGGGG\nRRRRGGGG\nRRRRGGG... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a of leng... | [{"type": "stdin_stdout", "input": "8\n6 15 35 129 143 221 34 26\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "8\n6 15 35 129 143 221 3 26\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "8\n6 15 35 129 143 221 3 51\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "8\n6 11 35 129 143 221 3 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\nSolve the following coding problem using the programming language python:\n\nYou are given n integers a_1, a_... | [{"type": "stdin_stdout", "input": "10\n13 3 2 10 8 8 8 9 3 11\n", "output": "-1 -1 -1 2 -1 -1 -1 -1 -1 -1\n-1 -1 -1 5 -1 -1 -1 -1 -1 -1\n"}, {"type": "stdin_stdout", "input": "10\n2 3 3 5 5 8 8 9 2 19\n", "output": "-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nYou are given an undirected grap... | [{"type": "stdin_stdout", "input": "50 49\n31 8 2\n31 7 2\n31 34 1\n7 49 1\n34 16 2\n8 24 1\n8 33 1\n8 21 1\n21 15 2\n34 4 2\n49 46 1\n34 18 2\n21 28 2\n33 23 1\n31 43 2\n4 17 2\n23 10 2\n16 30 2\n30 37 2\n34 25 2\n17 19 1\n34 40 1\n31 29 2\n46 32 2\n33 48 2\n31 14 1\n14 44 1\n14 9 2\n4 5 1\n43 2 2\n49 1 2\n17 26 2\n4 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n robbers at coordinat... | [{"type": "stdin_stdout", "input": "7 3\n0 8\n3 8\n2 7\n0 10\n5 5\n7 0\n3 5\n6 6\n3 11\n11 5\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "7 3\n0 8\n3 8\n2 7\n0 10\n5 5\n7 0\n3 5\n6 1\n3 11\n11 5\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "7 3\n0 8\n3 8\n2 7\n0 10\n5 5\n7 0\n3 5\n6 0\n3 11\n11 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\nSolve the following coding problem using the programming language python:\n\nPolycarp found on the street an ... | [{"type": "stdin_stdout", "input": "10\n5\n4 3 1 5 2\n5\n1 5 1 1 5\n5\n4 1 2 1 2\n5\n5 5 6 1 4\n5\n5 2 4 5 4\n5\n3 1 2 3 4\n5\n1 3 9 4 1\n5\n5 2 10 5 4\n5\n1 1 2 3 2\n4\n2 2 5 1\n", "output": "2\n0\n0\n2\n2\n2\n1\n2\n1\n1\n"}, {"type": "stdin_stdout", "input": "10\n5\n4 3 1 5 1\n5\n1 4 1 1 3\n5\n4 1 2 1 2\n5\n5 5 5 1 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs Sherlock Holmes was investiga... | [{"type": "stdin_stdout", "input": "64 28\n+54\n+44\n+55\n-3\n+33\n-54\n-54\n-7\n+33\n+54\n+54\n+26\n-54\n+14\n-54\n-47\n+25\n-54\n-54\n-54\n-52\n+54\n+54\n+54\n+54\n+20\n+7\n+54\n+4\n+32\n+46\n-54\n-47\n+15\n+32\n-54\n+7\n+62\n-16\n-54\n+3\n+54\n+54\n+54\n+54\n-54\n+54\n-54\n+54\n-52\n+27\n-7\n+54\n-5\n-54\n-18\n+1\n+... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou've got a rectangular paralle... | [{"type": "stdin_stdout", "input": "10000 10000 10000\n", "output": "1200"}, {"type": "stdin_stdout", "input": "10000 1 10000\n", "output": "40008"}, {"type": "stdin_stdout", "input": "9801 9801 9801\n", "output": "1188"}, {"type": "stdin_stdout", "input": "1 10000 10000\n", "output": "40008"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor he knew every Who down in Wh... | [{"type": "stdin_stdout", "input": "336 336\nHHHHHHHHHS..S..HH..H.S.H..HHH.H.H.H.S.H.S.S.H.S..SS..H.SS.H.HH.HH..HH.H...H.H.H.HSS..H...HH..HH.H..H.S.S....S.H.HH..HS..S.S.S.H.H.S..S.H.HH.HH..HH.HH.HS.HH.HSSHHHHHHHHH.H.HH..HHH.H.H.S..H.HH.S.H..HH.HS.HH.S.H.H.H..H.HH.HS.HHHHH.HH.S.SSS.S.S.HH.HS.H.S.HH.H.HH.H.S.HH.HS.HH..HH... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYaroslav thinks that two strings... | [{"type": "stdin_stdout", "input": "10\n?8?528?91?\n1???60??54\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "10\n?8?258?91?\n1???60??54\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "10\n0????19?01\n????164759\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "10\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs it has been found out recentl... | [{"type": "stdin_stdout", "input": "91 96\n49\n37 36 -1\n79 89 -1\n25 44 -1\n63 31 1\n60 29 -1\n31 36 1\n33 32 -1\n24 43 1\n19 51 -1\n60 19 1\n89 87 1\n8 81 -1\n36 55 1\n72 74 -1\n90 30 -1\n89 51 -1\n60 59 1\n15 27 -1\n10 20 -1\n21 55 -1\n48 89 -1\n49 19 -1\n59 37 1\n70 25 1\n10 73 1\n63 28 -1\n26 75 -1\n80 4 -1\n91 38... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has n pairs of socks. In t... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "100 5\n", "output": "124\n"}, {"type": "stdin_stdout", "input": "99 100\n", "output": "99\n"}, {"type": "stdin_stdout", "input": "95 16\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "99 74\n", "output": "1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBreaking Good is a new video gam... | [{"type": "stdin_stdout", "input": "13 58\n9 12 0\n8 11 0\n4 8 1\n2 12 1\n9 1 1\n10 6 1\n5 2 1\n3 9 0\n8 3 0\n9 10 0\n8 5 1\n11 3 0\n11 1 0\n2 6 1\n12 3 1\n11 6 0\n1 12 0\n2 1 1\n11 13 0\n6 8 1\n11 5 1\n8 9 0\n1 4 0\n12 7 1\n5 12 0\n11 7 0\n11 2 0\n5 11 1\n9 4 1\n7 5 1\n2 11 0\n13 12 1\n10 3 1\n1 13 0\n7 1 0\n6 3 0\n7 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSoon a school Olympiad in Inform... | [{"type": "stdin_stdout", "input": "3000000\n1000000 1000000\n1000000 1000000\n1000000 1000000\n", "output": "1000000 1000000 1000000\n"}, {"type": "stdin_stdout", "input": "2174477\n352351 791072\n365110 969163\n887448 955610\n", "output": "791072 495957 887448\n"}, {"type": "stdin_stdout", "input": "1400000\n300000 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHigh school student Vasya got a ... | [{"type": "stdin_stdout", "input": "100 12\naaaaaaaaaaaaaaaabaaabaaaaaaaaaabbaaaabbabaaaaaaaaaaaaaaaaaaaaabbaaabaaaaaaaaaaaabaaaaaaaabaaaaaaaaaa\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 65\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn one school with Vasya there i... | [{"type": "stdin_stdout", "input": "3 3 2 5\ndesolator\nrefresher\nperseverance\nvanguard: desolator 1, refresher 1\nmaelstorm: perseverance 2\n1 desolator\n2 perseverance\n1 refresher\n2 desolator\n2 perseverance\n", "output": "1\nvanguard 1\n2\ndesolator 1\nmaelstorm 1\n0\n"}, {"type": "stdin_stdout", "input": "2 3 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs you have noticed, there are l... | [{"type": "stdin_stdout", "input": "100\n84 94 72 32 61 90 61 2 76 42 35 82 90 29 51 27 65 99 38 41 44 73 100 58 56 64 54 31 14 58 57 64 90 49 73 80 74 19 31 86 73 44 39 43 28 95 23 5 85 5 74 81 34 44 86 30 50 57 94 56 53 42 53 87 92 78 53 49 78 60 37 63 41 19 15 68 25 77 87 48 23 100 54 27 68 84 43 92 76 55 2 94 100 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNoora is a student of one famous... | [{"type": "stdin_stdout", "input": "100 100\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... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPalindromic characteristics of s... | [{"type": "stdin_stdout", "input": "wyemcafatp\n", "output": "11 1 0 0 0 0 0 0 0 0 "}, {"type": "stdin_stdout", "input": "wyempafatc\n", "output": "11 1 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "wyempaf`tc\n", "output": "10 0 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "wyfmpae`tc\n", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n points on a straight... | [{"type": "stdin_stdout", "input": "10\n711183437 845779129 -106125616 -481773790 66231250 -183390793 -711197523 -196001897 -440633306 -873649505\n", "output": "156311685\n"}, {"type": "stdin_stdout", "input": "7\n996073710 -164874875 34663194 35526441 634003254 -704646201 -905166147\n", "output": "1901239851\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo famous competing companies C... | [{"type": "stdin_stdout", "input": "10\n598654597 975579682\n117777072 31932499\n223851456 1477480177\n988262691 654502493\n967529230 543358150\n835120075 101574205\n809901567 613170206\n152157661 479980560\n859252956 158469817\n614959273 735298093\n10\n1156316033 361325206\n341655282 740807372\n239996693 809030434\n81... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem Statement:\n\nDom and Br... | [{"type": "stdin_stdout", "input": "3\n0 2 15\n1 4 10\n\nSKLPEA", "output": "Dom\n13\n"}, {"type": "stdin_stdout", "input": "3\n0 2 27\n2 4 10\n\nSKLPEA", "output": "Dom\n25\n"}, {"type": "stdin_stdout", "input": "3\n2 -1 35\n0 4 0\n\nDLPNAS", "output": "Dom\n36\n"}, {"type": "stdin_stdout", "input": "3\n1 2 3\n1 2 4\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSoumika has a string S and its s... | [{"type": "stdin_stdout", "input": "574674546476\n\nSAMPLE", "output": "7 7 7 6 5 5 4 4 3 2 1 1\n"}, {"type": "stdin_stdout", "input": "574674546476\n\nELPMAS", "output": "7 7 7 6 5 5 4 4 3 2 1 1\n"}, {"type": "stdin_stdout", "input": "574674546476\n\nASMPLE", "output": "7 7 7 6 5 5 4 4 3 2 1 1\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a grid with N rows and ... | [{"type": "stdin_stdout", "input": "176527 15\n2 81279\n2 22308\n2 145342\n1 106634\n2 60988\n1 170938\n2 139754\n2 15220\n1 172794\n1 159290\n2 156968\n1 88080\n2 77429\n2 97459\n2 71282", "output": "31159275826"}, {"type": "stdin_stdout", "input": "176527 15\n2 81279\n2 22308\n2 145342\n1 106634\n2 60988\n1 170938\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have A cards, each of which h... | [{"type": "stdin_stdout", "input": "2000000000 0 0 2000000000", "output": "2000000000"}, {"type": "stdin_stdout", "input": "3 0 17 18", "output": "-12\n"}, {"type": "stdin_stdout", "input": "0 3 10 12", "output": "-9\n"}, {"type": "stdin_stdout", "input": "-4 3 8 5", "output": "-10\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNiwango bought a piece of land t... | [{"type": "stdin_stdout", "input": "18 477\n324 31 27 227 9 21 41 55 50 34 2 362 92 11 13 17 183 119", "output": "128162603\n"}, {"type": "stdin_stdout", "input": "18 477\n324 31 27 227 9 21 41 29 16 34 2 362 92 11 13 17 183 119", "output": "752066823\n"}, {"type": "stdin_stdout", "input": "18 477\n324 31 27 227 9 21 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe will call a string obtained b... | [{"type": "stdin_stdout", "input": "5\nabaaaaaaaa\noweplustno\naaaaaaaaba\ntwoplusone\naaaabaaaaa", "output": "4\n"}, {"type": "stdin_stdout", "input": "5\nabaaaaaaaa\noweplustmo\naaaaaaaaba\nunoselpowt\naaaaaaaaba", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\nabaaaaaaaa\noweplustno\naaaaaaaaba\ntwoplusone\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the beginning, Takahashi has ... | [{"type": "stdin_stdout", "input": "231274241 358979323 84", "output": "393502366 196751183\n"}, {"type": "stdin_stdout", "input": "377378637 358979323 84", "output": "490905292 245452646\n"}, {"type": "stdin_stdout", "input": "314159265 358979323 84", "output": "448759046 224379523"}, {"type": "stdin_stdout", "input":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAkaki, a patissier, can make N k... | [{"type": "stdin_stdout", "input": "5 1000010000 1000000\n123\n159 1\n111 1\n135 3\n147 3", "output": "7496370\n"}, {"type": "stdin_stdout", "input": "5 1000000000 1000000\n123\n166 1\n111 1\n135 3\n147 3", "output": "7460410\n"}, {"type": "stdin_stdout", "input": "5 1000010000 1000000\n203\n159 1\n111 1\n135 3\n147 3"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe call a 4-digit integer with t... | [{"type": "stdin_stdout", "input": "4000", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "15093", "output": "No\n"}, {"type": "stdin_stdout", "input": "12733", "output": "No\n"}, {"type": "stdin_stdout", "input": "24549", "output": "No\n"}, {"type": "stdin_stdout", "input": "16730", "output": "No\n"}, {"type": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers A and... | [{"type": "stdin_stdout", "input": "-169 -1", "output": "-170\n"}, {"type": "stdin_stdout", "input": "-169 -2", "output": "-171\n"}, {"type": "stdin_stdout", "input": "-279 -2", "output": "-281\n"}, {"type": "stdin_stdout", "input": "-279 -1", "output": "-280\n"}, {"type": "stdin_stdout", "input": "-433 -1", "output": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a lowercase English letter... | [{"type": "stdin_stdout", "input": "-12", "output": "consonant\n"}, {"type": "stdin_stdout", "input": "-10", "output": "consonant\n"}, {"type": "stdin_stdout", "input": "-14", "output": "consonant\n"}, {"type": "stdin_stdout", "input": "-17", "output": "consonant\n"}, {"type": "stdin_stdout", "input": "-11", "output": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the city, there are two pastr... | [{"type": "stdin_stdout", "input": "2\n-1\n3\n26 4 2\n0", "output": "-1\n16\n"}, {"type": "stdin_stdout", "input": "2\n-1\n3\n26 4 1\n0", "output": "-1\n15\n"}, {"type": "stdin_stdout", "input": "2\n-1\n4\n1 -1 1\n0", "output": "-1\n0\n"}, {"type": "stdin_stdout", "input": "2\n1\n54\n13 9 10\n0", "output": "1\n0\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence a0a1...... | [{"type": "stdin_stdout", "input": "6 32 64 13\n4 35 176 5\n5 555 442 1\n5 777 199 18\n100000 666 701622763 68962\n0 0 0 0", "output": "0\n1\n12\n1\n129752\n"}, {"type": "stdin_stdout", "input": "6 32 64 13\n4 35 176 5\n5 555 442 1\n5 777 465 18\n100000 666 701622763 65537\n0 0 0 0", "output": "0\n1\n12\n0\n68530\n"}, ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are a programmer who loves b... | [{"type": "stdin_stdout", "input": "5\n3 3\n0 0\n5 4\n5 5", "output": "10\n"}, {"type": "stdin_stdout", "input": "5\n5 4\n1 1\n3 14\n5 5", "output": "4\n"}, {"type": "stdin_stdout", "input": "5\n5 4\n1 1\n3 18\n5 5", "output": "4\n"}, {"type": "stdin_stdout", "input": "5\n5 4\n1 0\n3 14\n5 5", "output": "4\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA great king of a certain countr... | [{"type": "stdin_stdout", "input": "2\n1 2\nadd\n3\n12 4 0\nDDDA\n5\n3 1 3 5 2\ndcdkIlkP\n0", "output": "Zbc\nrzDo\nabafGijM\n"}, {"type": "stdin_stdout", "input": "2\n1 2\nadd\n3\n12 4 1\nDDDA\n5\n3 1 3 5 2\ndcdkIlkP\n0", "output": "Zbc\nrzCo\nabafGijM\n"}, {"type": "stdin_stdout", "input": "2\n1 0\nadd\n3\n12 4 1\nDD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nAOR Ika likes rooted ... | [{"type": "stdin_stdout", "input": "3.0106987506281717\n4\n4 1 1\n2 3 10\n2 4 0", "output": "11412.977062503\n"}, {"type": "stdin_stdout", "input": "3.0106987506281717\n4\n4 1 1\n2 3 11\n2 4 0", "output": "12541.821042461\n"}, {"type": "stdin_stdout", "input": "2.2392200720429236\n4\n2 3 1\n1 3 3\n3 4 20", "output": "1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have N coins each of which h... | [{"type": "stdin_stdout", "input": "5 4 7 19\n1 10 2 2 -1", "output": "4\n"}, {"type": "stdin_stdout", "input": "5 6 7 19\n1 10 2 2 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 4 13 19\n1 5 1 2 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 6 10 7\n1 10 2 2 -1", "output": "0\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDivision of Big Integers\n\nGive... | [{"type": "stdin_stdout", "input": "12 -1", "output": "-12\n"}, {"type": "stdin_stdout", "input": "10 -1", "output": "-10\n"}, {"type": "stdin_stdout", "input": "20 -1", "output": "-20\n"}, {"type": "stdin_stdout", "input": "11 -1", "output": "-11\n"}, {"type": "stdin_stdout", "input": "15 -1", "output": "-15\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef talks a lot on his mobile p... | [{"type": "stdin_stdout", "input": "4\n1.00 90 1\n1 1.7525489781557062 28\n1.3670910027404404 200 2\n2 0.75 40\n5 1.2448234862135843 101\n1.690723151930112 50 2\n1 1.4388842285899601 65\n2 2.296376152318535 100\n1.00 000 2\n3 1.1116288236865874 10\n4 1.5704897737882006 36", "output": "0\n1\n0\n0\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp loves ciphers. He has i... | [{"type": "stdin_stdout", "input": "qwertyuioasdfghjklrtyuiodfghjklqwertyuioasdfssddxb\n", "output": "dfogihujyktlrqlwkejrhtgyfudisoaaosidufystsrdedwxqb\n"}, {"type": "stdin_stdout", "input": "qwertyuioasdfghjklrtyuipdfghjklqwertyuioasdfssddxb\n", "output": "dfpgihujyktlrqlwkejrhtgyfudisoaaosidufystsrdedwxqb\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem.\... | [{"type": "stdin_stdout", "input": "100\n103\n130\n138\n126\n157\n164\n185\n120\n109\n137\n123\n147\n124\n178\n183\n155\n146\n169\n156\n153\n196\n152\n145\n110\n184\n168\n170\n177\n190\n128\n108\n182\n102\n101\n159\n150\n117\n106\n187\n194\n167\n151\n171\n195\n127\n115\n192\n114\n125\n165\n118\n113\n189\n199\n180\n139\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou came to a local shop and wan... | [{"type": "stdin_stdout", "input": "9\n7 2 3 3 2 5 6 3 3\n6\n7 5 4 8 9 2\n", "output": "31\n31\n31\n32\n32\n28\n"}, {"type": "stdin_stdout", "input": "9\n7 2 3 3 2 5 6 3 3\n6\n7 5 4 8 9 3\n", "output": "31\n31\n31\n32\n32\n29\n"}, {"type": "stdin_stdout", "input": "9\n7 2 3 3 2 5 5 3 3\n6\n7 5 4 8 9 3\n", "output": "30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnadi has a set of dominoes. Eve... | [{"type": "stdin_stdout", "input": "7 21\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n2 3\n2 4\n2 5\n2 6\n2 7\n3 4\n3 5\n3 6\n3 7\n4 5\n4 6\n4 7\n5 6\n5 7\n6 7\n", "output": "16"}, {"type": "stdin_stdout", "input": "7 21\n3 5\n7 2\n2 3\n6 5\n5 2\n4 7\n2 6\n2 4\n6 7\n5 1\n1 4\n4 5\n5 7\n4 6\n3 1\n1 2\n3 4\n7 1\n3 7\n6 1\n3 6\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKamil likes streaming the compet... | [{"type": "stdin_stdout", "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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThree friends are going to meet ... | [{"type": "stdin_stdout", "input": "8\n4 6 16\n7 6 35\n12 5 1\n2 15 3\n1 1000000000 0000000000\n1 1000000000 459694946\n2 0 9\n4 2 6\n", "output": "20\n54\n18\n22\n1999999996\n1999999994\n14\n4\n"}, {"type": "stdin_stdout", "input": "8\n4 6 16\n7 6 35\n12 5 1\n2 15 3\n1 1000000000 0000000000\n1 1000000000 459694946\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given string s of length... | [{"type": "stdin_stdout", "input": "1\n439 -6100238\n100011110101001111000100101001001100010100010101001011100000110000000010011011111100010011100100000010011000110100111010100100100101101101100111100001010000010110000111011100000001110111100111110011110001001001100010110101100101011111010110010110101111001011000111010... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has a string s of length n... | [{"type": "stdin_stdout", "input": "1\n440\ntcjbjlbtjfmvzdqutuwzvmgqrqtrvxwrdacxcowbmbwvwssihttgdsjntiawqavwspzmybakxmwpbcgaffpyhvjrulqsorkcuozvtdbkkmasxtemrrbhqnmkpgewwphdvcyhxmatrfjkesacujihmtyqtqcjfqhpsjhgzimegvkjylapylqprykvkjavlmipewlzqsfefjzecadsqmfutgnegngmwchqttcyklocfcyuhghvtygdbsxaoxkvtgdcnsqddzzakhgrribwxkua... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nXenia is a girl being born a nob... | [{"type": "stdin_stdout", "input": "5\n2 2 3\n7 8\n6 3\n3 1 4\n1 1 1\n1\n1\n1000000000\n2 2 2\n0 2\n5 4\n6 7\n2 2 2\n1 2\n3 4\n6 7\n3 4 1\n3 2 1\n7 3 3 4\n12\n", "output": "14\n1999999996000000002\n24\n24\n122\n"}, {"type": "stdin_stdout", "input": "5\n2 2 3\n7 8\n6 3\n3 0 4\n1 1 1\n1\n1\n1000000000\n2 2 2\n0 2\n5 4\n6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya very much likes rec... | [{"type": "stdin_stdout", "input": "-841 -205\n590 -205\n-1000 -1000\n-364 1385\n-682 113\n-841 -1000\n-1000 -205\n908 1067\n", "output": "YES\n2 4 5 8 \n1 3 6 7 \n"}, {"type": "stdin_stdout", "input": "-850 -1000\n-475 -325\n1025 800\n-325 575\n-325 -850\n-1000 -475\n-100 -775\n1250 -550\n", "output": "YES\n1 2 5 6 \n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarpus likes studying at sch... | [{"type": "stdin_stdout", "input": "10\n58 22116\n112840 772160\n127432 399484\n182031 255417\n459340 548097\n603984 739189\n606173 663033\n280170 366159\n779239 906234\n874623 155443\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "10\n58 22116\n112840 772160\n122094 399484\n182031 255417\n459340 548097\n60398... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya likes to play very ... | [{"type": "stdin_stdout", "input": "7\n1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000\n", "output": "6000000000\n"}, {"type": "stdin_stdout", "input": "7\n1000000000 -447358682 1000000000 -1000000000 1000000000 -1000000000 1000000000\n", "output": "5447358682\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA permutation is a sequence of i... | [{"type": "stdin_stdout", "input": "5 4\n1 2 5\n2 3\n1 1 3\n1 3 4\n", "output": "14\n7\n9\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 4\n2 3\n1 1 2\n1 1 4\n", "output": "9\n4\n10\n"}, {"type": "stdin_stdout", "input": "5 4\n1 1 4\n2 5\n1 1 2\n1 3 4\n", "output": "10\n3\n9\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nThe progress is not standing sti... | [{"type": "stdin_stdout", "input": "7\n1 2 5\n1 1 3 0 0\n2 2 5\n0 0 0 1 0\n2 1 4\n1 1 2 0 0\n1 2 5\n1 2 3 0 1\n0 0 0\n0 0 0 0 0\n1 0 4\n1 0 0 0 0\n13 37 42\n1 0 0 40 47\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n1 2 3\n1 2 3 0 0\n2 2 3\n1 2 3 1 0\n2 2 3\n1 2 3 0 1\n1 2 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\nSolve the following coding problem using the programming language python:\n\nBerland crossword is a puzzle th... | [{"type": "stdin_stdout", "input": "17\n5 0 0 0 0\n2 1 0 1 1\n2 0 0 1 1\n3 1 0 1 0\n10 0 1 0 4\n9 0 4 1 1\n2 1 0 1 0\n5 4 1 1 1\n5 0 5 4 2\n8 2 3 4 5\n2 2 2 2 2\n5 0 4 2 2\n5 5 1 0 1\n8 0 5 2 5\n2 0 1 2 1\n2 1 0 1 2\n2 1 1 1 2\n", "output": "YES\nNO\nYES\nYES\nYES\nYES\nNO\nYES\nNO\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nN... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA number is called 2050-number i... | [{"type": "stdin_stdout", "input": "9\n204926935685243951\n999999999999999000\n1000000000000000000\n204999999999997950\n983999999999997950\n205\n1266\n50\n20\n", "output": "-1\n81\n-1\n126\n128\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "9\n375241037050488412\n999999999999999000\n1000000000000000000\n204999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFinally, you have defeated Razor... | [{"type": "stdin_stdout", "input": "3\n1\n0 1\n2\n0 1\n1 2\n2 3\n3 0\n3\n0 1\n0 5\n0 7\n1 2\n1 4\n2 5\n2 6\n3 5\n3 6\n3 7\n4 6\n4 7\n", "output": "0 1\n0 0\n0 1 3 2\n0 0 1 1\n0 1 5 2 7 4 3 6\n-1\n"}, {"type": "stdin_stdout", "input": "3\n1\n0 1\n2\n0 1\n1 2\n2 3\n3 0\n3\n0 1\n0 5\n0 7\n1 2\n1 4\n2 5\n2 6\n3 5\n3 6\n3 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\nSolve the following coding problem using the programming language python:\n\n\n\nInput\n\nThe only line of in... | [{"type": "stdin_stdout", "input": "20 20 20\n", "output": "218920\n"}, {"type": "stdin_stdout", "input": "1 19 20\n", "output": "132716\n"}, {"type": "stdin_stdout", "input": "10 11 15\n", "output": "10480\n"}, {"type": "stdin_stdout", "input": "10 11 12\n", "output": "2474\n"}, {"type": "stdin_stdout", "input": "12 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA non-empty string s is called b... | [{"type": "stdin_stdout", "input": "10339710010772692 73118299589861909\n", "output": "191515094\n"}, {"type": "stdin_stdout", "input": "10339710010772692 63292874515415410\n", "output": "158860080\n"}, {"type": "stdin_stdout", "input": "94889574706765 1001666051582721344\n", "output": "925366296\n"}, {"type": "stdin_s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIlya is a very good-natured lion... | [{"type": "stdin_stdout", "input": "16\n978618343 473608041 799158564 800910753 461479363 520477481 780529176 678879534 118274424 720632652 1126830014 582019792 225578081 537373229 944668919 758615621\n", "output": "15485512030\n"}, {"type": "stdin_stdout", "input": "16\n978618343 473608041 799158564 800910753 46147936... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA nearby pie shop is having a sp... | [{"type": "stdin_stdout", "input": "50\n4 2 6 7 2 6 3 8 8 2 4 8 4 4 1 4 5 2 2 5 6 4 3 3 3 6 8 2 1 3 1 8 2 3 7 4 7 5 4 8 3 5 7 8 6 7 5 8 7 1\n", "output": "130\n"}, {"type": "stdin_stdout", "input": "50\n4 2 6 7 2 6 3 8 8 2 4 8 4 4 1 3 5 2 2 5 6 4 3 3 3 6 8 2 1 3 1 8 2 3 7 4 7 5 4 8 3 5 7 8 6 7 5 8 7 1\n", "output": "12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSimon has a rectangular table co... | [{"type": "stdin_stdout", "input": "5 50\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have an array of positive in... | [{"type": "stdin_stdout", "input": "35 1\n147456 288 165888 55296 442368 864 3456 576 41472 663552 13824 10368 71 6912 5184 1296 4608 73728 82944 1728 27648 110592 144 432 154456 41119 648 331776 2304 2592 9216 36864 216 18432 1152\n2\n", "output": "-126\n"}, {"type": "stdin_stdout", "input": "35 1\n147456 288 165888 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\nSolve the following coding problem using the programming language python:\n\nAlex enjoys performing magic tri... | [{"type": "stdin_stdout", "input": "999 504\n", "output": "0.0019990178729991604\n"}, {"type": "stdin_stdout", "input": "614 123\n", "output": "0.0032414781922363548\n"}, {"type": "stdin_stdout", "input": "723 1000\n", "output": "0.002762959403995896\n"}, {"type": "stdin_stdout", "input": "975 504\n", "output": "0.0020... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have decided to watch the be... | [{"type": "stdin_stdout", "input": "18 111\n1449 2156\n3497 4784\n7775 14575\n23857 24593\n29211 30739\n31932 33447\n35902 36426\n36991 38506\n39679 47202\n48772 60016\n60522 61868\n63340 63982\n68417 78537\n79445 86568\n86918 87940\n90081 90310\n90629 94325\n95728 96263\n", "output": "58967\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe first algorithm for detectin... | [{"type": "stdin_stdout", "input": "100 1\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem you are to calcu... | [{"type": "stdin_stdout", "input": "60\n536870912\n536870911\n536870913\n1000000000\n999999999\n1\n2\n3\n4\n268435456\n268435455\n268435457\n536870912\n536870911\n536870913\n1000000000\n999999999\n1\n2\n3\n4\n268435456\n268435455\n268435457\n536870912\n536870911\n536870913\n1000000000\n999999999\n1\n2\n3\n4\n268435456\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA lot of people in Berland hates... | [{"type": "stdin_stdout", "input": "20 5750 12756 15\n", "output": "YES\n224.57771408997397\n"}, {"type": "stdin_stdout", "input": "20 2910 12756 15\n", "output": "YES\n113.65585182640422\n"}, {"type": "stdin_stdout", "input": "20 2726 12756 15\n", "output": "YES\n106.46936497552505\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSonya was unable to think of a s... | [{"type": "stdin_stdout", "input": "75\n392 1038 98 533 515 448 220 310 386 28 539 294 208 828 75 534 875 493 94 205 656 105 546 493 60 188 222 108 788 504 809 621 934 455 307 178 630 298 938 62 850 421 839 134 950 256 934 817 209 559 866 67 990 835 534 672 468 768 757 516 959 893 275 136 692 927 321 554 801 805 885 12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnton likes to play chess, and s... | [{"type": "stdin_stdout", "input": "379\nAADAAAAAADDAAAAAADAADADADDAAAAADADDAADAAAADDDADAAAAAAADAADAAAAAAADAAAAAAAAADAAAAAAADAAAAAAAAAAADDDADAAAAAAAADAADADAAAADAAAAAAAAAAAAAAAAADAAAADDDAADAAAAAAADAAADAAADAADDDADDAAADAAAAAADDDADDDAAADAAAADAAAAAAAAADAAADAAAAAAAAADAAAAAAAAAAAAAAAAAADADAAAAAAAAAAADAAAAADAAAADAAAAAAAAAAAAAD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Berland it is the holiday of ... | [{"type": "stdin_stdout", "input": "70\n644488 5444 150441 714420 602059 335330 510670 196555 546346 740011 509449 850947 692874 524857 750434 952985 223744 533151 896124 609694 367352 679050 560202 172728 569291 778616 332116 286927 843598 372698 244906 498046 900681 709791 420904 724593 864493 813094 791377 39998 296... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBob recently read about bitwise ... | [{"type": "stdin_stdout", "input": "17 15\na := 010000111111110\nb := 101100110000100\nc := 100101100100111\nd := 010110101110110\ne := 111111000010110\nf := 011001110111110\ng := 110011010100101\nh := 000001010010001\ni := 110000111001011\nj := 000010000010111\nk := 110110111110110\nl := 010000110000100\nm := 00011110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe marmots have prepared a very... | [{"type": "stdin_stdout", "input": "100 60\n1443 3849 6174 8249 696 8715 3461 9159 4468 2496 3044 2301 2437 7559 7235 7956 8959 2036 4399 9595 8664 9743 7688 3730 3705 1203 12615 7088 8563 3860 2794 8014 6951 1160 8616 970 9885 2421 17193 4885 5246 6146 8849 5141 8602 9486 7257 3300 8323 4797 4082 7135 80 9622 4543 656... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConnect the countless points wit... | [{"type": "stdin_stdout", "input": "20\n-975467170 758268840 -975467171 758268839 -975467172 758268838 -975467173 758268837 -975467174 1015089897 -975467175 758268835 -975467176 758268834 -975467177 967684266 -975467178 758268832 -975467179 1082851919\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "20\n-97546... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n distinct points ... | [{"type": "stdin_stdout", "input": "10\n504155727 -77293021\n-155983273 -43296260\n-548837441 -43296260\n87058696 -80040028\n1006418476 -43296260\n-155983273 850521645\n-852404258 -125749655\n518823261 -77293021\n-89661323 -21885159\n-155983273 -406914114\n", "output": "11907\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nSince you are the best Wraith Ki... | [{"type": "stdin_stdout", "input": "100 20\n9149 9142 7686 5769 1871 4565 5670 8587 663 637 3421 4267 6884 8142 7634 5748 936 316 9300 771 6906 9230 8994 9690 7155 9393 6274 3183 932 7460 1611 6122 4031 6922 5466 1499 5290 4907 4673 5665 9744 1602 9891 8260 6351 4640 9930 9756 5242 3752 82 3287 824 6897 5579 9095 883 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers. Every... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "4444477777\n"}, {"type": "stdin_stdout", "input": "1000100000\n", "output": "4444477777\n"}, {"type": "stdin_stdout", "input": "1211766791\n", "output": "4444477777\n"}, {"type": "stdin_stdout", "input": "1101704081\n", "output": "4444477777\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUnlike Knights of a Round Table,... | [{"type": "stdin_stdout", "input": "11 10\n1 2 3 4 5 6 7 8 9 10 11\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1000000000 2000000000 3000000000 4000000000 5000000000 6000000000 7000000000 8000000000 9000000000 10000000000 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\nSolve the following coding problem using the programming language python:\n\nHarry was contesting to be the m... | [{"type": "stdin_stdout", "input": "10\n42\n18467 6334 26500 19169 15724 11478 29358 26962 24464 5705 28145 23281 16827 9961 491 2995 11942 4827 5436 32391 14604 3902 153 292 12382 17421 18716 19718 19895 5447 21726 14771 11538 1869 19912 25667 26299 17035 9894 28703 23811 31322\n364\n17673 4664 15141 7711 28253 6868 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPRAVAH, an annual techfest is be... | [{"type": "stdin_stdout", "input": "385900\n123000", "output": "loses\n"}, {"type": "stdin_stdout", "input": "854000\n731377", "output": "loses\n"}, {"type": "stdin_stdout", "input": "854000\n186396", "output": "loses\n"}, {"type": "stdin_stdout", "input": "854000\n702572", "output": "loses\n"}, {"type": "stdin_stdout"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet us see how search engines wo... | [{"type": "stdin_stdout", "input": "0 3\nhackdrearth 14\nhackerranl 27\nqhkdae\n\nSAMPLE", "output": "-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "1 2\nhackdrearth 10\nhackerranl 27\neadkhr\n\nSAMPLE", "output": "-1\n-1\n"}, {"type": "stdin_stdout", "input": "1 2\nhtraerdkcah 10\nhackerranl 27\neadkhr\n\nSAMPLE",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is a member of a progr... | [{"type": "stdin_stdout", "input": "17 3051", "output": "3051\n"}, {"type": "stdin_stdout", "input": "17 3619", "output": "3619\n"}, {"type": "stdin_stdout", "input": "76 6963", "output": "6963\n"}, {"type": "stdin_stdout", "input": "76 3451", "output": "3451\n"}, {"type": "stdin_stdout", "input": "-1 2265", "output": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi, who is A years old, i... | [{"type": "stdin_stdout", "input": "15 100", "output": "100\n"}, {"type": "stdin_stdout", "input": "16 110", "output": "110\n"}, {"type": "stdin_stdout", "input": "17 101", "output": "101\n"}, {"type": "stdin_stdout", "input": "25 111", "output": "111\n"}, {"type": "stdin_stdout", "input": "17 100", "output": "100\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the sum of the integers bet... | [{"type": "stdin_stdout", "input": "101 0 154", "output": "5151\n"}, {"type": "stdin_stdout", "input": "111 1 181", "output": "6216\n"}, {"type": "stdin_stdout", "input": "110 2 100", "output": "5994\n"}, {"type": "stdin_stdout", "input": "100 2 100", "output": "4939\n"}, {"type": "stdin_stdout", "input": "101 1 011", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis contest, AtCoder Beginner C... | [{"type": "stdin_stdout", "input": "1530", "output": "ABC1530\n"}, {"type": "stdin_stdout", "input": "2825", "output": "ABC2825\n"}, {"type": "stdin_stdout", "input": "5621", "output": "ABC5621\n"}, {"type": "stdin_stdout", "input": "-105", "output": "ABC-105\n"}, {"type": "stdin_stdout", "input": "-136", "output": "AB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke loves constructing integer... | [{"type": "stdin_stdout", "input": "10\n1 3 2 6 2 4 4 5 8 1", "output": "10\n14\n0\n10\n0\n0\n0\n0\n2\n0\n"}, {"type": "stdin_stdout", "input": "10\n1 3 1 6 3 4 6 6 4 1", "output": "10\n14\n0\n11\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "10\n1 4 0 1 1 4 4 0 22 1", "output": "8\n12\n0\n0\n0\n0\n0\n0\n18\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead the coordinates of four dif... | [{"type": "stdin_stdout", "input": "3.338679167476614 4.153021285774258 3.5962681645685493 3.0562783924178016 0.7824583380395241 0.6535611152381731 1.4307644766957708 0.2352661769827814\n2.6749426974072605 2.336361124342693 3.280415305064114 1.6735605571901062 -0.04476814775527138 2.2725919391555047 3.1294550602222495 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. A, who will graduate next sp... | [{"type": "stdin_stdout", "input": "6\n0 1 80\n1 3 20\n0 2 60\n2 4 50\n3 2 66\n0 4 165\n2\n0 1 1\n1 2 1\n0", "output": "2 262\n1 2\n"}, {"type": "stdin_stdout", "input": "6\n0 1 80\n1 3 20\n0 2 60\n2 4 50\n3 2 66\n0 4 165\n2\n0 1 1\n0 2 1\n0", "output": "2 262\n0 2\n"}, {"type": "stdin_stdout", "input": "6\n0 1 113\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYuki made a sugoroku so that eve... | [{"type": "stdin_stdout", "input": "8\n2 -1 3 -1 1 4 -1 0", "output": "5\n"}, {"type": "stdin_stdout", "input": "8\n3 -1 3 -1 1 4 -1 0", "output": "6\n"}, {"type": "stdin_stdout", "input": "8\n3 -1 3 -1 2 4 -1 0", "output": "6\n"}, {"type": "stdin_stdout", "input": "8\n3 -1 3 -1 0 4 -1 0", "output": "7\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA Bingo game is played by one ga... | [{"type": "stdin_stdout", "input": "4 3\n10 25 11 20 6 2 1 15 23\n5 21 1 12 23 17 7 26 2\n8 18 4 22 13 27 16 5 11\n19 9 24 2 11 5 14 28 16\n4 3\n12 13 20 24 28 32 15 16 17\n12 13 21 25 29 33 16 17 18\n12 13 22 26 30 34 17 18 15\n12 13 23 27 31 35 18 15 16\n4 3\n11 12 13 14 15 16 17 18 19\n21 22 23 24 25 26 27 28 29\n31... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven n integers a1, a2,β¦, an an... | [{"type": "stdin_stdout", "input": "4 100\n3 6 10 13\n160 28 40 19", "output": "53.147520000\n"}, {"type": "stdin_stdout", "input": "2 115\n2 2 -1 24\n91 60 40 23", "output": "13.246800000\n"}, {"type": "stdin_stdout", "input": "4 100\n2 5 10 13\n80 16 40 19", "output": "43.435600000\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.