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\nShuseki Kingdom is the world's l... | [{"type": "stdin_stdout", "input": "7 13\n6 1\n7 2\n3 7\n6 5\n3 6\n7 4\n3 5\n4 1\n3 1\n1 5\n1 6\n4 2\n2 4\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "7 13\n6 1\n7 2\n3 7\n6 5\n3 6\n7 4\n3 7\n4 1\n3 1\n1 5\n1 6\n4 2\n2 4\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "7 13\n6 1\n7 2\n3 7\n6 5\n3 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\nFind the price of a product befo... | [{"type": "stdin_stdout", "input": "80 100\n", "output": "1000\n"}, {"type": "stdin_stdout", "input": "68 85\n", "output": "850\n"}, {"type": "stdin_stdout", "input": "24 30\n", "output": "300\n"}, {"type": "stdin_stdout", "input": "25 32\n", "output": "320\n"}, {"type": "stdin_stdout", "input": "27 34\n", "output": "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\nEvery year, hundreds of people c... | [{"type": "stdin_stdout", "input": "1000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "1000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "100\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "123\n", "output": "6\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\nA sequence a0, a1, ..., at - 1 i... | [{"type": "stdin_stdout", "input": "100 3\n329 226 331 909 962 112 837 1005 194 818 506 416 125 648 367 459 400 582 989 547 329 438 234 121 272 226 821 376 834 427 718 164 834 113 654 177 737 212 169 696 744 180 89 944 233 147 667 990 809 1072 1085 1093 814 265 1067 312 833 572 303 901 1032 504 185 817 389 158 613 723 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nAtCoDeer the deer recently bough... | [{"type": "stdin_stdout", "input": "11 12 -1", "output": "3\n"}, {"type": "stdin_stdout", "input": "11 20 -1", "output": "3\n"}, {"type": "stdin_stdout", "input": "3 3 33\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5 -1 33", "output": "3\n"}, {"type": "stdin_stdout", "input": "5 -2 33", "output": "3\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA bracket sequence is a string c... | [{"type": "stdin_stdout", "input": "40 36\n((((((((()()()))))))))((())((()())))(())\n", "output": "((((((((()()()))))))))((())((()())))\n"}, {"type": "stdin_stdout", "input": "40 34\n((((((((()()()))))))))((())((()())))(())\n", "output": "((((((((()()()))))))))((())((())))\n"}, {"type": "stdin_stdout", "input": "40 32\... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 decided to carry out a su... | [{"type": "stdin_stdout", "input": "100000 1000000 7821\n", "output": "108426\n"}, {"type": "stdin_stdout", "input": "10000 1000000 60000\n", "output": "793662\n"}, {"type": "stdin_stdout", "input": "10000 1000000 60000\n", "output": "793662"}, {"type": "stdin_stdout", "input": "100000 1000000 7821\n", "output": "10842... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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# Convert number to reversed arr... | [{"input": "548702838394", "output": "[[4, 9, 3, 8, 3, 8, 2, 0, 7, 8, 4, 5]]", "fn_name": "digitize"}, {"input": "45762893920", "output": "[[0, 2, 9, 3, 9, 8, 2, 6, 7, 5, 4]]", "fn_name": "digitize"}, {"input": "984764738", "output": "[[8, 3, 7, 4, 6, 7, 4, 8, 9]]", "fn_name": "digitize"}, {"input": "23582357", "output... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOleg the client and Igor the ana... | [{"type": "stdin_stdout", "input": "tinkoff\nzscoder\n", "output": "fzfsirk\n"}, {"type": "stdin_stdout", "input": "tinkoff\nzscoder\n", "output": "fzfsirk\n"}, {"type": "stdin_stdout", "input": "tinkogf\nzscoder\n", "output": "fzgsirk"}, {"type": "stdin_stdout", "input": "thnkogf\nzscoder\n", "output": "fzgshrk"}, {"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\nVasya likes to solve equations. ... | [{"type": "stdin_stdout", "input": "999983 1000\n", "output": "999983001\n"}, {"type": "stdin_stdout", "input": "999995 1000\n", "output": "199999005\n"}, {"type": "stdin_stdout", "input": "1709131 435\n", "output": "743471986\n"}, {"type": "stdin_stdout", "input": "232207 1179\n", "output": "273772054\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\nThe R1 company wants to hold a w... | [{"type": "stdin_stdout", "input": "80 50\n15160 6853 20254 11358 19535 27691 2983 31650 9219 11833 32053 31695 21511 4320 4384 24843 1454 31543 18796 13815 1546 27926 16276 14315 12542 25370 24890 29647 3584 17867 12446 15072 19852 30207 16361 7964 5343 398 10837 31114 9252 12767 15098 22562 32637 31823 8160 12658 642... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nMr. ukuku1333 is a li... | [{"type": "stdin_stdout", "input": "x^5+15x^4+85x^3+225x^2+274x+120", "output": "(x+1)(x+2)(x+3)(x+4)(x+5)"}, {"type": "stdin_stdout", "input": "x^3-81x^2-1882x-1800", "output": "(x-100)(x+1)(x+18)"}, {"type": "stdin_stdout", "input": "x^2+4x+3", "output": "(x+1)(x+3)\n"}, {"type": "stdin_stdout", "input": "x^2+3x+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\nWhen a boy was cleaning up after... | [{"type": "stdin_stdout", "input": "56,65\n97,54\n64,-4\n55,76\n42,-27\n43,80\n87,-86\n55,-6\n89,34\n5,59\n0,0", "output": "181\n-212\n"}, {"type": "stdin_stdout", "input": "56,65\n97,54\n64,-4\n55,76\n42,-27\n43,80\n77,-86\n55,-6\n89,34\n95,5\n0,0", "output": "180\n-297\n"}, {"type": "stdin_stdout", "input": "56,65\n9... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\n\"Everlasti... | [{"type": "stdin_stdout", "input": "12 2\n2 2\n4 12\n6 0\n100000 0\n0 0", "output": "2049\n64\n607723520\n"}, {"type": "stdin_stdout", "input": "12 2\n1 2\n4 3\n6 0\n100000 0\n0 0", "output": "1025\n64\n607723520\n"}, {"type": "stdin_stdout", "input": "12 2\n2 2\n4 3\n6 0\n100000 0\n0 0", "output": "2049\n64\n607723520... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 day Vasya got hold of inform... | [{"type": "stdin_stdout", "input": "93 867\n131 1270 616 1027 1685 27 1662 947 1480 20 1394 1528 191 1348 37 1694 1772 1706 1394 49 1391 878 1474 307 101 1129 1064 116 143 1239 261 651 1534 1348 1604 636 793 1188 1293 36 1729 1204 1656 1579 1644 661 1470 341 1709 1860 1081 1539 5 1892 1732 1049 419 25 1086 1263 967 128... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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# Task\nFor the given set `S` it... | [{"input": "[125, 15, 155, 15, 158]", "output": "[[[], [158], [15], [15, 158], [155], [155, 158], [155, 15], [155, 15, 158], [15], [15, 158], [15, 15], [15, 15, 158], [15, 155], [15, 155, 158], [15, 155, 15], [15, 155, 15, 158], [125], [125, 158], [125, 15], [125, 15, 158], [125, 155], [125, 155, 158], [125, 155, 15], ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo get money for a new aeonic bl... | [{"type": "stdin_stdout", "input": "5 10 15\nDdunkjly\n13 12 4\n83 26 1\n63 42 3\n83 22 2\n57 33 0\n59 10 1\n89 31 1\n57 17 2\n98 79 5\n46 41 3\nFbpbc\n28 21 0\n93 66 5\n66 21 0\n68 58 0\n59 17 3\n57 23 1\n72 71 1\n55 51 2\n58 40 5\n70 67 2\nKeiotmh\n73 44 4\n98 14 0\n19 7 0\n55 10 5\n30 25 4\n66 48 2\n66 51 4\n82 79 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\n~~~if-not:ruby,python\nReturn `1... | [{"input": "2863311530", "output": "[true]", "fn_name": "any_odd"}, {"input": "24082", "output": "[true]", "fn_name": "any_odd"}, {"input": "1024", "output": "[false]", "fn_name": "any_odd"}, {"input": "1365", "output": "[false]", "fn_name": "any_odd"}, {"input": "128", "output": "[true]", "fn_name": "any_odd"}, {"inpu... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDefine a function that takes one... | [{"input": "75", "output": "[false]", "fn_name": "is_prime"}, {"input": "-1", "output": "[false]", "fn_name": "is_prime"}, {"input": "0", "output": "[false]", "fn_name": "is_prime"}, {"input": "1", "output": "[false]", "fn_name": "is_prime"}, {"input": "73", "output": "[true]", "fn_name": "is_prime"}, {"input": "2", "o... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEmacs is a text editor which is ... | [{"type": "stdin_stdout", "input": "hyo\nnh\nEND_OF_TEXT\ne\nd\nf\nf\nk\np\np\ne\ny\na\nk\ny\ny\nn\ny\n-", "output": "hyonhhyonhhyonh\n"}, {"type": "stdin_stdout", "input": "hyn\nnh\nEND_OF_TEXT\ne\nd\nf\nf\nk\np\np\ne\nx\na\nk\ny\ny\nn\ny\n-", "output": "hynnhhynnhhynnh\n"}, {"type": "stdin_stdout", "input": "oyh\nni\... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nSanta Claus likes palindromes ve... | [{"type": "stdin_stdout", "input": "10 20\njvyxocgomfmrtllgmagp 13\ngvtjnyaofrswcnnifzfq 17\nqisxpseggpjfoijmqnel -5\nlenqmjiofjpggespxsiq 14\nqfzfinncwsrfoaynjtvg 14\ncaayidazlylxyisihdhx 14\npgamglltrmfmogcoxyvj 11\nxhdhisiyxlylzadiyaac 2\ntbirihfpjgbbtclpxwhv 19\nvhwxplctbbgjpfhiribt 10\n", "output": "109\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\nAnya loves to fold and stick. To... | [{"type": "stdin_stdout", "input": "25 16 13326087796\n157576937 627434432 942652043 706432863 631136945 714549755 465703470 663358517 695561723 249240606 833566455 396564536 758483017 253748999 978210764 530023233 193812243 317718202 184788435 892848108 150420430 330992298 780787784 196460118 674015883\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 stone quarries in Pe... | [{"type": "stdin_stdout", "input": "30\n53 12\n13 98\n21 60\n76 58\n39 5\n62 58\n73 80\n13 75\n37 45\n44 86\n1 85\n13 33\n17 50\n12 26\n97 48\n52 40\n2 71\n95 79\n38 76\n24 54\n91 39\n97 92\n94 80\n50 61\n33 56\n22 91\n39 94\n31 56\n28 16\n20 44\n", "output": "tolik\n"}, {"type": "stdin_stdout", "input": "30\n53 12\n13... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 of intege... | [{"type": "stdin_stdout", "input": "8\n4\n1 2 5 2\nBRBR\n2\n1 2\nBB\n5\n3 1 4 2 5\nBRRBR\n5\n4 1 3 1 4\nRBRRB\n5\n5 1 5 1 10\nRBRRA\n4\n2 2 2 2\nBRBR\n2\n1 -3\nBR\n4\n-2 -1 4 0\nRRRR\n", "output": "YES\nYES\nYES\nYES\nNO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "8\n4\n1 2 5 2\nBRBR\n2\n1 2\nBB\n5\n3 1 4 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nD: Arrow / Arrow\n\nproblem\n\nr... | [{"type": "stdin_stdout", "input": "11 1\n11\n1\n16", "output": "1\n"}, {"type": "stdin_stdout", "input": "11 1\n11\n1\n6", "output": "-1\n"}, {"type": "stdin_stdout", "input": "15 1\n3\n1\n2", "output": "13\n"}, {"type": "stdin_stdout", "input": "15 1\n6\n1\n5", "output": "10\n"}, {"type": "stdin_stdout", "input": "15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a set of $N$ axis-aligned ... | [{"type": "stdin_stdout", "input": "4\n0 0 3 1\n-1 0 1 3\n-1 2 4 3\n3 0 3 3", "output": "11\n"}, {"type": "stdin_stdout", "input": "4\n0 0 3 1\n-1 0 1 3\n-1 0 4 3\n2 0 3 2", "output": "15\n"}, {"type": "stdin_stdout", "input": "4\n0 0 3 2\n-1 0 1 3\n-1 0 8 3\n2 0 3 2", "output": "27\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 three cells on an infi... | [{"type": "stdin_stdout", "input": "7\n\n2 2\n0 3\n-1 2\n\n2 5\n2 2\n0 3\n\n1000 144\n1000 2\n1000 0000\n\n0 2\n3 10\n2 10\n\n0 13\n12 8\n2 10\n\n0 1\n4 1\n1 2\n\n2 413\n0 10\n1 0\n", "output": "3\n3\n142\n11\n17\n4\n405\n"}, {"type": "stdin_stdout", "input": "7\n\n2 2\n1 3\n-1 2\n\n2 5\n2 1\n2 3\n\n1000 144\n1000 1\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\nAfter a team finished their trai... | [{"type": "stdin_stdout", "input": "10894 92356\n", "output": "46178\n46179\n46177\n46180\n46176\n46181\n46175\n46182\n46174\n46183\n46173\n46184\n46172\n46185\n46171\n46186\n46170\n46187\n46169\n46188\n46168\n46189\n46167\n46190\n46166\n46191\n46165\n46192\n46164\n46193\n46163\n46194\n46162\n46195\n46161\n46196\n46160... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 rooted tree with... | [{"type": "stdin_stdout", "input": "8\n2 1\n-1 0\n1 1\n1 1\n1 1\n4 0\n5 1\n7 1\n", "output": "1 3 5 7 8\n"}, {"type": "stdin_stdout", "input": "8\n2 1\n-1 0\n1 1\n1 1\n1 1\n4 0\n5 1\n7 0\n", "output": "1 3 5\n"}, {"type": "stdin_stdout", "input": "8\n2 1\n-1 0\n1 0\n1 1\n2 1\n4 0\n5 1\n7 1\n", "output": "5 7 8\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\nIn Republic of Atcoder, there ar... | [{"type": "stdin_stdout", "input": "75634 912\n18125 601244640\n58230 951349939\n4017 753730550\n23636 124912128\n45120 23758881\n51811 316477853\n19326 139861106\n48018 406348942\n68864 391719264\n1850 712458521\n2796 385027567\n12731 564315721\n43367 828330253\n30104 102450015\n64351 340641907\n19781 414658282\n53502... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nProf. Hachioji has devised a new... | [{"type": "stdin_stdout", "input": "10\nxi x8i\ni 9i\nc2x2i 5c9x8i\nm2ci 4m7c9x8i\n8c9x8i i\ni 9m9c9x8i\nm i\ni m\nm9i i\n8m9c7xi c1x8i", "output": "2x9i\nx\n7c2x\n5m9c9x9i\n8c9x9i\n9m9c9x9i\nmi\nmi\nmx\n9m8x9i\n"}, {"type": "stdin_stdout", "input": "10\nxi x8i\ni 9i\nc2x3i 5c8x8i\nm2ci 4m7c9x8i\n9c8x9i i\ni 9m9c9x8i\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\nLet's solve the geometric proble... | [{"type": "stdin_stdout", "input": "128 205", "output": "205\n"}, {"type": "stdin_stdout", "input": "110 161", "output": "161\n"}, {"type": "stdin_stdout", "input": "13 204", "output": "102\n"}, {"type": "stdin_stdout", "input": "11 251", "output": "251\n"}, {"type": "stdin_stdout", "input": "10 103", "output": "103\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 are league games and tourn... | [{"type": "stdin_stdout", "input": "4\nJapan 1 0 2\nEgypt 1 3 -1\nCanada 0 2 1\nSpain 1 0 1\n3\nJndia -1 2 0\nPoland 1 1 1\nItalx 1 -1 1\n0", "output": "Japan,5\nSpain,4\nEgypt,2\nCanada,1\n\nPoland,4\nItalx,4\nJndia,-3\n"}, {"type": "stdin_stdout", "input": "4\nnapaJ 1 0 0\nEgzpt 0 2 -1\naDaadn 0 2 3\nnibpS 2 0 0\n3\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\nRyouko is an extremely forgetful... | [{"type": "stdin_stdout", "input": "100 100\n28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 Romans have attacked again. ... | [{"type": "stdin_stdout", "input": "97\n800 771 66 126 231 306 981 96 196 229 253 35 903 739 461 962 979 347 152 424 934 586 225 838 103 178 524 400 156 149 560 629 697 417 717 738 181 430 611 513 754 595 847 464 356 640 24 854 138 481 98 371 142 460 194 288 220 41 999 581 441 407 301 651 271 226 457 393 980 166 272 25... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nWrite a program which reads a li... | [{"type": "stdin_stdout", "input": "92 101 -1\n16 30 -1\n0 2 -1\n-1 -1 -1", "output": "A\nD\nF\n"}, {"type": "stdin_stdout", "input": "150 64 -2\n16 30 -1\n1 0 -1\n-1 -1 -1", "output": "A\nD\nF\n"}, {"type": "stdin_stdout", "input": "116 100 -1\n16 50 -1\n1 1 0\n-1 -1 -1", "output": "A\nB\nF\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\nWe have N lamps numbered 1 to N,... | [{"type": "stdin_stdout", "input": "9479599 4999", "output": "395563313\n"}, {"type": "stdin_stdout", "input": "4734557 4999", "output": "743624188\n"}, {"type": "stdin_stdout", "input": "7100253 4999", "output": "2548353\n"}, {"type": "stdin_stdout", "input": "9999999 4999", "output": "90395416"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 description is rather long b... | [{"input": "9.0\n187174\n60\n12", "output": "[\"num_payment 12 c 3885 princ 2694 int 1191 balance 156135\"]", "fn_name": "amort"}, {"input": "1.9\n182840\n48\n18", "output": "[\"num_payment 18 c 3959 princ 3769 int 189 balance 115897\"]", "fn_name": "amort"}, {"input": "7.0\n168742\n48\n16", "output": "[\"num_payment 1... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA palindrome is a series of char... | [{"input": "\"$aaabbbccddd_!jJpqlQx_.///yYabababhii_\"", "output": "[25]", "fn_name": "longest_palindrome"}, {"input": "\"xyz__a_/b0110//a_zyx\"", "output": "[13]", "fn_name": "longest_palindrome"}, {"input": "\"Hannah\"", "output": "[6]", "fn_name": "longest_palindrome"}, {"input": "\"A\"", "output": "[1]", "fn_name":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Kata Task\n\nYou are given a l... | [{"input": "[100, 100, 100, 100]\n0", "output": "[[1, -1]]", "fn_name": "cog_RPM"}, {"input": "[100, 100, 100, 100]\n1", "output": "[[-1, 1]]", "fn_name": "cog_RPM"}, {"input": "[100, 100, 100, 100]\n2", "output": "[[1, -1]]", "fn_name": "cog_RPM"}, {"input": "[100, 100, 100, 100]\n3", "output": "[[-1, 1]]", "fn_name":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose that there are some ligh... | [{"type": "stdin_stdout", "input": "12 5 4\n0 10 0 1\n1 3 0 2\n1 4 0 2\n0 0 0 2\n10 0 0 1\n3 -1 0 2\n5 -1 0 2\n10 10 0 15\n-1 -10 0 1\n10 -10 0 1\n-10 -10 0 1\n10 10 0 1\n0 10 0 240\n10 0 0 200\n10 -2 0 52\n-10 0 0 100\n1 0 0 2\n-1 1 0\n12 5 4\n0 10 0 1\n1 5 0 2\n1 4 0 2\n0 0 0 2\n10 0 0 1\n3 -1 0 2\n5 -1 0 2\n10 10 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\nPolycarp has n different binary ... | [{"type": "stdin_stdout", "input": "4\n4\n0001\n1000\n0011\n0111\n3\n010\n111\n0\n2\n00000\n00001\n4\n01\n001\n0001\n00001\n", "output": "1\n3\n-1\n0\n\n2\n1 2\n"}, {"type": "stdin_stdout", "input": "4\n4\n0001\n0000\n0011\n0111\n3\n010\n111\n1\n2\n00000\n00001\n4\n01\n001\n0001\n00001\n", "output": "1\n1\n-1\n0\n\n2\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\n## Number pyramid\n\nNumber pyra... | [{"input": "[13, 76, 21, 42, 63]", "output": "[674]", "fn_name": "reduce_pyramid"}, {"input": "[13, 1, 21, 9]", "output": "[88]", "fn_name": "reduce_pyramid"}, {"input": "[5, 6, 7, 8]", "output": "[52]", "fn_name": "reduce_pyramid"}, {"input": "[3, 9, 4]", "output": "[25]", "fn_name": "reduce_pyramid"}, {"input": "[3, ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNam is playing with a string on ... | [{"type": "stdin_stdout", "input": "198 10\ntuxqalctjyegbvouezfiqoeoazizhmjhpcmvyvjkyrgxkeupwcmvzcosdrrfgtdmxwfttxjxsbaspjwftgpnvsfyfqsrmyjmypdwonbzwsftepwtjlgbilhcsqyfzfzrfvrvfqiwoemthwvqpvqnflqqspvqrnmvucnspexpijnivqpavqxjyucufculletaedlvut\n", "output": "695\n"}, {"type": "stdin_stdout", "input": "198 14\ntuxqalctjy... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 both a shop keeper and a... | [{"type": "stdin_stdout", "input": "3\n5\n1 2 6 4 5\n3\n1 2 3\n2\n777 2131\n", "output": "4\n2\n1454\n"}, {"type": "stdin_stdout", "input": "3\n5\n1 2 3 4 5\n3\n1 2 3\n2\n777 1089\n", "output": "3\n2\n933\n"}, {"type": "stdin_stdout", "input": "3\n5\n1 2 6 4 5\n3\n1 2 3\n2\n777 1089\n", "output": "4\n2\n933\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\nOne day, Snuke was given a permu... | [{"type": "stdin_stdout", "input": "8\n5 3 8 1 2 6 7 4", "output": "84\n"}, {"type": "stdin_stdout", "input": "8\n4 5 8 1 2 6 7 3", "output": "86\n"}, {"type": "stdin_stdout", "input": "8\n5 4 8 1 2 6 7 3", "output": "85"}, {"type": "stdin_stdout", "input": "4\n2 3 1 4", "output": "17\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer N. Amon... | [{"type": "stdin_stdout", "input": "100\n", "output": "543\n"}, {"type": "stdin_stdout", "input": "52\n", "output": "123\n"}, {"type": "stdin_stdout", "input": "54\n", "output": "131\n"}, {"type": "stdin_stdout", "input": "77\n", "output": "323\n"}, {"type": "stdin_stdout", "input": "78\n", "output": "324\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 team of students from the city... | [{"type": "stdin_stdout", "input": "200\n2 1 1 2 2 2 2 1 1 2 2 2 1 1 2 2 2 2 1 1 1 2 2 2 2 2 2 1 2 2 1 1 1 1 2 1 2 2 1 2 2 2 2 1 2 2 1 1 1 1 2 2 1 1 1 1 1 2 2 2 2 1 2 1 2 2 2 2 1 1 1 2 1 2 2 2 2 1 1 1 1 1 1 2 2 2 1 2 2 2 1 2 2 2 1 1 1 2 2 1 1 1 1 2 2 1 2 1 1 1 2 2 1 1 2 2 2 1 2 2 0 1 2 1 1 2 2 2 1 2 2 1 1 1 2 2 2 1 2 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a company an emplopyee is pai... | [{"type": "stdin_stdout", "input": "3\n1203\n10042\n1312", "output": "2406.00\n20383.16\n2624\n"}, {"type": "stdin_stdout", "input": "3 \n530\n4670\n1914", "output": "1060\n9746.6\n4289.72\n"}, {"type": "stdin_stdout", "input": "3 \n1203\n10042\n1312", "output": "2406\n20383.2\n2624\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\nPolycarp is a frequent user of t... | [{"type": "stdin_stdout", "input": "100 100\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 1 76 80 60 100 49 70 59 72 8 38 71 15 97 71 14 76 90 81 4 59 46 39 28 92 3 28 22 53 99 59 52 74 43 92 43 42 23 44 9 82 47 7 48 12 12 3 55 37 71 46 22 84 52 98 41 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nAndrey received a postcard from ... | [{"type": "stdin_stdout", "input": "uduzhzchjkaddukfwqngffblohjmqbgyfrzomuznircygatbxoyfxflurhoewioptyqlpoozlksyxrntwsqozghcamszlgeawisninpntpwpuemybjwmhwmpqkurkrnjzfoppmoopwrmpylvhtntghxkavveeyfmdqsvuqiflyemklnshfrtskmyhkbzhwmlaqcasjbw\n200\n", "output": "uduzhzchjkaddukfwqngffblohjmqbgyfrzomuznircygatbxoyfxflurhoewio... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nDark is going to attend Motarack... | [{"type": "stdin_stdout", "input": "7\n5\n-1 3 -1 24 -1\n5\n-1 40 14 -1 35\n6\n-1 -1 6 -1 0 -1\n2\n-1 -1\n2\n0 -1\n4\n1 -1 3 -1\n7\n1 -1 7 10 0 0 10\n", "output": "11 13\n26 27\n3 3\n0 0\n0 0\n1 2\n10 4\n"}, {"type": "stdin_stdout", "input": "7\n5\n-1 10 -1 20 -1\n5\n-1 22 35 -1 35\n6\n-1 -1 9 -1 3 -1\n2\n-1 -1\n2\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\nAtCoDeer the deer is going on a ... | [{"type": "stdin_stdout", "input": "2\n-3 4 1\n111 4 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "2\n5 1 1\n100 1 1\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "2\n5 2 3\n100 0 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "2\n5 2 2\n100 1 -1", "output": "No\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\nEach of you probably has your pe... | [{"type": "stdin_stdout", "input": "100\n11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100\n77183123282838... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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. Chanek is currently particip... | [{"type": "stdin_stdout", "input": "6 1\n1 10 10 5 20 100\n1000000 1 10 10 100 1000000\n", "output": "144\n"}, {"type": "stdin_stdout", "input": "6 1\n1 10 10 20 5 100\n1000000 1 10 100 10 1000000\n", "output": "144\n"}, {"type": "stdin_stdout", "input": "6 1\n1 10 10 5 20 100\n1000000 1 10 10 100 1000000\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\nGeorge is a cat, so he really li... | [{"type": "stdin_stdout", "input": "69756649467079322827497669450385938193725265564551073376856848456377282337192553343102536673046067874193973249293390979688852602950724884726382282903675659200865787042684264196306648305545290076062924087939978017987667847105325657080274323400258982046115892228300171243907466293917094... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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# Story\n\nJohn found a path to ... | [{"input": "\">^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v\"", "output": "[\">^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v>^>v\"]", "fn_name": "simplify"}, {"input": "\">vv<<<^^^^>>>>>vvvvvv<<<<<<^^^^^^^^>>>>\"", "output": "[\">vv<<<^^^^>>>>>vvvvvv<<<<<<^^^^^^^^>>>>\"]", "fn_name": "simplify"}, {"input": "\"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is \"7 rows\" in the game ... | [{"type": "stdin_stdout", "input": "5\n1 2 3 4 5 6\n1 3 5 6 8 4\n1 2 3 4 6 8\n1 2 3 5 10 11\n1 3 3 6 9 11", "output": "yes\nyes\nyes\nyes\nno\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5 10\n1 3 5 6 12 3\n1 2 3 4 6 8\n1 2 4 5 10 11\n1 4 2 6 9 5", "output": "no\nno\nyes\nyes\nyes\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n2\n2 -1\n2 0\n3\n-1 1\n-1 0\n-2 1", "output": "3\n0\n"}, {"type": "stdin_stdout", "input": "2\n2\n2 -1\n0 0\n3\n-1 1\n-1 0\n-2 1", "output": "3\n0\n"}, {"type": "stdin_stdout", "input": "2\n2\n0 2\n-1 -1\n3\n3 3\n0 -1\n1 3", "output": "3\n0\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\nExample\n\nInput\n\n2 2\n1 2 0\n... | [{"type": "stdin_stdout", "input": "8 0\n-2 0 1\n12 2 12", "output": "680445551\n"}, {"type": "stdin_stdout", "input": "4 0\n-2 0 -1\n12 2 5", "output": "15400\n"}, {"type": "stdin_stdout", "input": "4 0\n-2 0 1\n12 2 10", "output": "15400\n"}, {"type": "stdin_stdout", "input": "4 0\n1 0 1\n9 -1 -1", "output": "15400\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\nThis problem differs from the pr... | [{"type": "stdin_stdout", "input": "100\n463 6421 2912 1546 3999 5175 4357 2259 7380 6081 1148 7857 3532 4168 5643 8819 2568 6681 975 9216 4590 5217 6215 7422 6631 1651 39 4268 8290 2022 3175 8281 1552 980 9314 234 934 5133 6712 1880 2766 5042 5004 5455 6038 6010 6022 1553 4015 4544 3985 4033 223 7682 6302 2121 4832 39... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nChanek Jones is back, helping hi... | [{"type": "stdin_stdout", "input": "4 4\n2 -1000 100 3\n2 1\n3 2\n4 1\n2 1 3\n2 2 2\n1 1 -1000000000\n2 1 4\n", "output": "2102\n0\n1000000003\n"}, {"type": "stdin_stdout", "input": "4 4\n2 -1000 100 3\n2 1\n3 2\n4 2\n2 1 3\n2 2 2\n1 1 -1000000000\n2 1 4\n", "output": "2102\n0\n1000002003\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\nDr. Evil kidnapped Mahmoud and E... | [{"type": "stdin_stdout", "input": "100 100\n58 88 12 71 22 1 40 19 73 20 67 48 57 17 69 36 100 35 33 37 72 55 52 8 89 85 47 42 78 70 81 86 11 9 68 99 6 16 21 61 53 98 23 62 32 59 51 0 87 24 50 30 65 10 80 95 7 92 25 74 60 79 91 5 13 31 75 38 90 94 46 66 93 34 14 41 28 2 76 84 43 96 3 56 49 82 27 77 64 63 4 45 18 29 54... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 call an undirected graph o... | [{"type": "stdin_stdout", "input": "5\n24 228\n24 228\n24 228\n24 228\n24 228\n", "output": "1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n1 11\n1 12\n1 13\n1 14\n1 15\n1 16\n1 17\n1 18\n1 19\n1 20\n1 21\n1 22\n1 23\n1 24\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n2 10\n2 11\n2 12\n2 13\n2 14\n2 15\n2 16\n2 17\n2 18\n2 19\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\nE869120 defined a sequence $a$ l... | [{"type": "stdin_stdout", "input": "42 102", "output": "184174004\n"}, {"type": "stdin_stdout", "input": "42 123", "output": "268300608\n"}, {"type": "stdin_stdout", "input": "46 123", "output": "960087486\n"}, {"type": "stdin_stdout", "input": "70 123", "output": "396400358\n"}, {"type": "stdin_stdout", "input": "42 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\nCowboy Beblop is a funny little ... | [{"type": "stdin_stdout", "input": "16\n0 1000 0\n436 1013 0\n509 517 0\n1000 500 0\n1000 1000 0\n1401 1028 0\n1434 461 0\n2086 442 0\n2079 1044 0\n2506 1032 0\n2549 450 0\n3077 446 0\n3063 1067 0\n3715 1062 0\n3756 -125 0\n0 0 0\n16\n-243 700 394\n109 700 365\n129 700 -366\n763 700 -366\n725 700 397\n1131 700 409\n117... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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": "1\n100 5 4\n1 -2 -1 0 0 4 3 3 1 3 1 5 3 3 0 3 3 6 3 5 6 0 3 3 4 0 2 2 2 0 2 2 4 2 2 4 3 2 3 6 0 0 3 2 1 0 0 2 1 1 3 4 6 9 5 8 12 2 2 0 6 2 4 2 3 1 3 4 2 3 3 2 2 3 2 1 0 2 1 1 0 5 3 3 3 1 8 4 4 11 6 3 1 2 4 4 2 -1 -1 1\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1\n100 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\nWe conducted a survey on newspap... | [{"type": "stdin_stdout", "input": "101 110 100", "output": "100 109\n"}, {"type": "stdin_stdout", "input": "100 110 100", "output": "100 110\n"}, {"type": "stdin_stdout", "input": "000 110 100", "output": "100 210\n"}, {"type": "stdin_stdout", "input": "000 100 100", "output": "100 200\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\nTunnel formula\n\nOne day while ... | [{"type": "stdin_stdout", "input": "2-(2-3+4+5)", "output": "12\n"}, {"type": "stdin_stdout", "input": "3+(2-4-4+5)", "output": "10\n"}, {"type": "stdin_stdout", "input": "2-(2-3+4+6)", "output": "13\n"}, {"type": "stdin_stdout", "input": "3+(2-4-4+6)", "output": "11\n"}, {"type": "stdin_stdout", "input": "4-(2+5-0+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\n# Task\n\n* **_Given_** *three i... | [{"input": "10\n5\n6", "output": "[300]", "fn_name": "expression_matter"}, {"input": "3\n5\n7", "output": "[105]", "fn_name": "expression_matter"}, {"input": "2\n10\n3", "output": "[60]", "fn_name": "expression_matter"}, {"input": "9\n7\n2", "output": "[126]", "fn_name": "expression_matter"}, {"input": "1\n1\n10", "out... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a rectangular grid... | [{"type": "stdin_stdout", "input": "2\n2 2\n-1 1\n1 1\n3 4\n-1 -1 -2 -10\n0 -2 -5 -6\n-1 -3 -4 -5\n", "output": "2\n40\n"}, {"type": "stdin_stdout", "input": "2\n2 2\n-1 1\n1 1\n3 4\n-1 -1 -2 -3\n-1 -2 -3 -4\n-2 -1 -8 -5\n", "output": "2\n33\n"}, {"type": "stdin_stdout", "input": "2\n2 2\n-1 1\n1 1\n3 4\n-1 -1 -2 -3\n-... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nDen, the phone number... | [{"type": "stdin_stdout", "input": "11\n129483884450", "output": "125\n694\n738\n"}, {"type": "stdin_stdout", "input": "11\n128935478480", "output": "123\n689\n745\n"}, {"type": "stdin_stdout", "input": "11\n18396312558", "output": "124\n857\n369\n"}, {"type": "stdin_stdout", "input": "11\n24764186449", "output": "318\... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 has a rectangular Board of... | [{"type": "stdin_stdout", "input": "10 10 20\n7 5\n4 5\n5 4\n7 4\n1 5\n6 7\n9 10\n8 4\n1 4\n2 10\n3 10\n4 10\n0 6\n5 7\n6 2\n1 1\n10 9\n7 6\n1 4\n11 4\n8 2\n10 3\n5 1\n10 8\n4 2\n1 9\n1 10\n9 5\n2 2\n6 7\n8 6\n8 9\n2 2\n7 1\n3 3\n1 2\n6 20\n9 4\n10 2\n7 7\n", "output": "117\nUUUUUUUUULLLLLLLLLRRRRRRRRRDLLLLLLLLLDRRRRRR... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nOn the well-known testing system... | [{"type": "stdin_stdout", "input": "8\n2224571\n2410907\n1906778\n4433130\n429304\n748393\n1234320\n1234321\n", "output": "2982\n0 1 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 may know that Euclid was a m... | [{"type": "stdin_stdout", "input": "50 500000\n2 57 94\n2 1 10\n2 97 98\n2 15 86\n2 66 84\n2 40 100\n2 8 27\n2 14 43\n2 55 75\n2 25 90\n2 22 69\n2 9 12\n2 32 34\n2 24 48\n2 54 88\n2 13 50\n2 30 56\n2 38 77\n2 4 70\n2 39 92\n2 23 72\n2 17 36\n2 20 29\n2 6 51\n2 11 87\n2 21 68\n2 59 80\n2 52 61\n2 26 42\n2 2 37\n2 45 62\... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 Vasya found a golden ti... | [{"type": "stdin_stdout", "input": "100\n0809740931424957283280264749151125408689778966769781910603952566405858112111930579193115510555198933\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100\n4360837235306857829226262079948050131795231482102447137288804547991971660484969090651046154392003840\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\nVasya writes his own library for... | [{"type": "stdin_stdout", "input": "20\nVBox hykl\nVBox enwv\nenwv.pack(hykl)\nVBox dlepf\ndlepf.pack(hykl)\nenwv.set_border(30)\nWidget mjrrik(54,21)\nhykl.set_border(2)\ndlepf.set_border(22)\nenwv.set_border(3)\nenwv.pack(dlepf)\ndlepf.pack(mjrrik)\nhykl.set_spacing(96)\nenwv.set_border(32)\ndlepf.set_border(72)\nWid... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 map in Berland is a check... | [{"type": "stdin_stdout", "input": "10 10 40\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n**********\n", "output": "6 9\n5 9\n7 9\n6 8\n6 10\n"}, {"type": "stdin_stdout", "input": "10 10 59\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 know that Japan is the count... | [{"type": "stdin_stdout", "input": "1116434957\n", "output": "-O|OO-OO\n-O|-OOOO\n-O|OOOO-\nO-|OOOO-\nO-|OOO-O\nO-|OOOO-\n-O|O-OOO\nO-|O-OOO\nO-|O-OOO\nO-|O-OOO\n"}, {"type": "stdin_stdout", "input": "1603481361\n", "output": "O-|O-OOO\n-O|O-OOO\nO-|OOO-O\nO-|O-OOO\n-O|OOO-O\nO-|OOOO-\nO-|OOO-O\nO-|-OOOO\n-O|O-OOO\nO-|... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 Kingdom of Takahashi has N t... | [{"type": "stdin_stdout", "input": "6 727202214173249351\n6 5 2 5 3 2\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "6 1007784494318310970\n6 5 2 5 3 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "6 1122048832909353099\n6 4 1 1 3 2", "output": "4\n"}, {"type": "stdin_stdout", "input": "6 21904273061... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nFizzBuzz is often one of the fir... | [{"input": "\"Fizz 688 689 FizzBuzz\"", "output": "[[687, 688, 689, 690]]", "fn_name": "reverse_fizzbuzz"}, {"input": "\"1 2 Fizz 4 Buzz\"", "output": "[[1, 2, 3, 4, 5]]", "fn_name": "reverse_fizzbuzz"}, {"input": "\"Fizz Buzz\"", "output": "[[9, 10]]", "fn_name": "reverse_fizzbuzz"}, {"input": "\"Buzz Fizz\"", "output... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNazar, a student of the scientif... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "975735772\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000010000000\n", "output": "636734266\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "975735772"}, {"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\nThe employees of the F company h... | [{"type": "stdin_stdout", "input": "100 50\n11 28\n11 1\n98 58\n38 27\n24 27\n67 37\n90 48\n91 14\n43 29\n3 64\n24 6\n53 19\n97 65\n13 27\n75 53\n37 82\n69 75\n94 99\n1 26\n95 60\n45 27\n100 82\n71 49\n86 99\n74 58\n88 68\n39 63\n38 23\n22 39\n29 58\n62 83\n62 1\n61 58\n2 30\n41 48\n83 90\n1 17\n73 81\n23 53\n71 16\n43... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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": "10 10550000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n", "output": "1000\n"}, {"type": "stdin_stdout", "input": "10 100\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe government of Berland decide... | [{"type": "stdin_stdout", "input": "3\n10\n3 3 2 3 2 5 1 2 11 3\n6 5 2 5 3 2 4 2 1 2\n20\n9 1 10 1 17 7 5 5 8 1 1 2 7 1 4 2 3 7 6 3\n2 6 3 2 37 1 5 5 4 5 1 3 21 15 1 7 7 5 0 1\n20\n9 1 9 1 5 1 3 2 0 3 6 1 2 8 11 7 3 5 14 2\n11 14 6 4 6 8 8 2 9 9 6 5 3 2 5 7 1 9 14 1\n", "output": "NO\nNO\nNO\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\nRidhiman challenged Ashish to fi... | [{"type": "stdin_stdout", "input": "20\n541032394951352952 204302388514120798 548305186805250399 743987576790520671 332874928746186630 60150973547887825 600093435051546090 862815570651991829 798946884837606574 383607230476788640 748981752333005915 317959714195378963 824508576221039025 547099154391774856 411018774272655... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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 piles of stones of s... | [{"type": "stdin_stdout", "input": "2\n2 9\n5\n4 10 7 3 4\n", "output": "2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "2\n2 9\n5\n4 10 7 3 4\n", "output": "2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "2\n2 1\n5\n4 10 7 3 4\n", "output": "1 1 1 1 1\n"}, {"type": "stdin_stdout", "input": "2\n2 9\n5\n4 13 7 3 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\nYour start-up's BA has told mark... | [{"input": "\"IP_ADDRESS_INVALID\"", "output": "[\"Welcome\"]", "fn_name": "greet"}, {"input": "\"english\"", "output": "[\"Welcome\"]", "fn_name": "greet"}, {"input": "\"dutch\"", "output": "[\"Welkom\"]", "fn_name": "greet"}, {"input": "\"\"", "output": "[\"Welcome\"]", "fn_name": "greet"}, {"input": "2", "output": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has a grid with $2$ rows a... | [{"type": "stdin_stdout", "input": "1\n55\nBBBBBBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBGBGB\nBBBBBBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBGBGB\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "6\n2\nRG\nRB\n4\nGRBG\nGBGB\n5\nGGGGG\nBBBBB\n7\nBBBBBBB\nRRRRRRR\n8\nRGBRRGBR\nRGGRRBGR\n1\nG\nG\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\nMonocarp plays a computer game (... | [{"type": "stdin_stdout", "input": "3 4 5\n10 60 30\n12 57 17 6\n0 2 2 1 1\n", "output": "100\n102\n102\n100\n100\n"}, {"type": "stdin_stdout", "input": "3 4 5\n10 60 30\n12 57 17 6\n0 2 1 1 1\n", "output": "100\n102\n100\n100\n100\n"}, {"type": "stdin_stdout", "input": "3 4 5\n10 36 60\n19 57 23 0\n0 2 2 1 1\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\nImplication is a function of two... | [{"type": "stdin_stdout", "input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. 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\nIt seems that a magic... | [{"type": "stdin_stdout", "input": "10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10", "output": "-1000000000 1000000000\n"}, {"type": "stdin_stdout", "input": "10\n1 10\n1 10\n1 10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 10", "output": "-1000000 1000000000\n"}, {"type": "stdin_stdout", "input": "10\n1 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're hanging out with your fri... | [{"input": "\"Hvv? R'n mlg gszg wifmp, r xzm hgroo gzpv nb xolgsvh luu\"", "output": "[\"See? I'm not that drunk, i can still take my clothes off\"]", "fn_name": "decode"}, {"input": "\"Hfiv r xzm wzmxv lm xlk'h xzi, slow nb yvvi\"", "output": "[\"Sure i can dance on cop's car, hold my beer\"]", "fn_name": "decode"}, {... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is so boring in the summer ho... | [{"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 700000000 800000000 900000000 1000000000\n", "output": "Bob\n"}, {"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 700000000 800000000 900000000 1000000000\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\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\nTo quickly hire highly skilled s... | [{"type": "stdin_stdout", "input": "30\n", "output": "4809844402031689728\n"}, {"type": "stdin_stdout", "input": "29\n", "output": "1161928703861587968\n"}, {"type": "stdin_stdout", "input": "29\n", "output": "1161928703861587968"}, {"type": "stdin_stdout", "input": "30\n", "output": "4809844402031689728"}, {"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\nIn this problem you will have to... | [{"type": "stdin_stdout", "input": "13 12\n1 1 1 1 1 1 1 1 1 1 1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "13 12\n1 1 1 1 1 1 1 1 1 1 1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads an i... | [{"type": "stdin_stdout", "input": "10\n10\n126", "output": "4\n4\n30\n"}, {"type": "stdin_stdout", "input": "10\n117\n4", "output": "4\n30\n2\n"}, {"type": "stdin_stdout", "input": "10\n147\n9", "output": "4\n34\n4\n"}, {"type": "stdin_stdout", "input": "10\n54\n18", "output": "4\n16\n7\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\nGiven is an integer r.\nHow many... | [{"type": "stdin_stdout", "input": "100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "87\n", "output": "7569\n"}, {"type": "stdin_stdout", "input": "76\n", "output": "5776\n"}, {"type": "stdin_stdout", "input": "91\n", "output": "8281\n"}, {"type": "stdin_stdout", "input": "88\n", "output": "7744\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\nTakahashi, Aoki and Snuke love c... | [{"type": "stdin_stdout", "input": "1390 180 1200", "output": "1\n"}, {"type": "stdin_stdout", "input": "1390 180 2246", "output": "1\n"}, {"type": "stdin_stdout", "input": "1390 180 2625", "output": "0\n"}, {"type": "stdin_stdout", "input": "1390 213 2625", "output": "0\n"}, {"type": "stdin_stdout", "input": "1390 213... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.