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\nYou are given a positive integer...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "1999999998\n"}, {"type": "stdin_stdout", "input": "433933447\n", "output": "867866894\n"}, {"type": "stdin_stdout", "input": "476190629\n", "output": "952381258\n"}, {"type": "stdin_...
code_stdio
[ { "content": "You are an expert Python programmer. 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 cat Snuke wants to play a po...
[{"type": "stdin_stdout", "input": "183\n", "output": "bon\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "hon\n"}, {"type": "stdin_stdout", "input": "440\n", "output": "pon\n"}, {"type": "stdin_stdout", "input": "438\n", "output": "pon\n"}, {"type": "stdin_stdout", "input": "575\n", "output": "hon\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\nIt's now the season of TAKOYAKI ...
[{"type": "stdin_stdout", "input": "50\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\n", "output": "12250000\n"}, {"type": "stdin_stdout", "input": "41\n49 91 82 7 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\nThere are two buttons, one of si...
[{"type": "stdin_stdout", "input": "15 13\n", "output": "29\n"}, {"type": "stdin_stdout", "input": "14 16\n", "output": "31\n"}, {"type": "stdin_stdout", "input": "10 10\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "15 14\n", "output": "29\n"}, {"type": "stdin_stdout", "input": "16 17\n", "output": "33\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn some village, there are 999 t...
[{"type": "stdin_stdout", "input": "290178 291177\n", "output": "208323\n"}, {"type": "stdin_stdout", "input": "336594 337545\n", "output": "115131\n"}, {"type": "stdin_stdout", "input": "124075 124692\n", "output": "65961\n"}, {"type": "stdin_stdout", "input": "82747 83560\n", "output": "247331\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\nServal is fighting with a monste...
[{"type": "stdin_stdout", "input": "10000 1\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "10000 10000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "8772 81\n", "output": "109\n"}, {"type": "stdin_stdout", "input": "3497 7202\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "3982 4784\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\nAlice and Bob are controlling a ...
[{"type": "stdin_stdout", "input": "56 100 33 100\n", "output": "44\n"}, {"type": "stdin_stdout", "input": "0 100 0 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "0 75 25 100\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "10 90 20 80\n", "output": "60\n"}, {"type": "stdin_stdout", "input": "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\nThe number 105 is quite special ...
[{"type": "stdin_stdout", "input": "105\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "104\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "134\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "135\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "164\n", "output": "2\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\nTakahashi has decided to distrib...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "99 33\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "99 49\n", "output": "1\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKurohashi has never participated...
[{"type": "stdin_stdout", "input": "111\n", "output": "111\n"}, {"type": "stdin_stdout", "input": "112\n", "output": "222\n"}, {"type": "stdin_stdout", "input": "750\n", "output": "777\n"}, {"type": "stdin_stdout", "input": "234\n", "output": "333\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "999\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\nTakahashi and Aoki will have a b...
[{"type": "stdin_stdout", "input": "100 1 100 1\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "85 7 30 19\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "85 7 23 19\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "38 11 7 79\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "45 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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 of squares with ...
[{"type": "stdin_stdout", "input": "100 100\n#...................................................................................................\n.#..................................................................................................\n..#.......................................................................
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPrint the circumference of a cir...
[{"type": "stdin_stdout", "input": "100\n", "output": "628.31853071795865162130\n"}, {"type": "stdin_stdout", "input": "73\n", "output": "458.67252742410977361942\n"}, {"type": "stdin_stdout", "input": "20\n", "output": "125.66370614359172463992\n"}, {"type": "stdin_stdout", "input": "38\n", "output": "238.761041672824...
code_stdio
[ { "content": "You are an expert Python programmer. 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 4-character stri...
[{"type": "stdin_stdout", "input": "ASSA\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "FFEE\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "AVVA\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "HHTT\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ILIL\n", "output": "Yes\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have two integers: A and B.\n...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "-96 -16\n", "output": "1536\n"}, {"type": "stdin_stdout", "input": "36 80\n", "output": "2880\n"}, {"type": "stdin_stdout", "input": "-76 39\n", "output": "-37\n"}, {"type": "stdin_stdout", "input": "-13 3\n", "outp...
code_stdio
[ { "content": "You are an expert Python programmer. 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 mountains ranging fr...
[{"type": "stdin_stdout", "input": "20\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "20\n54 53 68 68 35 35 62 61 74 73 94 94 94 94 86 85 65 64 68 68\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "20\n8 12 14 17 23 26 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle girl Tanya climbs the sta...
[{"type": "stdin_stdout", "input": "48\n1 2 3 4 1 2 3 1 1 2 3 1 2 3 4 1 1 2 3 4 1 2 3 4 1 2 3 4 1 1 2 1 2 1 2 1 1 2 1 2 1 2 3 1 2 1 2 1\n", "output": "20\n4 3 1 3 4 1 4 4 4 1 2 2 2 1 2 2 3 2 2 1 "}, {"type": "stdin_stdout", "input": "8\n1 2 3 1 2 3 4 5\n", "output": "2\n3 5 "}, {"type": "stdin_stdout", "input": "7\n1 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\nRecently Vova found $n$ candy wr...
[{"type": "stdin_stdout", "input": "53\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle girl Tanya is learning ho...
[{"type": "stdin_stdout", "input": "999999999 49\n", "output": "99990\n"}, {"type": "stdin_stdout", "input": "999999999 50\n", "output": "9999\n"}, {"type": "stdin_stdout", "input": "1000000000 9\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "900000000 16\n", "output": "1\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\nThere are $n$ people in a row. T...
[{"type": "stdin_stdout", "input": "4\n200000 200000 200000 200000\n", "output": "4\n200000 200000 200000 200000 \n"}, {"type": "stdin_stdout", "input": "3\n200000 200000 200000\n", "output": "3\n200000 200000 200000 \n"}, {"type": "stdin_stdout", "input": "10\n2 3 6 7 4 6 3 2 6 6\n", "output": "5\n2 2 3 4 3 \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\nTakahashi loves takoyaki - a bal...
[{"type": "stdin_stdout", "input": "1000 1 1000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "999 10 1000\n", "output": "100000\n"}, {"type": "stdin_stdout", "input": "522 575 426\n", "output": "426\n"}, {"type": "stdin_stdout", "input": "447 629 497\n", "output": "497\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nThere are N students in a school...
[{"type": "stdin_stdout", "input": "1000\n", "output": "333\n"}, {"type": "stdin_stdout", "input": "303\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "807\n", "output": "269\n"}, {"type": "stdin_stdout", "input": "596\n", "output": "198\n"}, {"type": "stdin_stdout", "input": "604\n", "output": "201\n"}, {"t...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have A apples and P pieces of...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "200\n"}, {"type": "stdin_stdout", "input": "74 28\n", "output": "125\n"}, {"type": "stdin_stdout", "input": "39 85\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "93 70\n", "output": "174\n"}, {"type": "stdin_stdout", "input": "98 96\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\nYou are given positive integers ...
[{"type": "stdin_stdout", "input": "20 20\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "4 12\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "8 20\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "6 12\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "1 12\n", "output": "13\n"}, {"t...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi wants to be a member o...
[{"type": "stdin_stdout", "input": "aaaaaaaaaa\naaaaaaaaaaa\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "vgxgpuamkx\nvgxgpuamkxk\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "chokudai\nchokudaiz\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "vfjaqmop\nodotkrjzr\n", "output": "No\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\nWe have two distinct integers A ...
[{"type": "stdin_stdout", "input": "999999999 1000000000\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "369673908 845644227\n", "output": "IMPOSSIBLE\n"}, {"type": "stdin_stdout", "input": "232334010 962483782\n", "output": "597408896\n"}, {"type": "stdin_stdout", "input": "274100628 29096111\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\nGiven is a three-digit integer N...
[{"type": "stdin_stdout", "input": "117\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "777\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "974\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "477\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "758\n", "output": "Yes\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\nLet S(n) denote the sum of the d...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "873041724\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "689670774\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5064791...
code_stdio
[ { "content": "You are an expert Python programmer. 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 square in the xy-plan...
[{"type": "stdin_stdout", "input": "67 -89 -90 -11\n", "output": "-168 -168 -11 -246\n"}, {"type": "stdin_stdout", "input": "-100 100 100 -100\n", "output": "300 100 100 300\n"}, {"type": "stdin_stdout", "input": "0 -100 -100 100\n", "output": "-300 0 -200 -200\n"}, {"type": "stdin_stdout", "input": "31 -41 -59 26\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\nWe have A balls with the string ...
[{"type": "stdin_stdout", "input": "abcdeabcde opqrsopqrs\n7 2\nabcdeabcde\n", "output": "6 2\n"}, {"type": "stdin_stdout", "input": "airport door\n5 5\nairport\n", "output": "4 5\n"}, {"type": "stdin_stdout", "input": "length depth\n3 1\nlength\n", "output": "2 1\n"}, {"type": "stdin_stdout", "input": "tea coffee\n4 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\nGiven are a positive integer N a...
[{"type": "stdin_stdout", "input": "100\ntttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "100\nyyxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n", "output":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a rectangle in a coordi...
[{"type": "stdin_stdout", "input": "1000000000 1000000000 117928222 908877261\n", "output": "500000000000000000.000000 0\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 500000000 500000000\n", "output": "500000000000000000.000000 1\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 500000000 49...
code_stdio
[ { "content": "You are an expert Python programmer. 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 Japan, people make offerings ...
[{"type": "stdin_stdout", "input": "100\nP P P G G P P P G G P P G G P G W G W G G G P G P P G P P P G G G P P G P G P P G P P G G G W G G G P P P W G P G G P G G G G G P P W P G G G G G P P G G P G P G G G G P G G G G W P G P P P G G P G P\n", "output": "Three\n"}, {"type": "stdin_stdout", "input": "100\nG G G G G W W...
code_stdio
[ { "content": "You are an expert Python programmer. 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 next lecture in a high schoo...
[{"type": "stdin_stdout", "input": "14\n137698508 528184026 54130884 239033739 897037197 720680829 605286542 89272810 284191042 179359950 186766648 570400677 107541072 25121211\n195343970 709242622 422954170 980941827 265963618 812646456 943660193 344102432 295006337 221455256 203711937 632473368 334173424 49206958\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\nMishka got an integer array $a$ ...
[{"type": "stdin_stdout", "input": "10\n10000 10 50605065 1 5 89 5 999999999 60506056 1000000000\n", "output": "9999 9 50605065 1 5 89 5 999999999 60506055 999999999\n"}, {"type": "stdin_stdout", "input": "5\n100000000 100000000 100000000 100000000 100000000\n", "output": "99999999 99999999 99999999 99999999 99999999\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 an undirected grap...
[{"type": "stdin_stdout", "input": "17 15\n1 8\n1 12\n5 11\n11 9\n9 15\n15 5\n4 13\n3 13\n4 3\n10 16\n7 10\n16 7\n14 3\n14 4\n17 6\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5 10\n1 2\n2 3\n3 4\n4 5\n5 1\n1 4\n2 4\n3 5\n3 1\n2 5\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 10\n1 2\n1 3\n1 4\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an undirected tree...
[{"type": "stdin_stdout", "input": "20\n1 2 1 1 0 0 0 1 1 1 0 0 0 1 0 2 0 2 1 1\n1 20\n2 3\n2 4\n2 14\n2 18\n3 10\n5 15\n5 16\n6 17\n7 15\n8 15\n9 17\n9 20\n11 14\n12 18\n12 20\n13 19\n15 17\n18 19\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n1 2 0 0 1 1 1 1 0 1\n1 3\n1 5\n2 10\n3 4\n3 8\n4 6\n4 7\n6 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\nYou are given two strings $s$ an...
[{"type": "stdin_stdout", "input": "12\nlylfekzszgqx\noewrpuflwlir\n", "output": "nbqykcppkvzu\n"}, {"type": "stdin_stdout", "input": "10\nzzzzzzzzzx\nzzzzzzzzzz\n", "output": "zzzzzzzzzy\n"}, {"type": "stdin_stdout", "input": "6\nnijfvj\ntvqhwp\n", "output": "qoztvz\n"}, {"type": "stdin_stdout", "input": "5\nafogk\nas...
code_stdio
[ { "content": "You are an expert Python programmer. 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 integer sequences existed in...
[{"type": "stdin_stdout", "input": "12\n12 8 1 3 7 5 9 6 4 10 11 2\n", "output": "YES\n1 1 0 0 1 0 0 1 1 0 0 1 \n"}, {"type": "stdin_stdout", "input": "9\n5 1 3 6 8 2 9 0 10\n", "output": "YES\n1 0 0 0 0 1 0 1 0 \n"}, {"type": "stdin_stdout", "input": "8\n3 2 0 1 0 1 2 3\n", "output": "YES\n1 1 0 1 1 0 0 0 \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\nVova plans to go to the conferen...
[{"type": "stdin_stdout", "input": "10\n10 1 1 1\n10 1 1 2\n10 1 1 3\n10 1 1 4\n10 1 1 5\n10 1 1 6\n10 1 1 7\n10 1 1 8\n10 1 1 9\n10 1 1 10\n", "output": "9\n8\n7\n6\n5\n4\n3\n2\n1\n0\n"}, {"type": "stdin_stdout", "input": "10\n10 2 1 1\n10 2 1 2\n10 2 1 3\n10 2 1 4\n10 2 1 5\n10 2 1 6\n10 2 1 7\n10 2 1 8\n10 2 1 9\n10...
code_stdio
[ { "content": "You are an expert Python programmer. 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 string $s$ consi...
[{"type": "stdin_stdout", "input": "15 3\ncccaabababaccbc\n", "output": "cccbbabaccbc\n"}, {"type": "stdin_stdout", "input": "26 26\nabcdefghijklmnopqrstuvwxyz\n", "output": "\n"}, {"type": "stdin_stdout", "input": "14 5\nhxehmvkybeklnj\n", "output": "xmvkyklnj\n"}, {"type": "stdin_stdout", "input": "15 9\ncccaabababac...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "78 36\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 1 0 0 0 0 0 0 0 0 0 0\n1 52\n2 6\n9 43\n10 52\n4 63\n9 35\n10 67\n9 17\n3 43\n4 38\n1 27\n9 44\n6 74\n7 3\n8 18\n1 52\n1 68\n5 51\n5 2\n7 50\n1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA star is a figure of the follow...
[{"type": "stdin_stdout", "input": "100 3\n...\n...\n...\n...\n...\n...\n...\n*..\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n.*.\n***\n.*.\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n.....
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a three-digit posi...
[{"type": "stdin_stdout", "input": "575\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "171\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "123\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "812\n", "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\nAlice and Bob are playing One Ca...
[{"type": "stdin_stdout", "input": "1 13\n", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "11 11\n", "output": "Draw\n"}, {"type": "stdin_stdout", "input": "8 6\n", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "9 7\n", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "3 2\n", "output": "Ali...
code_stdio
[ { "content": "You are an expert Python programmer. 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 a New Year's gift, Dolphin re...
[{"type": "stdin_stdout", "input": "happy,newyear,enjoy\n", "output": "happy newyear enjoy\n"}, {"type": "stdin_stdout", "input": "haiku,atcoder,tasks\n", "output": "haiku atcoder tasks\n"}, {"type": "stdin_stdout", "input": "abcde,fghihgf,edcba\n", "output": "abcde fghihgf edcba\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\nThere are N students and M check...
[{"type": "stdin_stdout", "input": "50 50\n-87868672 9773500\n38180447 36636308\n-93470873 38029088\n49678522 -87311634\n62792334 -82584220\n50941177 2445768\n-21746015 -16856077\n-69539173 -40150977\n-82915111 -60619217\n-42155179 93071641\n-3205477 16657057\n26789545 -1410866\n-32360553 -38239433\n-69707837 59109468\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an integer a as input, pri...
[{"type": "stdin_stdout", "input": "10\n", "output": "1110\n"}, {"type": "stdin_stdout", "input": "5\n", "output": "155\n"}, {"type": "stdin_stdout", "input": "6\n", "output": "258\n"}, {"type": "stdin_stdout", "input": "7\n", "output": "399\n"}, {"type": "stdin_stdout", "input": "8\n", "output": "584\n"}, {"type": "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\nYou are given an image A compose...
[{"type": "stdin_stdout", "input": "49 48\n..#.......#....#...###...##.##.####.#.##..#.####.\n#####.....#####.#.#.######...#.#.#####.#.###..##.\n#.##.#####...#..#...##...###.####.....########.#.\n...#....###...#####.#..##.##.......#..####.#.####\n#......##..##.###.###.##..####..###.......###...#\n..#....#.####.###.####...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn some other world, today is th...
[{"type": "stdin_stdout", "input": "10\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n", "output": "95000\n"}, {"type": "stdin_stdout", "input": "10\n8830\n106\n9248\n6388\n3562\n7160\n8452\n3486\n5802\n9228\n", "output": "57638\n"}, {"type": "stdin_stdout", "input": "9\n6126\n5482\n9198\n9274\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe restaurant AtCoder serves th...
[{"type": "stdin_stdout", "input": "123\n123\n123\n123\n123\n", "output": "643\n"}, {"type": "stdin_stdout", "input": "101\n86\n119\n108\n57\n", "output": "481\n"}, {"type": "stdin_stdout", "input": "10\n80\n110\n70\n90\n", "output": "360\n"}, {"type": "stdin_stdout", "input": "57\n87\n123\n67\n47\n", "output": "393\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\nGiven is a sequence of N integer...
[{"type": "stdin_stdout", "input": "100\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn some other world, today is Ch...
[{"type": "stdin_stdout", "input": "3 2\n1\n500000000\n1000000000\n", "output": "499999999\n"}, {"type": "stdin_stdout", "input": "5 3\n10\n15\n11\n14\n12\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5 3\n5\n7\n5\n7\n7\n", "output": "0\n"}]
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn uppercase or lowercase Englis...
[{"type": "stdin_stdout", "input": "B\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "a\n", "output": "a\n"}, {"type": "stdin_stdout", "input": "A\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "G\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "Y\n", "output": "A\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\nYou have a digit sequence S of l...
[{"type": "stdin_stdout", "input": "0112\n", "output": "AMBIGUOUS\n"}, {"type": "stdin_stdout", "input": "0101\n", "output": "AMBIGUOUS\n"}, {"type": "stdin_stdout", "input": "1905\n", "output": "YYMM\n"}, {"type": "stdin_stdout", "input": "1312\n", "output": "YYMM\n"}, {"type": "stdin_stdout", "input": "0348\n", "outp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the number of ways to choos...
[{"type": "stdin_stdout", "input": "100\n", "output": "2500\n"}, {"type": "stdin_stdout", "input": "99\n", "output": "2450\n"}, {"type": "stdin_stdout", "input": "98\n", "output": "2401\n"}, {"type": "stdin_stdout", "input": "67\n", "output": "1122\n"}, {"type": "stdin_stdout", "input": "50\n", "output": "625\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\nDolphin loves programming contes...
[{"type": "stdin_stdout", "input": "23 23\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "9 12\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "19 0\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "22 1\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "3 12\n", "output": "15\n"}, {"t...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is a member of a progr...
[{"type": "stdin_stdout", "input": "100 4111\n", "output": "4111\n"}, {"type": "stdin_stdout", "input": "22 3051\n", "output": "3051\n"}, {"type": "stdin_stdout", "input": "10 3141\n", "output": "3141\n"}, {"type": "stdin_stdout", "input": "11 3141\n", "output": "3141\n"}, {"type": "stdin_stdout", "input": "2 2919\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\nGiven is an integer N. Find the ...
[{"type": "stdin_stdout", "input": "1000000000 2\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "314159265 3\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "282475249 7\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "282475248 7\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "282...
code_stdio
[ { "content": "You are an expert Python programmer. 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 wants to print a docum...
[{"type": "stdin_stdout", "input": "100\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "50\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "97\n", "output": "49\n"}, {"type": "stdin_stdout", "input": "99\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "42\n", "output": "21\n"}, {"type": "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\nE869120's and square1001's 16-th...
[{"type": "stdin_stdout", "input": "5 4\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "8 8\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "1 1\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "6 7\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "2 3\n", "output": "Yay!\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a string S consisting o...
[{"type": "stdin_stdout", "input": "1111111111\n", "output": "642\n"}, {"type": "stdin_stdout", "input": "2432423234\n", "output": "321\n"}, {"type": "stdin_stdout", "input": "8889998899\n", "output": "135\n"}, {"type": "stdin_stdout", "input": "1234567876\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "69452...
code_stdio
[ { "content": "You are an expert Python programmer. 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 were $n$ types of swords i...
[{"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 20 500000000 600000000 700000000 800000000 900000000 1000000000\n", "output": "244999999 20\n"}, {"type": "stdin_stdout", "input": "10\n1000000000 1 2 3 4 5 6 7 8 9\n", "output": "8999999955 1\n"}, {"type": "stdin_stdout", "input": "10\n1 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\nSolve the following coding problem using the programming language python:\n\nYou are given a forest — an undi...
[{"type": "stdin_stdout", "input": "100 50\n2 1\n3 4\n6 5\n7 8\n9 10\n11 12\n13 14\n12 13\n18 17\n21 22\n20 23\n20 21\n25 26\n28 27\n30 29\n32 31\n34 35\n33 35\n34 32\n37 36\n41 40\n43 44\n44 45\n47 48\n46 48\n50 49\n52 53\n53 54\n56 55\n57 58\n62 61\n65 64\n65 63\n67 66\n70 69\n71 73\n72 74\n71 74\n75 72\n77 76\n82 81...
code_stdio
[ { "content": "You are an expert Python programmer. 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$ dormitories in Ber...
[{"type": "stdin_stdout", "input": "3 10\n1000000000 1000000000 1000000000\n543678543 567869543 1000000000 1000000001 1500000000 1999999999 2000000000 2000000001 2754432345 3000000000\n", "output": "1 543678543\n1 567869543\n1 1000000000\n2 1\n2 500000000\n2 999999999\n2 1000000000\n3 1\n3 754432345\n3 1000000000\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\nPolycarp has guessed three posit...
[{"type": "stdin_stdout", "input": "1000000000 666666667 666666667 666666666\n", "output": "333333333 333333333 333333334\n"}, {"type": "stdin_stdout", "input": "600000000 900000000 500000000 1000000000\n", "output": "100000000 400000000 500000000\n"}, {"type": "stdin_stdout", "input": "500000000 500000001 999999999 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 have a garland consisting of...
[{"type": "stdin_stdout", "input": "500\nBRGRRBBGGRBBRBBGGGRBGBGRGRRBRRRBGRBGBRGGGRBBRRBBBRGGBGBBBGGGRGRBBBRBGGBRGGGBRGGRBRGBBGBRRGGBGRGBGGGGGRBBRGBGGRBGGGRBRGGBBGRBBRRRGBRRBGGBGBGGGGRBGRGRRGGGBRBRRGBGGGRBRBBGBBGGBRBGBRRGGRRBGGRRRRBRGRBBBRRBGRBBGBGBRRGGBRRBBRRGGRRRBGBRBBGRRRRBGGGBRGRRBRRRRGGRBRRBBRRGRGBGRRRBRRGGBBGRRBB...
code_stdio
[ { "content": "You are an expert Python programmer. 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 integer array o...
[{"type": "stdin_stdout", "input": "12\n1 2 3 4 5 6 7 8 9 10 11 12\n", "output": "12\n1 2 3 4 5 6 7 8 9 10 11 12 \n"}, {"type": "stdin_stdout", "input": "9\n6 7 8 3 4 5 9 10 11\n", "output": "6\n1 2 3 7 8 9 \n"}, {"type": "stdin_stdout", "input": "7\n3 3 4 5 6 7 8\n", "output": "6\n2 3 4 5 6 7 \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\nYou are given integers A and B, ...
[{"type": "stdin_stdout", "input": "3 1\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 1\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 3\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3 3\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 2\n", "output": "No\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\nThere is a train going from Stat...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "150\n"}, {"type": "stdin_stdout", "input": "81 58\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "100 2\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "76 48\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "1 100\n", "output": "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\nTakahashi is going to set a 3-ch...
[{"type": "stdin_stdout", "input": "5\n", "output": "125\n"}, {"type": "stdin_stdout", "input": "6\n", "output": "216\n"}, {"type": "stdin_stdout", "input": "7\n", "output": "343\n"}, {"type": "stdin_stdout", "input": "8\n", "output": "512\n"}, {"type": "stdin_stdout", "input": "9\n", "output": "729\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\nShichi-Go-San (literally \"Seven...
[{"type": "stdin_stdout", "input": "5\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "3\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "7\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "6\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1\n", "output": "NO\n"}, {"type": "stdin_...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nDecades have passed since the be...
[{"type": "stdin_stdout", "input": "1000\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1481\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1998\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1513\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1285\n", "output": "ABD\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn AtCoder city, there are five ...
[{"type": "stdin_stdout", "input": "6\n13\n29\n48\n105\n100\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "25\n26\n27\n28\n29\n91\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "0\n7\n9\n52\n123\n123\n", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "15\n18\n26\n35\n36\n18\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\nYou will be given an integer a a...
[{"type": "stdin_stdout", "input": "4999\nzzzzzzzzzz\n", "output": "zzzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "4998\nrainbow\n", "output": "rainbow\n"}, {"type": "stdin_stdout", "input": "3201\npurple\n", "output": "purple\n"}, {"type": "stdin_stdout", "input": "3200\npink\n", "output": "pink\n"}, {"type": "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\nA programming competition site A...
[{"type": "stdin_stdout", "input": "1199\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "1200\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "4208\n", "output": "AGC\n"}, {"type": "stdin_stdout", "input": "1234\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "2799\n", "output": "ARC\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\nCat Snuke is learning to write c...
[{"type": "stdin_stdout", "input": "119\n", "output": "991\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "111\n"}, {"type": "stdin_stdout", "input": "191\n", "output": "919\n"}, {"type": "stdin_stdout", "input": "111\n", "output": "999\n"}, {"type": "stdin_stdout", "input": "191\n", "output": "919\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\nAlice guesses the strings that B...
[{"type": "stdin_stdout", "input": "11\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nac\nbccddaaf\nzzzzzzzzzz\n", "output": "abac\nabac\nabac\nabac\nabac\nabac\nabac\nabac\nac\nbcdaf\nzzzzzz\n"}, {"type": "stdin_stdout", "input": "10\nabbaac\nac\nbccddaaf\nzzzzzzzzzz\nabbaac\nac\nbccddaaf\nzzzzzzzzzz...
code_stdio
[ { "content": "You are an expert Python programmer. 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 heat during the last few day...
[{"type": "stdin_stdout", "input": "5 1\n3 10 9 10 6\n", "output": "10.000000000000000\n"}, {"type": "stdin_stdout", "input": "5 4\n5 1 10 6 1\n", "output": "5.500000000000000\n"}, {"type": "stdin_stdout", "input": "5 2\n7 3 3 1 8\n", "output": "5.000000000000000\n"}, {"type": "stdin_stdout", "input": "5 3\n1 7 6 9 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\nPolycarp loves ciphers. He has i...
[{"type": "stdin_stdout", "input": "55\ncooooonnnnttttteeeeeeeeeeeeessssssssttttttttttttttttttt\n", "output": "coonteestt"}, {"type": "stdin_stdout", "input": "55\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "aaaaaaaaaa"}, {"type": "stdin_stdout", "input": "36\nabbcccddddeeeeeffffffggggggghhhh...
code_stdio
[ { "content": "You are an expert Python programmer. 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 weig...
[{"type": "stdin_stdout", "input": "8 10\n1 2 1\n2 3 2\n2 4 5\n1 4 2\n6 3 3\n6 1 3\n3 5 2\n3 7 1\n4 8 1\n6 2 4\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6 7\n1 2 1\n2 3 1\n3 4 1\n4 5 1\n5 1 2\n2 6 2\n3 6 2\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5 6\n1 2 2\n2 3 1\n4 5 3\n2 4 2\n1 4 2\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 have a garland consisting of...
[{"type": "stdin_stdout", "input": "500\nBRGRRBBGGRBBRBBGGGRBGBGRGRRBRRRBGRBGBRGGGRBBRRBBBRGGBGBBBGGGRGRBBBRBGGBRGGGBRGGRBRGBBGBRRGGBGRGBGGGGGRBBRGBGGRBGGGRBRGGBBGRBBRRRGBRRBGGBGBGGGGRBGRGRRGGGBRBRRGBGGGRBRBBGBBGGBRBGBRRGGRRBGGRRRRBRGRBBBRRBGRBBGBGBRRGGBRRBBRRGGRRRBGBRBBGRRRRBGGGBRGRRBRRRRGGRBRRBBRRGRGBGRRRBRRGGBBGRRBB...
code_stdio
[ { "content": "You are an expert Python programmer. 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 received otoshidama (N...
[{"type": "stdin_stdout", "input": "10\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n100.00000000 BTC\n", "output": "380000000.0\n"}, {"type": "stdin_stdout", "input": "10\n22.49891780 BTC\n59.00375526 B...
code_stdio
[ { "content": "You are an expert Python programmer. 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 an N-car train.\nYou ar...
[{"type": "stdin_stdout", "input": "100 1\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "93 40\n", "output": "54\n"}, {"type": "stdin_stdout", "input": "89 21\n", "output": "69\n"}, {"type": "stdin_stdout", "input": "15 11\n", "output": "5\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\nGiven are strings s and t of len...
[{"type": "stdin_stdout", "input": "100\naernvaoeiuraxmueiwovioxmuaioervuaionuxiaomuahlhakaqduwbuvpgrrgreiufwuiaubewobsjdhfbajkslfhjcaklyuwee aibfaeqpwidbcuoifnydukfbavysknxyualdyksayfkjdafqiryekucyuwepaasfdasdfiocaudmiovuandksfucnaldsfumioxa\n", "output": "aaeirbnfvaaeoqepiwuirdabxcmuuoeiifwnoyvdiuokxfmbuaaviyosekrnvx...
code_stdio
[ { "content": "You are an expert Python programmer. 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 AtCoder City, there are three...
[{"type": "stdin_stdout", "input": "ABA\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "BBA\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "BAB\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "AAB\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ABB\n", "output": "Yes\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\nWe have weather records at AtCod...
[{"type": "stdin_stdout", "input": "RRS\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "SSS\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "RSR\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "SRS\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "SSR\n", "output": "1\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\nTakahashi, who is A years old, i...
[{"type": "stdin_stdout", "input": "30 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "13 298\n", "output": "298\n"}, {"type": "stdin_stdout", "input": "60 654\n", "output": "654\n"}, {"type": "stdin_stdout", "input": "12 100\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "6 482\n", "output": "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is always an integer in Ta...
[{"type": "stdin_stdout", "input": "-+--\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "----\n", "output": "-4\n"}, {"type": "stdin_stdout", "input": "--+-\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+---\n", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+-++\n", "output": "2\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\nYou are given a string S as inpu...
[{"type": "stdin_stdout", "input": "2019/04/30\n", "output": "Heisei\n"}, {"type": "stdin_stdout", "input": "2019/01/01\n", "output": "Heisei\n"}, {"type": "stdin_stdout", "input": "2019/02/28\n", "output": "Heisei\n"}, {"type": "stdin_stdout", "input": "2019/04/29\n", "output": "Heisei\n"}, {"type": "stdin_stdout", "i...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "10 4\n2 3 3 1 1 2 1 2 3 3\n", "output": "3\n1 3 2 \n"}, {"type": "stdin_stdout", "input": "9 2\n1 2 3 4 5 6 7 8 9\n", "output": "2\n9 8 \n"}, {"type": "stdin_stdout", "input": "7 2\n1 2 3 2 1 3 2\n", "output": "2\n2 1 \n"}, {"type": "stdin_stdout", "input": "3 4\n1 1 2\n", "output": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp has $n$ coins, the valu...
[{"type": "stdin_stdout", "input": "1 10\n8\n1\n2\n3\n4\n5\n6\n7\n8\n9\n16\n", "output": "-1\n-1\n-1\n-1\n-1\n-1\n-1\n1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "1 10\n4\n1\n2\n3\n4\n5\n6\n7\n8\n9\n16\n", "output": "-1\n-1\n-1\n1\n-1\n-1\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "1 10\n2\n1\n2\n3\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\nYou are given an array $a$ consi...
[{"type": "stdin_stdout", "input": "69\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\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n2 3 3 4 1 4 1 4 1 4\n", "output": "6\n1 3 4 \n1 2 3 \n1 1 2 \n1 5 4 \n1 7 6 \n1 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\nPolycarp and his friends want to...
[{"type": "stdin_stdout", "input": "7\n4 4\n0100\n4 4\n0100\n4 4\n0100\n4 4\n0100\n4 4\n0100\n4 4\n0100\n4 4\n0100\n", "output": "0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "6\n6 1\n100010\n6 2\n000000\n5 1\n10101\n3 1\n001\n2 2\n00\n1 1\n0\n", "output": "1\n2\n0\n1\n1\n1\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 only difference between easy...
[{"type": "stdin_stdout", "input": "18 1\n116 138\n106 165\n105 130\n142 161\n99 128\n108 149\n82 162\n131 134\n167 167\n138 155\n76 150\n71 132\n100 167\n86 161\n88 152\n76 158\n142 150\n136 138\n", "output": "13\n1 2 3 4 6 7 10 11 12 13 14 15 16 \n"}, {"type": "stdin_stdout", "input": "16 3\n181 182\n183 184\n179 181...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nOne important contest will take ...
[{"type": "stdin_stdout", "input": "1\n37\n166320 83160 41580 33264 27720 23760 20790 18480 16632 15120 13860 11880 11088 10395 9240 8316 7920 7560 6930 6160 5940 5544 5040 4752 4620 4158 3960 3780 3696 3465 3080 3024 2970 2772 2640 29 23\n", "output": "166372\n"}, {"type": "stdin_stdout", "input": "1\n53\n50 50 50 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\nSolve the following coding problem using the programming language python:\n\nTwo integer sequences existed in...
[{"type": "stdin_stdout", "input": "7\n7 2 7 3 3 1 4\n", "output": "YES\n2\n3 7 \n5\n7 4 3 2 1 \n"}, {"type": "stdin_stdout", "input": "5\n4 3 1 5 3\n", "output": "YES\n1\n3 \n4\n5 4 3 1 \n"}, {"type": "stdin_stdout", "input": "5\n0 1 2 3 4\n", "output": "YES\n0\n\n5\n4 3 2 1 0 \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\nThere are $n$ products in the sh...
[{"type": "stdin_stdout", "input": "5\n8 19551489\n31131899 17585660 3913937 14521321 5400652 96097161 58347480 35051437\n1 55716143\n15578410\n7 19560555\n65980880 53703939 20259503 99698023 98868060 83313210 9926424\n6 72321938\n59271765 72426489 16625497 51598082 31475864 53103921\n7 44965081\n49955408 62397026 3998...
code_stdio
[ { "content": "You are an expert Python programmer. 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$ consi...
[{"type": "stdin_stdout", "input": "100\n4 42 23 23 8 42 16 23 42 16 42 8 4 23 4 4 23 42 16 42 23 23 23 42 4 42 8 8 16 23 15 23 16 4 42 15 15 23 16 15 16 4 4 15 23 42 42 15 8 23 8 23 4 15 16 15 42 8 23 16 15 42 23 8 4 16 15 16 23 16 16 4 23 16 8 23 16 15 23 4 4 8 15 4 4 15 8 23 23 4 4 8 8 4 42 15 4 4 42 16\n", "output"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers $a$ a...
[{"type": "stdin_stdout", "input": "11\n5 5\n13 42\n18 4\n1337 420\n123456789 1000000000\n100500 9000\n5 5\n13 42\n18 4\n1337 420\n123456789 1000000000\n", "output": "0\n3\n2\n92\n87654322\n9150\n0\n3\n2\n92\n87654322\n"}, {"type": "stdin_stdout", "input": "6\n5 5\n13 42\n18 4\n1337 420\n123456789 1000000000\n100500 90...
code_stdio