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\nGreg is a beginner bodybuilder. ...
[{"type": "stdin_stdout", "input": "20\n25 50 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24\n", "output": "biceps\n"}, {"type": "stdin_stdout", "input": "20\n25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24\n", "output": "chest\n"}, {"type": "stdin_stdout", "input": "20\n25 50 25 25 25 25 25 25 25 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\nValera the horse lives on a plan...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "397\n"}, {"type": "stdin_stdout", "input": "37 -100\n", "output": "400\n"}, {"type": "stdin_stdout", "input": "-96 -96\n", "output": "383\n"}, {"type": "stdin_stdout", "input": "56 -100\n", "output": "400\n"}, {"type": "stdin_stdout", "input": "94 -94\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 is a long plate s containi...
[{"type": "stdin_stdout", "input": "27755776656210607832788619414635535178188775623838313967013958143619017005079991285469853503718562504927535176713879737569375166451462839457844835806559098448980069427607\n240\n", "output": "163555103\n"}, {"type": "stdin_stdout", "input": "2775577665621060783278861941463553517818877...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTeacher thinks that we make a lo...
[{"type": "stdin_stdout", "input": "40020 4\n", "output": "102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102564102...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDZY loves Physics, and he enjoys...
[{"type": "stdin_stdout", "input": "20 20\n265918 744212 196368 74731 293587 679367 460805 632939 453630 565881 835276 606327 181087 721045 219431 849838 370939 582350 335676 32244\n2 16 989\n14 19 628\n1 6 483\n5 8 733\n13 19 556\n10 17 911\n2 7 599\n13 17 390\n10 20 965\n9 11 449\n3 15 310\n3 6 557\n14 18 225\n1 18 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\nAn n × n square matrix is specia...
[{"type": "stdin_stdout", "input": "7 4 100501\n0100010\n0000101\n0100100\n0000011\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "6 4 100501\n100010\n100100\n010100\n000011\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "6 4 146325\n100010\n100100\n010100\n000011\n", "output": "2\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\nAndrew skipped lessons on the su...
[{"type": "stdin_stdout", "input": "100\n0 1 1 1 0 0 0 2 1 2 2 1 2 2 2 0 0 2 1 2 0 1 1 0 2 0 1 2 2 0 2 0 1 0 1 2 0 2 1 1 0 1 0 1 0 0 0 2 2 2 2 1 1 1 0 2 1 0 0 0 0 0 1 0 2 -1 1 0 0 2 0 2 2 1 0 2 2 0 2 0 2 1 2 1 1 1 0 2 1 0 2 1 1 2 1 2 0 1 2 2\n", "output": "36 30 38 35 35 33 34 31 28 22 22 23 19 16 19 20 22 23 24 25 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\nDuff is in love with lovely numb...
[{"type": "stdin_stdout", "input": "942689843037\n", "output": "104743315893\n"}, {"type": "stdin_stdout", "input": "808453785117\n", "output": "808453785117\n"}, {"type": "stdin_stdout", "input": "999999999988\n", "output": "499999999994\n"}, {"type": "stdin_stdout", "input": "822722434952\n", "output": "205680608738\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "28\n", "output": "280349076803813376\n"}, {"type": "stdin_stdout", "input": "26\n", "output": "16255179905040384\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\nPetya has recently learned data ...
[{"type": "stdin_stdout", "input": "30\ninsert 62350949\ngetMin -928976719\nremoveMin\ngetMin 766590157\ngetMin -276914351\ninsert 858958907\ngetMin -794653029\ngetMin 505812710\ngetMin -181182543\ninsert -805198995\nremoveMin\ninsert -200361579\nremoveMin\ninsert 988531216\ninsert -474257426\ninsert 579296921\nremoveM...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is the first who cam...
[{"type": "stdin_stdout", "input": "10000 10000 199999999\n", "output": "10000 10000 L\n"}, {"type": "stdin_stdout", "input": "10000 10000 200000000\n", "output": "10000 10000 R\n"}, {"type": "stdin_stdout", "input": "10000 16759 186450844\n", "output": "5563 11864 R\n"}, {"type": "stdin_stdout", "input": "10000 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\nA sequence of square brackets is...
[{"type": "stdin_stdout", "input": "100\n[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n", "output": "+- -+\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\nKaren is getting ready for a new...
[{"type": "stdin_stdout", "input": "08:15\n", "output": "106\n"}, {"type": "stdin_stdout", "input": "06:01\n", "output": "240\n"}, {"type": "stdin_stdout", "input": "16:12\n", "output": "230\n"}, {"type": "stdin_stdout", "input": "17:25\n", "output": "157\n"}, {"type": "stdin_stdout", "input": "16:02\n", "output": "240...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Kefa found n baloons. Fo...
[{"type": "stdin_stdout", "input": "100 100\njhpyiuuzizhubhhpxbbhpyxzhbpjphzppuhiahihiappbhuypyauhizpbibzixjbzxzpbphuiaypyujappuxiyuyaajaxjupbahb\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\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\nMahmoud and Ehab continue their ...
[{"type": "stdin_stdout", "input": "10\n7 6\n2 10\n7 1\n8 5\n9 3\n2 3\n8 7\n10 8\n10 4\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "10\n7 6\n2 7\n4 1\n8 5\n9 4\n5 3\n8 7\n10 8\n10 4\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "10\n2 6\n3 7\n8 4\n4 10\n6 9\n9 7\n3 10\n1 2\n5 8\n", "output": "16...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMahmoud has an array a consistin...
[{"type": "stdin_stdout", "input": "10\n5 3 2 2 3 3 3 4 2 5\n", "output": "5 3 2 7 11 13 17 19 23 29 "}, {"type": "stdin_stdout", "input": "10\n5 3 4 2 3 3 3 4 2 5\n", "output": "5 3 4 7 11 13 17 19 23 29\n"}, {"type": "stdin_stdout", "input": "7\n23 11 6 14 7 17 20\n", "output": "23 11 6 17 5 7 13\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\nChandan is a horrendous murderer...
[{"type": "stdin_stdout", "input": "1\n3\n3 1 3\n3 2 13\n2 7 -1\n0 2 -1\n\nFLPMAS", "output": "0 16\n"}, {"type": "stdin_stdout", "input": "1\n3\n3 1 16\n3 2 2\n2 7 -1\n2 1 1\n\nFLOMAS", "output": "0 18\n"}, {"type": "stdin_stdout", "input": "1\n3\n3 1 16\n3 2 4\n2 7 -1\n2 0 1\n\nFLOMAS", "output": "0 20\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\nBosky and Menot are two friends ...
[{"type": "stdin_stdout", "input": "4\nG: I want to go on nineteen\nM: No that is not possible lets go on twenty one\nG: No nineteen is final and twenty one is not\nM: OKAY as you wish", "output": "No Date\n"}, {"type": "stdin_stdout", "input": "4\nG: I want to go on nineteen\nM: No that is not possible ldts go on twen...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 binary tree in a two dim...
[{"type": "stdin_stdout", "input": "20\n511\n4 114 122 119 120 102 114 70 73 83 66 47 53 48 45 77 90 33 34 93 77 15 21 97 103 58 59 33 51 34 37 113 134 94 77 112 128 76 84 98 122 40 33 42 43 43 47 0 0 108 121 42 49 68 95 106 124 87 103 15 38 0 0 33 69 88 81 33 41 55 50 63 62 19 24 30 30 58 57 88 112 94 109 50 72 45 29 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "SRR", "output": "2\n"}, {"type": "stdin_stdout", "input": "RRR", "output": "3\n"}, {"type": "stdin_stdout", "input": "RSS", "output": "1\n"}, {"type": "stdin_stdout", "input": "SSR", "output": "1\n"}, {"type": "stdin_stdout", "input": "RST", "output": "1\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\nFind \\displaystyle{\\sum_{a=1}^...
[{"type": "stdin_stdout", "input": "179", "output": "7689630\n"}, {"type": "stdin_stdout", "input": "130", "output": "2952085\n"}, {"type": "stdin_stdout", "input": "117", "output": "2145333\n"}, {"type": "stdin_stdout", "input": "126", "output": "2693919\n"}, {"type": "stdin_stdout", "input": "115", "output": "2033674...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 cities on a number l...
[{"type": "stdin_stdout", "input": "1 -1\n1010000101", "output": "1010000102\n"}, {"type": "stdin_stdout", "input": "1 -2\n1010000101", "output": "1010000103\n"}, {"type": "stdin_stdout", "input": "1 -2\n1010001101", "output": "1010001103\n"}, {"type": "stdin_stdout", "input": "1 -2\n1010001111", "output": "1010001113\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 had a pair of two posi...
[{"type": "stdin_stdout", "input": "38823 9265", "output": "550080294\n"}, {"type": "stdin_stdout", "input": "31415 9265", "output": "287927211"}, {"type": "stdin_stdout", "input": "11695 7143", "output": "10362628\n"}, {"type": "stdin_stdout", "input": "11695 9265", "output": "2953665\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\nRng is preparing a problem set f...
[{"type": "stdin_stdout", "input": "7\n100 200 500 700 1200 1600 2000\n6\n100 200 500 700 1600 1600", "output": "NO"}, {"type": "stdin_stdout", "input": "7\n100 200 500 700 238 1600 2000\n6\n100 200 500 700 1600 1600", "output": "NO\n"}, {"type": "stdin_stdout", "input": "7\n100 200 500 700 238 1600 2000\n6\n100 200 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\nThere are N bags, each containin...
[{"type": "stdin_stdout", "input": "2\n1 1\n1000000000 1000000100", "output": "1000000097999999901\n"}, {"type": "stdin_stdout", "input": "2\n1 1\n1000000000 1000100100", "output": "1000100097999899901\n"}, {"type": "stdin_stdout", "input": "2\n1 1\n1100000000 1000000000", "output": "1099999997900000001\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\nWe have an N×N checkerboard.\n\n...
[{"type": "stdin_stdout", "input": "3", "output": "4\n0 1\n1 0\n1 2\n2 1\n"}, {"type": "stdin_stdout", "input": "4", "output": "3\n0 1\n2 1\n2 3"}, {"type": "stdin_stdout", "input": "2", "output": "1\n1 0"}, {"type": "stdin_stdout", "input": "-102", "output": "0\n"}, {"type": "stdin_stdout", "input": "-133", "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 judges whe...
[{"type": "stdin_stdout", "input": "3\n-1 -2 0\n0 1 -1\n-2 0 2", "output": "NO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n-1 -2 -1\n0 1 0\n-2 0 2", "output": "NO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n1 1 0\n29 1 -1\n0 1 -1", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n2 2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA mischievous notice has arrived...
[{"type": "stdin_stdout", "input": "4\n03:05\n05:11\n11:54\n10:40", "output": "warning\nwarning\nwarning\nwarning\n"}, {"type": "stdin_stdout", "input": "4\n03:25\n10:61\n11:65\n10:41", "output": "warning\nwarning\nalert\nwarning\n"}, {"type": "stdin_stdout", "input": "4\n12:15\n10:50\n11:44\n10:40", "output": "warning...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 was a big old mansion in o...
[{"type": "stdin_stdout", "input": "4 4\n0 0\n1 0\n1 1\n0 1\n1 2\n1 4\n2 4\n3 4\n12 22\n2 0\n4 0\n8 0\n4 2\n6 2\n8 2\n2 4\n4 4\n6 4\n-1 6\n4 6\n-1 8\n1 2\n2 3\n1 4\n1 7\n1 10\n2 4\n2 5\n3 5\n3 6\n4 5\n3 12\n5 11\n5 7\n6 9\n6 11\n7 10\n7 8\n8 9\n9 11\n10 11\n10 12\n11 12\n0 0", "output": "1\n2\n"}, {"type": "stdin_stdou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nJOI Shoji manages the...
[{"type": "stdin_stdout", "input": "-1 -2 0 1 1 -1\n8 2 1 62 2 2\n27 6 665 -1 15 14", "output": "2 2 59\n54 0 1\n-28 -1 -51\n"}, {"type": "stdin_stdout", "input": "-1 -2 0 1 1 -1\n8 2 1 62 3 2\n27 6 665 -1 15 14", "output": "2 2 59\n54 1 1\n-28 -1 -51\n"}, {"type": "stdin_stdout", "input": "-1 -2 -1 1 1 -1\n8 2 1 62 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\nSince I got tired to write long ...
[{"type": "stdin_stdout", "input": "12\n7\n24\n0", "output": "8\n2\n11\n"}, {"type": "stdin_stdout", "input": "12\n11\n2\n0", "output": "8\n2\n2\n"}, {"type": "stdin_stdout", "input": "12\n15\n2\n0", "output": "8\n5\n2\n"}, {"type": "stdin_stdout", "input": "12\n11\n4\n0", "output": "8\n2\n3\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\nLife is not easy. Sometimes it i...
[{"type": "stdin_stdout", "input": "1\nnorth\n3\nnorth\neasu\nsouth\n0", "output": "5\n1\n"}, {"type": "stdin_stdout", "input": "1\nnorth\n3\nnorth\neast\nsouth\n0", "output": "5\n1"}, {"type": "stdin_stdout", "input": "1\nnorth\n0\nnorth\ntsae\nosuth\n-1", "output": "5\n"}, {"type": "stdin_stdout", "input": "1\nnorth\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nN ignited fuses and o...
[{"type": "stdin_stdout", "input": "3 3 2\n1 3\n3 2 3 2 1 2 1\n5 2 1 1 1 1 2 2 2 3 2", "output": "-1\n"}, {"type": "stdin_stdout", "input": "3 3 2\n1 3\n3 2 3 2 1 2 1\n5 2 1 1 1 1 2 2 4 3 2", "output": "-1\n"}, {"type": "stdin_stdout", "input": "3 3 2\n1 2\n3 2 3 2 1 2 1\n5 2 1 1 1 1 2 2 2 3 2", "output": "-1\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\nKyo, 垓, {Reiyo}, 穣, Mizo, 澗, Tad...
[{"type": "stdin_stdout", "input": "3\n1 km = 10^3 m\n1 m = 10^2 cm\n1 km = 10^5 cm\n7\n1 kilometre = 10^3 metre\n1 megametre = 10^3 kilometre\n1 metre = 10^-6 megametre\n1 terametre = 10^3 gigametre\n1 petametre = 10^3 terametre\n1 gigametre = 10^-6 petametre\n1 metre = 10^-15 petametre\n4\n1 a = 10^2 b\n1 a = 10^3 c\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlternate Escape\n\nAlice House\...
[{"type": "stdin_stdout", "input": "3 3 2 2\n 1 1 1\n0 0 0 0\n 1 1 1\n0 0 0 0\n 1 1 1\n0 0 0 0\n 1 1 1\n3 3 2 1\n 1 0 1\n1 0 1 1\n 1 0 0\n0 0 0 0\n 0 0 1\n1 1 0 1\n 1 0 1\n1 3 1 1\n 1 1 1\n1 0 0 1\n 1 0 1\n2 2 1 1\n 1 0\n1 0 0\n 0 0\n0 0 0\n 0 0\n0 0 0 0", "output": "Yes\nYes\nYes\nNo\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\nC: Only one subsequence --Unique...
[{"type": "stdin_stdout", "input": "aziucamp\nazu", "output": "yes\n"}, {"type": "stdin_stdout", "input": "azjucamp\nazu", "output": "yes\n"}, {"type": "stdin_stdout", "input": "aizucamp\nazu", "output": "yes"}, {"type": "stdin_stdout", "input": "aizucamp\nuza", "output": "no\n"}, {"type": "stdin_stdout", "input": "azj...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nB: AddMulSubDiv\n\nProblem State...
[{"type": "stdin_stdout", "input": "3 3 3 10\n2 -5 3\n1 3 2 2\n0 9 -1 4\n0 -1 20 5", "output": "1\n"}, {"type": "stdin_stdout", "input": "3 1 3 10\n2 -5 3\n1 3 2 2\n0 9 -1 4\n0 -1 20 5", "output": "1\n"}, {"type": "stdin_stdout", "input": "3 1 3 15\n2 -5 3\n1 3 2 2\n0 9 -1 4\n0 -1 20 5", "output": "1\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\nHarry is a bright student. To pr...
[{"type": "stdin_stdout", "input": "6\n14 hrilgne\n6 mathematics\n-1 geography\n-1\n3 grcphias\n-1", "output": "0 mathematics\n0 hrilgne\n0 grcphias\n"}, {"type": "stdin_stdout", "input": "6\n9 english\n7 nathematics\n-1 geography\n-1\n3 gchpsias\n-1", "output": "0 nathematics\n0 english\n0 gchpsias\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\nChef changed the password of his...
[{"type": "stdin_stdout", "input": "4\n2\n2 3\n1 1\n8\n0\n1800.7150295041072\n0\n0.42064717124502127\n3\nx 1\nc 2\n# .\n0xd21#dc/98x", "output": "8\n1800.7150295041072\n.42064717124502127\n1d21.d2/981\n"}, {"type": "stdin_stdout", "input": "4\n2\n7 3\n3 1\n10\n0\n1800.0493927440593\n0\n0.9085107376538183\n3\ny 0\nd 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\nYou are given a set of 2n+1 inte...
[{"type": "stdin_stdout", "input": "1000000001 1000000000000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 1000000000000000000\n", "output": "1000000000000000000\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 candy boxes in front...
[{"type": "stdin_stdout", "input": "50 49 1000\n30 37 34 31 26 44 32 12 36 15 5 5 31 24 17 24 43 19 17 23 45 2 24 17 23 48 20 44 46 44 13 4 29 49 33 41 14 25 46 43 7 47 28 25 2 30 37 37 19 32\nGBBBRBGRBRBRGRGRBBGBGRRBGGRBGRBRRRRRRRBRGRGGGGBRGG\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "50 37 500\n25 43 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\nLittle girl Margarita is a big f...
[{"type": "stdin_stdout", "input": "10\n449347852 741090797\n541919355 938202256\n442458747 465872502\n463474612 789217678\n146477812 390217056\n302933612 477640295\n48191125 1417399529\n173202385 374432789\n78807265 428215825\n194590462 1318087870\n", "output": "-145871473\n198141451\n11706878\n626346145\n268347434\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\nTom is interested in power consu...
[{"type": "stdin_stdout", "input": "30 3 50 32 1 18\n46 60\n66 94\n99 141\n162 239\n309 334\n400 550\n594 630\n659 663\n664 701\n735 736\n741 755\n756 801\n823 854\n865 915\n937 964\n984 986\n990 1007\n1008 1031\n1052 1064\n1073 1080\n1190 1191\n1192 1254\n1265 1266\n1272 1273\n1274 1277\n1284 1302\n1308 1312\n1358 138...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArkady bought an air ticket from...
[{"type": "stdin_stdout", "input": "10 11 4 5 10\n1 2 3 4 5 6 7 8 9 10\n16 17 18 19 20 21 22 23 24 25 26\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 3 2 3 1\n1 999999998 999999999 1000000000\n3 4 1000000000\n", "output": "1000000003\n"}, {"type": "stdin_stdout", "input": "10 11 4 5 3\n1 2 3 4 5 6 7 8 9 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet x be an array of integers x ...
[{"type": "stdin_stdout", "input": "5\n1 1 1 1 1\n1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "530612279\n"}, {"type": "stdin_stdout", "input": "10\n10 1 9 3 9 4 10 3 8 5\n10 1 10 14 12 4 10 4 10 7\n", "output": "875000103\n"}, {"type": "stdin_stdout", "input": "10\n10 1 9 3 9 4 10 3 8 5\n10 2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "100\n2\n8\n5\n6\n5\n4\n4\n6\n12\n2\n9\n5\n10\n8\n4\n10\n9\n6\n9\n4\n5\n6\n4\n4\n7\n1\n2\n2\n5\n6\n1\n5\n10\n9\n10\n16\n3\n2\n2\n3\n2\n7\n9\n2\n9\n5\n7\n8\n1\n5\n2\n5\n1\n3\n8\n4\n7\n9\n3\n1\n7\n1\n2\n4\n7\n2\n7\n1\n1\n10\n8\n5\n7\n12\n10\n8\n1\n7\n5\n10\n7\n6\n6\n6\n7\n4\n9\n3\n4\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\nKarl is developing a key storage...
[{"type": "stdin_stdout", "input": "100\n1\n3\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n14\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n19\n42\n43\n44\n45\n46\n47\n20\n49\n50\n65\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\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\nVK news recommendation system da...
[{"type": "stdin_stdout", "input": "40\n19 20 8 13 13 17 1 14 15 20 14 17 2 9 9 10 19 16 6 12 9 7 20 5 12 2 4 4 12 5 4 11 8 1 2 8 11 19 18 4\n52258 5648 46847 9200 63940 79328 118413 54479 1788 60107 8234 64215 15419 84411 50307 78075 92548 17867 43456 7970 1390 99373 97297 90662 82950 678 79356 51351 2794 82477 16508 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEric is the teacher of graph the...
[{"type": "stdin_stdout", "input": "50\n21 10\n30 22\n3 37\n37 32\n4 27\n18 7\n2 30\n29 19\n6 37\n12 39\n47 25\n41 49\n45 9\n25 48\n16 14\n9 7\n33 28\n3 31\n34 16\n35 37\n27 40\n45 16\n29 44\n16 15\n26 15\n1 12\n2 13\n15 21\n43 14\n9 33\n44 15\n46 1\n38 5\n15 5\n1 32\n42 35\n20 27\n23 8\n1 16\n15 17\n36 50\n13 8\n49 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\nYou are given two arrays a and b...
[{"type": "stdin_stdout", "input": "5\n2 1\n1 2\n3 4\n5 5\n5 5 6 11 5\n1 2 5 4 3\n5 3\n1 2 3 4 5\n10 9 10 10 9\n4 0\n2 2 4 3\n2 4 2 3\n4 4\n1 2 2 1\n4 4 5 4\n", "output": "6\n32\n39\n11\n17\n"}, {"type": "stdin_stdout", "input": "5\n2 1\n1 2\n3 4\n5 5\n5 10 6 6 5\n1 2 5 4 3\n5 5\n1 2 3 4 5\n10 9 10 10 9\n4 0\n2 2 4 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\nThere are two rival donut shops....
[{"type": "stdin_stdout", "input": "20\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 1000000000 1000000000\n2 100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSo nearly half of the winter is ...
[{"type": "stdin_stdout", "input": "100 350728 439252\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 -227776 821899\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "55 -20 1000000\n", "output": "27272\n"}, {"type": "stdin_stdout", "input": "100 350728 688056\n", "output": "-1\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\nYou're given an array b of lengt...
[{"type": "stdin_stdout", "input": "2\n6\n4 3 0 1 2 0\n2\n2 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n6\n0 3 0 1 2 0\n2\n2 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n6\n4 3 0 1 2 0\n2\n4 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n6\n4 3 0 1 2 0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are playing a new computer g...
[{"type": "stdin_stdout", "input": "13\n3 2 4\n10 2 4\n10 3 5\n5 4 6\n7 1 1\n3 3 3\n6 6 6\n14 2 2\n16 1 1\n9 9 9\n26 3 3\n9 8 10\n4 1 4\n", "output": "YES\nNO\nYES\nNO\nYES\nYES\nYES\nYES\nNO\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "13\n3 2 4\n10 2 1\n10 3 5\n5 4 6\n7 1 1\n3 3 3\n6 6 6\n14 2 2\n16 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\n«One dragon. Two dragon. Three d...
[{"type": "stdin_stdout", "input": "10\n10\n10\n10\n100000\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "10\n10\n10\n4\n100000\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "10\n10\n16\n4\n100000\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "1\n1\n1\n1\n100000\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 a large rectangular boa...
[{"type": "stdin_stdout", "input": "5 4\noooo\no*oo\noooo\n**oo\nooo*\n", "output": "239616\n"}, {"type": "stdin_stdout", "input": "5 4\noooo\no*oo\noooo\n**oo\n*ooo\n", "output": "249856\n"}, {"type": "stdin_stdout", "input": "5 4\noooo\no*oo\noooo\no*o*\nooo*\n", "output": "233472\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 numerated f...
[{"type": "stdin_stdout", "input": "96 15 21\n76 26 108 220 384 4 170 198 568 571 2 193 244 359 78 133 107 340 110 135 565 341 109 572 243 138 357 52 293 344 595 105 569 362 639 134 82 356 27 137 194 291 499 104 28 290 197 477 339 50 288 289 160 54 358 640 343 542 566 79 136 385 3 641 195 355 361 169 196 429 242 162 33...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consider equation:\n\nx2 +...
[{"type": "stdin_stdout", "input": "980100017820000000\n", "output": "990000000\n"}, {"type": "stdin_stdout", "input": "902500013300000000\n", "output": "950000000\n"}, {"type": "stdin_stdout", "input": "999999887000001932\n", "output": "999999908\n"}, {"type": "stdin_stdout", "input": "160000029199999926\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\nThe Little Elephant loves chess ...
[{"type": "stdin_stdout", "input": "BWBWBWBW\nBWBWBWBW\nBWBWBWBW\nBWBWBWBW\nWBWBWBWB\nWBWBWBWB\nWBWBWBWB\nWBWBWBWB\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "WBWBWBWB\nWBWBWBWB\nWBWBWBWB\nWBWBWBWB\nBWBWBWBW\nWBWBWBWB\nBWBWBWBW\nBWBWBWBW\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "WBWBWBWB...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 classic programming language...
[{"type": "stdin_stdout", "input": "101\nX++\nX++\nX++\n++X\n--X\nX--\nX++\nX--\nX--\n--X\n--X\n++X\nX++\n++X\n++X\nX--\n--X\n++X\nX++\nX--\n++X\n--X\n--X\n--X\n++X\n--X\n++X\nX++\nX++\n++X\n--X\nX++\nX--\nX++\n++X\n++X\nX--\nX--\nX--\nX++\nX++\nX--\nX--\nX++\n++X\n++X\n++X\n--X\n--X\n++X\nX--\nX--\n--X\n++X\nX--\n++X\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUser ainta has a stack of n red ...
[{"type": "stdin_stdout", "input": "50\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842623\n"}, {"type": "stdin_stdout", "input": "50\nBRRRBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842609\n"}, {"type": "stdin_stdout", "input": "50\nRRBBBBBBBBBBBBBBBBRBRRBBBR...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNearly each project of the F com...
[{"type": "stdin_stdout", "input": "100 5\n- 60\n- 58\n+ 25\n- 32\n+ 86\n", "output": "95\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 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 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBizon the Champion is called the...
[{"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 100\n101 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 000\n101 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "000 100 000\n101 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a well-known sponsor of ...
[{"type": "stdin_stdout", "input": "302 143 40 63 452\n100\nXXL\nM\nXL\nS\nXXL\nS\nL\nXL\nXL\nXL\nXXL\nS\nXXL\nS\nXXL\nXL\nXL\nXXL\nXL\nXXL\nM\nS\nS\nS\nS\nXXL\nS\nL\nXL\nXXL\nXXL\nS\nXXL\nL\nXXL\nM\nS\nL\nL\nXL\nXL\nS\nXL\nL\nXL\nM\nXL\nL\nM\nS\nXL\nXXL\nXL\nL\nXL\nXL\nXL\nM\nM\nXL\nL\nS\nS\nXL\nS\nXXL\nXXL\nXL\nS\nXL...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVanya wants to pass n exams and ...
[{"type": "stdin_stdout", "input": "9 846678 205000\n102282 593538\n246630 24854\n545346 409737\n334264 443193\n37717 191227\n154582 913095\n97105 345066\n65504 578960\n163348 394257\n", "output": "2441209588\n"}, {"type": "stdin_stdout", "input": "9 846678 205000\n102282 593538\n246630 24854\n545346 409737\n334264 443...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ...
[{"type": "stdin_stdout", "input": "GXPLMUNZIRBHFJOOJHOMQNIKHVQSGFYSJLSWJQBUWYWHLQHLZYLPZWBOMPOLOLUGSBMHHLYGEIOUWDKPFIAAIRKYRLXTIFAZOPOLLPSNZHCIZDRTJPCYSCDTXBTMFSGEPRNOHJHNXZFYJPAMSHNOVZZYWCVEXLLOVHGAJBANAXVNTWCYTCUMQPEUUESQZTSDANIMUVJGDJCDLIAZKIAYAUQKPXRYKFRBVQJDRSUQZQZTIHWZDXQND\nYTJUCSBGESVMVRIDTBJTMPVACWWDWKBPEBVMG...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 name of one small but proud ...
[{"type": "stdin_stdout", "input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne e\n", "output": "lellelleel\n"}, {"type": "stdin_stdout", "input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne f\n", "output": "lfllfllffl\n"}, {"type": "stdin_stdout", "input": "10 10\nlellellee...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStepan has the newest electronic...
[{"type": "stdin_stdout", "input": "196542\n", "output": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArkady plays Gardenscapes a lot....
[{"type": "stdin_stdout", "input": "52 38 22\n9 25 D\n28 29 C\n29 25 D\n4 28 D\n23 29 D\n24 25 D\n17 12 C\n11 19 C\n13 14 C\n12 15 D\n7 25 C\n2 25 C\n6 17 C\n2 20 C\n15 23 D\n8 21 C\n13 15 D\n29 15 C\n25 20 D\n22 20 C\n2 13 D\n13 22 D\n27 20 C\n1 21 D\n22 17 C\n14 21 D\n4 25 D\n5 23 C\n9 21 C\n2 20 C\n14 18 C\n29 24 C\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBerland annual chess tournament ...
[{"type": "stdin_stdout", "input": "100\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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\nOne day Polycarp decided to rewa...
[{"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "45\n"}, {"type": "stdin_stdout", "input": "8\n13 2 7 6 7 1 4 9\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "8\n14 2 6 6 5 1 4 9\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\nGathering darkness shrouds the w...
[{"type": "stdin_stdout", "input": "50 1 19\n-5213 -1\n2021 -1\n-4479 1\n1569 -1\n1618 1\n-8318 1\n3854 1\n8190 -1\n9162 1\n8849 1\n-5545 -1\n-7898 -1\n728 1\n-2175 -1\n6453 -1\n2999 1\n3095 1\n-2192 -1\n7938 -1\n1910 -1\n-6863 -1\n5230 -1\n-4630 -1\n-2587 -1\n-3389 1\n-332 -1\n5915 1\n-2604 1\n-8907 1\n-2019 1\n2992 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\nSee Russian Translation\n\nAdam ...
[{"type": "stdin_stdout", "input": "6\n2 2 10\n2 10 20\n10 10 3\n2 3 100\n22 40 500\n2 100 1000000000000000000\n\nSAMPLE", "output": "Bob\nBob\nAdam\nAdam\nBob\nAdam\n"}, {"type": "stdin_stdout", "input": "6\n2 2 10\n4 10 20\n10 10 3\n2 3 100\n22 40 500\n2 100 1000000000000000000\n\nSAMPLE", "output": "Bob\nBob\nAdam\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\nGeeko is very happy because his ...
[{"type": "stdin_stdout", "input": "2000\n8 294\n9 307\n7 310\n3 677\n10 952\n6 902\n9 86\n7 191\n5 423\n5 992\n6 306\n5 873\n3 504\n3 461\n4 380\n7 94\n4 16\n5 592\n9 876\n9 812\n8 664\n6 921\n10 701\n7 657\n2 979\n9 560\n9 393\n3 827\n7 841\n8 927\n2 685\n4 247\n7 126\n8 731\n10 813\n10 536\n5 963\n9 229\n3 273\n6 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\nAs the Monk is also taking part ...
[{"type": "stdin_stdout", "input": "10\n100\n35642 89928 21715 39632 43512 59963 55349 30586 81779 58165 10664 53467 64928 71994 28552 91179 67658 75573 82774 618 64112 14133 5264 25563 30866 89057 65543 72257 63301 42303 64150 45394 6663 85367 89516 72957 94996 75394 30645 7545 917 96968 29618 58611 28331 97002 69767 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChinna is preparing for an onlin...
[{"type": "stdin_stdout", "input": "2000\n67\n4034 6 5758 1533 98 3 3 1530 844 8853 18467 38 86 38 53604 2 95652 71 78 35482 6403 546 81178 346 977 20372 8362 826 768 7 5 1880 7606 5275 224 70646 237 25 12 523 5 975 93854 61704 41036 28358 5202 406 92 4 915 903 2 40675 37 2 5281 64780 2407 44 25 81 2 5733 7 24730 3 55 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 we have seen that Vaishnav wa...
[{"type": "stdin_stdout", "input": "6668\n1\n2\n4\n5\n7\n8\n10\n11\n13\n14\n16\n17\n19\n20\n22\n23\n25\n26\n28\n29\n31\n32\n34\n35\n37\n38\n40\n41\n43\n44\n46\n47\n49\n50\n52\n53\n55\n56\n58\n59\n61\n62\n64\n65\n67\n68\n70\n71\n73\n74\n76\n77\n79\n80\n82\n83\n85\n86\n88\n89\n91\n92\n94\n95\n97\n98\n100\n101\n103\n104\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\nM-kun is a student in Aoki High ...
[{"type": "stdin_stdout", "input": "15 1\n4 1 4 0 6 9 2 6 5 3 5 7 9 1 9", "output": "No\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo\nYes\nYes\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "15 1\n3 0 8 1 6 9 1 6 5 5 9 7 2 7 16", "output": "No\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo\nYes\nNo\nNo\nYes\nYes\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\nGiven are two integer sequences ...
[{"type": "stdin_stdout", "input": "6\n0 0 1 2 3 12\n0 2 14 6 2 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n1 0 1 2 3 12\n0 2 14 6 2 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n1 0 1 2 3 12\n0 4 14 6 2 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n1 0 1 2 3 12\n1 4 14...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 N, find the bas...
[{"type": "stdin_stdout", "input": "208967441", "output": "11101101101011110101100010001\n"}, {"type": "stdin_stdout", "input": "180276081", "output": "11111110000111101110010110001\n"}, {"type": "stdin_stdout", "input": "175198680", "output": "11111101100010101011000101000\n"}, {"type": "stdin_stdout", "input": "21427...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tree with N vert...
[{"type": "stdin_stdout", "input": "5\n0 1 1\n0 3 3\n0 3 10\n4 4 1", "output": "2"}, {"type": "stdin_stdout", "input": "5\n0 1 1\n0 0 3\n0 3 10\n4 4 1", "output": "2"}, {"type": "stdin_stdout", "input": "5\n0 1 2\n0 0 3\n0 3 10\n4 4 1", "output": "2"}, {"type": "stdin_stdout", "input": "5\n0 1 1\n0 0 3\n0 3 13\n4 4 1",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Takahashi Kingdom, which once...
[{"type": "stdin_stdout", "input": "3\n0 1000000000 1000000000\n1000000000 0 1000000000\n1000000000 1000000000 0", "output": "3000000000"}, {"type": "stdin_stdout", "input": "5\n0 21 18 11 28\n21 0 13 10 26\n18 13 0 23 13\n11 10 23 0 17\n28 26 13 17 0", "output": "82"}, {"type": "stdin_stdout", "input": "3\n-1 -1 3\n1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke loves \"paper cutting\": h...
[{"type": "stdin_stdout", "input": "3\ncacb\nccabe\n`cacbc", "output": "abcc\n"}, {"type": "stdin_stdout", "input": "3\ncaaa\ndaacc\nacacac", "output": "aac\n"}, {"type": "stdin_stdout", "input": "3\ncaca\ncca`d\nacacac", "output": "acc\n"}, {"type": "stdin_stdout", "input": "3\nacba\nda`cb\nacacbc", "output": "abc\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\nSample testcase 3 has a mistake,...
[{"type": "stdin_stdout", "input": "25 250\n13 10 11 20 25 30 35 40 45 50 55 60 65 36 83 80 85 90 95 100 176 110 115 120 125", "output": "322439703\n"}, {"type": "stdin_stdout", "input": "25 127\n5 10 15 20 39 30 35 40 45 50 108 37 81 70 75 80 82 175 58 000 99 110 115 120 125", "output": "712861496\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 hero of justice, the Spider,...
[{"type": "stdin_stdout", "input": "4\n1 -2 0\n2 30 0\n3 33 40\n4 1 60\n2\n1 3\n1 4\n22\n1 0 0\n2 150 40\n3 30 20\n4 180 150\n5 40 80\n6 130 130\n7 72 28\n8 172 118\n9 50 50\n10 160 82\n11 90 105\n12 218 131\n13 130 64\n14 80 140\n15 36 117\n16 190 90\n17 60 100\n18 100 70\n19 130 100\n20 71 69\n21 200 110\n22 120 150\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 frog is about to return to the...
[{"type": "stdin_stdout", "input": "115 172", "output": "115\n"}, {"type": "stdin_stdout", "input": "135 191", "output": "135\n"}, {"type": "stdin_stdout", "input": "170 176", "output": "170\n"}, {"type": "stdin_stdout", "input": "208 133", "output": "76\n"}, {"type": "stdin_stdout", "input": "194 102", "output": "93\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 message from humans to extrate...
[{"type": "stdin_stdout", "input": "5 1 2\n99999 999 999\n1680 10 16\n1970 1 2\n2002 4 11\n0 0 0", "output": "2 2\n313 313\n37 43\n37 53\n37 53\n"}, {"type": "stdin_stdout", "input": "10 1 9\n99999 999 1768\n1495 5 16\n973 1 2\n2002 4 11\n0 0 0", "output": "2 5\n257 389\n31 47\n31 31\n37 53\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\nProblem\n\nThere are N islands a...
[{"type": "stdin_stdout", "input": "4 4\n1 1 27\n1 3 10\n3 3 47\n3 1 136", "output": "-1\n"}, {"type": "stdin_stdout", "input": "3 4\n1 2 27\n2 3 10\n1 3 47\n3 1 57", "output": "47\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 27\n1 3 10\n2 3 47\n3 1 57", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 4\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\nExample\n\nInput\n\n3\n1 3 3\n2\...
[{"type": "stdin_stdout", "input": "3\n0 2 0\n-1\n1 2\n0 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n0 2 0\n-1\n1 2\n0 1", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n1 1 0\n0\n1 2\n-1 1", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n0 1 1\n0\n2 1\n-1 1", "output": "3\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\nWrite a program which reads two ...
[{"type": "stdin_stdout", "input": "3 0\n-1 2\n15 3\n0 0", "output": "0 3\n-1 2\n3 15\n"}, {"type": "stdin_stdout", "input": "3 -1\n0 2\n27 3\n0 0", "output": "-1 3\n0 2\n3 27\n"}, {"type": "stdin_stdout", "input": "4 -1\n0 2\n27 3\n0 0", "output": "-1 4\n0 2\n3 27\n"}, {"type": "stdin_stdout", "input": "4 -1\n0 2\n18 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef Ciel wants to put a fancy n...
[{"type": "stdin_stdout", "input": "5\n????CIELIS???E?\n????CIELISOUR???F\nT?KEITE?SY\n????????\n???C???", "output": "CHEFCIELISACHEF\nCHEFCIELISOURCHEF\nTAKEITEASY\nCHEFCHEF\nAAACHEF\n"}, {"type": "stdin_stdout", "input": "5\n????CIELIS???E?\n????CIELISOUR???F\nT?KEITE?SY\n????????\n@??C???", "output": "CHEFCIELISACHE...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 players A and B have a list ...
[{"type": "stdin_stdout", "input": "29\n254369 14511 114048 683934 553812 575014 620356 217938 286195 131704 268393 78202 296626 986697 175814 600746 146985 215868 740052 711417 11221 944700 940915 53378 698708 878644 704035 120164 437165\n3415 443979 327875 491782 974937 176118 37957 316844 12044 156497 462613 338831 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array a of length ...
[{"type": "stdin_stdout", "input": "39 1\n4 2 1 1 3 5 1 5 1 1 3 3 4 3 1 1 4 5 1 5 2 3 3 1 5 1 2 1 1 4 1 1 5 2 2 1 1 2 4\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "39 1\n4 2 1 1 3 5 1 5 1 1 3 3 4 3 1 1 4 5 1 5 3 3 3 1 5 1 2 1 1 4 1 1 5 2 2 1 1 2 4\n", "output": "19\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\nYou are given an array a_1, a_2,...
[{"type": "stdin_stdout", "input": "100\n1065 362 1002 1071 502 252 1401 1824 887 1803 1572 1571 502 1408 1699 1750 1785 1507 1616 1458 372 323 939 1208 1639 1517 1145 319 935 1507 1094 156 1062 39 1884 1470 646 917 1699 631 39 789 1030 1589 1700 17 495 32 506 574 1458 206 1091 211 279 1617 1624 1183 572 1496 1014 2007...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWelcome to Codeforces Stock Exch...
[{"type": "stdin_stdout", "input": "29 30 989\n450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 434\n451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451\n", "output": "1023\n"}, {"type": "s...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA car number in Berland consists...
[{"type": "stdin_stdout", "input": "490 406\n69376206583505466779821214863898994183223683064168986020986087427466188663988162816834873783630551758344308091300551677259892974326315461675692547390099840313192163258859011559750513086756892636598304230038445861422033560468535920495378496152301219687339355030990474992436599...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a holiday season, and Koal...
[{"type": "stdin_stdout", "input": "70\n0010011111011101101111000111101011010101000011000000010100010101010001\n3 1\n1 5\n3 1\n4 1\n3 3\n2 4\n2 1\n5 1\n2 4\n5 2\n5 2\n4 1\n2 5\n2 2\n4 2\n5 1\n1 2\n2 4\n3 1\n1 1\n5 3\n5 2\n3 5\n4 4\n2 1\n3 2\n1 3\n5 1\n3 4\n2 3\n1 5\n4 1\n2 2\n5 1\n3 3\n4 2\n1 4\n5 2\n1 2\n4 1\n1 4\n5 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\nYou have two integers l and r. F...
[{"type": "stdin_stdout", "input": "98766 110000\n", "output": "102345\n"}, {"type": "stdin_stdout", "input": "98766 110010\n", "output": "102345\n"}, {"type": "stdin_stdout", "input": "72073 145777\n", "output": "72081\n"}, {"type": "stdin_stdout", "input": "11097 145777\n", "output": "12034\n"}, {"type": "stdin_stdou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 players decided to play one ...
[{"type": "stdin_stdout", "input": "2\n2 1 1\n2\n-1\n5 2 3\n1 3\n2 11 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n2 1 1\n2\n-1\n5 2 3\n2 3\n2 2 5\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n2 1 1\n2\n1\n5 2 3\n2 3\n-1 6 5\n", "output": "YES\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\nThe Red Kingdom is attacked by t...
[{"type": "stdin_stdout", "input": "10\n6 3 4 5\n2 3 2 3 1 3\n1 5 4 3\n10\n4 4 2 3\n0 10 14 5\n2 2 1 4\n8 5\n3 5 3 5\n9 2 10\n4 5 5 5\n2 10 2 2\n2 3 1 4\n1 10\n3 1 5 3\n11 8 7\n2 5 4 5\n8 8\n3 5 1 4\n5 2 10\n", "output": "0\n2\n3\n2\n5\n12\n5\n0\n0\n2\n"}, {"type": "stdin_stdout", "input": "10\n6 3 4 5\n2 3 2 3 1 3\n1 ...
code_stdio