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\nThere will be a launch of a new,...
[{"type": "stdin_stdout", "input": "30\nRLLRLRLLRRRLRRRLLLLLLRRRLRRLRL\n128 610 1680 2436 2896 2994 3008 3358 3392 4020 4298 4582 4712 4728 5136 5900 6088 6232 6282 6858 6934 7186 7224 7256 7614 8802 8872 9170 9384 9794\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "28\nRRLRLRRRRRRLLLRRLRRLLLRRLLLR\n156 172 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\nThe Cybermen and the Daleks have...
[{"type": "stdin_stdout", "input": "10\n11 11\n11 12\n11 15\n11 17\n11 18\n11 19\n11 28\n11 33\n11 38\n11 40\n12 11\n15 46\n17 11\n17 46\n18 46\n19 11\n19 46\n20 11\n20 46\n24 46\n25 46\n26 11\n32 11\n32 46\n33 11\n34 46\n36 11\n39 11\n40 46\n43 11\n44 0\n46 14\n46 15\n46 17\n46 22\n46 26\n46 28\n46 32\n46 43\n46 45\n4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKurt reaches nirvana when he fin...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "387420489\n"}, {"type": "stdin_stdout", "input": "2000000000\n", "output": "387420489\n"}, {"type": "stdin_stdout", "input": "1382011913\n", "output": "387420489\n"}, {"type": "stdin_stdout", "input": "1999999999\n", "output": "387420489\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\nAwruk is taking part in election...
[{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 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\nYou are given a set of points on...
[{"type": "stdin_stdout", "input": "aaaaaaaaabbbbbaaaabaaaaaaaaaaaaaaaaabaaaaaabbbbbbbaaabbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "bbbbbbbbbbbbbbbbbbbbbbddddddddddddddddaaaaaaaaaaaaaccccccccbbbbbbbaaaaaaaaaabbbbbbbbaaaaaaaaaacccccc\n", "output": "11\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\nAfter returning from the army Ma...
[{"type": "stdin_stdout", "input": "4\n33554432 33554432 67108864 33554432\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n1000000000 1000000000 1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "11\n1 2 2 2 2 2 2 2 2 2 2\n", "output": "45\n"}, {"type": "stdin_stdout", "input": "10\n1 2 2 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\nKatie, Kuro and Shiro are best f...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "1000000000000000001"}, {"type": "stdin_stdout", "input": "822981260158260519\n", "output": "411490630079130260"}, {"type": "stdin_stdout", "input": "779547116602436424\n", "output": "779547116602436425"}, {"type": "stdin_stdout", "input": "578223540...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIlya is a very clever lion, he l...
[{"type": "stdin_stdout", "input": "-1000000000\n", "output": "-100000000\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "-847251738\n", "output": "-84725173\n"}, {"type": "stdin_stdout", "input": "-623563697\n", "output": "-62356367\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\n[Image] \n\nWalking through the ...
[{"type": "stdin_stdout", "input": "> >\n1000000000\n", "output": "undefined\n"}, {"type": "stdin_stdout", "input": "v ^\n571728018\n", "output": "undefined\n"}, {"type": "stdin_stdout", "input": "v v\n927162384\n", "output": "undefined\n"}, {"type": "stdin_stdout", "input": "v ^\n571728018\n", "output": "undefined\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\nLittle Chris knows there's no fu...
[{"type": "stdin_stdout", "input": "400\n.L.R.LR.LRL.R.LR.LR..L....RLR.L..R..LRLRLR.LRL..RLR.LRLRLRLR.LR..LRL.RLR...LRLR.LRL.R.LR..LR.LRLR...LRLRL.R.L.....RL..RL.RLRL.RL.RL...RL..R.LRLRL..R.LRL...R..LRL.RLRL...RL..RLRLRLRL.R..LRL.R..LRLRL.R.L.R.L.RL.RLRLRL....R.LR..L..RL.RL.RLRLR.L..RLRL.RLR..LRLR.L.R..L.R.LR.LRL.....R...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPasha has a positive integer a w...
[{"type": "stdin_stdout", "input": "219810011901120912 100\n", "output": "999822211111110000\n"}, {"type": "stdin_stdout", "input": "191919191919119911 100\n", "output": "999999991111111111\n"}, {"type": "stdin_stdout", "input": "123456789123456789 100\n", "output": "998877665544213123\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\nIlya lives in a beautiful city o...
[{"type": "stdin_stdout", "input": "41\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1\n", "output": "39\n"}, {"type": "stdin_stdout", "input": "20\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "20\n1 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\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 10000 160845880\n", "output": "8043 2940 R\n"}, {"type": "stdin_stdout", "input": "10000 9999 18...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCatherine has a deck of n cards,...
[{"type": "stdin_stdout", "input": "200\nBBRGRRBBRGGGBGBGBGRRGRGRGRBGRGRRBBGRGBGRRGRRRGGBBRGBGBGBRBBBBBBBGGBRGGRRRGGRGBGBGGBRRRRBRRRBRBBGGBGBRGRGBBBBGGBGBBBGBGRRBRRRGBGGBBBRBGRBRRGGGRRGBBBGBGRRRRRRGGRGRGBBBRGGGBGGGBRBBRRGBGRGRBRRRBRBGRGGBRBB\n", "output": "BGR\n"}, {"type": "stdin_stdout", "input": "200\nRGRGRRRRRGRRGR...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDasha decided to have a rest aft...
[{"type": "stdin_stdout", "input": "25\n1 2\n1 3\n1 4\n2 5\n5 6\n6 7\n7 8\n2 9\n9 10\n11 2\n12 11\n13 12\n3 14\n14 15\n14 16\n16 17\n14 18\n18 19\n20 4\n20 21\n20 22\n22 23\n20 24\n24 25\n", "output": "YES\n0 0\n0 1073741824\n1073741824 0\n0 -1073741824\n0 1610612736\n0 1879048192\n0 2013265920\n0 2080374784\n536870912...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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"}, {"type": "stdin_stdout", "input": "110132820763723554 347999721032847655\n", "output": "416849587"}, {"type": "stdin_stdout", "input": "344719938937955218 881301645881541177\n", "output": "901594724"}, {"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\nArpa is taking a geometry exam. ...
[{"type": "stdin_stdout", "input": "-947393823 -495674431 211535284 -877153626 -522763219 -778236665\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-357531221 381512519 -761132895 -224448284 328888775 -237692564\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-706921242 -758563024 -588592101 -44344...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp loves geometric progres...
[{"type": "stdin_stdout", "input": "18 10\n10000000 100000000 1000000000 -10000000 -100000000 -1000000000 -10000000 -100000000 -1000000000 -10000000 -100000000 -1000000000 10000000 100000000 1000000000 10000000 100000000 1000000000\n", "output": "20"}, {"type": "stdin_stdout", "input": "30 4096\n1 2 4 8 16 32 64 128 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\nRecently Max has got himself int...
[{"type": "stdin_stdout", "input": "10 9 0\n620118469 704168608\n528098892 341451371\n15150469 449838744\n960504540 722185004\n271837337 344050133\n940943201 419522619\n85569623 788965215\n161962866 563795701\n943389281 445744350\n610994199 473866838\n", "output": "5253588583\n"}, {"type": "stdin_stdout", "input": "12 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Vasya was sitting on a n...
[{"type": "stdin_stdout", "input": "1000000000000 999999999999\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 999999999998\n", "output": "500000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 1\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "62862524...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSengoku still remembers the myst...
[{"type": "stdin_stdout", "input": "11\n1 2 3 4 5 6 7 8 9 10 10\n1 2 3 4 5 6 7 8 9 10 3\n", "output": "1 2 3 4 5 6 7 8 9 10 11\n"}, {"type": "stdin_stdout", "input": "10\n1 2 3 4 7 6 7 8 9 10\n1 2 3 4 5 6 5 8 9 10\n", "output": "1 2 3 4 5 6 7 8 9 10\n"}, {"type": "stdin_stdout", "input": "10\n1 2 3 4 5 6 7 8 4 10\n1 2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn one quiet day all of sudden M...
[{"type": "stdin_stdout", "input": "100000 180\n", "output": "2 1 100000\n"}, {"type": "stdin_stdout", "input": "100000 123\n", "output": "2 1 68335\n"}, {"type": "stdin_stdout", "input": "100000 101\n", "output": "2 1 56113\n"}, {"type": "stdin_stdout", "input": "100000 109\n", "output": "2 1 60558\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\nPetr has just bought a new car. ...
[{"type": "stdin_stdout", "input": "15\n168\n168\n168\n168\n168\n168\n168\n168\n168\n168\n168\n168\n168\n168\n168\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "15\n180\n180\n180\n180\n180\n180\n180\n180\n180\n180\n180\n180\n180\n180\n180\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "14\n180\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\nPolycarp decided to relax on his...
[{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "500000000 250000000 750000000 1000000000\n", "output": "1500000000\n"}, {"type": "stdin_stdout", "input": "716270982 22102638 553198855 1000000000\n", "output": "1305831656\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\nVasya is studying number theory....
[{"type": "stdin_stdout", "input": "999999999989 999999999988\n", "output": "999999999988\n"}, {"type": "stdin_stdout", "input": "414654652183 366894205623\n", "output": "366894205623\n"}, {"type": "stdin_stdout", "input": "999999999958 999999999957\n", "output": "499999999979\n"}, {"type": "stdin_stdout", "input": "19...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 building with 2N floo...
[{"type": "stdin_stdout", "input": "100\n65 165\n6 106\n41 141\n1 101\n4 104\n33 133\n5 105\n57 157\n98 198\n15 115\n52 152\n53 153\n46 146\n29 129\n42 142\n8 108\n12 112\n69 169\n47 147\n87 187\n79 179\n88 188\n67 167\n26 126\n55 155\n73 173\n72 172\n74 174\n95 195\n36 136\n61 161\n10 110\n17 117\n7 107\n23 123\n30 13...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGerald is very particular to eig...
[{"type": "stdin_stdout", "input": "1000000 1000000\n1000000 999999\n1000000 999998\n999999 1000000\n999999 999998\n999998 1000000\n999998 999999\n999998 999998\n", "output": "respectable\n"}, {"type": "stdin_stdout", "input": "642921 597358\n922979 597358\n127181 616833\n642921 828316\n922979 828316\n127181 597358\n92...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAdilbek was assigned to a specia...
[{"type": "stdin_stdout", "input": "50\n1000000000 1000000000\n999999999 1000000000\n999999998 1000000000\n999999997 1000000000\n999999996 1000000000\n999999995 1000000000\n999999994 1000000000\n999999900 1000000000\n1 11\n2 11\n3 11\n4 11\n5 11\n6 11\n7 11\n8 11\n9 11\n10 11\n11 11\n4 18\n4 20\n3 19\n3 18\n3 167\n3 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\nApart from Nian, there is a daem...
[{"type": "stdin_stdout", "input": "35\n", "output": "888888888888888886\n"}, {"type": "stdin_stdout", "input": "36\n", "output": "888888888888888888\n"}, {"type": "stdin_stdout", "input": "33\n", "output": "88888888888888886\n"}, {"type": "stdin_stdout", "input": "34\n", "output": "88888888888888888\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\nErelong Leha was bored by calcul...
[{"type": "stdin_stdout", "input": "26 26\nabcdefghijklmnopqrstuvwxyz\nffffffffffffffffffffffffff\n", "output": "25\n1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 \n"}, {"type": "stdin_stdout", "input": "10 100\nmpmmpmmmpm\nmppppppmppmmpmpppmpppmmpppmpppppmpppmmmppmpmpmmmpmmpmppmmpppppmpmppppmmppmp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tree is a connected undirected...
[{"type": "stdin_stdout", "input": "33 5 3\n", "output": "1 2\n2 3\n3 4\n1 5\n5 6\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n16 1\n17 1\n18 1\n19 1\n20 1\n21 1\n22 1\n23 1\n24 1\n25 1\n26 1\n27 1\n28 1\n29 1\n30 1\n31 1\n32 1\n33 1\n"}, {"type": "stdin_stdout", "input": "30 14 14\n", "output": "1 2\n2 3\n3 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\nNN is an experienced internet us...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "3.2429391\n"}, {"type": "stdin_stdout", "input": "5 100\n", "output": "142.5919998\n"}, {"type": "stdin_stdout", "input": "3 32\n", "output": "206.8512517\n"}, {"type": "stdin_stdout", "input": "10 25\n", "output": "11.1803399\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\nHarry Potter and He-Who-Must-Not...
[{"type": "stdin_stdout", "input": "538\n479\n416\n", "output": "287.9351955\n"}, {"type": "stdin_stdout", "input": "583\n112\n248\n", "output": "181.3777778\n"}, {"type": "stdin_stdout", "input": "978\n467\n371\n", "output": "545.0190931\n"}, {"type": "stdin_stdout", "input": "980\n322\n193\n", "output": "612.7378641\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the faculty of Computer...
[{"type": "stdin_stdout", "input": "5\n2043 2042 2041 2044 2040\n", "output": "2042\n"}, {"type": "stdin_stdout", "input": "5\n2012 2013 2014 2015 2016\n", "output": "2014\n"}, {"type": "stdin_stdout", "input": "5\n2011 2014 2012 2013 2010\n", "output": "2012\n"}, {"type": "stdin_stdout", "input": "5\n2014 2013 2011 20...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOverlooking the captivating blen...
[{"type": "stdin_stdout", "input": "100\nC?M?M?M?YM??YMYC?MCYMYM??Y??YC?CYC???YM?YM??MYMY?CYCYMYC?YC?C?CYCMY??CMC?YMCMYCYCYMYM?CYM?M?MCMCMY?Y\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "100\n????????????????????????????????????????????????????????????????????????????????????????????????????\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\nLet $f_{x} = c^{2x-6} \\cdot f_{...
[{"type": "stdin_stdout", "input": "1000000000000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "607659049\n"}, {"type": "stdin_stdout", "input": "828401532544180275 298741808 401572465 730243936 632306255\n", "output": "808231153\n"}, {"type": "stdin_stdout", "input": "644520543495037719 168164385 42...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReturning back to problem solvin...
[{"type": "stdin_stdout", "input": "24 17\ngdnaevfczjayllndr\nwmuarvqwpbhuznpxz\nlurusjuzrkxmdvfhw\nyckftntrvdatssgbb\nzxpnzuhbpwqvraumw\nwaxuutbtbtbtuuxaw\ndgwjcwilgyrgpohnr\ntrcttthipihtttcrt\ncmbovzvfgdqlfkfqp\nqbgqnzkhixnnvzvqi\nqiursxnedmveeuxdq\nrdnllyajzcfveandg\nbzwxilleapxzcxmde\ncxcfjzlfdtytldtqf\nyhukzlipwdu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a list of positive in...
[{"type": "stdin_stdout", "input": "100\n881 479 355 759 257 497 690 598 275 446 439 787 257 326 584 713 322 5 253 781 434 307 164 154 241 381 38 942 680 906 240 11 431 478 628 959 346 74 493 964 455 746 950 41 585 549 892 687 264 41 487 676 63 453 861 980 477 901 80 907 285 506 619 748 773 743 56 925 651 685 845 313 4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLord Omkar has permitted you to ...
[{"type": "stdin_stdout", "input": "80\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStudent Dima from Kremland has a...
[{"type": "stdin_stdout", "input": "1 249\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 67 0 0 0 0 0 0 0 0 0 0 0 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven are two strings s and t co...
[{"type": "stdin_stdout", "input": "contest\nprogramming\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "contest\nsentence\n", "output": "33\n"}, {"type": "stdin_stdout", "input": "contest\nson\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "s\nsv\n", "output": "-1\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\nBear Limak examines a social net...
[{"type": "stdin_stdout", "input": "20 80\n17 4\n10 1\n11 10\n17 7\n15 10\n14 15\n13 1\n18 13\n3 13\n12 7\n9 13\n10 12\n14 12\n18 11\n4 7\n10 13\n11 3\n19 8\n14 7\n10 17\n14 3\n7 11\n11 14\n19 5\n10 14\n15 17\n3 1\n9 10\n11 1\n4 1\n11 4\n9 1\n12 3\n13 7\n1 14\n11 12\n7 1\n9 12\n18 15\n17 3\n7 15\n4 10\n7 18\n7 9\n12 17...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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[Image] \n\n\n-----Input-----\n\...
[{"type": "stdin_stdout", "input": "MDJivQRiOIVRcCdkSuUlNbMEOkIVJRMTAnHbkVaOmOblLfignh\n25\n", "output": "MDJIVQRIOIVRCCDKSUULNBMEOKIVJRMTANHBKVAOMOBLLFIGNH\n"}, {"type": "stdin_stdout", "input": "aaaaaaAAAaaaaAaaAaaAaaaaAAaAAAaaAAaaaAAaaaaaAaaAAa\n2\n", "output": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\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\nYaroslav, Andrey and Roman can p...
[{"type": "stdin_stdout", "input": "10\n00000000000111111111\n00000000011111111111\n", "output": "Draw\n"}, {"type": "stdin_stdout", "input": "4\n01100000\n10010011\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "4\n01101010\n11111110\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "4\n010101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and Kirill are doing a phys...
[{"type": "stdin_stdout", "input": "60\n-86077 -86075 -86076 -86076 -86077 -86077 -86075 -86075 -86075 -86077 -86075 -86076 -86075 -86075 -86075 -86076 -86075 -86076 -86075 -86075 -86076 -86076 -86076 -86075 -86075 -86075 -86075 -86077 -86075 -86076 -86075 -86075 -86075 -86076 -86075 -86076 -86077 -86075 -86075 -86075 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGrigoriy, like the hero of one f...
[{"type": "stdin_stdout", "input": "dqcpcobpcobnznamznamzlykxkxlxlylzmaobnaobpbnanbpcoaobnboaoboanzlymzmykylymylzlylymanboanaocqdqesfrfs\n", "output": "1236\n"}, {"type": "stdin_stdout", "input": "uhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuhuh\n", "output": "1293\n"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe final match of the Berland F...
[{"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n1999999\n", "output": "1999 1999\n"}, {"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n2000000\n", "output": "2000 2000\n"}, {"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n1456999\n", "output": "0 1456\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\nDuring the break the schoolchild...
[{"type": "stdin_stdout", "input": "50 30\nBGGGGGGBGGBGBGGGGBGBBGBBBGGBBBGBGBGGGGGBGBBGBGBGGG\n", "output": "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBBBBBBBBBBBBBBBBB\n"}, {"type": "stdin_stdout", "input": "50 10\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMakoto has a big blackboard with...
[{"type": "stdin_stdout", "input": "1000000000000000 10000\n", "output": "215514159\n"}, {"type": "stdin_stdout", "input": "671058194037157 8673\n", "output": "298638658\n"}, {"type": "stdin_stdout", "input": "900018062553298 4801\n", "output": "345432320\n"}, {"type": "stdin_stdout", "input": "999999999999993 8123\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\nNow it's time of Olympiads. Vany...
[{"type": "stdin_stdout", "input": "74 99\n", "output": "11011011011011011011011011011011011011011011011011011011011011011011011010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101\n"}, {"type": "stdin_stdout", "input": "19 30\n", "output": "1101101101101101101101101101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 quasi-palindromic number be ...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "213443120\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "999999998\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "21000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImp is in a magic forest, where ...
[{"type": "stdin_stdout", "input": "2500\n", "output": "700393\n"}, {"type": "stdin_stdout", "input": "1216\n", "output": "160822\n"}, {"type": "stdin_stdout", "input": "2140\n", "output": "614785\n"}, {"type": "stdin_stdout", "input": "1488\n", "output": "239580\n"}, {"type": "stdin_stdout", "input": "1040\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 play a computer game. Your c...
[{"type": "stdin_stdout", "input": "21 21\n.....X...X.........X.\n...X...XX......X.....\n..X........X.X...XX..\n.........X....X...X..\nX...X...........XX...\n...X...X....XX...XXX.\n.X............X......\n......X.X............\n.X...X.........X.X...\n......XX......X.X....\n....X.......X.XXX....\n.X.......X..XXX.X..X.\n....
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe programming competition seas...
[{"type": "stdin_stdout", "input": "100\n56 22 13 79 28 73 16 55 34 0 97 19 22 36 22 80 30 19 36 92 9 38 24 10 61 43 19 12 18 34 21 36 1 17 0 97 72 37 74 70 51 34 33 87 27 33 45 97 38 56 2 32 88 92 64 51 74 94 86 98 57 62 83 3 87 61 9 65 57 13 64 10 50 35 7 75 41 3 70 66 6 55 69 42 91 75 14 22 68 93 2 53 22 98 45 2 78 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string $s$ consi...
[{"type": "stdin_stdout", "input": "50\n6\nbxyxcz\n4\nzzcy\n2\nzb\n2\nyb\n6\nzzbxyx\n4\nbxzb\n4\naaca\n4\nbzyx\n4\nxaac\n2\nbb\n2\nzb\n6\ncabcbb\n6\nyxzbbb\n2\nxz\n2\ncc\n6\nazcaza\n4\nyyaa\n2\nxb\n2\nyb\n6\nzaxxxz\n4\nbyab\n4\naxxz\n2\nay\n2\nyb\n2\ncx\n4\nzyab\n6\nybcyya\n6\nxayzaz\n4\nzacx\n6\nzzyxbz\n2\ncc\n4\nbycx...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMarina loves strings of the same...
[{"type": "stdin_stdout", "input": "100 85\njknccpmanwhxqnxivdgguahjcuyhdrazmbfwoptatlgytakxsfvdzzcsglhmswfxafxyregdbeiwpawrjgwcqrkbhmrfcscgoszf\nhknccpmanwhxjnxivdggeahjcuyhdrazmbfwoqtatlgytdkxsfvdztcsglhmssfxsfxyrngdbeiwpawrjgwcqrkbhmrfcsckoskf\n", "output": "aknccpmanwhxanxivaaaabaaaaaaaabaaaaaaaabaaaaabaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt's hard times now. Today Petya...
[{"type": "stdin_stdout", "input": "k\n*\n89\nb\ncbbbc\ncabac\nbccbb\nccc\ncabaa\nabbaa\nccbaa\nccccb\ncabbb\nbbcbc\nbac\naaac\nabb\nbcbb\ncb\nbacc\nbbaba\nb\nacc\nbaac\naaba\nbcbba\nbaa\nbc\naaccb\nb\nab\nc\nbbbb\nabbcb\nacbb\ncba\nc\nbac\nc\nac\ncc\nb\nbbc\nbaab\nc\nbbc\nab\nb\nc\naa\naab\nab\naccbc\nacbaa\na\nccc\nc...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is managed to enter his fa...
[{"type": "stdin_stdout", "input": "20 5\nvSyC787KlIL8kZ2Uv5sw\nWKWOP\n7i8J3E8EByIq\nNW2VyGweL\nmyR2sRNu\nmXusPP0\nf4jgGxra\n4wHRzRhOCpEt\npPz9kybGb\nOtSpePCRoG5nkjZ2VxRy\nwHYsSttWbJkg\nKBOP9\nQfiOiFyHPPsw3GHo8J8\nxB8\nqCpehZEeEhdq\niOLjICK6\nQ91\nHmCsfMGTFKoFFnv238c\nJKjhg\ngkEUh\nKBOP9\n", "output": "3 11\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\nWhen registering in a social net...
[{"type": "stdin_stdout", "input": "ELioO1lOoOIOiLoooi1iolul1O\n7\nOoEIuOIl1ui1010uiooOoi0Oio001L0EoEolO0\nOLIoOEuoE11u1u1iLOI0oO\nuEOuO0uIOOlO01OlEI0E1Oo0IO1LI0uE0LILO0\nEOo0Il11iIOOOIiuOiIiiLOLEOOII001EE\niOoO0LOulioE0OLIIIulli01OoiuOOOoOlEiI0EiiElIIu0\nlE1LOE1Oil\n1u0EOliIiIOl1u110il0l1O0u\n", "output": "Yes\n"}, {"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConnect the countless points wit...
[{"type": "stdin_stdout", "input": "20\n-975467170 758268840 -975467171 758268839 -975467172 758268838 -975467173 758268837 -975467174 758268836 -975467175 758268835 -975467176 758268834 -975467177 758268833 -975467178 758268832 -975467179 758268831\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "20\n3194103...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 had three strings $a$, $b$...
[{"type": "stdin_stdout", "input": "100 200\ndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\nddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring a New Year special offer ...
[{"type": "stdin_stdout", "input": "58\n145410\n686144\n766870\n859775\n922809\n470967\n034349\n318920\n019664\n667953\n295078\n908733\n691385\n774622\n325695\n443254\n817406\n984471\n512092\n635832\n303546\n189826\n128551\n720334\n569318\n377719\n281502\n956352\n758447\n207280\n583935\n246631\n160045\n452683\n594100\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\nLittle Alyona is celebrating Hap...
[{"type": "stdin_stdout", "input": "86 30\n16 -12 11 16 8 14 7 -29 18 30 -32 -10 20 29 -14 -21 23 -19 -15 17 -2 25 -22 2 26 15 -7 -12 -4 -28 21 -4 -2 22 28 -32 9 -20 23 38 -21 21 37 -13 -30 25 31 6 18 29 29 29 27 38 -15 -32 32 -7 -8 -33 -11 24 23 -19 -36 -36 -18 9 -1 32 -34 -26 1 -1 -16 -14 17 -17 15 -24 38 5 -27 -12 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\nLuke Skywalker gave Chewbacca an...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "164324828731963982\n", "output": "134324121231033012\n"}, {"type": "stdin_stdout", "input": "384979173822804784\n", "output": "314020123122104214\n"}, {"type": "stdin_stdout", "input": "606...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProgrammer Rostislav got serious...
[{"type": "stdin_stdout", "input": "1 2576683920000 2\n", "output": "1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 687194...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPig is visiting a friend.\n\nPig...
[{"type": "stdin_stdout", "input": "70 100\n0 99\n1 87\n1 94\n1 4\n2 72\n3 39\n3 69\n4 78\n5 85\n7 14\n8 59\n12 69\n14 15\n14 76\n17 17\n19 53\n19 57\n19 21\n21 35\n21 83\n24 52\n24 33\n27 66\n27 97\n30 62\n30 74\n30 64\n32 63\n35 49\n37 60\n40 99\n40 71\n41 83\n42 66\n42 46\n45 83\n51 76\n53 69\n54 82\n54 96\n54 88\n5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 blocks arranged in a...
[{"type": "stdin_stdout", "input": "200000 200000 199999\n", "output": "703273590\n"}, {"type": "stdin_stdout", "input": "178720 187658 129518\n", "output": "963607179\n"}, {"type": "stdin_stdout", "input": "189770 199455 133747\n", "output": "971381227\n"}, {"type": "stdin_stdout", "input": "189992 49130 122242\n", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven are a prime number p and a...
[{"type": "stdin_stdout", "input": "2999\n0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 1 1 0 0 1 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 is a great fan of telev...
[{"type": "stdin_stdout", "input": "5\n15 18\n23 24\n23 28\n22 24\n15 19\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5\n19 23\n12 17\n16 21\n20 23\n8 10\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5\n3 4\n21 26\n12 17\n9 14\n15 16\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja showed an interesting gam...
[{"type": "stdin_stdout", "input": "100 1000\n10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 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\nAlice and Bob are decorating a C...
[{"type": "stdin_stdout", "input": "100 100 100\n", "output": "297"}, {"type": "stdin_stdout", "input": "99 100 100\n", "output": "297"}, {"type": "stdin_stdout", "input": "100 98 99\n", "output": "294"}, {"type": "stdin_stdout", "input": "99 100 99\n", "output": "294"}, {"type": "stdin_stdout", "input": "50 80 70\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\nKolya loves putting gnomes at th...
[{"type": "stdin_stdout", "input": "100000\n", "output": "192156836"}, {"type": "stdin_stdout", "input": "100000\n", "output": "192156836"}, {"type": "stdin_stdout", "input": "10000\n", "output": "246305722"}, {"type": "stdin_stdout", "input": "10868\n", "output": "118127713"}, {"type": "stdin_stdout", "input": "66115\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 wise man told Kerem \"Differen...
[{"type": "stdin_stdout", "input": "45\naaabbbcccdddeeefffgghhiijjkkkkkkkkkkkkkkkkkkk\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "30\nabcdefghtyabcdefghtyabcdefghty\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "27\naaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "-1\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\nAt regular competition Vladik an...
[{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "Vladik\n"}, {"type": "stdin_stdout", "input": "1000000000 999982505\n", "output": "Valera\n"}, {"type": "stdin_stdout", "input": "999963734 999994456\n", "output": "Vladik\n"}, {"type": "stdin_stdout", "input": "965161805 908862070\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\nServal soon said goodbye to Japa...
[{"type": "stdin_stdout", "input": "300\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\nLimak is a little polar bear. He...
[{"type": "stdin_stdout", "input": "100 1000\n-62 57 -27 -67 49 -10 66 -64 -36 -78 62 -75 -39 75 -47 -36 41 -88 62 -43 22 29 -20 58 40 16 71 -2 -87 12 86 -90 -92 67 -12 -48 -10 -26 78 68 22 -3 66 -95 -81 34 14 -76 -27 76 -60 87 -84 3 35 -60 46 -65 29 -29 2 -44 -55 18 -75 91 36 34 -86 53 59 -54 -29 33 -95 66 9 72 67 -44...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDeveloping tools for creation of...
[{"type": "stdin_stdout", "input": "-1000000000 -1000000000 1000000000 1000000000\n", "output": "2000000002000000001"}, {"type": "stdin_stdout", "input": "-1000000000 -999999999 1000000000 999999999\n", "output": "2000000000000000000"}, {"type": "stdin_stdout", "input": "-999999999 -1000000000 999999999 1000000000\n", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob are playing chess ...
[{"type": "stdin_stdout", "input": "1000\n500 200\n350 300\n400 401\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000\n600 600\n700 653\n650 701\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000\n500 500\n893 450\n891 449\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000\n350 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\nGiven an array $a$, consisting o...
[{"type": "stdin_stdout", "input": "174\n28 44 12 32 9 27 23 5 23 47 14 49 39 5 10 5 20 9 4 34 18 40 16 4 45 30 32 44 44 30 29 23 21 27 35 13 23 46 5 32 47 45 44 23 12 2 9 28 47 23 22 27 45 27 40 41 22 39 50 14 40 44 20 40 49 23 14 29 27 23 16 40 45 44 15 18 28 9 23 15 21 10 46 29 18 6 15 3 11 34 1 15 35 27 46 36 4 20 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBarney is standing in a bar and ...
[{"type": "stdin_stdout", "input": "2.0629094807595491132306264747042243928486303384791951220362096240931158821630792563855724946791054152e85\n", "output": "20629094807595491132306264747042243928486303384791951220362096240931158821630792563855.724946791054152\n"}, {"type": "stdin_stdout", "input": "1.739019376653594888...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has n cities, the capita...
[{"type": "stdin_stdout", "input": "2 9 1 2\n1 2 1000000\n1 2 1000000\n1 2 1000000\n1 2 1000000\n1 2 2\n1 2 1000000\n1 2 1000000\n1 2 1000000\n1 2 1000000\n", "output": "CAN 999999\nCAN 999999\nCAN 999999\nCAN 999999\nYES\nCAN 999999\nCAN 999999\nCAN 999999\nCAN 999999\n"}, {"type": "stdin_stdout", "input": "10 13 2 10...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an unweighted tree...
[{"type": "stdin_stdout", "input": "10\n8 2\n8 10\n10 3\n2 4\n3 6\n8 1\n2 7\n10 9\n4 5\n", "output": "35\n5 9 9\n6 1 1\n6 7 7\n5 6 6\n5 3 3\n5 10 10\n5 8 8\n5 2 2\n5 4 4\n"}, {"type": "stdin_stdout", "input": "10\n7 10\n10 6\n6 4\n4 5\n5 8\n8 2\n2 1\n1 3\n3 9\n", "output": "45\n7 9 9\n7 3 3\n7 1 1\n7 2 2\n7 8 8\n7 5 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\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 6 4 4 12 5 4 11 8 1 2 8 11 19 18 4\n52258 5648 46847 9200 63940 79328 64407 54479 1788 60107 8234 64215 15419 84411 50307 78075 92548 17867 43456 7970 1390 99373 97297 90662 82950 678 79356 51351 2794 82477 16508 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\nThis is an easier version of the...
[{"type": "stdin_stdout", "input": "500\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\nModern text editors usually show...
[{"type": "stdin_stdout", "input": "255\nT___J(M_XZJlr_lH___mqJA_p__kW)ko__F_M_Aro__ZA_G_M_P_____j_V(J_Jk_dkR_ta_lbIUhKFfo_y_DluW)IVFj_gouRfMhabn()_e___q_vo__QPEGBI_TpVVI_clPwwb_m_yL_cMVKgi___RJb_J_f____tPCyntLOr_s_x_N_SyqQw_zP_mycsW_o_c_o_Yzb_UVa_ATd(BYH_gl___Y__Uzok_Y_IA_XL_D__bkJ____e__K_quk)\n", "output": "10 25\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 two arrays $a_1, a...
[{"type": "stdin_stdout", "input": "77 22\n7 2 4 8 10 7 5 7 9 7 5 6 2 9 10 1 5 4 5 8 6 9 3 1 8 1 10 9 6 7 7 1 5 3 6 4 9 10 7 8 2 3 10 10 9 9 2 9 1 9 7 3 2 4 7 7 1 1 10 4 2 2 8 3 2 9 9 9 5 6 7 1 10 8 3 9 1\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nE869120 is initially standing at...
[{"type": "stdin_stdout", "input": "100\n-62558 -455059\n-78926 -574123\n-122264 -889372\n-29760 -216480\n-91884 -668382\n-122636 -892078\n-134168 -975964\n-17670 -128535\n-127782 -929511\n-74524 -542102\n-104470 -759935\n-133362 -970101\n-93124 -677402\n-16368 -119064\n-19530 -142065\n-82336 -598928\n-87358 -635459\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\nIvan has an array consisting of ...
[{"type": "stdin_stdout", "input": "50\n48 37 47 50 46 43 42 46 36 40 45 41 40 50 35 49 37 42 44 45 49 44 31 47 45 49 48 41 45 45 48 20 34 43 43 41 47 50 41 48 38 48 43 48 46 48 32 37 47 45\n", "output": "31\n1 2 3 4 5 6 7 8 36 9 10 11 40 12 35 13 14 42 15 16 17 44 31 18 19 49 21 22 23 24 25 20 34 26 27 28 29 50 41 30 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is going to the Olympics i...
[{"type": "stdin_stdout", "input": "100 79\n83 83 83 83 83 94 94 83 83 83 83 90 83 99 83 91 83 83 83 83 83 83 83 83 83 83 83 91 83 83 83 83 83 96 83 83 83 91 83 83 92 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 98 83 83 91 97 83 83 83 83 83 83 83 92 83 83 83 83 83 83 83 93 83 83 91 83 83 83 83 83 83 83 83 83 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 country of Byalechinsk is ru...
[{"type": "stdin_stdout", "input": "100 1\n439 158 619 538 187 153 973 781 610 475 94 947 449 531 220 51 788 118 189 501 54 434 465 902 280 635 688 214 737 327 682 690 683 519 261 923 254 388 529 659 662 276 376 735 976 664 521 285 42 147 187 259 407 977 879 465 522 17 550 701 114 921 577 265 668 812 232 267 135 371 58...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 wanted to prepare a Codes...
[{"type": "stdin_stdout", "input": "68 85\n43 55 2 4 72 45 19 56 53 81 18 90 11 87 47 8 94 88 24 4 67 9 21 70 25 66 65 27 46 13 8 51 65 99 37 43 71 59 71 79 32 56 49 43 57 85 95 81 40 28 60 36 72 81 60 40 16 78 61 37 29 26 15 95 70 27 50 97\n6 6 48 72 54 31 1 50 29 64 93 9 29 93 66 63 25 90 52 1 66 13 70 30 24 87 32 90...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCalendars in widespread use toda...
[{"type": "stdin_stdout", "input": "1900:01:01\n2038:12:31\n", "output": "50768\n"}, {"type": "stdin_stdout", "input": "1903:09:27\n1988:06:15\n", "output": "30943\n"}, {"type": "stdin_stdout", "input": "1915:01:01\n2007:07:01\n", "output": "33784\n"}, {"type": "stdin_stdout", "input": "1925:07:15\n2010:06:22\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\nAri the monster is not an ordina...
[{"type": "stdin_stdout", "input": "63 20\n35 26\n54 5\n32 56\n56 53\n59 46\n37 31\n46 8\n4 1\n2 47\n59 42\n55 11\n62 6\n30 7\n60 24\n41 36\n34 22\n24 34\n21 2\n12 52\n8 44\n60 21\n24 30\n48 35\n48 25\n32 57\n20 37\n11 54\n11 62\n42 58\n31 43\n12 23\n55 48\n51 55\n41 27\n25 33\n21 18\n42 12\n4 15\n51 60\n62 39\n46 41\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\nIt's well known that the best wa...
[{"type": "stdin_stdout", "input": "15 17\n1 10 8\n5 19 1\n12 14 6\n9 19 8\n6 7 3\n5 11 9\n7 12 5\n17 20 8\n6 12 6\n11 19 4\n3 14 1\n15 19 10\n3 20 5\n5 19 9\n10 18 10\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "15 24\n2 14 5\n7 14 4\n6 11 6\n3 5 6\n4 13 5\n10 11 4\n8 8 6\n5 14 4\n2 2 3\n9 14 5\n2 13 6\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\nTwo friends are on the coordinat...
[{"type": "stdin_stdout", "input": "864\n179\n", "output": "117649\n"}, {"type": "stdin_stdout", "input": "1\n1000\n", "output": "250000\n"}, {"type": "stdin_stdout", "input": "1000\n1\n", "output": "250000\n"}, {"type": "stdin_stdout", "input": "2\n1000\n", "output": "249500\n"}, {"type": "stdin_stdout", "input": "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\nYou are playing one RPG from the...
[{"type": "stdin_stdout", "input": "9\n475033014 267058742\n26843 148652\n850113755 279316120\n871120869 885251487\n51363 15651\n220811492 256297120\n473761699 194406678\n38725 23371\n167395720 333327477\n107541472 19164492\n74340 1113\n654389849 224345301\n663158140 437349008\n332 5052\n971865476 538450184\n959712803 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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-----Input-----\n\nThe input con...
[{"type": "stdin_stdout", "input": "34\n", "output": "Eisenhower\n"}, {"type": "stdin_stdout", "input": "1\n", "output": "Washington\n"}, {"type": "stdin_stdout", "input": "22\n", "output": "Cleveland\n"}, {"type": "stdin_stdout", "input": "24\n", "output": "Cleveland\n"}, {"type": "stdin_stdout", "input": "26\n", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFox Ciel has some flowers: r red...
[{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999 999999998\n", "output": "999999998\n"}, {"type": "stdin_stdout", "input": "123456789 123456789 123456789\n", "output": "123456789\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\nFifa and Fafa are sharing a flat...
[{"type": "stdin_stdout", "input": "519 -92641 -28571 -92540 -28203\n", "output": "-92659.18165738975 -28637.246038806206 450.30421903092184\n"}, {"type": "stdin_stdout", "input": "3930 -76494 -83852 -78181 -81125\n", "output": "-76303.71953677801 -84159.58436467478 3568.316718555632\n"}, {"type": "stdin_stdout", "inpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecall that the permutation is a...
[{"type": "stdin_stdout", "input": "250000 993244853\n", "output": "872048421\n"}, {"type": "stdin_stdout", "input": "244435 994838543\n", "output": "634651929\n"}, {"type": "stdin_stdout", "input": "234324 994631069\n", "output": "720229385\n"}, {"type": "stdin_stdout", "input": "249996 997202249\n", "output": "633673...
code_stdio