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\nKolya Gerasimov loves kefir very... | [{"type": "stdin_stdout", "input": "1000000000000000000\n999999998000000000\n999999999000000000\n999999998000000000\n", "output": " 3\n"}, {"type": "stdin_stdout", "input": "1\n1000000000000000000\n1000000000\n999999999\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\nLittle Alyona is celebrating Hap... | [{"type": "stdin_stdout", "input": "86 30\n16 -12 11 16 8 14 7 -29 18 30 -32 -10 20 29 -14 -21 23 -19 -15 17 -2 25 -22 2 26 15 -7 -12 -4 -28 21 -4 -2 22 28 -32 9 -20 23 38 -21 21 37 -13 -30 25 31 6 18 29 29 29 27 38 -15 -32 32 -7 -8 -33 -11 24 23 -19 -36 -36 -18 9 -1 32 -34 -26 1 -1 -16 -14 17 -17 15 -24 38 5 -27 -12 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nComrade Dujikov is busy choosing... | [{"type": "stdin_stdout", "input": "10000 10000 10000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 20 10000\n", "output": "500\n"}, {"type": "stdin_stdout", "input": "10000 1 10000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 10000 10000\n", "output": "1\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRick and Morty are playing their... | [{"type": "stdin_stdout", "input": "7000\n7 419 1631 1925 3861 6940 379 493\n29 5389 5925 2923 4696 972 6125 3779 6044 5477 1305 6488 5059 5515 3238 3863 248 6947 4023 6168 1915 6607 2991 2220 2023 200 4457 6398 1017 447\n", "output": "Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop Loop... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a long and glorious ... | [{"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\nPetya is a big fan of mathematic... | [{"type": "stdin_stdout", "input": "1000\n", "output": "499 501\n"}, {"type": "stdin_stdout", "input": "1120\n", "output": "559 561\n"}, {"type": "stdin_stdout", "input": "1010\n", "output": "503 507\n"}, {"type": "stdin_stdout", "input": "1200\n", "output": "599 601\n"}, {"type": "stdin_stdout", "input": "1764\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPig is visiting a friend.\n\nPig... | [{"type": "stdin_stdout", "input": "70 100\n0 99\n1 87\n1 94\n1 4\n2 72\n3 39\n3 69\n4 78\n5 85\n7 14\n8 59\n12 69\n14 15\n14 76\n17 17\n19 53\n19 57\n19 21\n21 35\n21 83\n24 52\n24 33\n27 66\n27 97\n30 62\n30 74\n30 64\n32 63\n35 49\n37 60\n40 99\n40 71\n41 83\n42 66\n42 46\n45 83\n51 76\n53 69\n54 82\n54 96\n54 88\n5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNot to be confused with [chessbo... | [{"type": "stdin_stdout", "input": "42\nquxukow soft\nwcn soft\npbwg soft\nlrp hard\nphdvfz soft\nidkvymji soft\nobq soft\nyhx soft\nijygw soft\nztzz soft\nuwdhnwu soft\ndgnuuej hard\nhntyyzr soft\nqxf hard\nztg soft\nhnpq soft\nuhznu soft\nitelgl hard\nggceadhw hard\nrxq soft\nkznmshem hard\nlri hard\ndalh soft\ngyzzu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 far away kingdom young page... | [{"type": "stdin_stdout", "input": "98\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\n702\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 fine day, Benny decided to c... | [{"type": "stdin_stdout", "input": "100\n402\n409\n278\n29\n268\n874\n527\n617\n727\n485\n616\n724\n660\n190\n286\n562\n270\n21\n75\n625\n1\n122\n579\n89\n764\n1291\n145\n847\n405\n419\n1070\n29\n126\n494\n216\n760\n662\n660\n651\n902\n7\n202\n192\n194\n908\n578\n214\n915\n711\n445\n422\n989\n651\n406\n492\n712\n866\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHackerMan has a message that he ... | [{"type": "stdin_stdout", "input": "994\n5407 1537\n2363 1131\n3948 2406\n4077 621\n4449 387\n406 3977\n2759 878\n1058 3651\n2356 1943\n3039 2573\n3138 2424\n1371 518\n4387 4339\n1646 2566\n387 481\n1633 2163\n3508 1815\n1011 2131\n3314 2819\n2842 3282\n4031 631\n67 4941\n3264 4893\n652 1712\n3117 4992\n2827 552\n4961 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTonight, in your favourite cinem... | [{"type": "stdin_stdout", "input": "6\n11 21 35 22 7 36 27 34 8 20 15 13 16 1 24 3 2 17 26 9 18 32 31 23 19 14 4 25 10 29 28 33 12 6 5 30", "output": "11"}, {"type": "stdin_stdout", "input": "4\n6 7 1 4 13 16 10 9 5 11 12 14 15 2 3 8", "output": "3"}, {"type": "stdin_stdout", "input": "3\n2 3 7 9 5 4 8 6 1", "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\nWe have a connected undirected g... | [{"type": "stdin_stdout", "input": "0 13\n1 2 3 7 0\n1 4\n1 3\n1 7\n4 7\n1 3\n2 5\n5 7", "output": "\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "5 7\n1 1 3 4 5\n1 2\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\nYou have a pot and N ingredients... | [{"type": "stdin_stdout", "input": "5\n138 138 232 138 138", "output": "185.0000000000\n"}, {"type": "stdin_stdout", "input": "5\n138 138 232 218 138", "output": "205.0000000000\n"}, {"type": "stdin_stdout", "input": "5\n37 138 232 218 138", "output": "198.6875000000\n"}, {"type": "stdin_stdout", "input": "5\n37 138 23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N mountains ranging fr... | [{"type": "stdin_stdout", "input": "5\n9 -1 6 8 4", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n9 -1 4 8 4", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n4 4 10 2 4", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n1 0 -1 7 2", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n48 -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 an integer sequence A, w... | [{"type": "stdin_stdout", "input": "7\n-1 -4 0 -20 -1 0 0", "output": "4\n"}, {"type": "stdin_stdout", "input": "7\n0 -1 1 -1 1 -1 1", "output": "13\n"}, {"type": "stdin_stdout", "input": "7\n0 -1 0 -5 0 -1 -3", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n0 -1 0 -5 0 -2 -3", "output": "3\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\nThere are a total of n x n squar... | [{"type": "stdin_stdout", "input": "10\n...*....**\n..........\n**....**..\n........*.\n..*.......\n..........\n.*........\n..........\n....*..***\n.*....*...\n10\n*****.****\n*..*.*....\n****.*....\n*....*....\n*....*****\n..........\n****.*****\n*..*...*..\n****...*..\n*..*...*..\n0", "output": "5\n3\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\nMr. A loves sweets, but recently... | [{"type": "stdin_stdout", "input": "1 1 2 5\n13\nH L1 18\nC1 D 6\nC1 H 12\nL1 D 10\nC1 L1 24\n2 2 4 6\n100 112\nH L1 10\nC1 L1 12\nC1 D 11\nC2 L1 7\nC2 D 12\nL1 D 8\n0 0 0 0", "output": "23\n-24\n"}, {"type": "stdin_stdout", "input": "1 1 2 5\n25\nH L1 18\nC1 D 6\nC1 H 12\nL1 D 10\nC1 L1 24\n2 2 4 6\n100 112\nH L1 10\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 a teacher at Iazu High S... | [{"type": "stdin_stdout", "input": "15 15\n1 2 45\n2 3 129\n1 4 29\n1 5 2\n5 6 25\n4 7 84\n7 8 56\n4 9 2\n4 10 37\n7 11 39\n1 12 11\n11 13 6\n3 14 68\n2 15 16\n10 13 14\n13 14 15\n2 14 12\n7 12 15\n10 14 15\n9 10 15\n9 14 15\n8 13 15\n10 6 13\n11 13 15\n12 13 14\n3 6 10\n5 13 13\n10 11 14\n6 8 11", "output": "203\n203\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nACM University holds its sports ... | [{"type": "stdin_stdout", "input": "2\n-40 -40 100 30\n-100 -100 -50 -30 1\n30 -70 90 -30 10\n2\n-4 -4 10 3\n-10 -10 -5 -3 1\n3 -7 9 -3 1\n2\n-40 -40 100 30\n-100 -100 -50 -30 3\n30 -70 90 -30 10\n2\n-400 -400 1000 300\n-800 -800 -500 -300 8\n300 -700 900 -300 20\n3\n20 70 150 70\n0 0 50 50 4\n40 100 60 120 8\n130 80 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\nProblem\n\nIn 20XX, a scientist ... | [{"type": "stdin_stdout", "input": "3 5\nCOMPARE 1 2\nIN 1 2 9\nIN 2 1 3\nCOMPARE 2 3\nCOMPARE 1 3", "output": "WARNING\nWARNING\nWARNING\n"}, {"type": "stdin_stdout", "input": "5 5\nCOMPARE 1 2\nIN 1 4 6\nIN 2 3 2\nCOMPARE 2 3\nCOMPARE 1 3", "output": "WARNING\n2\nWARNING\n"}, {"type": "stdin_stdout", "input": "5 5\nC... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe volume of access to a web se... | [{"type": "stdin_stdout", "input": "2\n4 0 2 2 5 10\n2 -1 1 2\n0", "output": "11\n"}, {"type": "stdin_stdout", "input": "2\n4 0 -1 -1 0 8\n2 1 3 3\n0", "output": "11\n"}, {"type": "stdin_stdout", "input": "2\n4 0 -2 -1 0 8\n2 1 3 3\n0", "output": "11\n"}, {"type": "stdin_stdout", "input": "2\n4 0 2 2 3 8\n2 -1 2 2\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\nI have a lot of friends. Every f... | [{"type": "stdin_stdout", "input": "6 50\n10\n30\n13\n18\n12\n16", "output": "15\n"}, {"type": "stdin_stdout", "input": "6 37\n6\n16\n13\n18\n12\n16", "output": "10\n"}, {"type": "stdin_stdout", "input": "6 50\n6\n16\n13\n18\n12\n16", "output": "12\n"}, {"type": "stdin_stdout", "input": "6 37\n5\n16\n13\n18\n26\n33", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the string S and m queries... | [{"type": "stdin_stdout", "input": "icpcsummertraining\n9\nmm n\nicpc summer\ntrain ing\nsummer mm\ni c\ni i\nh f\ntrain i\nsummer er", "output": "11\n10\n8\n0\n4\n16\n0\n6\n6\n"}, {"type": "stdin_stdout", "input": "icpcsummertraining\n9\nmm n\nicpc summer\nniart ing\nsummer mm\ni c\ni i\nh f\ntrain i\nsummer er", "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\nD: Arrow / Arrow\n\nproblem\n\nr... | [{"type": "stdin_stdout", "input": "11 1\n11\n1\n16", "output": "1\n"}, {"type": "stdin_stdout", "input": "11 1\n11\n1\n6", "output": "-1\n"}, {"type": "stdin_stdout", "input": "15 1\n3\n1\n2", "output": "13\n"}, {"type": "stdin_stdout", "input": "15 1\n6\n1\n5", "output": "10\n"}, {"type": "stdin_stdout", "input": "15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nCryptography is all t... | [{"type": "stdin_stdout", "input": "5\nAMazA", "output": "3\nAAA\n"}, {"type": "stdin_stdout", "input": "5\nAMAza", "output": "3\nAAA\n"}, {"type": "stdin_stdout", "input": "5\nAMBza", "output": "3\nAAA\n"}, {"type": "stdin_stdout", "input": "5\nAaBzM", "output": "3\nAAA\n"}, {"type": "stdin_stdout", "input": "5\nAazBM... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "4 3\n4 0\n5 2\n2 1\n13 1", "output": "22\n"}, {"type": "stdin_stdout", "input": "4 6\n4 0\n5 2\n2 1\n13 1", "output": "24\n"}, {"type": "stdin_stdout", "input": "4 5\n0 2\n5 2\n2 1\n8 3", "output": "13\n"}, {"type": "stdin_stdout", "input": "4 5\n4 2\n5 2\n2 0\n8 3", "output": "15\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCodehorses has just hosted the s... | [{"type": "stdin_stdout", "input": "43\nL\nXXXL\nM\nXS\nL\nXXL\nS\nL\nM\nXXXL\nXXS\nS\nXS\nS\nXS\nXL\nXXL\nXXL\nXS\nXXS\nXXL\nL\nXXXL\nL\nL\nXXL\nXXL\nM\nXXXS\nM\nXXL\nXXXS\nXXXL\nXXS\nL\nL\nXS\nL\nXS\nXS\nL\nXXL\nM\nXXXL\nXXL\nXXL\nXL\nL\nXS\nM\nXL\nXXXS\nXXXS\nS\nXXL\nXXXL\nXXL\nXS\nXXS\nL\nS\nXXXS\nXL\nL\nXL\nXXXS\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan unexpectedly saw a present ... | [{"type": "stdin_stdout", "input": "37\n52 52 66 149 149 130 47 47 26 110 185 -1 73 73 65 -1 -1 130 -1 -1 -1 94 97 190 -1 -1 49 49 54 -1 92 92 5 25 48 79 79\n", "output": "903952722\n"}, {"type": "stdin_stdout", "input": "37\n52 52 87 149 149 130 47 47 26 110 185 -1 73 73 65 -1 -1 130 -1 -1 -1 94 97 190 -1 -1 49 49 54 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a tree (a connecte... | [{"type": "stdin_stdout", "input": "19 20\n8 10 1\n17 15 1\n14 5 0\n6 14 0\n7 15 0\n19 8 1\n12 14 0\n2 18 0\n13 3 0\n17 1 1\n4 2 1\n11 3 0\n4 6 0\n6 9 0\n7 11 1\n16 4 1\n5 13 1\n16 19 0\n", "output": " 928042611\n"}, {"type": "stdin_stdout", "input": "13 3\n9 13 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\nThe only difference between prob... | [{"type": "stdin_stdout", "input": "93\n6 6 10 10 9 4 7 10 2 3 4 10 7 2 8 8 4 2 4 4 7 7 3 2 3 1 5 3 7 2 4 9 10 8 10 5 1 6 2 1 10 3 5 6 6 9 3 10 1 10 1 6 2 3 8 7 1 5 4 10 4 3 5 8 8 1 3 8 2 3 10 7 2 4 5 2 6 4 10 4 4 8 5 1 6 3 1 9 5 4 9 4 3\n", "output": "4\nRRLR\n"}, {"type": "stdin_stdout", "input": "93\n6 6 10 10 8 4 7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne common way of digitalizing s... | [{"type": "stdin_stdout", "input": "50 20\n592183311 362557946 154127088 616872926 395353745 675069471 509655682 79915471 356656666 937992998 304422065 724106263 472338455 792258113 796069631 663370025 201799298 566151622 722278085 508905399 703159587 690854023 925377265 11010958 69791159 990158269 535460930 167415727 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan plays an old action game ca... | [{"type": "stdin_stdout", "input": "2\n3 2\n1 3 5\n4 1\n5 2 3 5\n", "output": "2\n2\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n1 3 5\n4 1\n5 4 3 5\n", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n1 1 5\n4 1\n5 4 3 5\n", "output": "1\n3\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n0 1 5\n4 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\nThere is a river of width n. The... | [{"type": "stdin_stdout", "input": "1000 232 105\n4 3 4 4 6 1 4 3 4 1 4 1 4 2 2 3 2 6 3 2 6 1 1 4 1 2 4 2 3 2 5 2 3 4 3 3 3 2 5 4 2 5 4 2 4 4 4 2 4 1 3 5 4 4 5 3 6 5 3 3 4 4 2 3 3 3 1 4 4 3 2 3 2 5 4 3 2 4 3 1 2 5 6 2 4 6 3 2 2 2 2 2 6 4 4 5 5 1 4 2 5 1 6 4 3 2 3 7 2 3 3 2 4 4 2 3 2 3 3 4 1 3 2 3 2 7 7 3 3 3 4 2 2 3 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\nBob is about to take a hot bath.... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000 1000000\n", "output": "1000000 1000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 999999 999998 1000000\n", "output": "999999 999998\n"}, {"type": "stdin_stdout", "input": "176902 1481077 847541 412251 587604\n", "output": "616526 283398\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 cold winter evening Alice an... | [{"type": "stdin_stdout", "input": "918273645\n546372819\n", "output": "WRONG_ANSWER\n"}, {"type": "stdin_stdout", "input": "111111111\n111110111\n", "output": "WRONG_ANSWER\n"}, {"type": "stdin_stdout", "input": "987235645\n206049167\n", "output": "WRONG_ANSWER\n"}, {"type": "stdin_stdout", "input": "918273645\n278718... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCatherine received an array of i... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 15 11 10 11 5 13 14 15 16 17 18 19 20 3 22 23 24 16 26 27 28 29 29 43 32 33 34 35 36 37 38 39 40 41 76 43 44 45 46 47 48 41 50 51 52 53 54 55 97 57 58 59 60 61 62 63 64 65 66 67 68 30 70 71 72 73 74 75 76 77 78 79 80 81 88 83 84 85 86 87 88 265 90 91 92 93 94 95 96... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an array a of length n, fi... | [{"type": "stdin_stdout", "input": "10\n1 2 3 4 4 4 7 7 7 10\n", "output": "0 1 2 3 5 6 4 8 9 7\n"}, {"type": "stdin_stdout", "input": "7\n0 0 2 2 3 5 6\n", "output": "1 4 0 7 2 3 5 \n"}, {"type": "stdin_stdout", "input": "7\n0 0 2 2 3 5 7\n", "output": "1 4 0 6 2 3 5 \n"}, {"type": "stdin_stdout", "input": "7\n0 0 2 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\nKoa the Koala and her best frien... | [{"type": "stdin_stdout", "input": "4\n5\n4 1 5 1 4\n4\n1 0 0 12\n1\n0\n2\n5 4\n", "output": "LOSE\nWIN\nDRAW\nWIN\n"}, {"type": "stdin_stdout", "input": "4\n5\n2 1 3 1 0\n4\n1 0 1 6\n1\n0\n2\n5 4\n", "output": "LOSE\nWIN\nDRAW\nWIN\n"}, {"type": "stdin_stdout", "input": "4\n5\n4 1 5 1 4\n4\n1 0 1 12\n1\n1\n2\n5 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\nGiven a set of integers (it can ... | [{"type": "stdin_stdout", "input": "1\n100\n0 1 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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 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\nYou like playing chess tournamen... | [{"type": "stdin_stdout", "input": "8\n5 2\nWLWLL\n6 5\nLLLWWL\n7 4\nLWLWLWL\n15 5\nWWWLLLWWWLLLWWW\n40 38\nLLWLWLWWWLWLLWLWWWLWLLWLLWLLLLWLLWWWLWWL\n1 0\nL\n1 0\nL\n6 0\nWLLWLW\n", "output": "7\n11\n13\n26\n79\n0\n0\n3\n"}, {"type": "stdin_stdout", "input": "8\n5 2\nWLWLL\n6 5\nLLLWWL\n7 4\nLWLWLWL\n15 2\nWWWLLLWWWLLL... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 distinct points (x_1,... | [{"type": "stdin_stdout", "input": "3\n3 3\n0 -1\n3 4\n1 4\n3 3\n12 7\n10 6\n6 9\n4 1\n-1 0\n0 3\n0 2\n0 3\n", "output": "-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "3\n3 3\n0 -1\n3 2\n1 4\n3 3\n6 7\n10 6\n6 9\n4 1\n-1 -1\n0 3\n0 2\n0 3\n", "output": "-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "3\n3 2\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\nHaving stayed home alone, Petya ... | [{"type": "stdin_stdout", "input": "000:0010\n", "output": "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 51 52 53 54 55 56 57 58 59 "}, {"type": "stdin_stdout", "input": "001:010\n", "output": "2 3 4 5 6 7 8 9 10 11 12 13 14 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya adores sport programming. ... | [{"type": "stdin_stdout", "input": "100\n9999 9999 9999 9998 9998 9998 9997 9996 9996 9995 9993 9993 9991 9990 9989 9986 9984 9984 9983 9981 9981 10079 9980 9980 9979 9977 9977 9977 9977 9977 9976 9976 9975 9975 9973 9972 9972 9972 9972 9971 9969 9969 9969 9968 9967 9965 9962 9962 9962 9962 9960 9958 9958 9955 9954 995... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 celebrate the second ABBYY Cu... | [{"type": "stdin_stdout", "input": "13\n78\n11 1\n10 11\n6 2\n10 1\n11 6\n11 3\n5 3\n8 1\n12 11\n4 2\n10 3\n13 8\n9 8\n11 7\n7 5\n11 2\n7 1\n4 1\n11 10\n8 3\n13 11\n9 6\n13 9\n12 7\n12 8\n12 9\n10 2\n5 2\n12 10\n9 2\n9 7\n3 2\n7 4\n11 4\n13 1\n10 5\n11 5\n8 5\n10 4\n8 2\n10 9\n4 3\n9 5\n13 12\n13 5\n7 2\n12 4\n9 1\n10 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 plays a computer game with... | [{"type": "stdin_stdout", "input": "001 1\n----------------------------------------------------------------------------------------------------X\n----------------------------------------------------------------------------------------------------X\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "011 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\nThe Little Elephant has got a pr... | [{"type": "stdin_stdout", "input": "128\n1 2 4 6 8 17 20 20 23 33 43 49 49 49 52 73 74 75 82 84 85 87 90 91 102 103 104 105 111 111 401 142 142 152 155 160 175 176 178 181 183 184 101 188 191 193 326 202 202 214 224 225 236 239 240 243 246 247 249 249 257 257 261 264 265 271 277 281 284 284 286 289 290 296 297 303 305 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Polycarpus has learned ... | [{"type": "stdin_stdout", "input": "7\n-1 1000000000 999999488 999999488 1000000000 1000000000 999999488\n1000000000 -1 999999488 999999488 1000000000 1000000000 999999488\n999999488 999999488 -1 999999999 999999488 999999488 999999999\n999999488 999999488 999999999 -1 999999488 999999488 999999999\n1000000000 10000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEmuskald is addicted to Codeforc... | [{"type": "stdin_stdout", "input": "132\n13 7 33 124 118 76 94 92 16 107 130 1 46 58 28 119 42 53 102 81 99 29 57 70 125 45 100 68 10 63 34 38 19 49 56 30 103 72 106 3 121 110 78 2 31 129 128 24 77 61 87 47 15 21 88 60 5 101 82 108 84 41 86 66 79 75 54 97 55 12 69 44 83 131 9 95 11 85 52 35 115 80 111 27 109 36 39 104 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has been noted that if some a... | [{"type": "stdin_stdout", "input": "30000 39\n2650 -1515\n-3169 4818\n-1896 2727\n1323 -2335\n-387 901\n-4299 1481\n-2114 4435\n3654 -2730\n4569 3801\n-3815 -3355\n4777 1749\n4486 -780\n-3936 -158\n717 -3518\n4765 -909\n-3032 3726\n-2970 3346\n2067 -1560\n-521 -1331\n-4953 -2098\n-849 580\n-4941 4018\n1338 -2629\n-1444... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub recently has learned Bubbl... | [{"type": "stdin_stdout", "input": "100\n36 48 92 87 28 85 42 10 44 41 39 3 79 9 14 56 1 16 46 35 93 8 82 26 100 59 60 2 96 52 13 98 70 81 71 94 54 91 17 88 33 30 19 50 18 73 65 29 78 21 61 7 99 97 45 89 57 27 76 11 49 72 84 69 43 62 4 22 75 6 66 83 38 34 86 15 40 51 37 74 67 31 20 63 77 80 12 53 5 25 58 90 68 24 64 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\nOm Nom really likes candies and ... | [{"type": "stdin_stdout", "input": "2 100 59\n....................................................................................................\n.DR.D..DLLR.LDRR..L.LDRRRDLD.LDRR.LLR.R...DRLD.RRLL.L.D..R.LD.DL....LR.LR.DRLD.....L.D..RD...D.LL.R.\n", "output": "0 0 0 1 0 0 0 1 1 0 0 2 0 0 0 1 1 1 0 1 0 0 0 1 1 2 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\nValery is a PE teacher at a scho... | [{"type": "stdin_stdout", "input": "112 1867 1261 1606\n0 7 17 43 67 70 87 112 129 141 148 162 179 180 189 202 211 220 231 247 250 277 308 311 327 376 400 406 409 417 418 444 480 512 514 515 518 547 572 575 578 587 612 617 654 684 701 742 757 761 788 821 825 835 841 843 850 858 869 872 881 936 939 969 970 971 997 1026 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. Kitayuta has just bought an ... | [{"type": "stdin_stdout", "input": "5 7\n1 5 1\n2 5 1\n3 5 1\n4 5 1\n1 2 2\n2 3 2\n3 4 2\n5\n1 5\n5 1\n2 5\n1 5\n1 4\n", "output": "1\n1\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "5 7\n1 1 1\n2 5 1\n3 5 1\n4 5 1\n1 2 2\n2 3 2\n3 4 2\n5\n1 5\n5 1\n2 5\n1 5\n1 4\n", "output": "0\n0\n1\n0\n1\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\nKyoya Ootori has a bag with n co... | [{"type": "stdin_stdout", "input": "47\n20\n21\n16\n18\n24\n20\n25\n13\n20\n22\n26\n24\n17\n18\n21\n22\n21\n23\n17\n15\n24\n19\n18\n21\n20\n19\n26\n25\n20\n17\n17\n17\n26\n32\n20\n21\n25\n28\n24\n21\n21\n17\n28\n20\n20\n31\n19\n", "output": "295545118\n"}, {"type": "stdin_stdout", "input": "47\n20\n21\n16\n18\n24\n20\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\nKefa wants to celebrate his firs... | [{"type": "stdin_stdout", "input": "15 1234\n2738 365370390\n1160 970909702\n2594 902749351\n3126 324754476\n3151 177963947\n3424 396145897\n5578 737768323\n3423 687640543\n381 848813098\n1058 197211286\n936 650181776\n1025 776492538\n3598 142176544\n3595 680519527\n1191 32199940\n", "output": "3677320675\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\nAfter seeing the \"ALL YOUR BASE... | [{"type": "stdin_stdout", "input": "10 40\n39 39 39 14 39 39 39 39 39 39\n10 39\n38 38 38 38 38 38 38 38 38 38\n", "output": ">\n"}, {"type": "stdin_stdout", "input": "10 40\n39 39 39 39 39 39 39 39 39 39\n10 39\n38 38 38 38 38 38 38 38 38 38\n", "output": ">"}, {"type": "stdin_stdout", "input": "10 38\n16 19 37 32 16 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 likes watching sports... | [{"type": "stdin_stdout", "input": "90\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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90\n", "output": "90\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 an undirected connecte... | [{"type": "stdin_stdout", "input": "18\n2 3 4 5 2 7 8 9 10 7 11 12 14 15 13 17 18 18\n", "output": "5 \n2 3 4 5 11 7 8 9 10 11 11 11 14 15 11 17 18 11 \n"}, {"type": "stdin_stdout", "input": "18\n2 3 4 5 2 7 8 9 2 7 11 12 14 15 13 17 18 18\n", "output": "4\n2 11 4 5 2 7 8 9 2 7 11 11 11 15 13 17 18 11\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\nAnatoly lives in the university ... | [{"type": "stdin_stdout", "input": "166\nrbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbbbbrbbbbbbbrbbbbbbbrbbrbbbbbbbbrbbbbbbbbbbbbbbrrbbbrbbbbbbbbbbbbbbrbrbbbbbbbbbbbrbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbb\n", "output": "70\n"}, {"type": "stdin_stdout", "input": "166\nrbbbbbbbbbbbrrbrrbbbbbbrbbbbbbbbbbrbbbbbbrbbbrbbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 monster is chasing after Rick ... | [{"type": "stdin_stdout", "input": "100 100\n100 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 110\n100 100\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "87 22\n119 64\n", "output": "1849\n"}, {"type": "stdin_stdout", "input": "31 74\n88 152\n", "output": "2616\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\nAfter several latest reforms man... | [{"type": "stdin_stdout", "input": "70 203\n1 105\n1 105\n1 105\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 300\n3 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n<image>\n\nSlastyona and her loy... | [{"type": "stdin_stdout", "input": "6\n2 4\n75 45\n8 8\n16 16\n247 994\n1000000000 1000000\n", "output": "Yes\nYes\nYes\nNo\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "6\n2 4\n75 45\n8 8\n16 5\n247 994\n1000000000 1000000\n", "output": "Yes\nYes\nYes\nNo\nNo\nYes"}, {"type": "stdin_stdout", "input": "6\n2 4\n75 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\nThis time the Berland Team Olymp... | [{"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 2 1 2 2 2 2\n", "output": "10000000000\n"}, {"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 2 1 2 2 3 2\n", "output": "10000000000\n"}, {"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 0 1 2 2 3 2\n", "output": "10000000000\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 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\nEverybody knows of [spaghetti so... | [{"type": "stdin_stdout", "input": "10\n105 39 93 63 97 40 36 38 11 97\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n105 39 79 63 97 40 36 38 11 97\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n109 91 22 29 23 22 33 42 13 96\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\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\nKuro has recently won the \"Most... | [{"type": "stdin_stdout", "input": "50 1\n-1 -1 -1 -1 -1 0 -1 -1 -1 0 1 0 -1 0 1 -1 -1 -1 1 0 1 -1 0 1 0 1 0 0 1 1 -1 1 -1 -1 1 1 -1 -1 0 -1 -1 1 -1 1 -1 1 1 0 0 -1\n", "output": "279519499\n"}, {"type": "stdin_stdout", "input": "50 1\n-1 -1 -1 -1 -1 0 -1 -1 -1 0 1 0 -1 0 1 -1 -1 -1 1 0 1 -1 0 1 0 1 0 0 0 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\nThere are n players sitting at t... | [{"type": "stdin_stdout", "input": "50 1\n995 1815 941 1716 725 1098 747 627 1728 1007 34 1001 679 1742 22 1495 1299 1696 507 631 1971 775 1052 1665 1035 203 1564 1329 1592 1295 983 177 734 1442 172 943 33 486 1078 946 947 592 1524 563 396 1541 1670 326 543 79\n176 214 1601 1758 1468 972 628 1524 1506 425 746 309 387 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\nYesterday, Benny decided to buy... | [{"type": "stdin_stdout", "input": "4\nI want to buy Microsoft for $10000\nthhs house costs $0 5 1 00 0 tsuJ yub it\nsiejfsuhn $ 1 2 3 4 5 6 14 8 9 hello123\nshe cort is zero $ 1 0 0 0 0 0\n\nSAMPLE", "output": "$10000\n$51000\n$1234561489\n$100000\n"}, {"type": "stdin_stdout", "input": "4\nI want to buy Microsoft for ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIkshu and his class\n\nIkshu's c... | [{"type": "stdin_stdout", "input": "-2 -3\n-1 -3\n-1 3\n\nCLOMAS", "output": "1\n"}, {"type": "stdin_stdout", "input": "-2 -3\n-1 -3\n-1 3\n\nSAMOLC", "output": "1\n"}, {"type": "stdin_stdout", "input": "-2 -3\n-1 -3\n-1 1\n\nSAMOLC", "output": "1\n"}, {"type": "stdin_stdout", "input": "-2 -4\n-1 -3\n-1 1\n\nSAMOLC", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 friend Monk has an exam that... | [{"type": "stdin_stdout", "input": "7 11\n4 3 11 4 7 3 2\n\nSAMPLE", "output": "7\n"}, {"type": "stdin_stdout", "input": "7 6\n4 3 11 4 7 4 2\n\nSAMPLE", "output": "3\n"}, {"type": "stdin_stdout", "input": "7 6\n4 3 11 4 7 3 2\n\nSAMPLE", "output": "3\n"}, {"type": "stdin_stdout", "input": "7 6\n4 6 11 6 9 2 2\n\nSAMPL... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Mad King arrested Shil's com... | [{"type": "stdin_stdout", "input": "5\n-1 76 14 1 0\n\nELPLAR", "output": "1 2 3 4 5\n"}, {"type": "stdin_stdout", "input": "5\n-1 38 30 -1 11\n\nELPLAR", "output": "1 2 3 5\n"}, {"type": "stdin_stdout", "input": "5\n-1 38 30 0 11\n\nELPLAR", "output": "1 2 3 5\n"}, {"type": "stdin_stdout", "input": "5\n-1 38 30 0 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 given a sequence A_1, A_... | [{"type": "stdin_stdout", "input": "10 3\n1\n5\n2\n1\n1\n6\n11\n11\n4\n2", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 3\n0\n5\n4\n3\n14\n11\n9\n5\n3\n4", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 3\n0\n5\n4\n3\n11\n11\n9\n7\n6\n1", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 1\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\nGiven are three integers N, K, a... | [{"type": "stdin_stdout", "input": "32 5 001", "output": "1 1 1 1 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\n"}, {"type": "stdin_stdout", "input": "32 2 001", "output": "1 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\n"}, {"type": "stdin_stdout", "input": "18 1 010", "output": "10 11 11 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 will be given an integer a a... | [{"type": "stdin_stdout", "input": "3200\npinl", "output": "pinl\n"}, {"type": "stdin_stdout", "input": "3200\npiml", "output": "piml\n"}, {"type": "stdin_stdout", "input": "3200\nlmip", "output": "lmip\n"}, {"type": "stdin_stdout", "input": "3200\nkmip", "output": "kmip\n"}, {"type": "stdin_stdout", "input": "3200\nkn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integer N. Amon... | [{"type": "stdin_stdout", "input": "1260308870", "output": "26484\n"}, {"type": "stdin_stdout", "input": "1450760047", "output": "26484\n"}, {"type": "stdin_stdout", "input": "656396080", "output": "20434\n"}, {"type": "stdin_stdout", "input": "471776498", "output": "14384\n"}, {"type": "stdin_stdout", "input": "377370... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two sequences a an... | [{"type": "stdin_stdout", "input": "7 7\n49 -20 -27 42 159 29 9 11 20 44 27 19 -31 -49\n73 -50 -11 20 28 46 12 13 33 -22 -48 -27 35 -17\n7 27 34\n12 -2 22\n4 -50 -12\n3 -32 15\n8 -7 23\n3 -15 11\n4 -2 23", "output": "421\n422\n370\n396\n406\n402\n437\n"}, {"type": "stdin_stdout", "input": "7 7\n49 -20 -27 42 159 29 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\nYou are given an undirected conn... | [{"type": "stdin_stdout", "input": "7 1\n1 -1 0\n-1 4 1\n-1 0 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 1\n1 -1 0\n-1 4 2\n-1 0 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 1\n1 -2 0\n-1 4 2\n-1 0 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "14 -1\n2 0 1\n0 3 1\n0 0 4", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStick n circular stickers with a... | [{"type": "stdin_stdout", "input": "15\n3.13979,8.51743\n2.39506,3.84915\n2.68432,5.39095\n5.61904,9.16332\n7.85653,4.75593\n2.84021,5.41511\n1.79500,8.59211\n7.55389,8.17604\n4.70665,4.66125\n1.63470,4.42538\n7.34959,4.61981\n5.09003,8.11122\n5.24373,1.30066\n0.13517,1.83659\n7.57313,1.58150\n0", "output": "4\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 set of four prime numbers arra... | [{"type": "stdin_stdout", "input": "13\n14\n15\n16\n17\n18\n19\n20\n10010\n0", "output": "13\n13\n13\n13\n13\n13\n19\n19\n9439\n"}, {"type": "stdin_stdout", "input": "13\n14\n15\n16\n17\n36\n19\n20\n10000\n0", "output": "13\n13\n13\n13\n13\n19\n19\n19\n9439\n"}, {"type": "stdin_stdout", "input": "13\n14\n15\n16\n27\n36... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Aizu Wakamatsu city office d... | [{"type": "stdin_stdout", "input": "3 5\n12 15 70 19 44\n16 13 16 0 17\n20 14 16 10 22\n17 27 18 16\n9 7 0\n19 5\n21\n0 0", "output": "43\n"}, {"type": "stdin_stdout", "input": "3 5\n12 15 70 19 44\n30 13 16 0 17\n20 14 16 10 22\n17 27 18 16\n9 7 0\n19 5\n21\n0 0", "output": "43\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\nThree-valued logic is a logic sy... | [{"type": "stdin_stdout", "input": "(Q*P)\n(--R+(Q*R))\n(P+-Q)\n2\n-1\n(-1+(((---P+Q)*(--Q+---R))+(-R+-P)))\n.", "output": "3\n9\n15\n27\n0\n19\n"}, {"type": "stdin_stdout", "input": "(P*Q)\n(--R+(P*Q))\n(P*-P)\n2\n2\n(-1+(((---P+Q)*(--Q+---R))*(-R+-P)))\n.", "output": "3\n11\n0\n27\n27\n7\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDespite urging requests of the t... | [{"type": "stdin_stdout", "input": "2\n5 30\n15 20\n2\n10 240\n20 160\n5\n2 6\n7 2\n8 2\n4\n2 4\n13 2\n8 2\n18 1\n0", "output": "600\n6400\n105\n36\n"}, {"type": "stdin_stdout", "input": "2\n5 30\n15 20\n2\n10 240\n20 160\n5\n2 6\n7 2\n8 2\n4\n2 4\n13 2\n8 2\n28 1\n0", "output": "600\n6400\n105\n56\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\nSurrounding Area\n\nLand fence\n... | [{"type": "stdin_stdout", "input": "10 10\n.....W....\n....W.W...\n...W...W..\n....W...W.\n.....W...W\n......W.W.\nBBB....W..\n..BB.BB.BB\n....B..B..\n...B.B..W.\n5 3\n...B.\n...BB\n.....\n1 1\n.\n0 0", "output": "10 21\n12 0\n0 0\n"}, {"type": "stdin_stdout", "input": "10 10\n.....W....\n....W.W...\n...W...W..\n....W.... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSome of you know an old story of... | [{"type": "stdin_stdout", "input": "3 3\n0 0\n8 -1\n-1 8\n2 2\n4 2\n2 4\n0 0", "output": "10.125000\n10.687500\n10.687500\n"}, {"type": "stdin_stdout", "input": "3 3\n0 0\n16 -1\n0 2\n1 2\n3 -1\n2 13\n0 0", "output": "4.222997\n11.777003\n0.000000\n"}, {"type": "stdin_stdout", "input": "3 3\n0 0\n14 0\n0 8\n2 2\n7 0\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\nFrom tomorrow, the long-awaited ... | [{"type": "stdin_stdout", "input": "5\n8 100001\n14 100001\n12 100000\n11 100001\n3 100001", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n8 100001\n14 100001\n13 100000\n11 100001\n3 100001", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n8 000001\n14 100001\n13 100000\n11 100001\n3 100001", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the spring of 2014, a student... | [{"type": "stdin_stdout", "input": "3 1 -10\n-19\n-10\n-10", "output": "-27\n"}, {"type": "stdin_stdout", "input": "2 1 -10\n-19\n-10\n-10", "output": "-19\n"}, {"type": "stdin_stdout", "input": "3 1 -19\n-19\n-10\n-10", "output": "-39\n"}, {"type": "stdin_stdout", "input": "3 1 -19\n-19\n-10\n-18", "output": "-47\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\nB: Parentheses Number\n\nproblem... | [{"type": "stdin_stdout", "input": "2\n2 -107", "output": ":(\n"}, {"type": "stdin_stdout", "input": "2\n2 -187", "output": ":(\n"}, {"type": "stdin_stdout", "input": "2\n2 -155", "output": ":(\n"}, {"type": "stdin_stdout", "input": "2\n2 -142", "output": ":(\n"}, {"type": "stdin_stdout", "input": "2\n2 -100", "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\nProblem\n\nDefine a function $ f... | [{"type": "stdin_stdout", "input": "5\n101 608 404 1494 500", "output": "969227571\n"}, {"type": "stdin_stdout", "input": "5\n001 608 404 1494 500", "output": "969225971\n"}, {"type": "stdin_stdout", "input": "5\n100 325 300 400 500", "output": "936266429\n"}, {"type": "stdin_stdout", "input": "5\n101 325 300 400 500",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a given sequence A = {a0, a1... | [{"type": "stdin_stdout", "input": "5\n5\n1\n2\n-1\n10", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n5\n1\n0\n-1\n10", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n5\n1\n0\n-1\n11", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n8\n1\n0\n-1\n11", "output": "2\n"}, {"type": "stdin_stdout"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a dictionary $M$ that stores... | [{"type": "stdin_stdout", "input": "10\n0 blue 6\n0 red 1\n0 blue 4\n0 white 10\n1 red\n1 blue\n2 red\n1 black\n1 red\n3 w z", "output": "1\n6\n4\nwhite 10\n"}, {"type": "stdin_stdout", "input": "10\n0 blue 6\n0 red 1\n0 blue 0\n0 white 10\n1 red\n1 blue\n2 red\n1 black\n2 red\n3 w z", "output": "1\n6\n0\nwhite 10\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\nEnough is enough. Too many times... | [{"type": "stdin_stdout", "input": "185 2\n0 14 2 11 5 17 9 11 8 12 8 17 17 0 4 15 4 17 8 1 2 10 8 0 8 16 1 7 10 4 0 18 2 15 2 1 4 1 10 11 6 10 19 5 5 18 2 1 15 17 0 4 12 19 12 8 11 4 7 15 13 0 9 6 2 6 5 2 17 4 7 9 11 17 1 13 4 6 4 10 1 14 0 13 17 16 10 5 7 19 19 9 2 2 17 17 11 6 11 15 4 17 18 18 14 9 15 10 10 10 14 18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a playlist consisting o... | [{"type": "stdin_stdout", "input": "10 1\n135600 59157\n2735 28902\n43406 39542\n24166 178402\n18565 14980\n69958 53925\n23473 81878\n89682 3949\n18757 31637\n35580 45873\n", "output": "8021689200\n"}, {"type": "stdin_stdout", "input": "10 1\n135600 59157\n2735 28902\n43406 39542\n24166 93361\n18565 14980\n69958 53925\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has a pile, that consists ... | [{"type": "stdin_stdout", "input": "100\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100\n---+-----------+-++---+----------++++++++++++++++++++++++++++++++++++++++++++-----------------------\n", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSoon after the Chunga-Changa isl... | [{"type": "stdin_stdout", "input": "500000000000000000 500000000000000000 1000000000000000000\n", "output": "1 500000000000000000\n"}, {"type": "stdin_stdout", "input": "350919308160677995 916982339945800203 1000000000000001000\n", "output": "1 83017660054200797\n"}, {"type": "stdin_stdout", "input": "1444555415333840 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "19\n1\n10\n100\n1000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n10000000000\n100000000000\n1000000000000\n10000000000000\n100000000000000\n1000000000000000\n10000000000000000\n100000000000000000\n1000000000000000000\n", "output": "1\n4\n1\n4\n9\n2\n6\n2\n6\n8\n1\n1\n9\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLengths are measures in Baden in... | [{"type": "stdin_stdout", "input": "10000\n", "output": "277 9\n"}, {"type": "stdin_stdout", "input": "18864\n", "output": "524 0\n"}, {"type": "stdin_stdout", "input": "13473\n", "output": "374 3\n"}, {"type": "stdin_stdout", "input": "25368\n", "output": "704 8\n"}, {"type": "stdin_stdout", "input": "9999\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\nWe start with a string s consist... | [{"type": "stdin_stdout", "input": "9\n1500\n1212\n1500\n1221\n1500\n122\n1500\n12121\n1500\n22\n1500\n1111112111111112\n1500\n1111111111221111111\n1500\n111111122\n1500\n11111121111121111111\n", "output": "1504\n1599\n1502\n1598\n1502\n1510\n1657\n1502\n1763\n"}, {"type": "stdin_stdout", "input": "9\n1676\n1212\n1500\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAyoub thinks that he is a very s... | [{"type": "stdin_stdout", "input": "5\n6 4\n5 2\n3 2\n2 1\n10 2\n", "output": "19\n12\n5\n2\n40\n"}, {"type": "stdin_stdout", "input": "5\n6 4\n5 2\n4 2\n2 1\n10 2\n", "output": "19\n12\n8\n2\n40\n"}, {"type": "stdin_stdout", "input": "5\n6 1\n0 0\n5 0\n16 1\n8 1\n", "output": "12\n0\n0\n72\n20\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\nA monopole magnet is a magnet th... | [{"type": "stdin_stdout", "input": "18 22\n....................#.\n...................#..\n..........#...........\n..................#...\n..................#...\n..................#...\n......................\n......................\n...........#..........\n..............#.......\n..............#.......\n................ | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.