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\nThe door of Snuke's laboratory i... | [{"type": "stdin_stdout", "input": "12101", "output": "Good\n"}, {"type": "stdin_stdout", "input": "12904", "output": "Good\n"}, {"type": "stdin_stdout", "input": "24106", "output": "Good\n"}, {"type": "stdin_stdout", "input": "16798", "output": "Good\n"}, {"type": "stdin_stdout", "input": "29052", "output": "Good\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have N cards. A number a_i is... | [{"type": "stdin_stdout", "input": "4\n20 18 2 12", "output": "12\n"}, {"type": "stdin_stdout", "input": "4\n139 4 2 5", "output": "136\n"}, {"type": "stdin_stdout", "input": "4\n139 1 2 5", "output": "135\n"}, {"type": "stdin_stdout", "input": "4\n139 0 2 4", "output": "137\n"}, {"type": "stdin_stdout", "input": "4\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N towns in Takahashi K... | [{"type": "stdin_stdout", "input": "107 137", "output": "944428092\n"}, {"type": "stdin_stdout", "input": "150 300", "output": "734286322"}, {"type": "stdin_stdout", "input": "21 300", "output": "213825142\n"}, {"type": "stdin_stdout", "input": "13 300", "output": "572293777\n"}, {"type": "stdin_stdout", "input": "13 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\nWhen a boy was cleaning up after... | [{"type": "stdin_stdout", "input": "56,65\n97,54\n64,-4\n55,76\n42,-27\n43,80\n87,-86\n55,-6\n89,34\n5,59\n0,0", "output": "181\n-212\n"}, {"type": "stdin_stdout", "input": "56,65\n97,54\n64,-4\n55,76\n42,-27\n43,80\n77,-86\n55,-6\n89,34\n95,5\n0,0", "output": "180\n-297\n"}, {"type": "stdin_stdout", "input": "56,65\n9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Group C of the 3rd year, we d... | [{"type": "stdin_stdout", "input": "50\n5576\n6063\n5578", "output": "3C11\n3C38\n3C18\n3C01\n"}, {"type": "stdin_stdout", "input": "50\n5576\n5577\n5578", "output": "3C11\n3C38\n3C39\n3C01"}, {"type": "stdin_stdout", "input": "50\n5576\n6063\n515", "output": "3C11\n3C38\n3C18\n3C08\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\nShe is an apprentice wizard. She... | [{"type": "stdin_stdout", "input": "12 3\n2 3 6\n12 4\n1 2 3 6\n0 0", "output": "6.0000000000\n0.0000000000"}, {"type": "stdin_stdout", "input": "21 3\n2 3 19\n13 4\n1 2 4 6\n0 0", "output": "10.5\n0.0\n"}, {"type": "stdin_stdout", "input": "21 3\n2 5 19\n13 4\n2 2 4 3\n0 0", "output": "10.5\n6.5\n"}, {"type": "stdin_s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n3\n3 0 1\n\n... | [{"type": "stdin_stdout", "input": "3\n152 -3 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n-1 -1 1", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n13 -2 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n25 -2 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n25 -2 4", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rela... | [{"type": "stdin_stdout", "input": "16 9\n0 1\n0 2\n3 4\n5 7\n5 2\n3 7\n6 13\n11 12\n8 9\n3\n0 1\n5 9\n1 3", "output": "yes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "16 9\n0 1\n0 2\n3 4\n5 7\n5 2\n3 7\n6 13\n7 8\n8 9\n3\n0 1\n5 9\n1 3", "output": "yes\nyes\nyes\n"}, {"type": "stdin_stdout", "input": "16 9\n0 1\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads $n$ ... | [{"type": "stdin_stdout", "input": "3\n-1 10 1 14 13 17\n6 0 35 1 0 0\n4 4 2 7 -1 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3\n-1 10 1 14 13 17\n6 0 35 1 0 0\n4 4 2 5 -1 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3\n0 10 1 14 9 17\n6 0 35 1 0 0\n13 4 2 7 -1 -1", "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\nPolycarp has prepared n competit... | [{"type": "stdin_stdout", "input": "55\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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3\n", "output": "49"}, {"type": "stdin_stdout", "input": "18\n2 1 2 10 2 10 10 2 2 1 10 10 10 10 1 1 10 10\n", "output": "14"}, {"type": "stdin_stdout", "input": "18\n2 1 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\nPavel has several sticks with le... | [{"type": "stdin_stdout", "input": "100\n5 5 2 4 5 4 4 4 4 2 5 3 4 2 4 4 1 1 5 3 2 2 1 3 3 2 5 3 4 5 1 3 5 4 4 4 3 1 4 4 3 4 5 2 5 4 2 1 2 2 3 5 6 5 1 4 5 3 1 4 2 2 5 1 5 3 4 1 5 1 2 2 3 5 1 3 2 4 2 4 2 2 4 1 3 5 2 2 2 3 3 4 3 2 2 5 5 4 2 5\n", "output": "106\n"}, {"type": "stdin_stdout", "input": "100\n5 5 2 4 5 4 4 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\nBob has a string s consisting of... | [{"type": "stdin_stdout", "input": "aeaaaaravazyzaadwaarzajaaawvcakaanbparauaoaaamsmjaaaayaylhaaaxegasgaaaipaakalaspkbaaaaazfacaaafzypraervzyzdwrzjwvcknbpruomsmjyylhxegsgipklspkbzfcfzypr\n", "output": "aeaaaaravazyzaadwaarzajaaawvcakaanbparauaoaaamsmjaaaayaylhaaaxegasgaaaipaakalaspkbaaaaazfacaaafzypra"}, {"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\nThe main characters have been om... | [{"type": "stdin_stdout", "input": "20\n01001100001100011011\n00111101001100001101\n01010010000010000110\n10101001000000000110\n00110110111101100000\n00111010110011100011\n01101000111001110100\n11111100011110000100\n11111010011110011000\n10001100000101100101\n11001111010010100011\n00001111001001111111\n1001111000010100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 variation of g... | [{"type": "stdin_stdout", "input": "6\n4\n1024 512 64 512\n1\n2048\n3\n128 512 2\n2\n4096 8\n1\n2048 2 2048 2048 2048 2048 2048\n2\n2048 4898\n", "output": "YES\nYES\nNO\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "6\n4\n1024 512 64 512\n1\n2048\n3\n64 512 2\n2\n4096 4\n7\n2048 2 2048 2048 2048 2048 2048\n2\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBob is playing with 6-sided dice... | [{"type": "stdin_stdout", "input": "4\n29 34 19 30\n", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n29 47 19 30\n", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n15 47 19 30\n", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n29 34 19 38\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\nEvlampiy was gifted a rooted tre... | [{"type": "stdin_stdout", "input": "5\n0 1\n1 3\n2 1\n3 0\n2 0\n", "output": "YES\n2 5 3 1 4 \n"}, {"type": "stdin_stdout", "input": "5\n0 1\n1 3\n2 1\n3 0\n2 0\n", "output": "YES\n2 5 3 1 4 \n"}, {"type": "stdin_stdout", "input": "5\n0 1\n1 2\n2 1\n3 0\n2 0\n", "output": "YES\n2 4 3 1 5 "}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBessie is out grazing on the far... | [{"type": "stdin_stdout", "input": "42 41 20\n8 34 12 13 38 3 9 10 18 16 2 26 24 17 32 21 4 27 15 39\n1 35\n35 8\n1 31\n31 34\n1 40\n40 12\n1 30\n30 13\n1 33\n33 38\n1 37\n37 3\n1 22\n22 9\n1 20\n20 10\n1 25\n25 18\n1 14\n14 16\n1 42\n42 7\n7 2\n42 11\n11 26\n42 29\n29 24\n42 36\n36 17\n42 41\n41 32\n42 23\n23 21\n42 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\nDreamoon likes sequences very mu... | [{"type": "stdin_stdout", "input": "10\n1 1100000000\n2 1587398050\n4 99999998\n4 9999997\n5 999996\n10 99995\n9 9994\n8 1104\n12 92\n19 1\n", "output": "1\n3\n11\n11\n17\n119\n89\n59\n87\n0\n"}, {"type": "stdin_stdout", "input": "10\n1 1100000000\n2 1587398050\n3 99999998\n4 9999997\n5 999996\n18 99995\n9 9994\n8 1104... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSlime has a sequence of positive... | [{"type": "stdin_stdout", "input": "5\n5 3\n1 5 2 6 1\n1 6\n6\n3 2\n1 2 3\n4 3\n3 1 2 3\n10 3\n1 2 3 4 5 6 7 8 9 10\n", "output": "no\nyes\nyes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "5\n5 3\n1 5 2 6 1\n1 6\n6\n3 2\n1 2 3\n4 3\n3 1 2 3\n10 3\n1 4 3 4 5 6 7 8 9 10\n", "output": "no\nyes\nyes\nno\nyes\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPinkie Pie has bought a bag of p... | [{"type": "stdin_stdout", "input": "4\n7\n1 7 1 6 4 4 6\n8\n1 1 4 6 4 6 4 7\n3\n3 3 3\n6\n2 5 2 3 1 4\n", "output": "3\n2\n0\n4\n"}, {"type": "stdin_stdout", "input": "4\n7\n1 7 1 6 4 7 6\n8\n1 1 4 6 4 6 4 7\n3\n3 3 3\n6\n2 5 2 3 1 4\n", "output": "3\n2\n0\n4\n"}, {"type": "stdin_stdout", "input": "4\n7\n1 7 1 6 4 7 6\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a, consis... | [{"type": "stdin_stdout", "input": "5\n3\n1 3 2\n0 0 0\n4\n2 -3 4 -1\n1 1 1 1\n7\n-8 4 -2 -6 4 7 1\n1 0 0 0 1 1 0\n5\n0 1 -4 6 3\n0 0 0 1 1\n6\n-1 7 10 4 -8 -1\n1 0 0 0 0 1\n", "output": "3 2 1 \n2 -3 4 -1 \n-8 4 1 -2 4 7 -6 \n1 0 -4 6 3 \n-1 10 7 4 -8 -1 \n"}, {"type": "stdin_stdout", "input": "5\n3\n1 3 2\n0 0 0\n4\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\nFor a given array a consisting o... | [{"type": "stdin_stdout", "input": "5\n4 10\n5 5 5 5\n3 5\n5 5 5\n3 4\n10 1 1\n4 5\n5 5 1 5\n5 5\n5 5 5 10 5\n", "output": "NO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "5\n4 10\n5 5 5 5\n3 5\n5 5 5\n3 4\n10 1 1\n4 5\n5 5 1 5\n5 5\n5 5 5 15 5\n", "output": "NO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of intege... | [{"type": "stdin_stdout", "input": "4\n3\n2 -1 1\n4\n-1 2 2 6\n10\n2 -1 1 -2 1 0 -11 0 2 -1\n4\n-1 -2 -1 1\n", "output": "4\n8\n210\n8\n"}, {"type": "stdin_stdout", "input": "4\n3\n2 -1 2\n4\n-1 2 2 5\n10\n2 -1 1 -2 0 0 -11 0 2 -1\n4\n-1 -2 -1 1\n", "output": "4\n8\n150\n8\n"}, {"type": "stdin_stdout", "input": "4\n3\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI, Fischl, Prinzessin der Verurt... | [{"type": "stdin_stdout", "input": "3\n28\nqaabzwsxedcrfvtgbyhnujmiklop\n13\ncleanairactbd\n10\naannttoonn\n", "output": "\nac\nf\nb\n"}, {"type": "stdin_stdout", "input": "4\n5\noisha\n10\niloveoisha\n16\nshahromloveoisha\n16\noishaloveshahrom\n", "output": "b\nb\nb\nb\n"}, {"type": "stdin_stdout", "input": "4\n5\nais... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Polycarpus got hold of t... | [{"type": "stdin_stdout", "input": "pfdempfohomnpgbeegikfmflnalbbajpnpgeacaicoehopgnabnklheepnlnflohjegcciflmfjhachnhekckfjgoffhkblncidn\nidlhklpclcghngeggpjdgefccihndpoikojdjnbkdfjgaanoolfmnifnmbpeeghpicehjdiipnlfnjpglidpnnnjfmjfhbcogojkcfflmmfcgajbjbfaikhmjofbnjnaolbcdkelcieeodbfjcfiblhhmeelmpcmmcdhjcnnfklgedjjbaljnd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tournament «Sleepyhead-2010»... | [{"type": "stdin_stdout", "input": "9\n4 5\n9 6\n5 6\n8 7\n5 1\n8 5\n9 5\n4 7\n2 6\n7 6\n3 5\n2 1\n8 2\n3 7\n9 1\n2 5\n2 7\n4 2\n8 9\n8 1\n3 6\n7 1\n8 6\n3 2\n3 1\n9 2\n4 6\n5 7\n1 6\n4 8\n4 1\n4 3\n4 9\n9 3\n9 7\n", "output": "8 3\n"}, {"type": "stdin_stdout", "input": "8\n4 3\n6 8\n1 5\n8 3\n1 4\n1 7\n5 6\n5 3\n5 8\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\nEugeny has array a = a1, a2, ...... | [{"type": "stdin_stdout", "input": "10 10\n-1 1 -1 1 -1 -1 -1 -1 -1 -1\n6 10\n4 5\n3 6\n2 3\n3 5\n4 5\n3 4\n1 7\n1 1\n1 1\n", "output": "0\n1\n1\n1\n0\n1\n1\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "10 10\n-1 1 -1 1 -1 -1 -1 -1 -1 -1\n6 13\n4 5\n3 6\n2 3\n0 5\n4 5\n3 4\n1 4\n1 1\n1 1\n", "output": "0\n1\n1\n1\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou're a mikemon breeder current... | [{"type": "stdin_stdout", "input": "9 8\n38030772\n697T83S2\n8T626740\n86T02062\n05402864\nT7504180\n3T368E08\n90637446\n12709560\n", "output": "194\n"}, {"type": "stdin_stdout", "input": "9 8\n38030772\n697T83S2\n8T626740\n86T02062\n05402864\nT7504180\n3T368E08\n90637446\n13738808\n", "output": "202\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\nOn a number line there are n bal... | [{"type": "stdin_stdout", "input": "10 88\n-100 -86 12\n-88 -62 9\n-96 -73 1\n-89 -100 34\n-80 -57 18\n-81 -91 2\n-84 -100 7\n-77 -84 3\n-97 -96 10\n-52 -60 3\n", "output": "-9488.033285728\n-7931.120096426\n-8406.936891019\n-8261.349896254\n-5320.095238095\n-5795.666666667\n-6961.166666667\n-5303.428571429\n-8788.1186... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima and Inna are doing so great... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 0000000 1000000 1000000\n", "output": "Poor Inna and pony!"}, {"type": "stdin_stdout", "input": "1000100 1000000 1000000 0000000 1000000 1000000\n", "output": "Poor Inna and pony!"}, {"type": "stdin_stdout", "input": "1000100 1000010 1000000 0000000 1000000 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\nDZY loves chemistry, and he enjo... | [{"type": "stdin_stdout", "input": "50 50\n16 21\n23 47\n23 30\n2 12\n23 41\n3 16\n14 20\n4 49\n2 47\n19 29\n13 42\n5 8\n24 38\n13 32\n34 37\n38 46\n3 20\n27 50\n7 42\n33 45\n2 48\n41 47\n9 48\n15 26\n27 37\n32 34\n17 24\n1 39\n27 30\n10 33\n38 47\n32 33\n14 39\n35 50\n2 19\n3 12\n27 34\n18 25\n12 23\n31 44\n5 35\n28 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\nThe new ITone 6 has been release... | [{"type": "stdin_stdout", "input": "141 12 6\n66 53 86 91 12 27 5 74 79 50 33 2 100 26 2 73 16 14 50 86 75 9 66 48 19 34 25 1 22 50 63 39 38 42 98 71 76 27 80 16 74 21 36 1 32 20 65 28 68 40 41 6 0 77 65 84 0 34 60 0 42 65 2 16 25 85 35 57 74 66 26 33 39 14 0 6 2 15 87 99 47 67 75 63 72 32 93 7 5 63 35 99 89 61 18 25 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\nYou are given a permutation of n... | [{"type": "stdin_stdout", "input": "100 83\n6 98 18 72 51 83 66 40 32 60 90 53 91 10 92 47 94 1 77 8 19 78 9 52 85 2 26 12 97 100 82 84 46 79 38 39 50 35 55 99 37 88 74 4 20 23 43 11 87 59 75 61 71 73 34 86 21 17 44 62 42 95 30 54 5 25 64 81 58 65 7 3 45 70 76 24 89 28 80 41 14 31 49 56 22 63 68 13 29 33 67 96 27 36 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\nKing of Berland Berl IV has rece... | [{"type": "stdin_stdout", "input": "30 50\n17 >= 29\n19 <= 18\n3 > 50\n54 >= 56\n47 < 15\n50 <= 33\n49 < 8\n57 <= 16\n30 > 35\n49 < 21\n3 >= 37\n56 <= 51\n46 > 51\n35 >= 48\n32 < 15\n12 <= 4\n38 > 57\n55 < 9\n49 <= 1\n9 >= 38\n60 = 60\n1 > 12\n40 >= 43\n13 > 38\n24 >= 39\n9 < 2\n12 > 58\n15 >= 30\n13 > 50\n42 <= 16\n23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 started worki... | [{"type": "stdin_stdout", "input": "870 396 187 223 444 202 222 732\n", "output": "999.7945324433952405951409048 550.7817151597707949206572664\n699.8933625471825917263579697 538.6454762496719970710223890\n784.9466812735912958354234092 467.3227381248359985355111945\n314.6021379638620081853339627 -93.56941780067005040577... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLong ago, Vasily built a good fe... | [{"type": "stdin_stdout", "input": "50\n1 3083990 976356336 650365630 1 170272482 1 547248035 1 1 1 1 1 928379588 1 1 1 270052499 315045369 1 1 556091215 1 655608230 424079072 1 1 185387009 77360256 1 1 942696777 228860271 1 487787709 1 437229749 167886535 1 1 904578415 319694007 1 313704390 1 1 957736320 771147030 458... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 returned from forest, Alyo... | [{"type": "stdin_stdout", "input": "120 362 6\ncaaccbbbabbbcbaacbaccacaaccacaaababccaccaabaccacccbbaaaaababbccbbacccaacabacbaaacabbacbabcccbccbcbbcaabaaabaabcccaabacbb\nabcbbaaccbbcabbcbbcacbabaacbaaacabcbabcabbabccbcaaacaccaaabbcbaacccccbcabacaacabbbcabaabcbbccabacbaaaacbbbbbccabccccbababcbacbbbcbbaabcaabcacbaaaaaccba... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThor is getting used to the Eart... | [{"type": "stdin_stdout", "input": "10 85\n2 2\n1 10\n1 1\n2 6\n1 2\n1 4\n1 7\n2 1\n1 1\n3 3\n1 9\n1 6\n1 8\n1 10\n1 8\n2 8\n1 6\n1 3\n1 9\n1 6\n1 3\n1 8\n1 1\n1 6\n1 10\n2 1\n2 10\n1 10\n1 1\n1 10\n1 6\n1 2\n1 8\n1 3\n1 4\n1 9\n1 5\n1 5\n2 2\n2 4\n1 7\n1 1\n2 4\n1 9\n2 1\n1 7\n1 8\n3 33\n1 10\n2 2\n1 3\n1 10\n1 6\n3 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\nBachgold problem is very easy to... | [{"type": "stdin_stdout", "input": "92755\n", "output": "46377\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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\nAfter returning from the army Ma... | [{"type": "stdin_stdout", "input": "4\n33554432 33554432 67108864 33554432\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "4\n33554432 9657327 117245990 61220571\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "4\n33554432 9657327 67108864 33554432\n", "output": "1\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGleb ordered pizza home. When th... | [{"type": "stdin_stdout", "input": "10 2\n11\n1 1 0\n2 2 3\n3 3 0\n6 4 0\n5 5 0\n6 6 0\n7 7 4\n8 8 7\n9 18 3\n10 10 100\n9 0 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10 2\n11\n1 1 0\n2 2 3\n3 3 0\n6 4 0\n5 5 0\n6 6 0\n7 7 8\n8 8 7\n9 18 3\n10 10 100\n9 0 1\n", "output": "2\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\nVadim is really keen on travelli... | [{"type": "stdin_stdout", "input": "50\n297 787 34 268 439 629 600 398 425 833 721 908 830 636 64 509 420 647 499 675 427 599 396 119 798 742 577 355 22 847 389 574 766 453 196 772 225 261 106 844 726 975 173 992 874 89 775 616 678 52 69 591 181 573 258 381 665 301 589 379 362 146 790 842 765 100 229 916 938 97 340 793... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n points marked on the... | [{"type": "stdin_stdout", "input": "10\n0 1 1 0 -1 -2 1 0 0 0\n1 0 0 0 1 0 0 0 0 0\n0 0 1 2 1 0 1 1 0 0\n0 0 1 0 0 0 0 -1 0 0\n-1 0 -1 0 0 0 0 0 1 0\n0 0 -1 0 0 1 -1 0 0 1\n2 0 0 0 0 0 1 0 0 2\n0 -1 0 0 0 0 0 0 0 0\n0 0 0 0 0 -1 0 0 0 0\n0 1 0 -2 0 0 -1 -1 0 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA permutation of size n is an ar... | [{"type": "stdin_stdout", "input": "1\n1\n10\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n", "output": "even\neven\neven\neven\neven\neven\neven\neven\neven\neven\n"}, {"type": "stdin_stdout", "input": "7\n2 6 1 7 4 5 3\n5\n4 5\n6 7\n5 6\n4 5\n2 5\n", "output": "odd\neven\nodd\neven\neven\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn order to put away old things ... | [{"type": "stdin_stdout", "input": "1000000000000000000 2\n", "output": "61\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1 \n"}, {"type": "stdin_stdout", "input": "1000000000100000000 2\n", "output": "61\n0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 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\nYear 2118. Androids are in mass ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "=\n"}, {"type": "stdin_stdout", "input": "1000100000 1000000000\n", "output": "<\n"}, {"type": "stdin_stdout", "input": "1001100000 1000000000\n", "output": "<\n"}, {"type": "stdin_stdout", "input": "1000000000 1025346907\n", "output": ">\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn McD's Burger, n hungry burger... | [{"type": "stdin_stdout", "input": "5\n13 2\n1 1\n3 0\n16 -1\n-1 2\n\nLESM@P", "output": "5 2 3 1 4 \n"}, {"type": "stdin_stdout", "input": "5\n181 2\n0 2\n0 1\n0 -2\n-1 8\n\nQDLMAQ", "output": "4 3 2 5 1 \n"}, {"type": "stdin_stdout", "input": "5\n23 4\n-1 2\n1 2\n1 0\n-1 13\n\nQMDLAQ", "output": "2 4 3 5 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\nYou have just purchased a new mo... | [{"type": "stdin_stdout", "input": "10\n53 7\n23 17\n96 2\n15 3\n22 1\n21 14\n79 26\n147 60\n145 123\n146 19", "output": "476\n"}, {"type": "stdin_stdout", "input": "10\n53 7\n29 17\n96 2\n15 3\n22 1\n21 14\n79 26\n147 60\n145 76\n146 19", "output": "529\n"}, {"type": "stdin_stdout", "input": "10\n53 7\n29 17\n96 2\n15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given N real values A_1,... | [{"type": "stdin_stdout", "input": "11\n0.9\n1\n1\n1.25\n2.7527267588296525\n5\n70\n0.000000001\n9999.999999999\n0.999999999\n1.7676771981771382", "output": "7\n"}, {"type": "stdin_stdout", "input": "11\n0.9\n1\n1\n1.25\n2.30000\n5\n70\n0.000000001\n9999.999999999\n0.999999999\n1.7676771981771382", "output": "8\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven any integer x, Aoki can do... | [{"type": "stdin_stdout", "input": "1000000000000010000 1", "output": "0\n"}, {"type": "stdin_stdout", "input": "1000000000000010000 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "1000000010000010000 1", "output": "0\n"}, {"type": "stdin_stdout", "input": "1000000010000010000 2", "output": "0\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a string S consisting of... | [{"type": "stdin_stdout", "input": "13\nABCDEFGGIJKLMNOPQRSTUVWXYZ", "output": "NOPQRSTTVWXYZABCDEFGHIJKLM\n"}, {"type": "stdin_stdout", "input": "13\nABCDEFGGIJKLMNOOQRSTUVWXYZ", "output": "NOPQRSTTVWXYZABBDEFGHIJKLM\n"}, {"type": "stdin_stdout", "input": "13\nABCDEFGOIJKLMNGOQRSTUVWXYZ", "output": "NOPQRSTBVWXYZATBDE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 monsters, numbered 1... | [{"type": "stdin_stdout", "input": "3\n1000000000 1000000000 1000000000", "output": "1000000000"}, {"type": "stdin_stdout", "input": "3\n1000000100 1000000000 1000000000", "output": "100\n"}, {"type": "stdin_stdout", "input": "3\n1000000100 1000100000 1000000000", "output": "100\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\nTakahashi throws N dice, each ha... | [{"type": "stdin_stdout", "input": "126 0010", "output": "582339874\n582339874\n130864342\n130864342\n926813445\n926813445\n962697102\n962697102\n227521938\n227521938\n706791283\n706791283\n393039053\n393039053\n273540220\n273540220\n337333399\n337333399\n573465200\n573465200\n970990227\n970990227\n520726724\n520726724... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the maximum possible sum of... | [{"type": "stdin_stdout", "input": "1265641936938969", "output": "135\n"}, {"type": "stdin_stdout", "input": "2005985506723837", "output": "136\n"}, {"type": "stdin_stdout", "input": "5193523582167964", "output": "139\n"}, {"type": "stdin_stdout", "input": "4944180382968715", "output": "138\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\nThere are N lines in the xy-plan... | [{"type": "stdin_stdout", "input": "7\n1 7 8\n-2 4 9\n3 -8 -5\n9 2 -14\n6 7 5\n-8 -9 3\n3 8 10", "output": "-1.722222222222222 1.325000000000000"}, {"type": "stdin_stdout", "input": "7\n1 7 9\n-2 4 9\n3 -8 -5\n17 2 -14\n4 11 5\n-8 -9 3\n1 8 10", "output": "-1.027777778 1.210526316\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\nWrite a program which reads an i... | [{"type": "stdin_stdout", "input": "10\n10\n126", "output": "4\n4\n30\n"}, {"type": "stdin_stdout", "input": "10\n117\n4", "output": "4\n30\n2\n"}, {"type": "stdin_stdout", "input": "10\n147\n9", "output": "4\n34\n4\n"}, {"type": "stdin_stdout", "input": "10\n54\n18", "output": "4\n16\n7\n"}, {"type": "stdin_stdout", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI decided to create a program th... | [{"type": "stdin_stdout", "input": "2\n9\n64", "output": "#########\n# #\n# ##### #\n# # # #\n# # # # #\n# # # # #\n# # ### #\n# # #\n# #######\n\n################################################################\n# #\n# ###########################... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nJOI Pizza sells pizza... | [{"type": "stdin_stdout", "input": "8\n3\n2\n3\n2\n4\n6\n20\n4\n4\n33\n16\n15\n15\n12\n5\n8\n0", "output": "3\n15\n"}, {"type": "stdin_stdout", "input": "8\n3\n2\n3\n0\n4\n6\n20\n4\n4\n14\n14\n23\n7\n7\n11\n8\n0", "output": "3\n23\n"}, {"type": "stdin_stdout", "input": "8\n3\n2\n3\n0\n4\n6\n20\n4\n4\n17\n17\n23\n7\n7\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\nTurtle Shi-ta and turtle Be-ko d... | [{"type": "stdin_stdout", "input": "2 3 7 10 50\n3 3\n6 6\n10 10\n4.0000000000 4.380940502722975\n7.0000000000 7.0000000000\n2 3 10 10 48\n2 3\n7 6\n10 10\n4.1530399119933294 4.124627510166318\n7.679827074828504 8.063298606739774\n2 3 10 10 30\n3 3\n6 6\n10 10\n4.0000000000 4.920930737803775\n7.0000000000 7.0000000000\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nABC Gene\n\nThere is a gene sequ... | [{"type": "stdin_stdout", "input": "ABC", "output": "Yes"}, {"type": "stdin_stdout", "input": "BAC", "output": "No\n"}, {"type": "stdin_stdout", "input": "ACB", "output": "No\n"}, {"type": "stdin_stdout", "input": "CAB", "output": "No\n"}, {"type": "stdin_stdout", "input": "CBA", "output": "No\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChokudai loves eating so much. H... | [{"type": "stdin_stdout", "input": "184 2 114\n-9 1 -1", "output": "2281\n"}, {"type": "stdin_stdout", "input": "235 2 31\n-5 1 -1", "output": "1427\n"}, {"type": "stdin_stdout", "input": "235 2 31\n-5 1 -2", "output": "1179\n"}, {"type": "stdin_stdout", "input": "235 1 31\n-5 1 -2", "output": "1181\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\nWrite a program which prints $n$... | [{"type": "stdin_stdout", "input": "44", "output": "1134903170\n"}, {"type": "stdin_stdout", "input": "44", "output": "1134903170\n"}, {"type": "stdin_stdout", "input": "41", "output": "267914296\n"}, {"type": "stdin_stdout", "input": "42", "output": "433494437\n"}, {"type": "stdin_stdout", "input": "43", "output": "70... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 calculates... | [{"type": "stdin_stdout", "input": "-1 -4 3 -115", "output": "111.072048689\n"}, {"type": "stdin_stdout", "input": "-1 -4 3 -190", "output": "186.043005781\n"}, {"type": "stdin_stdout", "input": "-1 -4 1 -190", "output": "186.010752377\n"}, {"type": "stdin_stdout", "input": "-1 -5 1 -190", "output": "185.010810495\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem.\... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n benches in the Berla... | [{"type": "stdin_stdout", "input": "100\n3241\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLunar New Year is approaching, a... | [{"type": "stdin_stdout", "input": "10 10\n1 4\n6 8\n2 5\n3 7\n9 4\n5 6\n3 4\n8 10\n10 2\n1 10\n", "output": "1 4 3 7 9 10 2 5 6 8\n"}, {"type": "stdin_stdout", "input": "10 10\n1 4\n6 8\n2 5\n3 10\n10 2\n5 6\n3 4\n9 7\n8 9\n1 10\n", "output": "1 4 3 10 2 5 6 8 9 7\n"}, {"type": "stdin_stdout", "input": "10 10\n1 4\n3 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are a coach at your local un... | [{"type": "stdin_stdout", "input": "100 4\n4741 3440 2421 1765 4810 1955 4346 1365 2697 3255 3337 386 1154 115 4951 2306 4058 279 4849 3962 1737 1147 362 4799 4796 3670 481 2913 435 1032 592 1187 4676 1295 2262 3757 2494 862 2134 1898 4159 530 3038 2610 4399 2707 1041 4337 3275 3569 4437 166 4730 3165 4022 3317 1763 22... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence a_1, a_... | [{"type": "stdin_stdout", "input": "100\n49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 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\nToday Adilbek is taking his prob... | [{"type": "stdin_stdout", "input": "20 30\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "310937903\n"}, {"type": "stdin_stdout", "input": "20 31\n2 2 1 2 1 1 2 1 2 2 1 2 1 2 1 1 1 2 1 2\n", "output": "153515832\n"}, {"type": "stdin_stdout", "input": "20 26\n1 2 1 1 1 2 1 1 2 2 2 1 2 1 2 1 1 2 2 1\n", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "10 4\n2 3 3 1 1 2 1 4 3 3\n", "output": "4\n4 1 3 2\n"}, {"type": "stdin_stdout", "input": "10 4\n2 3 5 1 1 2 1 4 3 3\n", "output": "4\n4 1 5 3\n"}, {"type": "stdin_stdout", "input": "10 4\n2 3 5 2 1 2 1 4 2 3\n", "output": "4\n3 2 4 1\n"}, {"type": "stdin_stdout", "input": "10 4\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are four stones on an infi... | [{"type": "stdin_stdout", "input": "0 1 2 1000000010\n0 0 999999999 1000000000\n", "output": "236\n0 2\n1 4\n2 7\n4 12\n7 20\n12 33\n20 54\n33 88\n54 143\n88 232\n143 376\n232 609\n376 986\n609 1596\n986 2583\n1596 4180\n2583 6764\n4180 10945\n6764 17710\n10945 28656\n17710 46367\n28656 75024\n46367 121392\n75024 19641... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a hard version of the pr... | [{"type": "stdin_stdout", "input": "500\nhvmmnbwnblqfvwwrcbzkccvcdrhoxbvzwkopagpwntjwwqppduunnenopvyjumjotgcnkoorjcbzctddppezypklfhmxcmufnhcuwxhzbpumlevwdufpyasriaupqdjhpccvtxwqkjseqpsatgbkihgteuclmpaamloxpbtbxhekgpbjvndelmrenhtotvuaymrzpyhmlaujjttwrrlamijsxyegcwagncdscpbvprkwgpwdikdsbqrpkecilprocbyzsupmanekspjzoebjqvm... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 four positive inte... | [{"type": "stdin_stdout", "input": "5\n3 6 2 1\n4 2 2 1\n2 2 2 4\n8 4 1 2\n2 2 1 2\n", "output": "YES\n110000\n001100\n000011\nNO\nNO\nYES\n1000\n0100\n0010\n0001\n1000\n0100\n0010\n0001\nNO\n"}, {"type": "stdin_stdout", "input": "5\n3 6 2 1\n4 2 2 1\n2 3 2 4\n8 4 1 2\n2 2 1 2\n", "output": "YES\n110000\n001100\n000011... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a point A with coordinat... | [{"type": "stdin_stdout", "input": "6\n0 0\n5 8\n0 1000000\n1 0\n2 0\n0000000 1000000\n", "output": "0\n3\n1000000\n1\n0\n1000000\n"}, {"type": "stdin_stdout", "input": "6\n6 0\n0 8\n0 1000000\n0 0\n1 0\n0000000 1000000\n", "output": "0\n8\n1000000\n0\n1\n1000000\n"}, {"type": "stdin_stdout", "input": "6\n0 0\n5 8\n1 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\nPetya loves lucky numbers very m... | [{"type": "stdin_stdout", "input": "86451 754 85 84\n", "output": "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an organizer of a Be... | [{"type": "stdin_stdout", "input": "4\n7\n1 3 1 2 1 2 1\n12 8 3 2 5 1 5\n10\n2 2 2 4 2 2 2 6 3 3\n3435 3014 2197 4336 2893 1527 5359 2175 1961 2567\n6\n3 6 3 3 3 3\n0 11 6 5 9 7\n1\n1\n278\n", "output": "36 28 22 25 0 0 0\n29464 22953 18425 14701 16898 18425 0 0 0 0\n38 27 22 27 27 0\n278\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\nAquaMoon has n friends. They sta... | [{"type": "stdin_stdout", "input": "10\n10\n6 2 1 1 1 10 10 2 10 5\n8\n1 3 1 1 4 5 4 4\n9\n9 6 9 9 2 8 7 2 2\n10\n9 4 3 3 5 4 3 10 4 5\n9\n7 5 1 7 5 5 5 5 6\n8\n8 8 4 4 7 6 2 8\n10\n6 8 1 6 8 8 5 6 8 4\n10\n5 5 5 8 3 4 3 3 10 10\n8\n1 1 3 6 6 7 1 2\n8\n4 1 3 5 3 1 3 3\n", "output": "NO\nYES\nYES\nYES\nYES\nYES\nYES\nYE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJohn Doe has a list of all Fibon... | [{"type": "stdin_stdout", "input": "6138242440179\n", "output": "14000000000092\n"}, {"type": "stdin_stdout", "input": "9999999999999\n", "output": "14999999999998\n"}, {"type": "stdin_stdout", "input": "4917874132879\n", "output": "10929066223558\n"}, {"type": "stdin_stdout", "input": "9999999999979\n", "output": "149... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 square matrix co... | [{"type": "stdin_stdout", "input": "50\n4 24\n7 26\n39 28\n3 37\n29 38\n16 17\n48 49\n27 34\n28 22\n48 47\n34 11\n11 43\n46 34\n33 41\n31 29\n50 36\n43 46\n15 34\n47 22\n36 11\n20 18\n1 39\n18 12\n17 33\n43 30\n45 33\n26 10\n32 9\n20 28\n10 17\n39 4\n39 1\n31 39\n6 7\n18 42\n43 16\n31 46\n48 30\n6 20\n49 13\n28 20\n6 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\nThere are n students living in t... | [{"type": "stdin_stdout", "input": "50 50\n50 48 38 45 50 48 38 48 49 49 50 50 49 50 38 48 45 40 43 49 48 43 50 50 50 42 47 50 49 34 48 47 48 50 50 50 49 47 48 49 48 48 50 39 45 47 48 47 45 50\n", "output": "1.000000000000001\n"}, {"type": "stdin_stdout", "input": "50 50\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring the last Sereja's Codesec... | [{"type": "stdin_stdout", "input": "10 0\n5 9 1 12 4 2 2 4 12 1\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n"}, {"type": "stdin_stdout", "input": "10 0\n5 16 1 7 4 2 2 5 18 3\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n"}, {"type": "stdin_stdout", "input": "10 0\n5 16 1 7 4 2 2 4 18 3\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\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\nGame \"Minesweeper 1D\" is playe... | [{"type": "stdin_stdout", "input": "?2*?2*??1*2**?2*1???*2???100?????*???*?*????0????2?*?*?1??1??*?01**2**1001??**??**??1*?*???00??**??*\n", "output": "147483634\n"}, {"type": "stdin_stdout", "input": "*??**??00???*?*1??**??**??1001**2**10?*??1??1?*?*?2????0????*?*???*?????001???2*???1*2?**2*1??*2?*2?\n", "output": "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\nOne day, Twilight Sparkle is int... | [{"type": "stdin_stdout", "input": "9\n4 5 6 7 1 2 3 4 10\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "9\n4 5 6 7 1 0 3 4 10\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "9\n4 5 6 7 1 0 3 4 2\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "9\n4 5 0 7 1 0 3 4 2\n", "output": "-1\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given string s. Your tas... | [{"type": "stdin_stdout", "input": "AABBBACBBBBBBAACBCCACBBAABBBBBCAACABAACABCACCBCBCCCBCBCABCBBCCBCBBAACBACAABACBBCACCBCCACCABBCBABBAAC\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "CAABBABCBBACCACCBCCACBBCABAACABCAABBCBCCBBCBACBCBCCCBCBCCACBACAABACAACBBBBBAABBCACCBCAABBBBBBCABBBAA\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\nYou are given a sequence of numb... | [{"type": "stdin_stdout", "input": "100 968\n966 966 967 966 967 967 967 967 966 1446 966 967 966 966 966 967 967 966 966 967 967 967 967 966 967 967 967 967 563 967 967 967 600 967 967 966 967 1750 967 966 967 966 967 966 966 966 967 966 967 966 966 967 967 193 966 966 967 966 1294 967 967 966 967 966 966 580 966 967 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Artem is fond of dancing.... | [{"type": "stdin_stdout", "input": "364 57\n1 -101\n1 110\n1 -76\n1 329\n2\n2\n2\n1 -191\n1 97\n1 189\n1 305\n1 -313\n1 312\n1 -148\n2\n1 -104\n1 85\n1 -55\n1 -79\n1 230\n1 -94\n1 58\n1 -72\n2\n2\n2\n1 -104\n1 -351\n1 23\n2\n1 215\n2\n2\n2\n1 58\n1 -237\n2\n2\n2\n1 198\n2\n1 83\n2\n1 -205\n2\n2\n2\n2\n1 -110\n2\n2\n2\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya has recently starte... | [{"type": "stdin_stdout", "input": "14391752689956519300788497161416904648305096969559656916798920426154191397931561980203179360129309381\n", "output": "BigInteger\n"}, {"type": "stdin_stdout", "input": "11271203439111662452647816080492937379011458047735472400976277474953429583477559167812276320735634783\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\nHeidi has finally found the myth... | [{"type": "stdin_stdout", "input": "10\n5 1\n1 2\n9 1\n10 8\n6 3\n8 5\n2 7\n2 3\n10 4\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "10\n5 1\n1 2\n9 5\n10 5\n6 3\n8 10\n2 7\n2 3\n1 4\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "10\n5 1\n1 2\n9 5\n10 5\n6 3\n8 10\n2 7\n1 3\n1 4\n", "output": "12\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInnokenty is a president of a ne... | [{"type": "stdin_stdout", "input": "10\nIJGDI KHB\nHBI CKKCG\nFHE GCAA\nEDCGH HHICE\nGFH AIHD\nHED KIK\nDCK BCFIJ\nFFIHE FDB\nJGB AKKI\nIJD CAG\n", "output": "YES\nIJG\nHBI\nFHE\nEDC\nGFH\nHED\nDCK\nFFI\nJGB\nIJD\n"}, {"type": "stdin_stdout", "input": "10\nIJGDI KHB\nHBI CKKCG\nFHE GCAA\nEDCGH HHICE\nGFH AIHD\nHED KKI\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 few years ago Sajjad left his ... | [{"type": "stdin_stdout", "input": "300997\n", "output": "150498\n"}, {"type": "stdin_stdout", "input": "273658\n", "output": "136828\n"}, {"type": "stdin_stdout", "input": "222057\n", "output": "111028\n"}, {"type": "stdin_stdout", "input": "456496\n", "output": "228247\n"}, {"type": "stdin_stdout", "input": "220343\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 might have heard about the n... | [{"type": "stdin_stdout", "input": "636553724 546535019 115079316355948443\n", "output": "425992073 546535018\n"}, {"type": "stdin_stdout", "input": "595261150 794915864 332353903994901365\n", "output": "177161677 794915848\n"}, {"type": "stdin_stdout", "input": "548492800 434105920 179638683192075937\n", "output": "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\nIn the race for the best Interne... | [{"type": "stdin_stdout", "input": "100\nwww.oazqupphakywpbqyfajsmgwcfcxuaaarpxhsyiljjzehrmifcxaldbffnkbdtfvzdrjnlnixdaobbfrppdrbmyducp.com\nwww.wwbikcjsdqqnzrywdmibxbhfiqsmwuvhbsewgjswat.com\nwww.cm.com\nwww.knbwiewnxvdashnytchqsklwzlelczdkhamhlfbpduhefwori.com\nwww.aysuwnxdoradigzeivasglvmkopgnkoayeeiwlgvjqzzkkxaqjva... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the Kingdom of AtCoder, only ... | [{"type": "stdin_stdout", "input": "476640020082194381531155118436783393866726953614433851622190777875571135215042541028243752681838573", "output": "259\n"}, {"type": "stdin_stdout", "input": "402419059500366785869358882282163159674165660152915334404536663378232442791064106232595577577780162", "output": "252\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi will do a tap dance. T... | [{"type": "stdin_stdout", "input": "RDULULDURURLRDULRLR", "output": "Yes"}, {"type": "stdin_stdout", "input": "RDULULDURURLLDULRRR", "output": "No\n"}, {"type": "stdin_stdout", "input": "RCULULDURURLLDULRRR", "output": "No\n"}, {"type": "stdin_stdout", "input": "RCVLULDURURLLDULRRR", "output": "No\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N cards placed face do... | [{"type": "stdin_stdout", "input": "6 5\n1 2 1\n2 3 2\n1 6 3\n4 5 4\n1 4 5", "output": "1\n"}, {"type": "stdin_stdout", "input": "6 5\n1 2 1\n2 3 2\n1 3 3\n4 5 4\n3 6 5", "output": "2\n"}, {"type": "stdin_stdout", "input": "6 5\n1 2 1\n2 3 2\n1 3 3\n4 5 4\n1 6 5", "output": "2\n"}, {"type": "stdin_stdout", "input": "6 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi Lake has a perimeter o... | [{"type": "stdin_stdout", "input": "314159265 7\n35438742\n77271666\n139044510\n156626166\n160332356\n331169608\n453863319", "output": "1023255587\n"}, {"type": "stdin_stdout", "input": "314159265 7\n35438742\n77271666\n122238627\n156626166\n160332356\n331169608\n453863319", "output": "1040061470\n"}, {"type": "stdin_s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is doing a research on... | [{"type": "stdin_stdout", "input": "33 4 2", "output": "0 0\n0 1\n0 4\n0 5\n0 8\n0 9\n0 12\n0 13\n0 16\n0 17\n0 20\n0 21\n0 24\n0 25\n0 28\n0 29\n0 32\n0 33\n0 36\n0 37\n0 40\n0 41\n0 44\n0 45\n0 48\n0 49\n0 52\n0 53\n0 56\n0 57\n0 60\n0 61\n0 64\n0 65\n2 2\n2 3\n2 6\n2 7\n2 10\n2 11\n2 14\n2 15\n2 18\n2 19\n2 22\n2 23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integers wr... | [{"type": "stdin_stdout", "input": "6\n348324507 1154626501 32183854 379425024 590201381 471526144", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\n586050932 1154626501 32183854 379425024 590201381 471526144", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\n586050932 1154626501 31409214 379425024 59020... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers written on ... | [{"type": "stdin_stdout", "input": "5\n1 12 6 0 5", "output": "1 0 6 12 5 "}, {"type": "stdin_stdout", "input": "5\n1 12 2 0 5", "output": "1 0 5 2 12 "}, {"type": "stdin_stdout", "input": "5\n1 12 3 0 5", "output": "1 0 5 3 12 "}, {"type": "stdin_stdout", "input": "5\n1 17 3 0 5", "output": "1 0 17 5 3 "}, {"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\nHit n nails one by one at the co... | [{"type": "stdin_stdout", "input": "4\n1.0,0.0\n0.0,1.0\n2.0,1.0\n1.0,2.0\n9\n-509.94,892.63\n567.62,639.99\n-859.32,-64.84\n-445.99,383.96\n667.54,430.49\n551.12,828.21\n-940.2,-877.2\n-361.62,-970\n-125.42,-178.48\n0", "output": "0\n3\n"}, {"type": "stdin_stdout", "input": "4\n0.0,0.1\n0.0,1.0\n0.1,0.2\n1.0,2.0\n9\n-... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.