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\nUh oh! Applications to tech comp... | [{"type": "stdin_stdout", "input": "100 89826\n1076 402 6 202 1196 687 966 243 1715 847 608 1446 1901 106 1622 222 864 204 1700 1001 1834 726 1158 1497 1928 1787 254 275 1788 1972 687 611 1983 1085 1876 311 1979 1845 1706 1360 528 1842 1041 1636 1276 443 895 158 725 1884 13 1916 326 406 216 1040 677 366 785 1424 596 45... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe store sells n beads. The col... | [{"type": "stdin_stdout", "input": "1\n364 1485\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeefffffffffffffffffffffffffffgggggggggggggggggggggggggggggggggggggggghhhhhhh... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 secret array. You don'... | [{"type": "stdin_stdout", "input": "5\n4 1 5\n6 27 50\n32 20 62\n8 2 11\n9 1 23\n", "output": "1 3 5 7 \n4 27 50 73 96 119 \n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 \n2 5 8 11 14 17 20 23 \n1 12 23 34 45 56 67 78 89 \n"}, {"type": "stdin_stdout", "input": "5\n6 1 5\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\nGildong has a square board consi... | [{"type": "stdin_stdout", "input": "5\n3\n000\n122\n001\n2\n57\n75\n4\n0123\n4012\n3401\n2340\n1\n9\n8\n42987101\n98289412\n38949562\n87599023\n92834718\n83917348\n19823743\n38947912\n", "output": "\n4 4 1 0 0 0 0 0 0 0\n0 0 0 0 0 1 0 1 0 0\n9 6 9 9 6 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n18 49 49 49 49 15 0 30 42 42\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\nn distinct integers x_1,x_2,…,x_... | [{"type": "stdin_stdout", "input": "6\n2 1\n1 2\n3 0\n2 3 11\n2 -1\n40263371 27182818\n2 1000000000000000000\n1 1000000000000000000\n2 -1612195815535461144\n-1000000000000000000 123\n6 141\n-5 -20 15 -14 -2 -11\n", "output": "YES\nYES\nNO\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "6\n2 1\n1 2\n3 0\n2 3 11\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a grid with n rows and ... | [{"type": "stdin_stdout", "input": "2020 2021\n", "output": "\n50657649\n"}, {"type": "stdin_stdout", "input": "1848 1937\n", "output": "337952422\n"}, {"type": "stdin_stdout", "input": "2000 2000\n", "output": "111024599\n"}, {"type": "stdin_stdout", "input": "2021 2021\n", "output": "138387540\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\nThe weight of a sequence is defi... | [{"type": "stdin_stdout", "input": "2\n4\n1 2 1 1\n4\n1 2 3 4\n", "output": "\n6\n0\n"}, {"type": "stdin_stdout", "input": "2\n4\n2 2 2 2\n4\n1 3 3 4\n", "output": "15\n4\n"}, {"type": "stdin_stdout", "input": "2\n4\n2 2 2 2\n4\n1 4 3 4\n", "output": "15\n2\n"}, {"type": "stdin_stdout", "input": "2\n4\n2 2 2 2\n4\n1 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarpus has n markers and m m... | [{"type": "stdin_stdout", "input": "6 7\n2 1\n1 1\n2 2\n1 2\n1 1\n1 2\n2 1\n1 1\n1 1\n1 1\n1 2\n2 2\n1 1\n", "output": "5 5\n"}, {"type": "stdin_stdout", "input": "6 7\n1 1\n1 1\n1 2\n1 2\n2 2\n1 2\n2 1\n2 1\n2 1\n2 1\n1 1\n1 1\n1 2\n", "output": "3 3\n"}, {"type": "stdin_stdout", "input": "6 7\n2 1\n2 2\n2 1\n1 1\n2 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY love... | [{"type": "stdin_stdout", "input": "4\n-64322865 -60701256 -53458038 -42593211 -38971602 -31728384 -24485166 -17241948 -2755512 4487706 11730924 18974142 22595751 33460578 40703796 44325405\n", "output": "-39994920\n-60701256 -64322865 44325405 40703796\n-2755512 33460578 -53458038 -17241948\n18974142 -31728384 1173092... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFormula One championship consist... | [{"type": "stdin_stdout", "input": "1\n50\nJamesHunt\nNakajima\nHakkinen\nScheckter\nJones\nHill\nHawthorn\nVettel\nHulkenberg\nSutil\nGlock\nWebber\nAlbertoAscari\nMensel\nBuemi\nKubica\ndiGrassi\nJimClark\nKovalainen\nTrulli\nBarichelo\nSurtees\nJackieStewert\nLauda\nRaikkonen\nVilleneuve\nFangio\nButton\nDeLaRosa\nP... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a tradition, every year befor... | [{"type": "stdin_stdout", "input": "1000000001101010101011111001001101011100011000010000100101001111001000110100100001110001100001000001\n", "output": "759144998\n"}, {"type": "stdin_stdout", "input": "1000001010111011110011111110011001011111011001110011100101111110100110111001100001110000011101011011\n", "output": "92... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 will receive 3 points for so... | [{"type": "stdin_stdout", "input": "CCCTTCACCCGGATCCAAATCCCTTAGAAATAATCCCCGACGGCGTTGTATCACCTCTGCACTTGTTAGTAAGGTCAGGCGTCCATTACGGAAGAACGTA\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "GCATTACATGGGGGGGTCCTACGAGCCCGGCATCCCGGAAACTAGCCGGTTAATTTGGTTTAAACCCTCCCACCCCGGATTGTAACCCCCCTCATTGGTT\n", "output": "17\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\nOne of the most important produc... | [{"type": "stdin_stdout", "input": "gerald.agapov1991@gmail.com\n", "output": " 18"}, {"type": "stdin_stdout", "input": "x@x.x@x.x_e_@r1.com\n", "output": " 8"}, {"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\nVasya decided to write an anonym... | [{"type": "stdin_stdout", "input": "kKhuIwRPLCwPFfcnsyCfBdnsraGeOCcLTfXuGjqFSGPSAeDZJSS bXKFanNqWjpFnvRpWxHJspvisDlADJBioxXNbVoXeUedoPcNEpUyEeYxdJXhGzFAmpAiHotSVwbZQsuWjIVhVaEGgqbZHIoDpiEmjTtFylCwCkWWzUOoUfOHxEZvDwNpXhBWamHn\nK VpJjGhNbwCRhcfmNGVjewBFpEmPlIKeTuWiukDtEWpjgqciqglkyNfWrBLbGAKvlNWxaUelJmSlSoakSpRzePvJsshOs... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 denote as <image> the numb... | [{"type": "stdin_stdout", "input": "18\n0 18\n1 101\n1 1001\n0 10000\n2 100000\n1 1001010\n1 10000000\n1 100000001\n1 1000000000\n1 10000010000\n1 100000000000\n0 1100000000000\n2 10000100000000\n0 100000000000000\n1 1000100000000000\n1 10000000000000000\n1 100000000000000001\n2 1000000000000000100\n", "output": "15\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\nVasya had a strictly increasing ... | [{"type": "stdin_stdout", "input": "100\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n6\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\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\nAmr bought a new video game \"Gu... | [{"type": "stdin_stdout", "input": "4 3\n4 10 14 1\n3 7 6 0\n2 3 3 1\n", "output": "Data not sufficient!\n"}, {"type": "stdin_stdout", "input": "4 3\n4 10 26 1\n3 7 6 0\n2 3 3 1\n", "output": "Data not sufficient!\n"}, {"type": "stdin_stdout", "input": "4 3\n4 10 23 1\n3 7 6 0\n2 3 3 1\n", "output": "Data not sufficien... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKolya loves putting gnomes at th... | [{"type": "stdin_stdout", "input": "100000\n", "output": "192156836"}, {"type": "stdin_stdout", "input": "10701\n", "output": "198227529\n"}, {"type": "stdin_stdout", "input": "10010\n", "output": "495680028\n"}, {"type": "stdin_stdout", "input": "62113\n", "output": "786955632\n"}, {"type": "stdin_stdout", "input": "4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Cybernetics Failures (CF) or... | [{"type": "stdin_stdout", "input": "15 17 8 9\nURRDLUULLDDDRRURR\n", "output": "1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 241 "}, {"type": "stdin_stdout", "input": "15 17 7 9\nURRDLUULLDDDRRURR\n", "output": "1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 241\n"}, {"type": "stdin_stdout", "input": "15 17 1 9\nURRDLUULLDDDRRURR\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\nJohny likes numbers n and k very... | [{"type": "stdin_stdout", "input": "1000000010 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1398941105 1000000001\n", "output": "2000000002\n"}, {"type": "stdin_stdout", "input": "1000100010 1000010000\n", "output": "2000020000\n"}, {"type": "stdin_stdout", "input": "1000100010 110001000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 vacations n pupils decided to... | [{"type": "stdin_stdout", "input": "10000 1000000000 999999999 1000000000 3\n", "output": "1.000000000999700060987552535\n"}, {"type": "stdin_stdout", "input": "10000 1000000000 999999999 1000000000 1\n", "output": "1.000000000999900000999850006\n"}, {"type": "stdin_stdout", "input": "10000 1 999999999 1000000000 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 an array consistin... | [{"type": "stdin_stdout", "input": "7\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1 2 3 4 5 6 7\n", "output": "6000000000\n5000000000\n4000000000\n3000000000\n2000000000\n1000000000\n0\n"}, {"type": "stdin_stdout", "input": "7\n1000000000 1000000000 1000000000 1000000100 1000000000 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\nHongcow is ruler of the world. A... | [{"type": "stdin_stdout", "input": "24 38 2\n4 13\n7 1\n24 1\n2 8\n17 2\n2 18\n22 2\n23 3\n5 9\n21 5\n6 7\n6 19\n6 20\n11 7\n7 20\n13 8\n16 8\n9 10\n14 9\n21 9\n12 10\n10 22\n23 10\n17 11\n11 24\n20 12\n13 16\n13 23\n15 14\n17 14\n14 20\n19 16\n17 20\n17 23\n18 22\n18 23\n22 19\n21 20\n23 24\n", "output": "215\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\nBear Limak examines a social net... | [{"type": "stdin_stdout", "input": "20 80\n17 4\n10 1\n11 10\n17 7\n15 10\n14 15\n13 1\n18 13\n3 13\n12 7\n9 13\n10 12\n14 12\n18 11\n4 7\n10 13\n11 3\n19 8\n14 7\n10 17\n14 3\n7 11\n11 14\n19 5\n10 14\n15 17\n3 1\n9 10\n11 2\n4 1\n11 4\n12 1\n12 3\n13 7\n1 14\n11 12\n7 1\n9 12\n18 15\n17 3\n7 15\n4 10\n7 18\n3 9\n12 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\nConsider the function p(x), wher... | [{"type": "stdin_stdout", "input": "4 1000000000000000000\n612929642 983621174 279363954 332455288\n", "output": "2137\n"}, {"type": "stdin_stdout", "input": "4 1000000000000000000\n612929642 983621174 97116392 332455288\n", "output": "2137\n"}, {"type": "stdin_stdout", "input": "18 1000000000000000000\n1 0 0 0 0 0 0 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a building where Polycarp liv... | [{"type": "stdin_stdout", "input": "50 70\n3 3\n80 80\n23 23\n11 11\n87 87\n7 7\n63 63\n61 61\n67 67\n53 53\n9 9\n43 43\n55 55\n27 27\n5 5\n1 1\n99 99\n65 65\n37 37\n60 60\n32 32\n38 38\n81 81\n2 2\n34 34\n17 17\n82 82\n26 26\n71 71\n4 4\n16 16\n19 19\n39 39\n51 51\n6 6\n49 49\n64 64\n83 83\n10 10\n56 56\n30 30\n76 76\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValentin participates in a show ... | [{"type": "stdin_stdout", "input": "15\n. r\n? e\n. s\n. rw\n? y\n. fj\n. zftyd\n? r\n! wq\n? w\n? p\n. ours\n. dto\n. lbyfru\n? q\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "15\n. r\n? e\n. s\n. rw\n? y\n. fj\n. zftyd\n? r\n! qw\n? w\n? p\n. ours\n. dto\n. lbyfru\n? q\n", "output": "2\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a rectangular grid of n... | [{"type": "stdin_stdout", "input": "50 8\n.....#..\n........\n........\n.....#..\n.....#..\n........\n........\n........\n........\n...#....\n...#....\n........\n...#....\n#.#.#...\n...#....\n...#....\n........\n...#....\n...#....\n...#....\n........\n#.#.#...\n.....#..\n........\n#.#.#...\n#.#.#...\n#.#.#...\n...#....... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the Bus of Characters there a... | [{"type": "stdin_stdout", "input": "10\n24 53 10 128 141 9 15 62 32 47\n00100000000111111111\n", "output": "6 3 3 7 1 9 10 2 8 4 5 5 4 8 2 10 9 1 7 6\n"}, {"type": "stdin_stdout", "input": "10\n24 53 10 128 141 9 15 97 32 47\n00100000000111111111\n", "output": "6 3 3 7 1 9 10 2 8 4 5 5 4 8 2 10 9 1 7 6\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRahul and Rashi are bored with p... | [{"type": "stdin_stdout", "input": "216\n88 0\n452 823\n549 562\n790 873\n114 186\n216 75\n620 414\n870 68\n657 802\n358 735\n757 593\n662 481\n700 339\n885 256\n1030 398\n370 939\n837 517\n519 150\n897 829\n822 76\n110 134\n241 367\n507 63\n241 807\n25 445\n440 802\n933 167\n588 798\n511 979\n256 565\n359 14\n805 1303... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 us define F(N,K) be number o... | [{"type": "stdin_stdout", "input": "1000\n1000 0\n1000 1\n1000 2\n1000 3\n1000 4\n1000 5\n1000 6\n1000 7\n1000 8\n1000 9\n1000 10\n1000 11\n1000 12\n1000 13\n1000 14\n1000 15\n1000 16\n1000 17\n1000 18\n1000 19\n1000 20\n1000 21\n1000 22\n1000 23\n1000 24\n1000 25\n1000 26\n1000 27\n1000 28\n1000 29\n1000 30\n1000 31\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\nN coders decided to go for a tri... | [{"type": "stdin_stdout", "input": "1\n12 0\n-1 41\n\nENPTAO", "output": "4095\n"}, {"type": "stdin_stdout", "input": "1\n15 1\n1 14\n\nSAMPKE", "output": "24575\n"}, {"type": "stdin_stdout", "input": "1\n13 0\n-2 43\n\nEMPTBP", "output": "8191\n"}, {"type": "stdin_stdout", "input": "1\n15 0\n1 11\n\nSAMPKE", "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 Oz is playing with his gam... | [{"type": "stdin_stdout", "input": "2\n26 14 1911 581 510\n0 5 10 -20 -43\n\nSAMPKD", "output": "57820\n-100\n"}, {"type": "stdin_stdout", "input": "2\n26 15 1911 581 510\n0 5 10 -20 -43\n\nSAKPMD", "output": "58401\n-100\n"}, {"type": "stdin_stdout", "input": "2\n26 15 1911 581 510\n0 5 10 -25 -43\n\nSAKPMD", "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\nIt's the rainy season again, and... | [{"type": "stdin_stdout", "input": "10\n0.18645496223766345 360\n0.17989902622977394 360\n0.45262248490623425 360\n0.04663296744034651 360\n0.12725823257381275 360\n0.2895663014860297 48\n0.05625277914818627 360\n0.11455689444280615 360\n0.46003084917418513 360\n0.17986394802612649 360", "output": "0.0503\n0.0484\n0.13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the minimum prime number gr... | [{"type": "stdin_stdout", "input": "99992", "output": "100003"}, {"type": "stdin_stdout", "input": "1171", "output": "1171\n"}, {"type": "stdin_stdout", "input": "1154", "output": "1163\n"}, {"type": "stdin_stdout", "input": "1955", "output": "1973\n"}, {"type": "stdin_stdout", "input": "1040", "output": "1049\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\nWe have a sequence of N integers... | [{"type": "stdin_stdout", "input": "8 57\n-1 26 2 0 2 2 20 2", "output": "53\n"}, {"type": "stdin_stdout", "input": "8 26\n0 22 2 1 0 2 16 3", "output": "46\n"}, {"type": "stdin_stdout", "input": "8 26\n0 22 2 1 1 2 16 3", "output": "47\n"}, {"type": "stdin_stdout", "input": "8 26\n0 25 2 1 1 2 16 3", "output": "50\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 simple connected... | [{"type": "stdin_stdout", "input": "18 27\n17 9\n12 15\n18 17\n13 18\n13 1\n5 7\n12 1\n14 5\n15 11\n14 6\n1 9\n5 1\n18 16\n4 6\n7 2\n7 11\n6 3\n12 14\n5 3\n10 5\n5 8\n10 15\n3 15\n9 8\n7 15\n2 16\n18 15", "output": "No\n"}, {"type": "stdin_stdout", "input": "18 15\n17 9\n12 15\n18 17\n13 18\n13 1\n5 7\n12 1\n14 5\n15 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 N gemstones labeled 1 th... | [{"type": "stdin_stdout", "input": "6\n100 -100 -100 -100 100 -100", "output": "200"}, {"type": "stdin_stdout", "input": "6\n000 -100 -100 -100 100 -100", "output": "100"}, {"type": "stdin_stdout", "input": "6\n111 4 -314 -1477 110 -128", "output": "225"}, {"type": "stdin_stdout", "input": "6\n111 4 -314 -3247 100 -161... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNukes has an integer that can be... | [{"type": "stdin_stdout", "input": "271828182845904523\n1128816364578546661", "output": "881093321760942453\n"}, {"type": "stdin_stdout", "input": "271828182845904523\n1080587834201094862", "output": "881093321760942453\n"}, {"type": "stdin_stdout", "input": "271828182845904523\n1104519973481288013", "output": "8810933... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 boxes arranged in a ... | [{"type": "stdin_stdout", "input": "-2 124\n10 2 2 6 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "-2 124\n10 1 2 6 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "-2 189\n10 1 2 6 3", "output": "0\n"}, {"type": "stdin_stdout", "input": "-1 124\n10 2 2 6 3", "output": "0\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\nHiroshi:? D-C'KOPUA\n\nPeter: Wh... | [{"type": "stdin_stdout", "input": "?DKC'-OPUB", "output": "PES WP E EIERD\n"}, {"type": "stdin_stdout", "input": "?DKC'-OPUA", "output": "PES WP E EIER\n"}, {"type": "stdin_stdout", "input": ".UPDL'BCN?", "output": "EP.PD IP?DSPP\n"}, {"type": "stdin_stdout", "input": ".UQDL'BCN?", "output": "EPF'K PEWLEPP\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\nBetter things, cheaper. There is... | [{"type": "stdin_stdout", "input": "6 5\n1 1 . 0 0 4\n1 . . . . .\n. . 2 2 . .\n. . 2 2 3 3\nP . - . . .\n5\n0 50 5 10\n1 20 0 10\n2 10 5 15\n3 150 3 10\n4 100 8 9\n0 0", "output": "330\n"}, {"type": "stdin_stdout", "input": "6 5\n1 0 . 0 0 4\n1 . . . . .\n. . 2 2 . .\n. . 2 2 3 3\nP . . . . .\n5\n0 50 8 10\n1 20 0 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\nThere are n cups of different si... | [{"type": "stdin_stdout", "input": "3 10\n0\n1 1\n2 2 3\n4 13\n1 1 2\n1 3\n1 4\n1 5\n2 1 2\n0\n0\n3 6\n0\n1 1\n2 2 3\n0 0", "output": "9\n-1\n0\n-1\n"}, {"type": "stdin_stdout", "input": "3 10\n0\n1 1\n2 2 3\n4 20\n2 1 2\n1 3\n1 4\n1 5\n2 1 2\n0\n0\n3 3\n0\n1 1\n2 2 3\n0 0", "output": "9\n3\n0\n-1\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBackground\n\nMr. A and Mr. B ar... | [{"type": "stdin_stdout", "input": "4 3\nS..\n/..\n..G\n../\n4\n2\n\n.#\n\n.#\n0\n\n..\n..\n\n8\n\n-#\n\n..\n10\n\n..\n..", "output": "4\n"}, {"type": "stdin_stdout", "input": "4 3\nS..\n/..\n.G.\n./.\n8\n0\n\n.\"\n\n.#\n2\n\n..\n..\n\n2\n\n#.\n\n..\n16\n\n..\n..", "output": "3\n"}, {"type": "stdin_stdout", "input": "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\nEdward Leven loves multiples of ... | [{"type": "stdin_stdout", "input": "17819\n1011\n11011\n1234567891011121314151617181920\n0", "output": "1\n1\n4\n38\n"}, {"type": "stdin_stdout", "input": "17819\n1010\n11011\n1234567891011121314151617181920\n0", "output": "1\n0\n4\n38\n"}, {"type": "stdin_stdout", "input": "17819\n1011\n11011\n130083111483873165421240... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n2 2 2 0 0 0 ... | [{"type": "stdin_stdout", "input": "2 2 4 1 0 1 35", "output": "1 4 6 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "1 1 4 0 0 0 24", "output": "1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "1 1 4 0 0 1 24", "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\nA: Alphabet block\n\nWakana Naka... | [{"type": "stdin_stdout", "input": "gcpc", "output": "1\n"}, {"type": "stdin_stdout", "input": "bgnc", "output": "2\n"}, {"type": "stdin_stdout", "input": "gcoc", "output": "1\n"}, {"type": "stdin_stdout", "input": "gcnc", "output": "1\n"}, {"type": "stdin_stdout", "input": "cgnc", "output": "1\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nC: Skewering\n\nproblem\n\nOne d... | [{"type": "stdin_stdout", "input": "28 11 20", "output": "Tem\n"}, {"type": "stdin_stdout", "input": "28 11 17", "output": "Hom\n"}, {"type": "stdin_stdout", "input": "54 11 17", "output": "Hom\n"}, {"type": "stdin_stdout", "input": "12 6 20", "output": "Tem\n"}, {"type": "stdin_stdout", "input": "24 6 20", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which manipulate... | [{"type": "stdin_stdout", "input": "9 20\n0 0 0 0\n0 1 2 8\n0 0 2 2\n1 0 3\n1 1 2", "output": "2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "9 20\n0 0 0 0\n0 0 2 8\n0 0 0 2\n1 1 3\n1 1 2", "output": "8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n8\n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour friend is developing a comp... | [{"type": "stdin_stdout", "input": "50 72\n35 38\n19 46\n35 12\n27 30\n23 41\n50 16\n31 6\n20 33\n38 1\n10 35\n13 43\n29 25\n25 4\n1 13\n4 20\n36 29\n13 47\n48 5\n30 21\n30 38\n28 50\n41 45\n25 43\n40 36\n19 47\n31 32\n26 28\n8 13\n43 24\n27 35\n14 29\n14 38\n50 9\n34 49\n12 34\n43 42\n41 15\n46 29\n48 11\n48 7\n40 29\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is choosing a laptop. The ... | [{"type": "stdin_stdout", "input": "27\n1689 1927 40 270\n3833 2570 167 134\n2580 3589 390 300\n1898 2587 407 316\n1841 2772 411 187\n1296 288 407 506\n1215 263 236 307\n2737 1427 84 992\n1107 1879 284 866\n3311 2507 475 147\n2951 2214 209 375\n1352 2582 110 324\n2082 747 289 521\n2226 1617 209 108\n2253 1993 109 835\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob are decorating a C... | [{"type": "stdin_stdout", "input": "100 100 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "156 101 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "156 111 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "99 100 100\n", "output": "297\n"}, {"type": "stdin_stdout", "input": "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\nPetya loves lucky numbers. We al... | [{"type": "stdin_stdout", "input": "777777776 778777777 777777775 1000000000 1\n", "output": "0.00000201349596377857\n"}, {"type": "stdin_stdout", "input": "987654215 1000000000 9854874 854888120 270\n", "output": "0.00000003195140557588\n"}, {"type": "stdin_stdout", "input": "777777776 992178143 529475309 1000000000 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya got interested in grammar ... | [{"type": "stdin_stdout", "input": "fbvzqonvdlqdanwliolaqfj sbauorbinites xkbfnfinitespjy phbexglblzpobtqpisyijycmtliola aosinites lbpjiwcjoqyuhglthloiniteswb mjtxhoofohzzgefvhsywojcuxtetxmojrlktodhbgyrkeejgjzxkzyvrxwmyaqkeoqnvusnlrsfffrzeoqjdfumolhksqkrtzwhnforgpenziokrxlnhcapbbupctlmuetrani pigxerwetupjbkvlmgnjhdfjli... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 square grid of size n... | [{"type": "stdin_stdout", "input": "1000 24\n190 39 552 958\n539 146 763 587\n31 526 423 673\n208 432 953 442\n263 69 719 635\n162 428 623 797\n49 126 94 963\n749 623 979 919\n190 461 367 855\n211 240 939 914\n169 80 336 203\n684 546 829 582\n80 218 324 327\n560 452 656 637\n316 534 982 642\n521 634 758 686\n514 324 75... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonocarp and Bicarp live in Berl... | [{"type": "stdin_stdout", "input": "396\n???7?2675?2??52554870???512418???29?6270?638470?154?339014?59??5?3?51577??8?2???1441?86???90?7?6?472??3675?4??1920?9??6258??16362?979??707?0?05682730650?08???04005?54?355??4???530?5?1?9?84416??5???80??8102??2??8??3??868?18?304????68?91225?047175??4??8?14593???58?05661?9?0??4?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\nAssume that you have k one-dimen... | [{"type": "stdin_stdout", "input": "1\n10\n1 2\n1 3\n2 4\n2 5\n2 6\n3 7\n3 8\n4 9\n4 10\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "1\n10\n1 2\n2 3\n1 4\n2 5\n4 6\n6 7\n3 8\n4 9\n4 10\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "1\n10\n1 2\n1 3\n1 4\n2 5\n2 6\n6 7\n1 8\n4 9\n4 10\n", "output"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are the gym teacher in the s... | [{"type": "stdin_stdout", "input": "22\n100 100 100 1\n100 100 1 100\n100 0 100 1\n100 0 1 100\n2 0 1 2\n2 100 1 2\n2 0 2 1\n2 100 2 1\n100 0 1 2\n100 98 1 2\n100 97 1 2\n100 0 2 1\n100 98 2 1\n100 97 2 1\n100 0 99 100\n100 98 99 100\n100 97 99 100\n100 0 100 99\n100 98 100 99\n100 97 100 99\n100 0 13 37\n100 0 66 11\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are an all-powerful being an... | [{"type": "stdin_stdout", "input": "4\n7 8\nAAP@AABA\nPPPPAAAA\nPPPPAAAA\nAPAAPPPP\nAPAPPAPP\nAAAAPPAP\nAAAAPPAA\n6 5\nAAAAA\nAAAAA\nAAPAA\nAAPAP\nAAAPP\nAAAOP\n4 4\nPPPP\nPPPP\nPPPP\nPPPP\n1 4\nPPPP\nPA@P\nPPPP\n", "output": "2\n1\nMORTAL\nMORTAL\n"}, {"type": "stdin_stdout", "input": "4\n7 8\nAAPAAAAA\nPPPPAAAA\nPPPP... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGuy-Manuel and Thomas have an ar... | [{"type": "stdin_stdout", "input": "1\n100\n64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 -64 64 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "15\n16\n1 1 1 1 1 1 1 1 1 1 1 1 5 12 12 14\n18\n12 14 12 15 17 16 11 5 15 15 7 15 15 14 16 16 11 11\n13\n4 9 11 7 13 9 10 1 3 7 12 5 9\n3\n3 2 2\n6\n6 3 2 2 3 1\n20\n2 2 4 4 5 5 5 5 5 5 5 5 5 5 6 8 10 12 12 17\n25\n1 1 6 10 8 8 9 10 14 16 16 16 16 16 16 16 16 16 16 16 16 18 21 21 23\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently Vova found n candy wrap... | [{"type": "stdin_stdout", "input": "53\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAshish has n elements arranged i... | [{"type": "stdin_stdout", "input": "10\n8\n94616 28275 43594 32192 68030 82703 84250 96281\n1 0 0 0 0 0 0 0\n5\n28821 83833 62399 69723 77684\n1 1 0 1 1\n8\n115822 94805 71389 67802 43519 34364 17842 98783\n0 1 0 1 0 1 0 0\n3\n63630 83145 89435\n1 1 1\n5\n66195 67879 10777 54269 80789\n1 1 1 1 0\n8\n42696 26113 2424 33... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo help those contestants who st... | [{"type": "stdin_stdout", "input": "4\n6\n1 1 2 3 1 1\n5\n1 1 1 2 2\n8\n7 7 2 7 7 1 4 7\n10\n1 2 3 10 1 1 2 3 4 1\n", "output": "-1\n3\n-1\n2\n"}, {"type": "stdin_stdout", "input": "4\n6\n2 1 2 3 1 1\n5\n1 1 1 2 2\n8\n7 7 2 7 7 1 8 7\n10\n1 2 3 4 1 1 2 3 4 1\n", "output": "\n1\n3\n-1\n2\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\nDuring cleaning the coast, Alice... | [{"type": "stdin_stdout", "input": "5\n3\n1 2 1\n3\n1 1 2\n5\n2 2 2 1 3\n5\n2100 1900 1600 3000 1600\n2\n2443 2445\n", "output": "\nYES\nYES\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "5\n3\n1 2 1\n3\n1 1 2\n5\n2 2 2 1 3\n5\n2100 1900 1600 3000 1600\n2\n2443 1129\n", "output": "YES\nYES\nYES\nYES\nNO\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\nA boy Bob likes to draw. Not lon... | [{"type": "stdin_stdout", "input": "50 1\n.\n*\n*\n*\n.\n.\n*\n.\n*\n*\n*\n*\n*\n*\n*\n.\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n.\n.\n.\n.\n*\n*\n.\n*\n*\n.\n.\n.\n.\n*\n*\n.\n.\n.\n.\n.\n.\n", "output": "*\n*\n*\n.\n.\n*\n.\n*\n*\n*\n*\n*\n*\n*\n.\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n.\n.\n.\n.\n*\n*\n.\n*\n*\n.\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY plan... | [{"type": "stdin_stdout", "input": "26 919241245\n302193 763904252\n302152 990010704\n453347 786598325\n302156 614790744\n151113 552970041\n151053 935503943\n453339 788648514\n453340 819457698\n604398 992471599\n453342 141598754\n302166 998869126\n151098 158907792\n453293 724150038\n604414 436248800\n604434 447578562\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 Free Meteor Association (FMA... | [{"type": "stdin_stdout", "input": "6 5 30\n536048 34640 572197 62457 304174\n194764 325606 270468 784237 551632\n10580 294606 63164 543647 531895\n430397 576813 678878 323394 603231\n534567 804015 403517 886087 981939\n518845 962097 609792 877955 88610\nc 1 5\nc 2 5\nc 2 5\nr 5 3\nc 5 2\nc 4 5\nr 6 5\nc 2 1\nr 3 4\nr ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 seems like the year of 2013 c... | [{"type": "stdin_stdout", "input": "1987\n", "output": "2013\n"}, {"type": "stdin_stdout", "input": "2013\n", "output": "2014\n"}, {"type": "stdin_stdout", "input": "1594\n", "output": "1596\n"}, {"type": "stdin_stdout", "input": "5090\n", "output": "5091\n"}, {"type": "stdin_stdout", "input": "3000\n", "output": "3012... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBeing a nonconformist, Volodya i... | [{"type": "stdin_stdout", "input": "1000000000000 1000000000000\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 1276759536556\n", "output": "1553519073112\n"}, {"type": "stdin_stdout", "input": "1000100000000 1000000000000\n", "output": "999900000000\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\n<image>\n\nInput\n\nThe input co... | [{"type": "stdin_stdout", "input": "4.472136\n", "output": "10 10\n"}, {"type": "stdin_stdout", "input": "4.239992\n", "output": "10 8\n"}, {"type": "stdin_stdout", "input": "0.499376\n", "output": "1 10\n"}, {"type": "stdin_stdout", "input": "1.483405\n", "output": "3 10\n"}, {"type": "stdin_stdout", "input": "4.06866... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nATMs of a well-known bank of a s... | [{"type": "stdin_stdout", "input": "58 5\n1 6 9 18 34 41 82 99 164 179 183 204 240 396 636 1224 2023 2856 4488 4705 5712 9180 9266 18360 18850 20270 23086 60810 190701 197064 211140 214200 222970 243240 263510 314442 425670 486480 708288 789888 1009800 1025349 1054040 1094580 1325184 1579776 1748076 2050698 2635100 289... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Vasya the Hipster decide... | [{"type": "stdin_stdout", "input": "171 100\n", "output": "100 35\n"}, {"type": "stdin_stdout", "input": "171 110\n", "output": "110 30\n"}, {"type": "stdin_stdout", "input": "287 100\n", "output": "100 93\n"}, {"type": "stdin_stdout", "input": "287 101\n", "output": "101 93\n"}, {"type": "stdin_stdout", "input": "100 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPeople do many crazy things to s... | [{"type": "stdin_stdout", "input": "133 51\n", "output": "1613157\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 66... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 progress bar is an element of ... | [{"type": "stdin_stdout", "input": "100 101 100\n", "output": "101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 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\nEach New Year Timofey and his fr... | [{"type": "stdin_stdout", "input": "10\n5 7\n4 5\n10 2\n4 6\n1 2\n3 4\n8 5\n4 9\n2 3\n15 15 15 15 5 15 26 18 15 15\n", "output": "YES\n5\n"}, {"type": "stdin_stdout", "input": "10\n5 7\n4 5\n10 2\n4 6\n1 2\n3 4\n8 5\n4 9\n2 3\n15 15 15 15 5 15 42 18 15 15\n", "output": "YES\n5\n"}, {"type": "stdin_stdout", "input": "10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHelen works in Metropolis airpor... | [{"type": "stdin_stdout", "input": "10 6\n2226 89307 11261 28772 23196 30298 10832 43119 74662 24028\n", "output": "1246672\n16 7 14 11 13 10 15 8 9 12 \n"}, {"type": "stdin_stdout", "input": "10 5\n66220 81797 38439 54881 86879 94346 8802 59094 57095 41949\n", "output": "2484818\n9 8 14 12 7 6 15 10 11 13 \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\nIt seems that Borya is seriously... | [{"type": "stdin_stdout", "input": "42\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n", "output": "83\n"}, {"type": "stdin_stdout", "input": "42\n1 2\n1 2\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSasha is taking part in a progra... | [{"type": "stdin_stdout", "input": "10\n1 1 147 102 112 103 114 112 112 295 109\n", "output": "ambiguous\n0 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem you will write a... | [{"type": "stdin_stdout", "input": "!\"#$%&'()*\n", "output": "..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\n..\nX.\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\nView Russian Translation\n\nOne ... | [{"type": "stdin_stdout", "input": "7 1 124\n\nDTPLAL", "output": "-0.11\n"}, {"type": "stdin_stdout", "input": "4 -1 0\n\nR@MQFL", "output": "-1.00\n"}, {"type": "stdin_stdout", "input": "11 3 77\n\nDSPL@M", "output": "0.37\n"}, {"type": "stdin_stdout", "input": "4 -2 0\n\nR@MQFL", "output": "-2.00\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter solving Reese's first prob... | [{"type": "stdin_stdout", "input": "400\n44\n18470\n6337\n26503\n19172\n15727\n11481\n29361\n26965\n24467\n5708\n28148\n23284\n16830\n9964\n494\n2998\n11945\n4830\n5439\n32394\n14607\n3905\n156\n295\n12385\n17424\n18719\n19721\n19898\n5450\n21729\n14774\n11541\n1872\n19915\n25670\n26302\n17038\n9897\n28706\n23814\n3132... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is an integer N. Find the ... | [{"type": "stdin_stdout", "input": "150916391", "output": "67547447\n"}, {"type": "stdin_stdout", "input": "116446379", "output": "20549361\n"}, {"type": "stdin_stdout", "input": "39730771", "output": "39730770\n"}, {"type": "stdin_stdout", "input": "71266519", "output": "17269679\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 playing a game and your ... | [{"type": "stdin_stdout", "input": "10\n710714906537 801526060256 134858704333 970632701383 344124734627 780768757320 1205627779029 145838269002 9231169966 485814502387\n31 83 57 11 001 30 10 91 15 28", "output": "1205627778393.899999976158\n"}, {"type": "stdin_stdout", "input": "10\n710714906537 223115971783 134858704... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is a lowercase English let... | [{"type": "stdin_stdout", "input": "z", "output": "{\n"}, {"type": "stdin_stdout", "input": "b", "output": "c\n"}, {"type": "stdin_stdout", "input": "x", "output": "y\n"}, {"type": "stdin_stdout", "input": "`", "output": "a\n"}, {"type": "stdin_stdout", "input": "w", "output": "x\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\nGiven are two strings s and t co... | [{"type": "stdin_stdout", "input": "contest\nprogrammhng", "output": "-1\n"}, {"type": "stdin_stdout", "input": "eontcst\nprogrammhng", "output": "-1\n"}, {"type": "stdin_stdout", "input": "eonscst\nprogrammhng", "output": "-1\n"}, {"type": "stdin_stdout", "input": "eonscst\nprogrammhog", "output": "-1\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Dwango Co., Ltd., there is a ... | [{"type": "stdin_stdout", "input": "54\nDIALUPWIDEAREADETWORKGAMINGOPERATIONCORPORATIONLIMITEN\n3\n20 30 40", "output": "0\n2\n3\n"}, {"type": "stdin_stdout", "input": "54\nDIALUPWIDEAREADETWORKGAMINGOPERATIONCORPORATIONLIMITEN\n3\n20 38 40", "output": "0\n3\n3\n"}, {"type": "stdin_stdout", "input": "54\nDIALUPWIDEAREA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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.\n\nTak... | [{"type": "stdin_stdout", "input": "ARAABHAIKAA", "output": "NO\n"}, {"type": "stdin_stdout", "input": "AR@ABHAIKAA", "output": "NO\n"}, {"type": "stdin_stdout", "input": "AR@ABHAIJAA", "output": "NO\n"}, {"type": "stdin_stdout", "input": "AAJIAHBA@RA", "output": "NO\n"}, {"type": "stdin_stdout", "input": "AAIJAHBA@RA"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 cats. We number them... | [{"type": "stdin_stdout", "input": "5\n3 4 3 4 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n3 4 3 3 3", "output": "No\n"}, {"type": "stdin_stdout", "input": "5\n4 3 4 3 4", "output": "No"}, {"type": "stdin_stdout", "input": "5\n3 3 3 3 3", "output": "No"}, {"type": "stdin_stdout", "input": "4\n1 0 -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\nHave you ever heard of the unit ... | [{"type": "stdin_stdout", "input": "101 -1", "output": "-30.5525011457\n"}, {"type": "stdin_stdout", "input": "111 -1", "output": "-33.5775012592\n"}, {"type": "stdin_stdout", "input": "-1 106", "output": "-32.0650012024\n"}, {"type": "stdin_stdout", "input": "26 -1", "output": "-7.86500029494\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\nTaro and Hanako decided to play ... | [{"type": "stdin_stdout", "input": "1234 10660\n1234 1354\n1234 1234\n1230 1023\n0123 1234\n0 0", "output": "1 0\n2 1\n4 0\n1 3\n0 3\n"}, {"type": "stdin_stdout", "input": "1234 10660\n1964 1354\n1234 1234\n1230 1023\n0123 1234\n0 0", "output": "1 0\n2 0\n4 0\n1 3\n0 3\n"}, {"type": "stdin_stdout", "input": "1234 10660... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOur master carpenter is designin... | [{"type": "stdin_stdout", "input": "000 12 208", "output": "197\n"}, {"type": "stdin_stdout", "input": "000 9 208", "output": "200\n"}, {"type": "stdin_stdout", "input": "000 4 120", "output": "117\n"}, {"type": "stdin_stdout", "input": "000 16 106", "output": "91\n"}, {"type": "stdin_stdout", "input": "000 26 106", "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\nPeter loves any kinds of cheatin... | [{"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 26 62 143 38 80 7", "output": "117\n1108\n"}, {"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 44 62 143 38 80 7", "output": "117\n1210\n"}, {"type": "stdin_stdout", "input": "3\n10 20 47\n7\n56 44 62 143 38 80 6", "output": "117\n1203\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe configuration of three circl... | [{"type": "stdin_stdout", "input": "20 80 -40 -27 106 -20\n20 -20 120 -20 -40 80\n0 0 1 0 0 1\n0 -2 999 1 -999 1\n897 -916 847 -972 973 -925\n1626 1224 -999 -998 -998 -1471\n-419 -1751 999 -999 0 731\n-734 -999 999 -464 -464 1496\n979 -436 -955 -337 157 -439\n0 0 0 0 0 0", "output": "22.344342834616615 24.4028528446503... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPrincess'Gamble\n\nPrincess gamb... | [{"type": "stdin_stdout", "input": "3 2 50\n1\n4\n2\n4 4 65\n1\n0\n3\n-1\n3 1 10\n8\n2\n1\n0 0 0", "output": "87\n-105\n123\n"}, {"type": "stdin_stdout", "input": "3 2 50\n1\n2\n3\n4 4 65\n-1\n2\n5\n1\n3 1 10\n8\n0\n1\n0 0 0", "output": "150\n245\n101\n"}, {"type": "stdin_stdout", "input": "3 2 50\n1\n2\n3\n4 4 65\n-1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n<image>\n\nOne evening. As usual... | [{"type": "stdin_stdout", "input": "111 218 367", "output": "353374389\n"}, {"type": "stdin_stdout", "input": "124 218 367", "output": "817857665"}, {"type": "stdin_stdout", "input": "29 218 367", "output": "816094540\n"}, {"type": "stdin_stdout", "input": "29 430 669", "output": "643250629\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\nA: Taking a Seat-Taking a Seat-\... | [{"type": "stdin_stdout", "input": "10 0\n--o-,\n,ox--\n-.x--\n--o-x\n--xpo", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 0\n--o-,\n,ox--\n-.x--\n--o-x\n-.xpo", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 5\n--o,-\n--xo-\n--x--\no---x\n--xoo", "output": "3\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 have N items that you want t... | [{"type": "stdin_stdout", "input": "1 10\n15 4\n0 3\n4 1\n13 3", "output": "15\n"}, {"type": "stdin_stdout", "input": "1 10\n27 4\n0 0\n6 1\n13 3", "output": "27\n"}, {"type": "stdin_stdout", "input": "1 10\n39 4\n1 0\n6 1\n13 3", "output": "39\n"}, {"type": "stdin_stdout", "input": "1 10\n24 4\n0 3\n5 1\n13 5", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike is given a matrix A, N and ... | [{"type": "stdin_stdout", "input": "3 2\n2 2\n4 1\n7 -1\n2\n1 2\n2 2", "output": "5\n"}, {"type": "stdin_stdout", "input": "3 2\n2 2\n7 0\n7 -1\n2\n1 2\n2 2", "output": "7\n"}, {"type": "stdin_stdout", "input": "3 2\n1 2\n3 5\n7 0\n2\n2 2\n2 2", "output": "10\n"}, {"type": "stdin_stdout", "input": "3 2\n1 2\n3 6\n7 0\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\nRecently, the Fair Nut has writt... | [{"type": "stdin_stdout", "input": "100 1000000000\nbbabbaabbbaaaaabbabbbaaabbbbabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaabbbbabaabbbabbaaaaabbbbaab\nbbabbaabbbaaaaabbabbbaaabbbbabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaababbbabbbbaaaaabbaaaaaaaab\n", "output": "41073741883\n"}, {"type": "stdin_stdout", "input":... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.