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\nHackerMan has brought a new draw... | [{"type": "stdin_stdout", "input": "91\n31\n631\n598\n172\n710\n453\n948\n108\n898\n299\n490\n24\n572\n769\n397\n449\n830\n398\n326\n973\n473\n453\n580\n341\n331\n510\n139\n595\n399\n952\n925\n474\n419\n481\n462\n847\n257\n865\n323\n881\n812\n352\n595\n503\n985\n583\n512\n354\n374\n777\n505\n247\n587\n994\n85\n441\n336... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRaja tranports boxes from one pl... | [{"type": "stdin_stdout", "input": "1\n5\n10 14 12 15 3\n25\n\nSAMPLE", "output": "10 14 12 15 3\n"}, {"type": "stdin_stdout", "input": "1\n5\n5 14 12 15 3\n25\n\nSAMPLE", "output": "5 14 12 15 3\n"}, {"type": "stdin_stdout", "input": "1\n5\n10 14 6 15 3\n25\n\nSAMPLE", "output": "10 14 6 15 3\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\nLittle Jhool always wanted to ha... | [{"type": "stdin_stdout", "input": "1111010100010100101011101100101101110011000010100010000001111100010011100101010001101111000001011000", "output": "Sorry, sorry!\n"}, {"type": "stdin_stdout", "input": "0101100011001110001110100111100011010101011000000000110110010010111100101111010111100011101100100101", "output": "So... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nShil, Aditya and Utkarsh go to a... | [{"type": "stdin_stdout", "input": "891", "output": "234989370\n"}, {"type": "stdin_stdout", "input": "828", "output": "188536152\n"}, {"type": "stdin_stdout", "input": "563", "output": "59167922\n"}, {"type": "stdin_stdout", "input": "550", "output": "55156200\n"}, {"type": "stdin_stdout", "input": "318", "output": "1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nXsquare likes strings a lot but ... | [{"type": "stdin_stdout", "input": "100\nctaqinomqgoggfkanhrhfriftpfbohogtcalpcqknmphlntahibtlloqcthforeflhorcjdolcdanpgkdofimtaonmrq\nahbcsqjthirinsntrrbcmosictmqtkctnsgktmmclnsfcihgsianpbeatmqcheddodqjmcocboggomtenadaalgntoqgdtrtapa\nahkalidekjcckifcalkimkljkjjgmidbagjhjgdcfbdalkgkkdelejhigacichfjiabeejcjfkcafbkclgbe... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 N integers A_1, ..., A_N, ... | [{"type": "stdin_stdout", "input": "31\n4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 0 2 7 9 5 0", "output": "0\n"}, {"type": "stdin_stdout", "input": "31\n4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 9 5 0", "output": "0"}, {"type": "stdin_stdout", "input": "2\n1000000000 1000000000", "output": "100000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 squares arranged in ... | [{"type": "stdin_stdout", "input": "7\n20 7 -1 1 3 -2 2", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\n64 3 0 4 -1 -2 5", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\n64 3 1 4 -1 -2 5", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\n20 7 3 0 3 -1 2", "output": "3\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\nThere are N strings arranged in ... | [{"type": "stdin_stdout", "input": "5\n11 1 2 2 2", "output": "3"}, {"type": "stdin_stdout", "input": "5\n14 1 2 2 2", "output": "3"}, {"type": "stdin_stdout", "input": "5\n28 1 2 2 2", "output": "3"}, {"type": "stdin_stdout", "input": "5\n3 1 2 1 13", "output": "3"}, {"type": "stdin_stdout", "input": "5\n11 1 2 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\nRingo Kingdom Congress is voting... | [{"type": "stdin_stdout", "input": "1 60\n11 10\n5 8\n3 4\n13 -1\n4 7", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 60\n11 10\n5 8\n4 4\n13 -1\n4 7", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 60\n11 10\n5 8\n4 4\n13 -1\n7 7", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 60\n11 10\n5 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\nThis contest is `CODE FESTIVAL`.... | [{"type": "stdin_stdout", "input": "ETAUDARGTSOP", "output": "ETAU DARGTSOP\n"}, {"type": "stdin_stdout", "input": "AACDEFGHIJKL", "output": "AACD EFGHIJKL\n"}, {"type": "stdin_stdout", "input": "COCEFESTIVAL", "output": "COCE FESTIVAL\n"}, {"type": "stdin_stdout", "input": "POSTGRADUATF", "output": "POST GRADUATF\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 solution of $ x ^ 3 = q $ is... | [{"type": "stdin_stdout", "input": "15\n153\n-1", "output": "2.466212\n5.348481\n"}, {"type": "stdin_stdout", "input": "15\n123\n-1", "output": "2.466212\n4.973190\n"}, {"type": "stdin_stdout", "input": "15\n194\n-1", "output": "2.466212\n5.788963\n"}, {"type": "stdin_stdout", "input": "15\n103\n-1", "output": "2.46621... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. A is planning to travel alon... | [{"type": "stdin_stdout", "input": "1 3 3 1 3\n1 3 2000\n1 2 1000\n2 3 1001\n2 3 3 1 3\n1 3 2300\n1 2 1000\n2 3 1200\n2 6 6 5 1\n1 2 1500\n1 3 4500\n2 6 2000\n5 4 1000\n6 4 2200\n3 5 3000\n0 0 0 0 0", "output": "1000\n1100\n3750\n"}, {"type": "stdin_stdout", "input": "1 3 3 1 3\n1 3 2000\n1 2 1000\n2 3 1001\n2 3 3 1 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\nShe loves e-mail so much! She se... | [{"type": "stdin_stdout", "input": "666660666\n134424306396481246895756\n12784174432754272468162", "output": "No\n'dhagdmdwmgt'agmtwjpjm\n'aptg'phdapjgapagmt'ma\n"}, {"type": "stdin_stdout", "input": "666660666\n113124756735251440964347\n33891614279093528467517", "output": "No\n,d'agpjmpdjaj'hwmgdgp\netw'm'gapwwdjatgmp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 2300, the Life Science Divisi... | [{"type": "stdin_stdout", "input": "ABC 3\nABC 2\n2(4()B)3(XY)A10C 30\n1000(1000(1000(1000(1000(1000(OM)))))) 1090860\n0 0", "output": "0\nC\n0\nO\n"}, {"type": "stdin_stdout", "input": "CBA 3\nABC 0\n2(4(AB)3(XY))10C 10\n1000(1000(1000(1000(1000(1000(NM)))))) 1889091\n0 0", "output": "0\nA\nX\nM\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\nIn the middle of Tyrrhenian Sea,... | [{"type": "stdin_stdout", "input": "3\n8 8 28\n32 34 32\n57 2 108\n5\n49 3 49\n7 46 44\n27 21 21\n33 56 56\n21 46 4\n3\n45 52 28\n46 26 36\n40 55 62\n10\n33 8 39\n50 57 43\n61 21 12\n21 17 11\n16 22 106\n45 40 53\n45 30 53\n39 1 8\n24 48 30\n7 48 15\n0", "output": "03:16:36 03:21:07\n06:14:56 06:32:09\n02:18:54 02:21: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\nProfessor Matsuzaki is a scienti... | [{"type": "stdin_stdout", "input": "0 55\n0 1\n0 2\n0 3\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n11 1\n11 2\n11 3\n100001 100\n-1 -1", "output": "42\n4\n5\n6\n22\n24\n26\n28\n30\n30\n26\n30\n32\n200274\n"}, {"type": "stdin_stdout", "input": "0 55\n0 1\n0 2\n0 3\n10 1\n10 2\n10 3\n10 4\n10 5\n10 1\n11 1\n11 2\n11 3\n100001 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nClaire is a man-eater. She's a r... | [{"type": "stdin_stdout", "input": "2\n2 100\n10 12\n14 16\n2 200\n12 13\n18 20\n4\n1 100\n6 22\n1 1000\n12 22\n1 10000\n6 22\n1 100000\n6 22\n16\n1 100000000\n6 7\n1 100000000\n7 8\n1 100000000\n8 15\n1 110000000\n9 10\n1 100000000\n10 11\n1 100000000\n11 12\n1 100000000\n12 13\n1 100000000\n13 17\n1 100000000\n14 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\nThere is an Amidakuji that consi... | [{"type": "stdin_stdout", "input": "10 8 10\n10 4\n4 4\n5 1\n6 2\n3 3\n1 3\n2 4\n8 2\n7 5\n7 1", "output": "1\n2\n3\n7\n8\n5\n4\n6\n"}, {"type": "stdin_stdout", "input": "10 6 10\n10 4\n4 4\n5 1\n4 2\n7 3\n1 3\n2 4\n8 2\n3 5\n7 1", "output": "1\n4\n3\n5\n6\n2\n"}, {"type": "stdin_stdout", "input": "10 6 10\n10 4\n4 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\nG: Working\n\nKou decided to do ... | [{"type": "stdin_stdout", "input": "5\n6 -27 -3 -2 -29", "output": "-11\n"}, {"type": "stdin_stdout", "input": "5\n6 -27 -3 -1 -29", "output": "-10\n"}, {"type": "stdin_stdout", "input": "5\n4 -31 0 -1 -28", "output": "-13\n"}, {"type": "stdin_stdout", "input": "5\n-2 -12 7 -1 32", "output": "-7\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nIt seems that a magic... | [{"type": "stdin_stdout", "input": "10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10\n1 10", "output": "-1000000000 1000000000\n"}, {"type": "stdin_stdout", "input": "10\n1 10\n1 10\n1 10\n1 10\n2 10\n1 10\n1 10\n1 10\n1 10\n1 10", "output": "-1000000 1000000000\n"}, {"type": "stdin_stdout", "input": "10\n1 10\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a given sequence $A = \\\\{a... | [{"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-3\n4\n14", "output": "0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-2\n4\n14", "output": "0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-4\n4\n14", "output": "0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n-1 0 1 4\n3\n-4\n0\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 tree (an undirec... | [{"type": "stdin_stdout", "input": "6 1\n2 1\n4 3\n2 5\n5 4\n5 6\n", "output": "0.6666666666666666\n"}, {"type": "stdin_stdout", "input": "6 1\n2 1\n1 3\n2 5\n5 4\n5 6\n", "output": "0.6666666666666666\n"}, {"type": "stdin_stdout", "input": "6 1\n2 1\n2 3\n1 5\n5 4\n5 6\n", "output": "0.6666666666666666\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\nGiven a string s of length n and... | [{"type": "stdin_stdout", "input": "92 5\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "92 6\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "output": "2\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\nYou have a set of items, each ha... | [{"type": "stdin_stdout", "input": "263313949370306890\n4140164751166140 6614205360468614 8773811688442168 7305250350819495 9250632788512985 7714928459050216 8422821279105776 5352796431133309\n", "output": "263313949370306890"}, {"type": "stdin_stdout", "input": "94517213607565382\n9730010615245182 9582835010066942 147... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is raining heavily. But this ... | [{"type": "stdin_stdout", "input": "37 99816\n19935 98486\n13473 97526\n12932 94864\n12400 98868\n13485 96232\n10902 93340\n10315 93206\n14926 98755\n13524 99060\n10391 94409\n14740 94040\n16968 94901\n18543 49807\n16376 96008\n16802 95903\n19742 97400\n10380 97416\n13674 91688\n16347 99505\n17541 91909\n19573 93640\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\nAnia has a large integer S. Its ... | [{"type": "stdin_stdout", "input": "400 224\n34034718296316650556302576767095880542740697596682657060609028712014739414658241556774411582749368771597248873201583574900424227251655547840887764275893533353440635216728376201808545879398359535670372855472971530695051695650262058940466340529417646357776899296790403916961389... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consist... | [{"type": "stdin_stdout", "input": "12\n123654 1 2 3 4 5 6 7 16 9 10 11\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "12\n123654 1 2 6 4 5 6 7 16 9 10 11\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "12\n123654 1 2 6 4 5 6 7 16 9 18 11\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "12\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 permutation p_1,... | [{"type": "stdin_stdout", "input": "3\n4\n2 1 4 3\n6\n4 12 1 2 5 3\n5\n5 7 1 2 4\n", "output": "YES\n2 3 4\nYES\n1 2 3\nYES\n1 2 3\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 1 4 3\n6\n4 12 1 2 5 3\n5\n5 8 1 2 4\n", "output": "YES\n2 3 4\nYES\n1 2 3\nYES\n1 2 3\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 1 4 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\nA binary string is a string wher... | [{"type": "stdin_stdout", "input": "4\n1\n1\n3\n00000\n4\n1110000\n2\n101\n", "output": "1\n000\n1100\n11\n"}, {"type": "stdin_stdout", "input": "4\n1\n1\n3\n00000\n4\n1110000\n2\n101\n", "output": "1\n000\n1100\n11\n"}, {"type": "stdin_stdout", "input": "4\n1\n1\n3\n00100\n4\n1110000\n2\n101\n", "output": "1\n010\n110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 want to build a fence that w... | [{"type": "stdin_stdout", "input": "6\n2 3\n0 0\n2 3\n0 3\n2 3\n3 0\n3 3\n4 0 4\n3 3\n4 0 5\n3 3\n5 0 4\n", "output": "YES\nNO\nNO\nYES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "6\n2 3\n0 0\n2 3\n0 3\n2 3\n3 0\n3 3\n4 0 4\n3 3\n4 0 5\n3 3\n5 0 8\n", "output": "YES\nNO\nNO\nYES\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 a directed graph c... | [{"type": "stdin_stdout", "input": "3 11\n+ 1 2 a\n+ 2 3 b\n+ 3 2 a\n+ 2 1 b\n? 3\n? 2\n- 2 1\n- 3 2\n+ 2 1 c\n+ 3 2 d\n? 5\n", "output": "\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3 11\n+ 1 2 a\n+ 1 3 c\n+ 3 2 a\n+ 2 1 a\n? 6\n? 5\n- 2 1\n- 3 2\n+ 2 1 c\n+ 3 2 d\n? 5\n", "output": "YES\nYES\nYES\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 are wandering in the explore... | [{"type": "stdin_stdout", "input": "3 3 10\n1 1\n1 1\n1 1\n1 1 1\n1 1 1\n", "output": "\n10 10 10\n10 10 10\n10 10 10\n"}, {"type": "stdin_stdout", "input": "3 3 10\n1 1\n2 1\n1 1\n1 1 1\n1 1 1\n", "output": "10 10 10\n10 10 10\n10 10 10\n"}, {"type": "stdin_stdout", "input": "3 3 10\n1 1\n2 2\n1 1\n1 2 1\n2 2 1\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\nPolycarpus has recently got inte... | [{"type": "stdin_stdout", "input": "239 695 50503 21427\n", "output": "\n25251\n"}, {"type": "stdin_stdout", "input": "536 673 81953 56773\n", "output": "\n81952\n"}, {"type": "stdin_stdout", "input": "271 761 99991 77298\n", "output": "\n49995\n"}, {"type": "stdin_stdout", "input": "887 265 64802 22027\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 ancient Berlanders believed ... | [{"type": "stdin_stdout", "input": "50\nagecd\ncghafi\nfiide\niecc\njbdcfjhgd\ndiee\nhfeg\nehc\ngfijgjh\ngacaifebg\ndicbbddc\nhjgciaei\njjcdh\ng\ngc\ncf\nhfdjhd\nc\nicidbec\nji\neeh\ncgeejggc\nacfd\njjg\najefdj\neghhebiic\nbih\ngbb\njjaa\nidc\ngafi\necg\ndbigbjiehj\ncedif\nahidfaaajg\nhfhhiccbgb\ndgegjgieif\nhgjebhfdc\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 new Berland businessman Vitaly... | [{"type": "stdin_stdout", "input": "1000 2 1363\n", "output": "2726\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 2N - 1 boxes there are apples... | [{"type": "stdin_stdout", "input": "2\n2\n10 15\n5 7\n20 18\n1\n0 0\n", "output": "YES\n1 3 \nYES\n1 \n"}, {"type": "stdin_stdout", "input": "2\n2\n10 15\n5 7\n20 18\n1\n0 0\n", "output": "YES\n1 3 \nYES\n1 \n"}, {"type": "stdin_stdout", "input": "2\n2\n10 15\n5 11\n20 22\n1\n0 0\n", "output": "YES\n1 3\nYES\n1\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 penguin Polo adores integ... | [{"type": "stdin_stdout", "input": "47 21\n3 5\n-422 -417\n60 60\n-348 -348\n-3 -3\n-364 -361\n-49 -41\n-436 -430\n-250 -244\n-33 -26\n-162 -158\n-90 -88\n-357 -352\n-339 -337\n-25 -19\n-69 -67\n-261 -260\n-292 -283\n12 18\n44 44\n-277 -275\n-301 -293\n-108 -98\n-180 -172\n-327 -318\n-314 -309\n-12 -7\n-134 -130\n33 35... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 -6\n5 2 1 9 5 2 4 4 9 2\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n"}, {"type": "stdin_stdout", "input": "10 -6\n5 2 1 8 5 2 4 4 9 2\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\n"}, {"type": "stdin_stdout", "input": "10 0\n5 14 1 1 5 1 1 4 9 2\n", "output": "2\n3\n4\n5\n6\n7\n8\n9\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\nVasily the bear has got a sequen... | [{"type": "stdin_stdout", "input": "39\n37749932 37750076 37750391 37750488 37750607 37750812 37750978 37751835 37752173 37752254 75497669 75497829 75497852 75498044 75498061 75498155 75498198 75498341 75498382 75498465 150994988 150994989 150995009 150995019 150995024 150995030 150995031 150995069 150995072 805306369 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSimon has an array a1, a2, ..., ... | [{"type": "stdin_stdout", "input": "5\n2 3 5 7 11\n", "output": "5 0\n1 2 3 4 5 "}, {"type": "stdin_stdout", "input": "5\n2 3 5 9 17\n", "output": "5 0\n1 2 3 4 5\n"}, {"type": "stdin_stdout", "input": "5\n3 2 3 4 6\n", "output": "5 0\n1 2 3 4 5\n"}, {"type": "stdin_stdout", "input": "2\n999999 1000000\n", "output": "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\nEverybody knows what an arithmet... | [{"type": "stdin_stdout", "input": "40\n100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub is very proud of his recen... | [{"type": "stdin_stdout", "input": "30\n2 1\n3 2\n4 3\n5 3\n6 5\n7 3\n8 3\n9 2\n10 3\n11 2\n12 11\n13 6\n14 4\n15 5\n16 11\n17 9\n18 14\n19 6\n20 2\n21 19\n22 9\n23 19\n24 20\n25 14\n26 22\n27 1\n28 6\n29 13\n30 27\n1 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0\n0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 1 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\nYou are given a permutation of n... | [{"type": "stdin_stdout", "input": "100\n1 65 33 97 17 81 49 11 73 41 25 89 57 5 69 39 21 85 53 13 77 45 29 93 61 3 67 60 99 19 83 51 11 75 43 27 91 59 7 71 39 23 87 55 15 79 47 31 2 95 63 66 34 98 18 82 50 10 74 42 26 90 58 6 70 38 22 86 54 14 78 46 30 94 62 4 68 36 100 20 84 52 12 76 44 28 92 60 8 72 40 24 88 56 16 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\nGiven a sequence of integers a1,... | [{"type": "stdin_stdout", "input": "10\n2 2 4 3 2 4 4 2 4 2\n104\n3\n3\n1\n4\n1\n1\n4\n1\n1\n3\n1\n1\n4\n1\n1\n1\n4\n3\n1\n1\n4\n1\n1\n1\n1\n1\n4\n1\n1\n1\n4\n1\n1\n4\n1\n1\n1\n1\n1\n4\n4\n1\n3\n1\n4\n1\n1\n1\n4\n1\n2\n4\n1\n4\n1\n4\n1\n4\n3\n1\n2\n2\n4\n2\n1\n1\n2\n4\n4\n1\n2\n3\n1\n1\n4\n4\n4\n4\n4\n2\n2\n4\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\nPolycarp is writing the prototyp... | [{"type": "stdin_stdout", "input": "9 20\n**.......\n****.....\n******...\n*******..\n..******.\n....****.\n......***\n*.....***\n*********\n*********\n*********\n*********\n....**...\n...****..\n..******.\n.********\n****..***\n***...***\n**.....**\n*.......*\n", "output": "********......**********........********\n**... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDo you like summer? Residents of... | [{"type": "stdin_stdout", "input": "10\n520230360 520230361 520230362 520230363 520230364 520230365 520230366 520230367 520230368 520230369\n", "output": "520230360 520230361 520230362 520230363 520230364 520230365 520230366 520230367 520230368 520230369 "}, {"type": "stdin_stdout", "input": "10\n876584065 876584063 87... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIgor is in the museum and he wan... | [{"type": "stdin_stdout", "input": "10 10 50\n**********\n*......***\n***..**..*\n***....***\n**..***..*\n**..**.*.*\n*****..***\n*.***..***\n*..****.**\n**********\n5 9\n5 9\n7 7\n6 4\n6 7\n8 7\n6 7\n9 2\n3 9\n9 2\n4 7\n4 6\n2 5\n9 2\n7 7\n5 8\n8 7\n8 6\n7 7\n5 3\n8 7\n3 8\n5 8\n5 9\n9 8\n9 3\n8 7\n5 9\n9 2\n9 8\n9 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\nAfter the contest in comparing n... | [{"type": "stdin_stdout", "input": "Iran_\nPersian;\nW_o;n;d;e;r;f;u;l;\n7\nWonderfulPersianIran\nwonderful_PersIAN_IRAN;;_\nWONDERFUL___IRAN__PERSIAN__;;\nIra__Persiann__Wonderful\nWonder;;fulPersian___;I;r;a;n;\n__________IranPersianWonderful__________\nPersianIran_is_Wonderful\n", "output": "ACC\nACC\nACC\nWA\nACC\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\nFurther research on zombie thoug... | [{"type": "stdin_stdout", "input": "10 9\n5 1\n1 2\n9 3\n10 5\n6 3\n8 9\n2 7\n2 3\n10 4\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "10 9\n5 1\n1 2\n9 3\n10 5\n6 4\n8 9\n2 7\n2 3\n10 4\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "10 9\n5 1\n1 2\n9 3\n10 5\n6 3\n8 5\n2 7\n2 3\n10 4\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\nToday an outstanding event is go... | [{"type": "stdin_stdout", "input": "519325240668210886 776112702001665034 360568516809443669 1272711703453279586 994594983925273138\n", "output": "256787461333454149\n"}, {"type": "stdin_stdout", "input": "519325240668210886 776112702001665034 360568516809443669 875594219634943179 994594983925273138\n", "output": "2567... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 some reason in many American... | [{"type": "stdin_stdout", "input": "90\n1 1\n2 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n1 2\n2 2\n3 2\n4 2\n5 2\n6 2\n7 2\n8 2\n9 2\n1 3\n2 3\n3 3\n4 3\n5 3\n6 3\n7 3\n8 3\n9 3\n1 4\n2 4\n3 4\n4 4\n5 4\n6 4\n7 4\n8 4\n9 4\n1 5\n2 5\n3 5\n4 5\n5 5\n6 5\n7 5\n8 5\n9 5\n1 6\n2 6\n3 6\n4 6\n5 6\n6 6\n7 6\n8 6\n9 6\n1 7\n2 7\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 matrix with n rows... | [{"type": "stdin_stdout", "input": "100 10000\n", "output": "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \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... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has n burles. One bottle o... | [{"type": "stdin_stdout", "input": "10000000\n10000000\n10000000\n", "output": "YES\n0 1\n"}, {"type": "stdin_stdout", "input": "10000000\n10000100\n10000000\n", "output": "YES\n0 1\n"}, {"type": "stdin_stdout", "input": "10000000\n9999999\n1\n", "output": "YES\n0 10000000\n"}, {"type": "stdin_stdout", "input": "100000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose that you are in a campus... | [{"type": "stdin_stdout", "input": "5 5 3\n.....\n.....\n*...*\n*....\n.*...\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "5 5 3\n.....\n.....\n*...*\n*....\n...*.\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "5 5 3\n.....\n.....\n*...*\n....*\n...*.\n", "output": "18\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have two variables a and b. ... | [{"type": "stdin_stdout", "input": "1100000000000000000 1000000000000000000\n", "output": "1100000000000000000 1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1100000000000000000 1000000000000010000\n", "output": "1100000000000000000 1000000000000010000\n"}, {"type": "stdin_stdout", "input": "10000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAkari has n kinds of flowers, on... | [{"type": "stdin_stdout", "input": "1001010000 32745 173205", "output": "733789298\n"}, {"type": "stdin_stdout", "input": "1000000000 60937 173205", "output": "832968201\n"}, {"type": "stdin_stdout", "input": "1000010001 32745 173205", "output": "184550369\n"}, {"type": "stdin_stdout", "input": "1000010101 32745 173205... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 square grid with H row... | [{"type": "stdin_stdout", "input": "17 183 -1 0", "output": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\n00000000000000000000000000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 N cards. On the i-th ca... | [{"type": "stdin_stdout", "input": "11 3\n1 1 1 1 1 1 1 1 1 1 1\n3 1000000000\n4 1000000000\n3 1000000001", "output": "10000000004\n"}, {"type": "stdin_stdout", "input": "11 3\n1 1 1 1 1 1 1 1 1 1 1\n3 1000000000\n4 1000000000\n3 1100000000", "output": "10300000001\n"}, {"type": "stdin_stdout", "input": "11 3\n1 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\nDecades have passed since the be... | [{"type": "stdin_stdout", "input": "1001", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1506", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1101", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1111", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "0111", "output": "ABC\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\nYou are given a string S consist... | [{"type": "stdin_stdout", "input": "aatltmaa", "output": "-1\n"}, {"type": "stdin_stdout", "input": "aamtltaa", "output": "-1\n"}, {"type": "stdin_stdout", "input": "aamaltta", "output": "-1\n"}, {"type": "stdin_stdout", "input": "attlamaa", "output": "-1\n"}, {"type": "stdin_stdout", "input": "alttamaa", "output": "-1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a sequence of length N c... | [{"type": "stdin_stdout", "input": "2307894359683", "output": "50 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887209 46157887259 46157887259 46157887259 46157887259 46... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 time is 2020. There is data ... | [{"type": "stdin_stdout", "input": "1,20\n2,20\n3,30\n4,10\n5,10\n6,20\n0,0\n1\n2\n4\n1", "output": "2\n2\n3\n2\n"}, {"type": "stdin_stdout", "input": "1,20\n2,20\n3,30\n4,10\n5,10\n0,26\n0,0\n1\n2\n4\n1", "output": "3\n3\n4\n3\n"}, {"type": "stdin_stdout", "input": "1,20\n2,20\n3,30\n4,10\n5,10\n0,26\n0,0\n0\n2\n4\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\nThere are various parking lots s... | [{"type": "stdin_stdout", "input": "5 5\n136\n68\n82\n84\n114\n2 4\n14\n30\n118\n54\n0 0", "output": "2 3 4 1 5\n1 2 4 3\n"}, {"type": "stdin_stdout", "input": "2 5\n123\n52\n195\n87\n105\n2 4\n18\n30\n80\n24\n0 0", "output": "4 2 3 1 5\n1 2 4 3\n"}, {"type": "stdin_stdout", "input": "1 5\n123\n52\n105\n87\n105\n2 4\n1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNobuo-kun and Shizuo-kun are pla... | [{"type": "stdin_stdout", "input": "1 9\n-2 -1 4 -1 -1\n0 1 2 26 -15\n-1 1 -13 6 0\n0 -1 8 -1 -2", "output": "28\n"}, {"type": "stdin_stdout", "input": "1 9\n-3 -1 4 -1 -1\n0 1 2 26 -15\n-1 1 -13 6 0\n0 -1 8 -1 -2", "output": "27\n"}, {"type": "stdin_stdout", "input": "1 9\n-2 -1 4 -1 0\n2 1 2 26 -15\n-1 0 -13 6 0\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\nproblem\n\nN students from JOI H... | [{"type": "stdin_stdout", "input": "6 3\n3\n3\n11\n-1\n1\n10", "output": "3\n-1\n3\n10\n1\n11\n"}, {"type": "stdin_stdout", "input": "6 4\n3\n3\n11\n-1\n1\n5", "output": "-1\n3\n1\n3\n5\n11\n"}, {"type": "stdin_stdout", "input": "6 4\n3\n3\n11\n-2\n1\n5", "output": "-2\n3\n1\n3\n5\n11\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\nOrigami, or the art of folding p... | [{"type": "stdin_stdout", "input": "2 1 1 1\n1 1\n0 0\n1 3 2 1\n2 1\n2 1\n0 0\n15 10 3 2\n2 2\n1 1\n1 1\n0 0\n3 4\n4 3 3 2\n1 2\n1 2\n1 1\n0 1\n0 0\n0 0 0 0", "output": "2\n3\n6\n1\n4\n4\n"}, {"type": "stdin_stdout", "input": "2 1 1 1\n2 1\n0 0\n1 3 2 1\n2 0\n2 1\n0 1\n10 13 3 2\n2 2\n1 3\n1 1\n0 1\n3 4\n3 5 3 2\n1 2\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 playing a solitaire puzz... | [{"type": "stdin_stdout", "input": "10 16\nLAAOITNNRETNI\nAOLLCGIFTE\nPROGRAMMJNH\nOSETNTC", "output": "22\n"}, {"type": "stdin_stdout", "input": "10 16\nLANOITANRETNI\nCOLLAGIFTE\nPROGRAMMJNG\nTSETNOC", "output": "18\n"}, {"type": "stdin_stdout", "input": "10 16\nLANOITANRETNI\nCOLLAGIFTE\nPROGRAMMJNG\nOSETNTC", "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\nOne day, Ikta, an elementary sch... | [{"type": "stdin_stdout", "input": "(198876743*1-210*4-89)", "output": "3533045339395\n"}, {"type": "stdin_stdout", "input": "(198876744*1-210*4-89)", "output": "3533045357160\n"}, {"type": "stdin_stdout", "input": "(198776744*1-210*4-89)", "output": "3531268857160\n"}, {"type": "stdin_stdout", "input": "(198777744*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\nF: Miko Mi String-\n\nstory\n\nM... | [{"type": "stdin_stdout", "input": "iNobiNociN", "output": "mitomerarenaiWA\n"}, {"type": "stdin_stdout", "input": "iNoaiNociN", "output": "mitomerarenaiWA\n"}, {"type": "stdin_stdout", "input": "iNoaiNochN", "output": "mitomerarenaiWA\n"}, {"type": "stdin_stdout", "input": "NhcoNiaoNi", "output": "mitomerarenaiWA\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 performs t... | [{"type": "stdin_stdout", "input": "18\ninsert 13\ninsert 2\ninsert 3\ninsert 7\ninsert 22\ninsert 1\nfind 1\nfind 2\nfind 3\nfind 13\nfind 5\nfind 6\nfind 4\nfind 7\nprint\ndelete 3\ndelete 7\nprint", "output": "yes\nyes\nyes\nyes\nno\nno\nno\nyes\n 1 2 3 7 13 22\n 13 2 1 3 7 22\n 1 2 13 22\n 13 2 1 22\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\nFor a dynamic array $A = \\\\{a_... | [{"type": "stdin_stdout", "input": "11\n0 1 0\n0 0 2\n0 1 3\n1 1\n1 1\n1 0\n2 -1\n1 1\n0 1 4\n1 0\n1 0", "output": "0\n0\n2\n0\n2\n2\n"}, {"type": "stdin_stdout", "input": "11\n0 1 1\n0 0 2\n0 1 3\n1 1\n1 1\n1 0\n2 0\n1 1\n0 0 4\n1 0\n1 0", "output": "1\n1\n2\n3\n4\n4\n"}, {"type": "stdin_stdout", "input": "11\n0 0 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\nToday, Chef woke up to find that... | [{"type": "stdin_stdout", "input": "-1 4 14", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "1 2 11", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "2 1 11", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "-1 4 6", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe palindrome is a string that ... | [{"type": "stdin_stdout", "input": "2\n12\n12", "output": "12\n12\n"}, {"type": "stdin_stdout", "input": "2\n14\n11", "output": "14\n10\n"}, {"type": "stdin_stdout", "input": "2\n14\n22", "output": "14\n22\n"}, {"type": "stdin_stdout", "input": "2\n119\n1", "output": "118\n0\n"}, {"type": "stdin_stdout", "input": "2\n6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 text consisting ... | [{"type": "stdin_stdout", "input": "250\nf r s d b f f k d e k v m b t k k j t t a o m m s n d w l v g e k x d w k v a j h c a g x s d e t z z w q z d h n r i k b z k u s q l k c v o d o w w c y i a q v r i g i m l b x z h t a i j t h q u e v j o h w m o v k g r r x j a c m z z i s i r a p p i i l e i g m f f f y v k m... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 campus has m rooms numbered ... | [{"type": "stdin_stdout", "input": "100000000000000 99999999999999\n", "output": "50000000000001\n"}, {"type": "stdin_stdout", "input": "97821761637600 97821761637493\n", "output": "11943039006\n"}, {"type": "stdin_stdout", "input": "97821761637600 97821761637497\n", "output": "8923056792\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\nAfter finding and moving to the ... | [{"type": "stdin_stdout", "input": "10\n1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000001\n1000000000 999999999\n", "output": "999999999\n"}, {"type": "stdin_stdout", "input": "10\n1 10 100 1000 10000 100000 1000000 11000000 100000000 1000000001\n1000000000 999999999\n", "output": "999999999\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\nPolycarp has a lot of work to do... | [{"type": "stdin_stdout", "input": "11\n4 2 35\n13 5 6 13\n5 2 35\n13 5 6 13 3\n4 2 35\n14 5 6 13\n5 3 35\n13 5 6 13 3\n6 3 55\n13 5 6 13 3 3\n6 3 55\n13 5 6 3 13 3\n6 3 55\n13 5 6 3 3 13\n6 3 61\n13 5 6 13 3 3\n6 3 65\n13 5 6 13 3 3\n6 3 70\n13 5 6 13 3 3\n6 3 55\n15 5 6 13 3 3\n", "output": "2 6\n3 6\n3 13\n3 6\n4 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 two integers n and... | [{"type": "stdin_stdout", "input": "66\n1 1\n1 1\n2 1\n1 1\n1 1\n1 1\n1 1\n2 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n2 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n2 1\n1 1\n1 1\n1 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 a regular polygon ... | [{"type": "stdin_stdout", "input": "455\n", "output": "31398638\n"}, {"type": "stdin_stdout", "input": "452\n", "output": "30781650\n"}, {"type": "stdin_stdout", "input": "494\n", "output": "40184428\n"}, {"type": "stdin_stdout", "input": "485\n", "output": "38027878\n"}, {"type": "stdin_stdout", "input": "473\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\nLet's call an array of non-negat... | [{"type": "stdin_stdout", "input": "3\n1000000000 1000000000 1000000000\n", "output": "500000000\n"}, {"type": "stdin_stdout", "input": "3\n1000000000 1000000000 1000100000\n", "output": "500000000\n"}, {"type": "stdin_stdout", "input": "3\n1000000000 1000000000 1000100010\n", "output": "500000000\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\nDima worked all day and wrote do... | [{"type": "stdin_stdout", "input": "100\n8820100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026601\n", "output": "88201000000000000000000000000000000000000000000000000000000000000000000000000000000000000026601\n"}, {"type": "stdin_stdout", "input": "99\n92858678988128683760262... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the ... | [{"type": "stdin_stdout", "input": "19\n1\n10\n100\n1000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n10000000000\n100000000000\n1000000000000\n10000000000000\n100000000000000\n1000000000000000\n10000000000000000\n100000000000000000\n1000000000000000000\n", "output": "1\n4\n1\n4\n9\n2\n6\n2\n6\n8\n1\n1\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\nLet's define a string <x> as an ... | [{"type": "stdin_stdout", "input": "<d><d><w><v><g><m></m></g><b><u></u><j><h><n><q><q><c></c></q></q></n></h><c></c><l><r><l></l><b><d></d><x><k><o><w><q><x></x></q></w></o></k><p></p></x><g><m></m></g></b></r></l></j><k><l></l></k><c><v><g><p><p><d><e><z><x></x></z></e><v></v></d><u><o><u></u><k></k></o></u><m><x><h>... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an all-powerful being an... | [{"type": "stdin_stdout", "input": "4\n7 8\nAAPAAAAA\nPPPPAAAA\nPPPPAAAA\nAPAAPPPP\nAPAPPAPP\nAAAAPPAP\nAAAAPPAA\n6 5\nAAAAA\nAAAAA\nAAPAA\nAAPAP\nAAAPP\nAAAPP\n4 4\nPPPP\nPPPP\nPPPP\nPPPP\n3 4\nPPPP\nPAAP\nPPPP\n", "output": "2\n1\nMORTAL\n4\n"}, {"type": "stdin_stdout", "input": "4\n7 8\nAAPAAAAA\nAAAAPPPP\nPPPPAAAA\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLogical quantifiers are very use... | [{"type": "stdin_stdout", "input": "100 50\n55 13\n84 2\n22 63\n100 91\n2 18\n98 64\n1 86\n93 11\n17 6\n24 97\n14 35\n24 74\n22 3\n42 5\n63 79\n31 89\n81 22\n86 88\n77 51\n81 34\n19 55\n41 54\n34 57\n45 9\n55 72\n67 61\n41 84\n39 32\n51 89\n58 74\n32 79\n65 6\n86 64\n63 42\n100 57\n46 39\n100 9\n23 58\n26 81\n61 49\n71... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 matrix with n ro... | [{"type": "stdin_stdout", "input": "4\n2 2\n1 1\n0 1\n2 3\n1 1 0\n1 0 0\n3 7\n1 0 1 1 1 1 1\n0 0 0 0 0 0 0\n1 0 1 1 1 0 1\n2 5\n1 0 1 0 0\n1 1 1 1 0\n-1 1 1 0 0\n", "output": "0\n3\n5\n4\n"}, {"type": "stdin_stdout", "input": "4\n2 2\n1 1\n0 1\n2 3\n1 1 1\n1 0 0\n3 7\n1 0 1 1 1 1 1\n0 0 1 0 0 1 0\n1 0 1 0 1 0 1\n2 5\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\nThere is a road with length l me... | [{"type": "stdin_stdout", "input": "5\n2 10\n1 6\n1 10\n1\n5 10\n1 2 3 4 6\n2 1000000000\n413470354 988915189\n9 478\n1 10 25 33 239 260 453 468 477\n", "output": "3.625\n3.6666666666666665\n2.6999999999999997\n327473009.875\n57.763636363636365\n"}, {"type": "stdin_stdout", "input": "5\n2 10\n2 9\n1 10\n1\n5 10\n1 2 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\nZookeeper is buying a carton of ... | [{"type": "stdin_stdout", "input": "100\n0110110011011111001110000110010010000111111001100001011101101000001011001101100111011111100111101110\n", "output": "23254\n"}, {"type": "stdin_stdout", "input": "100\n0110110011011111001110000110010010000111111001100001011101101000001011001101100110011111100111101110\n", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is an infinite 2-dimension... | [{"type": "stdin_stdout", "input": "100\n0 0\n0 1\n1 0\n1 1\n0 2\n1 2\n2 0\n2 1\n2 2\n0 3\n1 3\n2 3\n3 0\n3 1\n3 2\n3 3\n0 4\n1 4\n2 4\n3 4\n4 0\n4 1\n4 2\n4 3\n4 4\n0 5\n1 5\n2 5\n3 5\n4 5\n5 0\n5 1\n5 2\n5 3\n5 4\n5 5\n0 6\n1 6\n2 6\n3 6\n4 6\n5 6\n6 0\n6 1\n6 2\n6 3\n6 4\n6 5\n6 6\n0 7\n1 7\n2 7\n3 7\n4 7\n5 7\n6 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 two binary square ... | [{"type": "stdin_stdout", "input": "3\n3\n110\n001\n110\n\n000\n000\n000\n3\n101\n010\n101\n\n010\n101\n010\n2\n01\n11\n\n10\n10\n", "output": "\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "3\n3\n110\n001\n110\n\n000\n000\n000\n3\n111\n010\n101\n\n110\n100\n011\n2\n01\n11\n\n10\n10\n", "output": "YES\nYES\nNO\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDr. Moriarty is about to send a ... | [{"type": "stdin_stdout", "input": "ksmbytfyhhnstlecripupiwdhbkhfpfmimrbqgszohcqnezcybvwasxmkxfupvuecsctcpadccnqexsglwaiyxcoyheefcjmdedesgjqdtqgrvfjonzesffousooutsjumrxl\nhgjqihcfbnmgufonaiudbjegexexthrzcdkuimwogpbyovemztzcmqnrbhabxyyxyfuzpyhjgnioexbezzupcxlyzuuncstiiqsjzdtqppqhxilvqimlpjejiqbwpeekzweeyvthvjffgfvqauqru... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Smart Beaver from ABBYY bega... | [{"type": "stdin_stdout", "input": "120\n242 524 420 973 816 432 247 666 134 849 145 366 608 930 613 315 863 628 97 109 65 704 741 314 736 17 872 971 559 648 223 771 171 327 782 837 303 393 292 339 730 834 794 868 540 251 789 893 23 305 116 220 699 863 580 992 861 393 98 253 544 171 336 207 348 496 316 285 286 727 613 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has an array that consi... | [{"type": "stdin_stdout", "input": "100\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja loves all sorts of algori... | [{"type": "stdin_stdout", "input": "yxzyzxzzxyyzzxxxzyyzzyzxxzxyzyyzxyzxyxxyzxyxzyzxyzxyyxzzzyzxyyxyzxxy\n10\n17 67\n6 35\n12 45\n56 56\n14 30\n25 54\n1 1\n46 54\n3 33\n19 40\n", "output": "NO\nNO\nNO\nYES\nYES\nNO\nYES\nNO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "yxzyzxzzxyyzzxxxzyyzzyzxxzxyzyyzxyzxyxxyzxyxzyz... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 axis directed from t... | [{"type": "stdin_stdout", "input": "15\n-241250505 -2\n-241250503 0\n-241250502 -5\n-241250501 -1\n-241250500 -3\n-241250499 2\n-241250498 -2\n-241250497 6\n-241250496 0\n-241250495 0\n-241250494 8\n-241250493 -5\n-241250492 7\n-241250491 -7\n-241250490 2\n", "output": "-20\n"}, {"type": "stdin_stdout", "input": "15\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\nBerland scientists noticed long ... | [{"type": "stdin_stdout", "input": "5833850738115444790123301858525860464609052423198474077217629208584932325696195827387610627649689452307781278299607661979317839675618367523485801890948530770658677574385684508313179053341358796468870615462459993169923271075382282788408147405323998383308800\n", "output": "YES\n1\n465\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAmr doesn't like Maths as he fin... | [{"type": "stdin_stdout", "input": "1000 100 777767777\n", "output": "577920877\n"}, {"type": "stdin_stdout", "input": "886 10 902171654\n", "output": "134375492\n"}, {"type": "stdin_stdout", "input": "712 53 592302770\n", "output": "147693148\n"}, {"type": "stdin_stdout", "input": "393 71 933802677\n", "output": "3665... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKevin has just recevied his disa... | [{"type": "stdin_stdout", "input": "93\n010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\n", "output": "93\n"}, {"type": "stdin_stdout", "input": "93\n010101010101010101010101010101010101010101010101010101010101010101010101011101010101010101010\n", "output": "93\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\nMary has just graduated from one... | [{"type": "stdin_stdout", "input": "10 10000\n", "output": "55\n"}, {"type": "stdin_stdout", "input": "10 1022\n", "output": "53\n"}, {"type": "stdin_stdout", "input": "10 1023\n", "output": "55\n"}, {"type": "stdin_stdout", "input": "10 9999\n", "output": "55\n"}, {"type": "stdin_stdout", "input": "8 10000\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\nIn Chelyabinsk lives a much resp... | [{"type": "stdin_stdout", "input": "20 30\n4 13 78 11\n13 19 56 41\n15 15 46 83\n4 9 74 72\n17 20 97 7\n15 20 29 64\n8 17 44 85\n4 18 26 46\n16 17 13 90\n16 16 39 89\n13 14 46 125\n14 18 67 18\n12 20 84 48\n10 20 49 32\n10 14 14 11\n6 18 80 84\n3 20 13 97\n12 20 62 42\n7 14 64 71\n5 19 38 17\n17 18 99 18\n11 15 83 22\n... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.