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\nTwo people are playing a game wi... | [{"type": "stdin_stdout", "input": "axxxxbbaaa\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "pogfjssywv\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "aaabbxxxxa\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "pogfjssywu\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "axab... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNeko loves divisors. During the ... | [{"type": "stdin_stdout", "input": "1000000000 264865600\n", "output": "102701600\n"}, {"type": "stdin_stdout", "input": "999999973 800000007\n", "output": "199999823\n"}, {"type": "stdin_stdout", "input": "159488527 938932258\n", "output": "100326050\n"}, {"type": "stdin_stdout", "input": "179237079 691088384\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\nYou're given an array a of lengt... | [{"type": "stdin_stdout", "input": "97\n13 8 5 4 7 4 10 3 8 10 2 10 9 9 8 1 17 1 8 8 5 6 4 8 7 1 9 10 6 3 9 5 8 3 3 8 9 8 4 2 10 9 5 4 1 10 8 4 2 3 2 10 6 1 4 5 1 2 9 5 4 9 1 5 5 8 10 1 10 6 5 8 8 8 5 4 5 7 8 8 6 2 7 10 4 2 1 6 5 9 1 8 6 7 5 2 3 4 1 10 4 5 4 3 10 8 9 9 9 8 6 5 8 7 8 10 4 4 7 5 8 8 1 10 6 9 5 9 8 4 9 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 points on the plane,... | [{"type": "stdin_stdout", "input": "35\n8 1\n6 8\n4 1\n1 2\n1 4\n5 10\n10 8\n9 1\n9 9\n10 2\n6 5\n8 8\n7 6\n10 6\n9 4\n4 9\n3 2\n1 8\n3 9\n7 3\n3 7\n2 7\n3 8\n3 1\n2 2\n5 5\n7 2\n4 10\n6 3\n5 1\n8 10\n4 3\n9 8\n9 7\n3 10\n", "output": "316"}, {"type": "stdin_stdout", "input": "35\n4 2\n9 6\n3 10\n2 5\n7 9\n6 9\n10 7\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\nAnadi has a set of dominoes. Eve... | [{"type": "stdin_stdout", "input": "7 21\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n2 3\n2 4\n2 5\n2 6\n2 7\n3 4\n3 5\n3 6\n3 7\n4 5\n4 6\n4 7\n5 6\n5 7\n6 7\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "7 21\n3 5\n7 2\n2 3\n6 5\n5 2\n4 7\n2 6\n2 4\n6 7\n5 1\n1 4\n4 5\n5 7\n4 6\n3 1\n1 2\n3 4\n7 1\n3 7\n6 1\n3 6\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\nAt first, let's define function ... | [{"type": "stdin_stdout", "input": "1000000000000000000 100\n", "output": "31249999999999998\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 100000000\n", "output": "29802322386\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 10000000000\n", "output": "232830642\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKana was just an ordinary high s... | [{"type": "stdin_stdout", "input": "7\n100 3 2\n189 3 4\n28 2 3\n63 2 3\n30 27 14\n10 9 1\n69117 21 2\n", "output": "NO\nNO\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n100 3 2\n189 4 4\n64 2 3\n18 2 3\n19 27 14\n10 9 1\n69117 21 2\n", "output": "NO\nYES\nNO\nYES\nYES\nYES\nYES\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\nPolycarpus has postcards and pho... | [{"type": "stdin_stdout", "input": "CPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCPCP\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "PPPPPPPPPPPPPPPPPPPPPPPCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCPPPPPCCCPPPPCCCCCPCC\n", "output": "23\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 likes numbers a lot... | [{"type": "stdin_stdout", "input": "1209\n", "output": "263450/1207\n"}, {"type": "stdin_stdout", "input": "1869\n", "output": "627063/1867\n"}, {"type": "stdin_stdout", "input": "1865\n", "output": "623876/1863\n"}, {"type": "stdin_stdout", "input": "1343\n", "output": "325366/1341\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\nThe Bubble Cup hypothesis stood ... | [{"type": "stdin_stdout", "input": "100\n891 894 462 899 163 868 418 903 31 333 670 32 705 561 505 920 414 81 723 603 513 25 896 879 703 415 799 271 440 8 596 207 296 116 458 646 781 842 963 174 157 747 207 996 361 371 721 447 566 438 566 449 522 176 79 740 757 156 436 296 23 704 542 572 455 886 962 194 219 301 437 315... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is preparing for his birth... | [{"type": "stdin_stdout", "input": "4\n4\n3 7 4 5\n2 1 2 4\n4\n1 2 3 4\n3 3 3 3\n2\n1 2\n10 10\n2\n10 10\n1 2\n", "output": "5\n3\n2\n3\n"}, {"type": "stdin_stdout", "input": "4\n4\n3 11 4 2\n2 1 2 4\n4\n1 2 3 4\n3 3 3 3\n2\n1 2\n10 10\n2\n10 10\n1 2\n", "output": "3\n3\n2\n3"}, {"type": "stdin_stdout", "input": "4\n4\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose you have a sequence of k... | [{"type": "stdin_stdout", "input": "95 95\n6636 6466 83 4661 3 354 6148 217 427 8192 9699 31 1162 9381 27 3403 166 841 3599 318 1403 413 6557 49 371 6254 4096 4819 3127 7316 498 2419 6241 2562 3782 158 961 3813 79 4209 1643 2291 3074 5002 3444 3481 4897 177 1909 61 53 9796 1891 59 1681 529 1357 2173 3233 2407 1537 2573... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "36 6\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 2 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 2\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 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\nBaby Ehab was toying around with... | [{"type": "stdin_stdout", "input": "100\n2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the easy version of the ... | [{"type": "stdin_stdout", "input": "32\n8581 2\n6058 2\n3019 2\n2151 2\n4140 2\n4553 2\n5920 2\n9883 2\n9170 2\n318 2\n1527 2\n6945 2\n5345 2\n5007 2\n6709 2\n7960 2\n7659 2\n7507 2\n7188 2\n3939 2\n4849 2\n3336 2\n7426 2\n9064 2\n4765 2\n9262 2\n9265 2\n8162 2\n8985 2\n2298 2\n9285 2\n7280 2\n", "output": "0\n0\n0\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\nThey say that Berland has exactl... | [{"type": "stdin_stdout", "input": "5\n3 4\n4 5\n1 4\n2 4\n3\n2 3\n1 3\n3 5\n", "output": "3 1 1 1\n"}, {"type": "stdin_stdout", "input": "5\n3 4\n4 5\n1 2\n2 4\n3\n2 3\n1 3\n3 5\n", "output": "3 1 1 2\n"}, {"type": "stdin_stdout", "input": "5\n3 1\n4 5\n1 4\n2 4\n3\n2 3\n1 3\n3 5\n", "output": "3 1 2 1\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\nLittle penguin Polo adores strin... | [{"type": "stdin_stdout", "input": "93563 25\n", "output": "abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIlya is a very clever lion, he l... | [{"type": "stdin_stdout", "input": "-1000000000\n", "output": "-100000000\n"}, {"type": "stdin_stdout", "input": "-1015555150\n", "output": "-101555510\n"}, {"type": "stdin_stdout", "input": "-1620057635\n", "output": "-162005763\n"}, {"type": "stdin_stdout", "input": "-1246147339\n", "output": "-124614733\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\nDima liked the present he got fr... | [{"type": "stdin_stdout", "input": "8\n7 3 3 10 9 9 8 1\n8 2 6 6 0 3 8 0\n1 2 5 1 9 4 7 8\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "8\n7 3 3 10 9 9 8 1\n8 2 4 6 0 3 8 0\n1 2 5 1 9 4 7 8\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "8\n7 3 3 10 9 9 6 1\n8 2 4 6 0 3 8 0\n1 2 5 1 9 4 7 8\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\nSereja loves number sequences ve... | [{"type": "stdin_stdout", "input": "7\n1 53989\n1 47249\n1 71935\n2 1 3\n1 84520\n1 142367\n2 6 2\n14\n1 2 3 4 5 6 7 8 9 10 11 12 13 14\n", "output": "53989 47249 71935 53989 53989 53989 84520 142367 53989 47249 71935 53989 53989 53989\n"}, {"type": "stdin_stdout", "input": "7\n1 53989\n1 47249\n1 71935\n2 1 3\n1 84520... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Queen of England has n trees... | [{"type": "stdin_stdout", "input": "50 5\n232 6 17 6 21 26 27 36 41 88 665 56 61 66 71 76 602 86 28 712 101 106 111 116 121 126 131 136 141 146 151 156 161 166 755 176 181 186 191 196 201 206 211 216 5 226 172 236 241 246\n", "output": "12\n- 1 231\n- 3 6\n+ 4 10\n+ 7 4\n- 10 42\n- 11 614\n- 17 521\n+ 19 63\n- 20 616\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\nRight now you are to solve a ver... | [{"type": "stdin_stdout", "input": "84618709 232259095 877021269 101998945\n", "output": "+4\n+3\n+2\n+4\n+3\n+1\n+2\n+3\n/4\n+4\n/3\n+1\n+3\n+4\n+1\n/4\n/2\n+3\n+4\n/2\n/3\n/3\n+3\n+2\n+4\n/1\n+3\n/2\n+4\n/1\n+2\n/3\n+1\n/4\n/3\n+2\n/3\n+4\n+1\n+2\n/3\n+3\n/1\n+2\n+1\n/4\n+1\n+3\n/2\n+2\n/2\n/1\n/3\n+3\n/3\n+1\n/4\n/3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are organizing a cycling rac... | [{"type": "stdin_stdout", "input": "65 69\n20 23\n18 33\n16 19\n9 22\n48 11\n5 57\n39 37\n60 38\n12 32\n39 49\n50 8\n55 56\n17 29\n8 24\n11 58\n38 61\n14 48\n22 15\n46 49\n51 41\n64 47\n20 6\n19 12\n51 10\n28 23\n6 45\n13 34\n53 40\n34 31\n63 19\n33 17\n47 2\n57 42\n45 60\n43 37\n24 14\n54 7\n7 31\n56 2\n46 4\n65 44\n4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA restaurant received n orders f... | [{"type": "stdin_stdout", "input": "20\n22 77\n13 50\n55 64\n16 52\n67 96\n49 51\n59 95\n2 25\n69 91\n2 24\n4 46\n50 74\n45 106\n39 55\n31 33\n9 33\n6 72\n14 67\n56 98\n69 152\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "20\n22 77\n13 50\n55 64\n16 52\n62 96\n49 51\n59 95\n2 25\n69 91\n2 24\n4 46\n50 74\n45... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 group of n cities is connected... | [{"type": "stdin_stdout", "input": "50 23129 410924\n18 28\n17 25\n21 15\n18 50\n50 11\n32 3\n44 41\n50 31\n50 34\n5 14\n36 13\n22 40\n20 9\n9 43\n19 47\n48 40\n20 22\n33 45\n35 22\n33 24\n9 6\n13 1\n13 24\n49 20\n1 20\n29 38\n10 35\n25 23\n49 30\n42 8\n20 18\n32 15\n32 1\n27 10\n20 47\n41 7\n20 14\n18 26\n4 20\n20 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\nA tree is a connected undirected... | [{"type": "stdin_stdout", "input": "11244 7 5\n", "output": "1 2\n2 3\n3 4\n4 5\n5 6\n1 7\n7 8\n1 9\n1 10\n1 11\n1 12\n1 13\n1 14\n1 15\n1 16\n1 17\n1 18\n1 19\n1 20\n1 21\n1 22\n1 23\n1 24\n1 25\n1 26\n1 27\n1 28\n1 29\n1 30\n1 31\n1 32\n1 33\n1 34\n1 35\n1 36\n1 37\n1 38\n1 39\n1 40\n1 41\n1 42\n1 43\n1 44\n1 45\n1 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\nToday Sonya learned about long i... | [{"type": "stdin_stdout", "input": "10\n+ 870566619432760298\n+ 869797178280285214\n+ 609920823721618090\n+ 221159591436767023\n+ 730599542279836538\n? 101001100111001011\n? 001111010101010011\n? 100010100011101110\n? 100110010110001100\n? 110000011101110011\n", "output": "0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe academic year has just begun... | [{"type": "stdin_stdout", "input": "50\nUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDD\n", "output": "51 102 153 204 255 306 357 408 459 510 561 612 663 714 765 816 867 918 969 1020 1071 1122 1173 1224 1275 1275 1224 1173 1122 1071 1020 969 918 867 816 765 714 663 612 561 510 459 408 357 306 255 204 153 102 51\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\nIgor found out discounts in a sh... | [{"type": "stdin_stdout", "input": "50 45\n80 125 152 122 85 62 123 195 157 73 8 127 47 193 70 132 131 38 98 115 185 98 68 166 114 53 144 106 141 106 191 123 44 199 35 18 84 169 46 52 129 102 155 130 63 169 116 145 154 41\n155 187 79 106 136 173 17 146 9 47 173 21 37 183 110 74 185 14 82 156 147 25 162 195 26 25 22 80 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Floral Clock has been standi... | [{"type": "stdin_stdout", "input": "23333\n", "output": "259575428\n"}, {"type": "stdin_stdout", "input": "49997\n", "output": "645043850\n"}, {"type": "stdin_stdout", "input": "10492\n", "output": "914991759\n"}, {"type": "stdin_stdout", "input": "30000\n", "output": "583465411\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given several queries. I... | [{"type": "stdin_stdout", "input": "100\n611\n513\n544\n463\n38\n778\n347\n317\n848\n1308\n382\n108\n718\n33\n544\n876\n234\n22\n944\n305\n159\n245\n513\n691\n639\n135\n435\n324\n813\n459\n304\n116\n331\n993\n184\n224\n853\n769\n121\n687\n93\n930\n751\n308\n485\n914\n400\n695\n95\n981\n175\n972\n121\n1007\n242\n610\n61... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nβ Thanks a lot for today.\n\nβ I... | [{"type": "stdin_stdout", "input": "100000 1000000000\n", "output": "495495496\n"}, {"type": "stdin_stdout", "input": "91454 1017443433\n", "output": "794092041\n"}, {"type": "stdin_stdout", "input": "77809 868097296\n", "output": "440411873\n"}, {"type": "stdin_stdout", "input": "67298 349286579\n", "output": "1564352... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs Will is stuck in the Upside D... | [{"type": "stdin_stdout", "input": ")?(??((???????()?(?????????)??(????????((?)?????)????)??????(?????)?)?????)??????(??()??????)????????)?)()??????????????())????????(???)??)????????????????????(?????)??)???)??(???????????????)???)??)?\n", "output": "8314\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\nAnd where the are the phone numb... | [{"type": "stdin_stdout", "input": "3 99948\nttt\n", "output": "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRachel, being an awesome android... | [{"type": "stdin_stdout", "input": "15\n27 44 85 12 100 99\n-97 -25 17 45 38 -116\n53 -15 86 32 14 -41\n-66 24 20 -29 34 17\n-83 40 -137 52 -71 114\n-34 67 -62 37 -49 75\n58 45 6 22 13 88\n75 86 -82 89 -31 -35\n34 74 -3 -113 63 -61\n-7 63 78 111 -31 -25\n-49 -49 3 92 61 -28\n-90 90 42 -92 -75 -26\n-100 -100 100 -100 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\nToday, you have been given the t... | [{"type": "stdin_stdout", "input": "1000 100\n899 100000\n202 100000\n401 100000\n45 100000\n389 100000\n551 100000\n997 100000\n920 100000\n430 100000\n534 100000\n739 100000\n320 100000\n309 100000\n641 100000\n318 100000\n665 100000\n462 100000\n635 100000\n39 100000\n331 100000\n898 100000\n711 100000\n334 100000\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\nMax feels lonely after shifting ... | [{"type": "stdin_stdout", "input": "507\n887\n778 916 794 336 387 493 650 422 363 28 691 60 764 511 541 427 173 737 125 369 568 430 783 531 863 124 83 136 930 803 23 59 70 168 394 457 12 43 230 374 422 1145 785 538 199 325 316 371 414 510 92 981 957 874 863 171 997 282 306 926 85 328 337 506 847 730 314 858 125 896 583... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHow many strings can be obtained... | [{"type": "stdin_stdout", "input": "37564\nwhydidzoudesertme", "output": "318008117\n"}, {"type": "stdin_stdout", "input": "37564\nwhxdidzoudesertme", "output": "318008117\n"}, {"type": "stdin_stdout", "input": "37564\nwhxdidzoudesertne", "output": "318008117\n"}, {"type": "stdin_stdout", "input": "37564\nwhxdiczoudese... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nN friends of Takahashi has come ... | [{"type": "stdin_stdout", "input": "5 1\n100 200 300 467 500", "output": "5\n"}, {"type": "stdin_stdout", "input": "5 2\n000 200 300 467 500", "output": "4\n"}, {"type": "stdin_stdout", "input": "5 2\n100 200 300 467 500", "output": "5\n"}, {"type": "stdin_stdout", "input": "5 2\n100 200 476 467 500", "output": "5\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N men and N women, bot... | [{"type": "stdin_stdout", "input": "21\n0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1\n1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 0\n0 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 0 0 0 1 1\n0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0\n1 1 0 0 1 0 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0\n0 1 1 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1\n0 1 0 0 0 1 0 1 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Takahashi's mind, there is al... | [{"type": "stdin_stdout", "input": "48\n-+><<><><><>>>+-<<>->>><<><<-+<>><+<<>+><-+->><<", "output": "475"}, {"type": "stdin_stdout", "input": "48\n<<>>-+-<>+><<+<>><+-<<><<>>>-><<-+>>><><><><<>+-", "output": "475"}, {"type": "stdin_stdout", "input": "48\n<<>>-+-<>+><<+<>><+-<<><<>>>-><<-+>>><><><><<>-+", "output": "47... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 say that a odd number N is si... | [{"type": "stdin_stdout", "input": "6\n1 53\n7 129\n37 55\n19 51\n103 169\n13 33", "output": "4\n4\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "6\n1 53\n7 129\n65 55\n19 51\n17 169\n13 49", "output": "4\n4\n-1\n1\n4\n2\n"}, {"type": "stdin_stdout", "input": "6\n1 53\n7 119\n37 55\n19 83\n73 39\n13 49", "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\nSnuke, who loves animals, built ... | [{"type": "stdin_stdout", "input": "10\nxooxoxooxo", "output": "SWWSSSWWSS\n"}, {"type": "stdin_stdout", "input": "10\nxxooxoxooo", "output": "SWSWWWSSSS\n"}, {"type": "stdin_stdout", "input": "10\noxooooxxox", "output": "SSWWSWWWWS\n"}, {"type": "stdin_stdout", "input": "10\nxoxxooooxo", "output": "SWWWWSWWSS\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\nAtCoDeer the deer and his friend... | [{"type": "stdin_stdout", "input": "ggpgggppgg", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggggggpppg", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggppgpgggg", "output": "2\n"}, {"type": "stdin_stdout", "input": "ggppggpggg", "output": "2\n"}, {"type": "stdin_stdout", "input": "gggpggppgg", "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\nWith the motto \"Creating your o... | [{"type": "stdin_stdout", "input": "-1 -2 9 6\n3 -2 7 6\n-1 0 9 0\n2 2 0 -1\n1 2 2 0\n-3 -1 3 1\n0 0 0 0", "output": "syo-kichi\nsyo-kichi\n"}, {"type": "stdin_stdout", "input": "-1 -2 22 6\n3 -2 7 10\n-1 0 9 0\n3 2 0 -1\n1 1 2 1\n-3 -1 3 1\n0 0 0 0", "output": "syo-kichi\nkyo\n"}, {"type": "stdin_stdout", "input": "-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\nN different natural numbers are ... | [{"type": "stdin_stdout", "input": "4\n100010 140474 4 -1", "output": "48096.8000000000\n"}, {"type": "stdin_stdout", "input": "4\n100010 215427 4 -1", "output": "63087.4000000000\n"}, {"type": "stdin_stdout", "input": "4\n100101 3026 -1 -2", "output": "103127.0000000000\n"}, {"type": "stdin_stdout", "input": "4\n11010... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCarving the cake 2 (Cake 2)\n\nJ... | [{"type": "stdin_stdout", "input": "5\n-1\n3\n2\n132\n24", "output": "134\n"}, {"type": "stdin_stdout", "input": "5\n2\n27\n-1\n12\n87", "output": "113\n"}, {"type": "stdin_stdout", "input": "5\n2\n27\n-1\n12\n88", "output": "114\n"}, {"type": "stdin_stdout", "input": "5\n-1\n6\n2\n101\n27", "output": "106\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\nThere are many caves deep in mou... | [{"type": "stdin_stdout", "input": "3\n1 0\n0 1\n-2 0\n1 0\n0 8\n-1 0\n0 -1\n5 0\n0 1\n0 -4\n1 0\n0 -5\n-3 0\n0 3\n2 0\n-1 -1\n-2 1\n0 1\n0 -1\n1 0\n0 2\n-2 -1\n0 -3\n3 1\n-1 0\n-4 0\n0 0\n-2 0\n1 0\n0 0\n-3 0\n0 0\n2 0\n0 1\n-1 0\n-1 1\n-1 0\n0 -2\n0 0", "output": "4 9\n-2 0\n-3 0\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the year 2020, a race of atom... | [{"type": "stdin_stdout", "input": "2\n2 3\n1.1946563976133233\n1 2.557093764182385 0.48719322387595776 0.3\n5\n5 6 15 20 25\n0.15\n1 1.0 0.04 1.0346326402545585\n10\n1783 3640 3991 4623 5465 5481 6369 6533 6865 8425\n5.110816362691462\n72 59.4705 0.6319554453888588 0.12728810127294996\n0", "output": "1.317231571615\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\nFair Chocolate-Cutting\n\nYou ar... | [{"type": "stdin_stdout", "input": "4\n0 0\n10 0\n14 10\n-1 10", "output": "10.0000000000\n16.4359024361\n"}, {"type": "stdin_stdout", "input": "4\n0 0\n10 0\n14 10\n0 10", "output": "10.0000000000\n16.4155227683\n"}, {"type": "stdin_stdout", "input": "4\n0 0\n10 0\n14 10\n0 19", "output": "12.9141922507\n21.3018147823... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBoolean Expression Compressor\n\... | [{"type": "stdin_stdout", "input": "0\n(a*(0*b))\n(1^a)\n(-(-a*-b)*a)\n(a^(b^(c^d)))\n.", "output": "1\n1\n2\n1\n13\n"}, {"type": "stdin_stdout", "input": "0\n(a*(1*b))\n(1^b)\n(-(-a*-b)*a)\n(a^(b^(c^d)))\n.", "output": "1\n5\n2\n1\n13\n"}, {"type": "stdin_stdout", "input": "0\n(a*(1*b))\n(0^a)\n(-(-b*-c)*a)\nca^(b^((^... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIkta has an extraordinary feelin... | [{"type": "stdin_stdout", "input": "9 8 7 8\n2 6\n4 9\n8 6\n9 2\n3 8\n2 8\n8 5\n7 9", "output": "5\n"}, {"type": "stdin_stdout", "input": "9 8 7 8\n2 6\n4 9\n8 6\n9 2\n3 8\n2 8\n8 5\n7 4", "output": "6\n"}, {"type": "stdin_stdout", "input": "9 8 7 8\n2 6\n4 9\n8 6\n9 2\n3 8\n1 8\n4 1\n7 9", "output": "7\n"}, {"type": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA: Isono, let's do that! --Senda... | [{"type": "stdin_stdout", "input": "3\ntameru\ntameru\nuremat\ntameru\nkougekida\ntameru", "output": "Nakajima-kun\n"}, {"type": "stdin_stdout", "input": "3\ntameru\ntameru\nuremat\ntameru\nadikeguok\ntameru", "output": "Hikiwake-kun\n"}, {"type": "stdin_stdout", "input": "3\ntameru\ntameru\nuremat\ntameru\nadikeguok\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\nPrint all subsets of a set $S$, ... | [{"type": "stdin_stdout", "input": "8", "output": "0:\n1: 0\n2: 1\n3: 0 1\n4: 2\n5: 0 2\n6: 1 2\n7: 0 1 2\n8: 3\n9: 0 3\n10: 1 3\n11: 0 1 3\n12: 2 3\n13: 0 2 3\n14: 1 2 3\n15: 0 1 2 3\n16: 4\n17: 0 4\n18: 1 4\n19: 0 1 4\n20: 2 4\n21: 0 2 4\n22: 1 2 4\n23: 0 1 2 4\n24: 3 4\n25: 0 3 4\n26: 1 3 4\n27: 0 1 3 4\n28: 2 3 4\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAsmany strings are strings of '0... | [{"type": "stdin_stdout", "input": "2\n12\n12", "output": "YES\nYES\n"}, {"type": "stdin_stdout", "input": "2\n12\n4", "output": "YES\nYES\n"}, {"type": "stdin_stdout", "input": "2\n18\n12", "output": "NO\nYES\n"}, {"type": "stdin_stdout", "input": "2\n12\n6", "output": "YES\nYES\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\nLet's start from some definition... | [{"type": "stdin_stdout", "input": "3\nmpei\nelepgaot\nitco", "output": "no such string\n"}, {"type": "stdin_stdout", "input": "3\nmpei\nglepeaot\nitco", "output": "no such string\n"}, {"type": "stdin_stdout", "input": "3\niepm\nglepeaot\nitco", "output": "no such string\n"}, {"type": "stdin_stdout", "input": "3\niepm\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and Alice are often particip... | [{"type": "stdin_stdout", "input": "372839920 992839201 1000000000\n100293021 1262614379 999999993\n", "output": "619999282\n"}, {"type": "stdin_stdout", "input": "372839920 992839201 1000000000\n100293021 773829394 999999993\n", "output": "619999282\n"}, {"type": "stdin_stdout", "input": "111111111 888888889 164509949... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMiyako came to the flea kingdom ... | [{"type": "stdin_stdout", "input": "10\n13 18 10 3 9 19 20 4 10 5\n20\n0 9\n5 11\n1 5\n1 16\n3 3\n0 7\n10 19\n14 20\n6 15\n11 12\n13 16\n11 13\n3 9\n7 10\n2 2\n10 11\n17 20\n17 18\n0 15\n0 6\n", "output": "27 24 22 33 9 25 27 24 27 13 20 17 24 20 9 13 20 13 33 24\n"}, {"type": "stdin_stdout", "input": "10\n13 18 10 3 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice has a string s. She really... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "ababababababababababababababababababababababababav\n", "output": "49\n"}, {"type": "stdin_stdout", "input": "ababababababababababababababababababababbbabaaabav\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\nA telephone number is a sequence... | [{"type": "stdin_stdout", "input": "2\n13\n7818005553535\n11\n31415926535\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n13\n14222439333841\n11\n31415926535\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n13\n3872943379171\n11\n45489461254\n", "output": "YES\nNO\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\nMislove had an array a_1, a_2, β
... | [{"type": "stdin_stdout", "input": "1000 20 20\n", "output": "1049555 514850815\n"}, {"type": "stdin_stdout", "input": "114 18 19\n", "output": "262239 25427967\n"}, {"type": "stdin_stdout", "input": "879 17 17\n", "output": "131933 56623103\n"}, {"type": "stdin_stdout", "input": "1000 1 20\n", "output": "1000 51485081... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 working for the Gryzzl c... | [{"type": "stdin_stdout", "input": "4\n0 0\n0 1\n1 0\n1 1\n2\n0 1 1 2\n2 5 5 8\n", "output": "4 0 0 0 1 1 0 1 1\n4 -1 -1 -1 2 2 -1 2 2\n"}, {"type": "stdin_stdout", "input": "4\n0 0\n0 1\n1 0\n1 1\n2\n0 1 1 2\n2 3 5 8\n", "output": "4 0 0 0 1 1 0 1 1 \n0 \n"}, {"type": "stdin_stdout", "input": "4\n-1 0\n0 1\n0 0\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\nBob is a competitive programmer.... | [{"type": "stdin_stdout", "input": "15\n5318008\n379009\n06\n79153975193751375917591379919397337913333535330\n791539751937513759175913799193973379133301353533\n123456789023487138475693874561834576138495713485673485364857638475673465873457346581495713641\n7915397519375137511917591379919397337913333535330\n31553555535353... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the cow has just intercep... | [{"type": "stdin_stdout", "input": "abcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcde... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the multiset of positive int... | [{"type": "stdin_stdout", "input": "10\n972 972 324 972 324 648 1944 243 324 474\n", "output": "162\n"}, {"type": "stdin_stdout", "input": "10\n61 1677 535 769 324 1309 1589 243 324 184\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "10\n61 1677 535 769 627 1309 1589 243 324 184\n", "output": "1\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\nThis year in Equestria was a yea... | [{"type": "stdin_stdout", "input": "1\n1\n34\n- 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n+ 1\n- 1\n- 1\n- 1\n- 1\n- 1\n+ 2\n+ 2\n+ 2\n+ 2\n- 1\n+ 2\n+ 2\n- 1\n+ 2\n- 1\n+ 3\n+ 3\n+ 1\n- 1\n- 2\n- 2\n- 2\n+ 1\n+ 3\n", "output": "NO\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\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\nYou are playing a very popular g... | [{"type": "stdin_stdout", "input": "5\n2 1 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n", "output": "14\n33\n25\n2000000003\n1000000001999999999\n"}, {"type": "stdin_stdout", "input": "5\n2 2 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers very m... | [{"type": "stdin_stdout", "input": "20 7\n1 4 5 8 47 777777777 1 5 4 8 5 9 5 4 7 4 5 7 7 44474\n", "output": "29172\n"}, {"type": "stdin_stdout", "input": "20 7\n1 2 5 8 47 777777777 1 5 4 8 5 9 5 4 7 4 5 7 7 44474\n", "output": "39468\n"}, {"type": "stdin_stdout", "input": "13 5\n44 44 49 44 44 44 44 44 77 102 66 99 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n - 1 integers a_2... | [{"type": "stdin_stdout", "input": "4\n14\n1 1 1 2 3 4 4 5 5 6 7 8 8\n2 3 7 7 6 9 5 9 7 3 6 6 5\n6\n1 2 2 3 4\n32 54 124 5 41\n15\n1 15 1 10 4 9 11 2 4 1 8 6 10 11\n62 13 12 43 39 65 42 86 25 38 19 19 43 62\n15\n11 2 7 6 9 8 10 1 1 1 5 3 15 2\n50 19 30 35 9 45 13 24 8 44 20 26 10 40\n", "output": "14\n106\n163\n123\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\nOmkar has received a message fro... | [{"type": "stdin_stdout", "input": "40\n2\n18 79\n3\n-95 0 95\n2\n92 85\n2\n10 22\n3\n39 66 11\n3\n99 39 87\n2\n48 46\n2\n56 2\n3\n73 76 -11\n3\n14 -34 49\n3\n83 31 10\n3\n97 28 -143\n2\n-19 -99\n3\n64 25 95\n3\n56 21 14\n2\n61 75\n2\n95 21\n2\n78 72\n2\n-111 99\n3\n9 55 -54\n2\n16 -48\n3\n84 45 76\n2\n23 78\n3\n86 90 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSensation, sensation in the two-... | [{"type": "stdin_stdout", "input": "10\nUR\nDR\nUL\nDR\nUL\nULDR\nUR\nUL\nULDR\nUL\n", "output": "45\n"}, {"type": "stdin_stdout", "input": "10\nUL\nUL\nUL\nUL\nUL\nUL\nUL\nUL\nUL\nUL\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "10\nUL\nUR\nUR\nDR\nDR\nDR\nDL\nDL\nDL\nDL\n", "output": "35\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe know that prime numbers are p... | [{"type": "stdin_stdout", "input": "22\n1 2 3 4 5 6 7 13 14 10 12752041 64 121 144 55063932582 124 42550 23756 135153365 25235235235 42351351 81\n", "output": "NO \nNO \nNO \nYES\nNO \nNO \nNO \nNO \nNO \nNO \nYES\nNO \nYES\nNO \nNO \nNO \nNO \nNO \nNO \nNO \nNO \nNO \n"}, {"type": "stdin_stdout", "input": "22\n1 2 3 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\nGena loves sequences of numbers.... | [{"type": "stdin_stdout", "input": "73\n531 626 701 57 708 511 54 441 297 697 411 253 397 652 21 59 851 561 539 461 629 894 275 417 127 960 433 243 963 247 5 368 969 541 408 485 319 117 441 131 265 357 1 659 267 983 643 285 913 782 813 569 99 781 297 636 645 341 6 17 601 129 509 197 226 105 241 737 86 128 762 647 849\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nΒ«PolygonΒ» is a system which allo... | [{"type": "stdin_stdout", "input": "10\n1 7 13 6 10 10 3 8 2 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n1 7 13 6 10 10 4 8 2 4\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n1 7 13 6 10 10 4 8 2 8\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n1 7 13 6 5 10 3 8 2 4\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\nYou are an adventurer currently ... | [{"type": "stdin_stdout", "input": "17\n.EEEEE...EEEE..EE\nEEE..E...EEEEE..E\n.E..E..EEE.EE...E\n.EEE.EE..EE...E..\nE..EEEEEE.EE.....\nE.EE...EEEEEEE.E.\nEEEE....EE..E.EEE\n...EEEEE.E..EE...\nEEE.E..EEEE.EEE..\n..E.E....EEE.....\nEE..E..E.E..EEEEE\nEEE..E.EEEEE.E...\n..EEEEE.E..EE.EE.\nEE.E...E..E..E.EE\n..E.EEE.EE..EE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n cities in Berland. E... | [{"type": "stdin_stdout", "input": "100 62 42\n45 66 13 18 93 47 83 19 41 66 5 70 16 29 54 28 65 91 92 24 90 54 7 40 77 53 68 58 70 65 68 30 94 80 16 18 69 21 94 1 99 61 97 2 69 15 79 38 61 46 88 32 57 84 35 18 17 77 38 91 84 2 53 54 68 19 13 78 62 16 63 17 76 49 28 45 94 13 35 69 37 56 12 41 95 70 57 24 45 84 87 65 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\nLet's assume that \n\n * v(n) i... | [{"type": "stdin_stdout", "input": "6\n885\n419\n821\n635\n63\n480\n", "output": "781453/1566442\n175559/352798\n674039/1351366\n403199/808942\n3959/8174\n232303/466546\n"}, {"type": "stdin_stdout", "input": "6\n1656\n419\n821\n635\n63\n480\n", "output": "1655/3314\n175559/352798\n674039/1351366\n403199/808942\n3959/81... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhile resting on the ship after ... | [{"type": "stdin_stdout", "input": "100 100\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 49 \n\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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 chessboard, and he enj... | [{"type": "stdin_stdout", "input": "8 35\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\nAfter you had helped George and ... | [{"type": "stdin_stdout", "input": "13 27 7\n1893\n370\n7320\n5753\n4418\n2146\n2702\n5013\n5959\n1929\n7611\n7013\n540\n3454\n4271\n2887\n4724\n3520\n2111\n5845\n1868\n7659\n3040\n3775\n6507\n4917\n7506\n2515\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "13 27 7\n1893\n370\n7320\n5753\n4418\n2146\n2702\n50... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBerland has n cities, the capita... | [{"type": "stdin_stdout", "input": "2 9 1 2\n1 2 1000000\n1 2 1000000\n1 2 1100000\n1 2 1000000\n1 2 2\n1 2 1000000\n1 2 1000000\n1 2 1000000\n1 2 1000000\n", "output": "CAN 999999\nCAN 999999\nCAN 1099999\nCAN 999999\nYES\nCAN 999999\nCAN 999999\nCAN 999999\nCAN 999999\n"}, {"type": "stdin_stdout", "input": "2 9 1 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\nThe Department of economic devel... | [{"type": "stdin_stdout", "input": "-1678 -814 10\n", "output": "0.011988724652885814\n-0.49709003573751037\n"}, {"type": "stdin_stdout", "input": "1000 1000 -1322\n", "output": "0.7537942414925983\n-1.7537942414925982\n"}, {"type": "stdin_stdout", "input": "1000 1000 -2375\n", "output": "1.1201851746019649\n-2.1201851... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlyona decided to go on a diet a... | [{"type": "stdin_stdout", "input": "39\n100 110 92 26 10 63 56 85 14 64 25 50 75 51 11 41 78 53 52 96 63 12 48 88 57 57 25 52 69 45 4 97 5 87 58 15 72 59 100\n35 -60\n33 -39\n1 65\n11 -65\n34 -63\n38 84\n4 76\n22 -9\n4 -91\n23 -65\n18 7\n2 -17\n29 -15\n19 26\n29 23\n14 -12\n30 -72\n9 14\n12 -1\n27 -21\n32 -67\n7 -3\n26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCaptain Bill the Hummingbird and... | [{"type": "stdin_stdout", "input": "-100000 -100000 100000 100000\n100000 100000\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-100000 -100000 100000 100000\n100000 101000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-100000 -100000 100000 110000\n100000 101000\n", "output": "NO\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\nKirill plays a new computer game... | [{"type": "stdin_stdout", "input": "6134912 6134912 10000000 10000000 999869\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "9222174 9829060 9418763 14615160 9092468\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "6134912 8670745 10000000 10000000 999869\n", "output": "NO\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\nLet quasi-palindromic number be ... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000010000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "213443120\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "153882... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "35 1001000000\n723631245 190720106 931659134 503095294 874181352 712517040 800614682 904895364 256863800 39366772 763190862 770183843 774794919 55669976 329106527 513566505 207828535 258356470 816288168 657823769 5223226 1556305467 655737365 278677545 880429272 718852999 810522025 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\nMishka is decorating the Christm... | [{"type": "stdin_stdout", "input": "1500 1500 1500\n", "output": "NO"}, {"type": "stdin_stdout", "input": "1499 1498 1500\n", "output": "NO"}, {"type": "stdin_stdout", "input": "1493 1489 1487\n", "output": "NO"}, {"type": "stdin_stdout", "input": "992 1498 1500\n", "output": "No\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\nA dragon symbolizes wisdom, powe... | [{"type": "stdin_stdout", "input": "200\n2 1 1 2 1 2 2 2 2 2 1 2 2 1 1 2 2 1 1 1 2 1 1 2 2 2 2 2 1 1 2 1 2 1 1 2 1 1 1 1 2 1 2 2 1 2 1 1 1 2 1 1 1 2 2 2 1 1 1 1 2 2 2 1 2 2 2 1 2 2 2 1 2 1 2 1 2 1 1 1 1 2 2 2 1 1 2 1 2 1 2 1 2 2 1 1 1 2 2 2 2 1 2 2 2 1 1 1 1 2 1 1 1 2 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 2 2 1 2 2 2 1 1 1 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\nPetya loves volleyball very much... | [{"type": "stdin_stdout", "input": "15 29\n6 6\n7 12 7\n11 3 7\n4 5 18\n13 9 18\n3 8 12\n6 1 7\n4 1 4\n12 5 18\n10 8 15\n2 10 1\n9 7 11\n2 4 10\n2 14 3\n15 12 14\n1 13 8\n11 4 1\n15 11 2\n1 5 9\n5 2 5\n9 10 5\n15 2 17\n11 5 1\n14 15 14\n10 1 16\n15 9 2\n13 15 6\n13 5 1\n7 12 6\n12 5 13\n8 26\n35 17\n16 14\n12 13\n21 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\nYou took a peek on Thanos wearin... | [{"type": "stdin_stdout", "input": "4\ngreen\nyellow\norange\npurple\n", "output": "2\nSpace\nReality\n"}, {"type": "stdin_stdout", "input": "4\ngreen\nyellow\norange\npurple\n", "output": "2\nSpace\nReality\n"}, {"type": "stdin_stdout", "input": "3\norange\nyellow\ngreen\n", "output": "3\nPower\nSpace\nReality\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\nLily Aldrin, as the slap bet com... | [{"type": "stdin_stdout", "input": "3\n3 1 0 7\n-1 2 -3 7\n-1 0 0 16\n\nSBMLPD", "output": "Nothing\nNothing\nPoint\n"}, {"type": "stdin_stdout", "input": "3\n-1 1 8 0\n2 3 1 5\n1 2 1 6\n\nAPMSLE", "output": "Nothing\nNothing\nNothing\n"}, {"type": "stdin_stdout", "input": "3\n-1 -1 7 5\n1 2 -1 13\n1 2 0 3\n\nSAMPLE", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDG (Departmental Gathering) is c... | [{"type": "stdin_stdout", "input": "3\n1\n16\n20\n\nEPKNCT", "output": "1\n139202068568601568785946949658348\n375476495794069216556083980357827284230304438004757733143079647458896478567196763060223492177681649114455351865758513944997504748\n"}, {"type": "stdin_stdout", "input": "3\n1\n19\n12\n\nEKRNCS", "output": "1\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\nProblem :\n\nThe Starks(S),Lanni... | [{"type": "stdin_stdout", "input": "2421\n30818\n4399\n6718\n14365\n22792\n21922\n5364\n32273\n14894\n6502\n4931\n10384\n17321\n30287\n21441\n6061\n16849\n413\n26555\n25679\n17277\n16932\n24777\n10107\n21551\n20906\n31910\n18134\n9867\n11665\n17215\n27237\n17166\n31414\n19210\n32664\n3836\n16536\n6041\n28039\n16282\n24... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKaran has decided to give sticke... | [{"type": "stdin_stdout", "input": "2\n-1\n153", "output": "0\n11781\n"}, {"type": "stdin_stdout", "input": "2\n-1\n145", "output": "0\n10585\n"}, {"type": "stdin_stdout", "input": "2\n4\n48", "output": "10\n1176\n"}, {"type": "stdin_stdout", "input": "2\n4\n82", "output": "10\n3403\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\nWe have N strings of lowercase E... | [{"type": "stdin_stdout", "input": "4\nba 5\ncba 3\na 12\nab 10", "output": "12\n"}, {"type": "stdin_stdout", "input": "4\nba 2\ncba 5\nb 21\nba 10", "output": "21\n"}, {"type": "stdin_stdout", "input": "4\nba 2\ncba 5\nb 19\nba 18", "output": "19\n"}, {"type": "stdin_stdout", "input": "4\nba 1\ncba 3\nb 15\nba 24", "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\nWe have held a popularity poll f... | [{"type": "stdin_stdout", "input": "12 3\n4 56 78 901 2 345 67 1556 123 45 6 789", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 3\n4 56 78 104 2 345 67 1145 123 45 3 789", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 3\n4 56 78 104 2 345 23 1145 123 45 3 789", "output": "Yes\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\nThere are N mountains in a circl... | [{"type": "stdin_stdout", "input": "3\n0000000000 1010000000 0", "output": "-1010000000 1010000000 1010000000\n"}, {"type": "stdin_stdout", "input": "3\n0000000000 1110000000 0", "output": "-1110000000 1110000000 1110000000\n"}, {"type": "stdin_stdout", "input": "3\n0000000000 1110000010 0", "output": "-1110000010 1110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers N and K. ... | [{"type": "stdin_stdout", "input": "150607 162", "output": "1606122089\n"}, {"type": "stdin_stdout", "input": "101525 92", "output": "2687492591\n"}, {"type": "stdin_stdout", "input": "101525 162", "output": "491806259\n"}, {"type": "stdin_stdout", "input": "35897 92", "output": "118638000\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a grid with H rows and W... | [{"type": "stdin_stdout", "input": "5 5 4\n13 25 7 15 17\n16 22 20 2 9\n14 11 12 1 19\n10 6 23 8 18\n3 21 5 24 4\n3\n13 13\n0 10\n13 13", "output": "0\n5\n0\n"}, {"type": "stdin_stdout", "input": "5 5 7\n13 25 7 15 17\n16 22 20 2 9\n14 11 12 1 19\n10 6 23 8 18\n3 21 5 24 4\n3\n13 13\n0 10\n13 13", "output": "0\n1\n0\n"... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.