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\nDo you know the story about the ... | [{"type": "stdin_stdout", "input": "30\n34938093 71279712 25853338\n29827587 21741565 52179990 30235076 83272806 10815432 98887688 94542207 99870240 97586453 21739186 30460781 75347784 50711354 12162179 74306503 97398492 88466481 52489587 67579359 53177356 75077523 86044366 14405531 73916272 78242091 49321886 41937821 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKris works in a large company \"... | [{"type": "stdin_stdout", "input": "17 1 1\n2 1 1000000000\n", "output": "1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\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\nVasiliy is fond of solving diffe... | [{"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\naaaaaabaaaab\nab\naab\naaab\naaaab\naaaaab\naaaaaab\naaaaaaab\naaaaaaaab\naaaaaaaaab\n", "output": "8000000000\n"}, {"type": "stdin_stdout", "input": "10\n1000000000 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\nThere are n workers in a company... | [{"type": "stdin_stdout", "input": "10 10\n3 0 0 0 0 0 1 1 1 0\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 10\n3 0 0 0 0 0 1 0 1 0\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 10\n3 0 0 0 0 1 1 0 1 0\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 10\n3 0 0 0 1 1 1 0 1 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\na is an array of n positive inte... | [{"type": "stdin_stdout", "input": "50\n49 21 50 31 3 19 10 40 20 5 47 12 12 30 5 4 5 2 11 23 5 39 3 30 19 3 23 40 4 14 39 50 45 14 33 37 1 15 43 30 45 23 32 3 9 17 9 5 14 12\n50\n36 29\n44 24\n38 22\n30 43\n15 19\n39 2\n13 8\n29 50\n37 18\n32 19\n42 39\n20 41\n14 11\n4 25\n14 35\n17 23\n1 29\n3 19\n8 6\n26 31\n9 46\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n students who have ta... | [{"type": "stdin_stdout", "input": "2106623580587 109123020071\n", "output": "9 982107180639 1124516399939 "}, {"type": "stdin_stdout", "input": "1000000000000 499999999999\n", "output": "1 499999999999 500000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 1\n", "output": "250000000000 250000000000 5000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem.\... | [{"type": "stdin_stdout", "input": "10 3 632584719\n378382911 9\n978367651 -1\n176599346 7\n557138623 8\n441019502 4\n823417558 2\n244832688 10\n702148024 6\n385598339 5\n357778234 1\n", "output": "? 3\n? 9\n! 978367651\n"}, {"type": "stdin_stdout", "input": "10 3 632584719\n378382911 9\n978367651 -1\n176599346 7\n5571... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 set of n points ... | [{"type": "stdin_stdout", "input": "50\n-38 -107\n-34 -75\n-200 -143\n-222 -139\n-34 55\n-102 -79\n48 -99\n2 -237\n-118 -167\n-56 -41\n10 17\n68 -89\n-32 41\n-100 -93\n84 -1\n86 -15\n46 -145\n-58 -117\n8 31\n-36 -61\n-12 21\n-116 79\n88 -205\n70 -103\n-78 -37\n106 -5\n-96 -201\n-60 -103\n-54 45\n-138 -177\n-178 -47\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\nSince Grisha behaved well last y... | [{"type": "stdin_stdout", "input": "1100000000000000000 1000000000000000000\n", "output": "1152921504606846975\n"}, {"type": "stdin_stdout", "input": "1100000000010000000 1000000000000000000\n", "output": "1152921504606846975\n"}, {"type": "stdin_stdout", "input": "1005016953863700545 1459461610595482691\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\nPuchi and Ghissi are playing a g... | [{"type": "stdin_stdout", "input": "10\njmwyirufdtlimcxeqtjhzkgwxrcwqkhzxnmofjbotrfvgoshptrpsuoeqwslvfdvirjleimwhoubxtwmsnamwqbhyzvvhnpticrgdqcpwfvujnmxgtxscgzykwlsdspqtbqfoljoenrdfizkwtrwsymuwsiphwfwuromadxluebvuxqzbwbjctfnrwqlkebssxrcgppwjhdqbaqnxqrkdphqrvhirqasyoqxicucdbxvqmazbqqvrxvxfzczfopiqvbamfxlacnqjklqrqtngdfo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPankaj is a very intelligent stu... | [{"type": "stdin_stdout", "input": "99\n380 -405 351 -268 -88 375 -367 -496 15 276 495 -183 421 398 -140 376 378 -481 -90 55 209 -105 -497 -330 -120 364 224 -258 50 -419 497 -122 319 -57 -478 452 -465 -195 -60 289 -158 -235 162 -112 492 -354 377 437 -54 -177 430 365 -256 -64 -148 133 198 63 150 96 458 106 116 270 199 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUtkarsh's mother recently receiv... | [{"type": "stdin_stdout", "input": "10\n1000\n772 471 331 119 775 107 645 356 638 975 867 164 316 61 22 487 523 873 955 185 28 413 742 304 317 154 702 877 682 460 393 1582 687 52 696 408 323 190 134 577 402 311 347 171 761 130 106 101 236 505 562 804 672 521 814 173 978 950 396 716 757 327 448 279 724 612 27 443 721 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\nTakahashi loves gold coins. He g... | [{"type": "stdin_stdout", "input": "1000000001", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1100000000", "output": "2200000000\n"}, {"type": "stdin_stdout", "input": "1000000101", "output": "2000000100\n"}, {"type": "stdin_stdout", "input": "1000000000", "output": "2000000000"}, {"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\nChokudai made a rectangular cake... | [{"type": "stdin_stdout", "input": "13 21 106\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\nKen loves ken-ken-pa (Japanese v... | [{"type": "stdin_stdout", "input": "6 8\n1 2\n2 1\n3 4\n4 11\n5 0\n1 5\n1 5\n4 6\n1 4", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 8\n1 4\n2 3\n3 4\n4 5\n5 1\n1 4\n1 5\n4 1\n1 6", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 8\n1 2\n2 1\n3 4\n4 6\n5 0\n1 5\n1 5\n4 6\n1 4", "output": "-1\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\nRingo is giving a present to Snu... | [{"type": "stdin_stdout", "input": "YAKINIKU", "output": "Yes"}, {"type": "stdin_stdout", "input": "UKINIKAY", "output": "No\n"}, {"type": "stdin_stdout", "input": "UAKOYAKI", "output": "No\n"}, {"type": "stdin_stdout", "input": "NKIUIKAY", "output": "No\n"}, {"type": "stdin_stdout", "input": "IKAYOKAU", "output": "No\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 problem set at CODE FESTIVAL... | [{"type": "stdin_stdout", "input": "740", "output": "2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n"}, {"type": "stdin_stdout", "input": "370", "output": "1\n2\n3\n4\n5\n6\n7\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 computes t... | [{"type": "stdin_stdout", "input": "20\n100", "output": "68440000\n55000000\n"}, {"type": "stdin_stdout", "input": "20\n120", "output": "68440000\n51840000\n"}, {"type": "stdin_stdout", "input": "20\n150", "output": "68440000\n47250000\n"}, {"type": "stdin_stdout", "input": "20\n200", "output": "68440000\n40000000\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 phantom thief \"Lupin IV\" i... | [{"type": "stdin_stdout", "input": "5\n13 199 1\n93 1000 1\n37 350 10\n27 300 2\n123 200 1100", "output": "93 37 27 13 123\n"}, {"type": "stdin_stdout", "input": "5\n11 199 0\n93 1000 1\n37 350 10\n27 300 2\n123 200 1100", "output": "93 37 27 11 123\n"}, {"type": "stdin_stdout", "input": "5\n11 91 0\n124 1000 1\n37 350... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 planning manager of ... | [{"type": "stdin_stdout", "input": "4\nakzakr 2 1 8\nfnmyi 5 2 3 4 6 9\ntsnukk 5 2 3 4 7 9\nyskwcnt 6 3 4 7 8 9 10\n4\nakzakr 1 2\nfnmyi 3 10 11 12\ntsnukk 2 1 8\nyskwcnt 2 1 8\n5\nknmmdk 2 13 19\nakmhmr 4 13 15 19 22\nmksyk 6 3 7 12 13 15 19\nskrkyk 3 1 4 8\ntmemm 3 1 17 24\n5\nknmmdk 5 5 6 16 18 26\nakmhmr 9 3 4 7 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDescription\n\nTHE BY DOLM @ STE... | [{"type": "stdin_stdout", "input": "3 10\nDobkeradops\n7 5 23 10\nPataPata\n1 0 2 1\ndop\n1 7 11 21\n2 300\nBydp System ahplA\n2 11 4 7\nGreen Inferno\n300 300 300 300", "output": "210\n1650\n"}, {"type": "stdin_stdout", "input": "3 10\nDobkeradops\n7 5 23 10\nPataPata\n1 1 2 1\ndop\n1 7 11 14\n2 300\nBydp System Alpha... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nH --Bit Operation Game\n\nGiven ... | [{"type": "stdin_stdout", "input": "6 9\nT=T|X\nT=T|Y\nT=T|Y\nT=T^Y\nT=T&X\n0 1\n0 2\n1 3\n1 4\n2 5\n5 6\n3 5\n0 0", "output": "4\n6\n0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "6 9\nT=T|X\nT=T|Y\nT=T|Y\nT=T^Y\nT=T&X\n0 1\n0 2\n1 3\n1 4\n2 5\n5 6\n4 5\n0 0", "output": "4\n4\n0\n0\n0\n0\n0\n0\n0\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\nProblem\n\nMr. ukuku1333 is a li... | [{"type": "stdin_stdout", "input": "x^5+15x^4+85x^3+225x^2+274x+120", "output": "(x+1)(x+2)(x+3)(x+4)(x+5)"}, {"type": "stdin_stdout", "input": "x^3-81x^2-1882x-1800", "output": "(x-100)(x+1)(x+18)"}, {"type": "stdin_stdout", "input": "x^2+4x+3", "output": "(x+1)(x+3)\n"}, {"type": "stdin_stdout", "input": "x^2+3x+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\nDepth-first search (DFS) follows... | [{"type": "stdin_stdout", "input": "6\n1 2 2 3\n2 2 3 4\n3 1 5\n4 1 6\n5 1 6\n6 -1", "output": "1 1 12\n2 2 11\n3 3 8\n4 9 10\n5 4 7\n6 5 6\n"}, {"type": "stdin_stdout", "input": "6\n1 2 2 3\n2 2 4 4\n3 1 5\n4 1 6\n5 1 6\n6 -1", "output": "1 1 12\n2 2 7\n3 8 11\n4 3 6\n5 9 10\n6 4 5\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\nConstruct a dice from a given se... | [{"type": "stdin_stdout", "input": "1 2 3 4 14 -1\n3\n1 3\n1 4\n3 2", "output": "14\n2\n-1\n"}, {"type": "stdin_stdout", "input": "1 2 3 4 5 12\n3\n3 2\n1 3\n3 2", "output": "12\n5\n12\n"}, {"type": "stdin_stdout", "input": "1 2 3 4 5 16\n3\n3 2\n1 3\n3 2", "output": "16\n5\n16\n"}, {"type": "stdin_stdout", "input": "1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "109\n"}, {"type": "stdin_stdout", "input": "999999999992\n", "output": "200\n"}, {"type": "stdin_stdout", "input": "290687942106\n", "output": "153\n"}, {"type": "stdin_stdout", "input": "110884501982\n", "output": "146\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn accordion is a string (yes, i... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "oenfnemfddbhhmig]gcd:]:mnnbj::f|ichec:|dkfnjbfjkdgoge]lfihgd[... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen Petya went to school, he go... | [{"type": "stdin_stdout", "input": "2147483647\n2147483647\n", "output": "YES\n0\n"}, {"type": "stdin_stdout", "input": "2147483646\n2147483647\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1094841453\n1656354409\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "2147483647\n2147483646\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\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": "129630 805489 631548 761110 577559\n", "output": "227930 447929\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 two integers n and... | [{"type": "stdin_stdout", "input": "2\n69 120\n11 9\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n34 230\n4 15\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n34 230\n4 27\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n11 101\n13 4\n", "output": "NO\nNO\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "18\n36\n1 1\n1 2\n1 3\n1 6\n1 9\n1 18\n2 1\n2 2\n2 3\n2 6\n2 9\n2 18\n3 1\n3 2\n3 3\n3 6\n3 9\n3 18\n6 1\n6 2\n6 3\n6 6\n6 9\n6 18\n9 1\n9 2\n9 3\n9 6\n9 9\n9 18\n18 1\n18 2\n18 3\n18 6\n18 9\n18 18\n", "output": "1\n1\n1\n2\n1\n3\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n2\n2\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\nThis is an interactive problem. ... | [{"type": "stdin_stdout", "input": "2\n2 1\n100 1\n5 2\n99 98 100 100 100\n", "output": "? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n2\n? 1 1\n1\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob play a game. They ... | [{"type": "stdin_stdout", "input": "5\n01111001\n0000\n111111\n101010101\n011011110111\n", "output": "4\n0\n6\n3\n6\n"}, {"type": "stdin_stdout", "input": "5\n01111101\n0000\n111111\n101010101\n011011110111\n", "output": "5\n0\n6\n3\n6\n"}, {"type": "stdin_stdout", "input": "5\n01111101\n0000\n111111\n101010101\n011001... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor some time the program of rou... | [{"type": "stdin_stdout", "input": "2567340036354357844391998756110821468858185018763415770617907336824217629234299240638243305079104961\n", "output": "$2,567,340,036,354,357,844,391,998,756,110,821,468,858,185,018,763,415,770,617,907,336,824,217,629,234,299,240,638,243,305,079,104,961.00\n"}, {"type": "stdin_stdout", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a consist... | [{"type": "stdin_stdout", "input": "5 5\n0 1 0 1 0\n2 3\n2 2\n2 3\n2 1\n2 5\n", "output": "0\n1\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "5 5\n0 0 0 1 0\n2 3\n2 2\n2 3\n2 2\n2 5\n", "output": "0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "5 5\n1 0 1 0 0\n2 3\n2 3\n2 3\n2 1\n2 5\n", "output": "0\n0\n0\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 are given an array a of n (n... | [{"type": "stdin_stdout", "input": "1\n10 195593331\n886547706 549473499 719535263 337021357 357872635 1071822623 699988186 10455 29750933 887846992\n", "output": "1760339979\n"}, {"type": "stdin_stdout", "input": "1\n10 121406599\n432485522 549473499 522487623 1009120577 698965406 845977171 252631181 1770 81120106 717... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 dive into one of the most ... | [{"type": "stdin_stdout", "input": "# a \n # a \n\n # a \n\n\n # a \n \n # a \n \n\n # a \n\n \n # a\n \n \n # a \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\nYou are given a weighted undirec... | [{"type": "stdin_stdout", "input": "10 10\n1 5 12\n2 4 140\n2 10 149\n3 6 154\n3 7 17\n3 8 226\n3 10 132\n4 10 55\n5 8 33\n7 8 173\n", "output": "1 5 8 7 3 10\n"}, {"type": "stdin_stdout", "input": "10 10\n1 5 12\n2 4 140\n2 10 149\n3 6 154\n2 7 17\n3 8 226\n3 10 136\n4 10 55\n5 8 33\n7 8 173\n", "output": "1 5 8 7 2 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's denote d(n) as the number ... | [{"type": "stdin_stdout", "input": "1908 1921 1021\n", "output": "1053840771\n"}, {"type": "stdin_stdout", "input": "1676 1012 1117\n", "output": "407213319\n"}, {"type": "stdin_stdout", "input": "2000 2000 2000\n", "output": "281684196\n"}, {"type": "stdin_stdout", "input": "858 1641 1021\n", "output": "1011842644\n"}... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Vasya had n boxes with ba... | [{"type": "stdin_stdout", "input": "48 19\n227460648 746912227 51958075 682685526 1080381698 666833118 492590399 167395932 678377837 125106811 638633256 713194370 386921921 34175133 704550052 220688092 499436761 495071386 57379330 137372655 0 720974146 209203457 946682102 237312198 943872065 957150897 357568282 3670067... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBessie and the cows are playing ... | [{"type": "stdin_stdout", "input": "5\n2 -980\n1 2 -156\n2 641\n2 -253\n2 -514\n", "output": "-490.000000\n-646.000000\n-217.000000\n-226.000000\n-283.600000\n"}, {"type": "stdin_stdout", "input": "5\n1 1 -48\n1 1 19\n1 1 -35\n2 -67\n1 2 -13\n", "output": "-48.000000\n-29.000000\n-64.000000\n-65.500000\n-78.500000\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 that the Berland... | [{"type": "stdin_stdout", "input": "2000\naabaaabaabababbbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2000\naaaaaabaabababbbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2000\naaaaaabaababaabbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2000\nbbbbbabbbbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 recently found out wha... | [{"type": "stdin_stdout", "input": "4898 3\n", "output": "3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe New Year is coming! That's w... | [{"type": "stdin_stdout", "input": "10\n2 1 8 0 0 1 0 4 4 3\n", "output": "PRLPRLRPRLRPRLPRLPRLPRLPRLPRLPRLPRLRRRPRLRRPRLPRLPRLPRLRPRLPRLPRLPRLRPLRPLRPLR"}, {"type": "stdin_stdout", "input": "10\n2 0 8 0 0 1 0 4 4 3\n", "output": "PRLPRLRRPRLPRLPRLPRLPRLPRLPRLPRLRRRPRLRRPRLPRLPRLPRLRPRLPRLPRLPRLRPLRPLRPLR"}, {"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\nSchool holidays come in Berland.... | [{"type": "stdin_stdout", "input": "100 50\n1 8\n9 12\n13 19\n20 22\n23 27\n28 31\n32 36\n36 40\n40 43\n47 47\n48 51\n51 55\n62 63\n69 77\n77 84\n85 90\n98 99\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 100\n100 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\nA and B are preparing themselves... | [{"type": "stdin_stdout", "input": "250000 500000\n", "output": "250000\n"}, {"type": "stdin_stdout", "input": "473686 122443\n", "output": "122443\n"}, {"type": "stdin_stdout", "input": "231646 398487\n", "output": "210044\n"}, {"type": "stdin_stdout", "input": "332019 281112\n", "output": "204377\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\nLittle girl Susie went shopping ... | [{"type": "stdin_stdout", "input": "26\n1000 4110030 64221 131521030 942374833 1003 2055015 32110 770511 16440130 263042057 32880256 128439 557559573 16051 8220066 469240078 65760513 256878 790176315 4012 2005 1027508 928528684 8030 1005954322\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "26\n1000 4110030 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays A and B... | [{"type": "stdin_stdout", "input": "20 30\n19 29\n2 1 2 2 3 3 4 4 7 7 7 9 8 8 8 8 1 0 9 10\n6 9 9 7 9 9 9 9 5 9 9 9 9 18 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "20 30\n19 29\n2 1 2 2 2 3 4 4 7 10 7 8 8 8 8 8 9 9 9 9\n6 9 9 9 9 9 9 9 9 9 9 9 9 18 9 9 10 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\nThis Christmas Santa gave Masha ... | [{"type": "stdin_stdout", "input": "100 50\n66 3\n92 79\n9 44\n84 45\n30 63\n30 20\n33 86\n8 83\n40 75\n7 36\n91 4\n76 88\n77 76\n28 27\n1 52\n41 57\n8 23\n34 75\n50 15\n86 68\n36 98\n30 84\n37 62\n22 4\n6 45\n72 80\n98 74\n78 84\n1 54\n99 27\n84 91\n78 7\n80 61\n67 48\n51 52\n36 72\n97 87\n25 17\n20 80\n20 39\n72 5\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\nJohnny drives a truck and must d... | [{"type": "stdin_stdout", "input": "281 12 23\n178 650197\n129 288456\n34 1664910\n43 683515\n305 957083\n103 724815\n105 308008\n252 1280706\n74 87088\n229 146026\n85 241042\n35 39127\n62 47524\n217 760274\n156 562141\n10 209057\n50 714473\n201 164128\n97 624021\n120 102709\n147 388268\n317 1546753\n190 1448117\n", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInternational Abbreviation Olymp... | [{"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "5\nIAO'15\nIAO'2015\nIAO'1\nIAO'9\nIAO'0\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\nPolandBall is a young, clever Ba... | [{"type": "stdin_stdout", "input": "1447\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1127\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1722\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1332\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1261\n", "output": "1\n"}, {"type": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a consist... | [{"type": "stdin_stdout", "input": "20\n128 33 9 1 50 37 12 44 26 69 24 10 17 4 17 41 11 26 10 14\n", "output": "7.005\n"}, {"type": "stdin_stdout", "input": "20\n49 33 9 8 50 21 12 44 23 39 24 10 17 4 17 40 24 19 27 21\n", "output": "7.0100"}, {"type": "stdin_stdout", "input": "20\n49 33 9 8 50 21 12 44 23 49 24 10 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tried to explain t... | [{"type": "stdin_stdout", "input": "12 12 12 11 12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11 59 59 11 12\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11 59 59 12 11\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "3 30 45 10 11\n", "output": "YES\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two positive integ... | [{"type": "stdin_stdout", "input": "1\n524288 1000000\n", "output": "645043186\n"}, {"type": "stdin_stdout", "input": "1\n983675 1000000\n", "output": "661876874\n"}, {"type": "stdin_stdout", "input": "1\n65536 1000000\n", "output": "928522471\n"}, {"type": "stdin_stdout", "input": "1\n36157 1000000\n", "output": "2585... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a m-free matrix as ... | [{"type": "stdin_stdout", "input": "3\n21\n0\n1\n", "output": "5 2\n1 1\n-1\n"}, {"type": "stdin_stdout", "input": "1\n297540\n", "output": "546 22\n"}, {"type": "stdin_stdout", "input": "1\n1015463691\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "1\n420441920\n", "output": "-1\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 rectangle with sides A and B i... | [{"type": "stdin_stdout", "input": "2\n2 2 20\n2 10 40\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "2\n2 2 20\n1 10 11\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2\n2 2 35\n1 10 11\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2\n2 3 20\n2 4 40\n", "output": "6\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\nYou have to handle a very comple... | [{"type": "stdin_stdout", "input": "4\n3 -10 6 1\n5\n1 2\n3 2\n2 4\n3 4\n3 1\n", "output": "Possible\n-3\n-7\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n3 -10 6 1\n5\n1 2\n3 2\n2 4\n3 4\n3 1\n", "output": "Possible\n-3\n-7\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n3 -10 6 1\n5\n1 4\n3 2\n2 4\n3 4\n3 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\nChandu is a very strict mentor. ... | [{"type": "stdin_stdout", "input": "10000\n50475\n28475\n16797\n79790\n18251\n56915\n35705\n13557\n80986\n8847\n83145\n52539\n85820\n11696\n29001\n94572\n86370\n56866\n80823\n7870\n8239\n45191\n79881\n30587\n93804\n33155\n9721\n42472\n64506\n70429\n72316\n45387\n41663\n45404\n86055\n93998\n96046\n58187\n15011\n52946\n8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is the first class after a... | [{"type": "stdin_stdout", "input": "7\n3 10\n3 11\n5 11\n3 12\n3 13\n3 8\n3 8\n3 32", "output": "Yes\nNo\nYes\nNo\nNo\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "7\n3 10\n3 11\n5 11\n3 12\n3 13\n3 8\n3 11\n4 32", "output": "Yes\nNo\nYes\nNo\nNo\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "7\n1 0\n3 12\n1 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\nWalter and Jesse's friend Mike h... | [{"type": "stdin_stdout", "input": "97\n1313416998 993571903 6\n5158133151 8524785232 7\n1750815523 8199560165 9\n3427555468 1298742223 3\n1767424737 8349144254 3\n7255619299 6606660467 7\n5786862276 2636132251 2\n10865125029 3088810998 6\n7839400579 9956455418 3\n6302924883 792549880 4\n1012933025 5679789796 8\n207983... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 learned the multiplicatio... | [{"type": "stdin_stdout", "input": "00010", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "00001", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "11111", "output": "No\n"}, {"type": "stdin_stdout", "input": "10111", "output": "No\n"}, {"type": "stdin_stdout", "input": "10011", "output": "No\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string S of leng... | [{"type": "stdin_stdout", "input": "18\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "output": "9075135300"}, {"type": "stdin_stdout", "input": "18\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`aaaa", "output": "0\n"}, {"type": "stdin_stdout", "input": "18\naaaaaaaaaaaaaaaaaaaaaaabaaaaaaa`aaaa", "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\nAtCoDeer the deer has found two ... | [{"type": "stdin_stdout", "input": "000 001", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "010 000", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "000 000", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "000 100", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "110 100", "output": "No\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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've come to your favorite sto... | [{"type": "stdin_stdout", "input": "12345678 87654321 12345678 87654321\n226515686", "output": "2796489721305108\n"}, {"type": "stdin_stdout", "input": "12345678 87654321 12873114 87654321\n226515686", "output": "2915962248666204\n"}, {"type": "stdin_stdout", "input": "12345678 87654321 12345678 87654321\n123456789", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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.\nFor... | [{"type": "stdin_stdout", "input": "53937807463", "output": "10\n"}, {"type": "stdin_stdout", "input": "10211397040", "output": "6\n"}, {"type": "stdin_stdout", "input": "16034112351", "output": "8\n"}, {"type": "stdin_stdout", "input": "18677078008", "output": "6\n"}, {"type": "stdin_stdout", "input": "15102704751", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rectangle in the xy-p... | [{"type": "stdin_stdout", "input": "18 1 -1\n2 -1 1\n5 2 1\n1 1 4\n5 2 0\n2 0 12", "output": "18\n"}, {"type": "stdin_stdout", "input": "10 10 5\n1 14 1\n4 1 1\n6 4 4\n9 0 2\n3 2 4", "output": "10\n"}, {"type": "stdin_stdout", "input": "10 10 0\n1 6 1\n4 1 1\n6 4 4\n9 4 0\n3 2 4", "output": "100\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\nThere is Kannon-do in the mounta... | [{"type": "stdin_stdout", "input": "1\n1\n30\n27\n0", "output": "1\n1\n14740\n2369\n"}, {"type": "stdin_stdout", "input": "1\n17\n28\n27\n0", "output": "1\n6\n4357\n2369\n"}, {"type": "stdin_stdout", "input": "1\n1\n30\n25\n0", "output": "1\n1\n14740\n701\n"}, {"type": "stdin_stdout", "input": "1\n17\n28\n24\n0", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAiz, which is located in cybersp... | [{"type": "stdin_stdout", "input": "5\n18\n102\n-155\n53\n32", "output": "3"}, {"type": "stdin_stdout", "input": "5\n18\n102\n-181\n53\n9", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n18\n102\n-155\n53\n9", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n18\n146\n-181\n53\n9", "output": "0\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTaro decided to go to the summer... | [{"type": "stdin_stdout", "input": "5 20 14\n7 18\n2 4\n7 13\n1 3\n0 12", "output": "8\n"}, {"type": "stdin_stdout", "input": "8 4 38\n7 13\n6 0\n11 27\n1 3\n0 15", "output": "7\n"}, {"type": "stdin_stdout", "input": "5 20 14\n8 9\n2 4\n7 13\n1 3\n5 8", "output": "11\n"}, {"type": "stdin_stdout", "input": "5 20 14\n7 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\nYour mission in this problem is ... | [{"type": "stdin_stdout", "input": "H 1\neI 5\nC 12\nO 16\nF 22\nNe 24\nEu 64\nCc 241\nEND_OF_FIRST_PART\nG2C\n(MhF)2As\nCu(OH)2\nH((CO)2F)99\n0", "output": "UNKNOWN\nUNKNOWN\nUNKNOWN\n7723\n"}, {"type": "stdin_stdout", "input": "H 0\nHe 4\nC 12\nO 26\nF 2\nOe 36\nvC 64\nCc 603\nEND_OF_FIRST_PART\nH2B\n(MgF)2As\nBu(OH)... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nICPC Calculator\n\nIn mathematic... | [{"type": "stdin_stdout", "input": "1\n4\n0\n+\n2.115262384218664\n1.6946524456220797\n1.2494077125386351\n0\n+\n2.4871472060127386\n+.\n.-*\n3...\n...)\n--.+1\n2....\n1.1146316365084887\n-1\n*\n0\n1.4326064398520582\n.3.\n)/\n0.6657411913142146\n*/.\n.7..\n...6\n1.7891160931823404\n-1", "output": "4\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe full exploration sister is a... | [{"type": "stdin_stdout", "input": "-2 1 -1 2\n6\n-1 2\n2 0\n1 -2\n1 1\n-1 -1\n-1 -1\n2 5", "output": "-1\n"}, {"type": "stdin_stdout", "input": "-2 1 -1 2\n6\n-1 2\n2 0\n1 -2\n1 1\n-1 -1\n-1 -1\n3 5", "output": "-1\n"}, {"type": "stdin_stdout", "input": "-2 0 -1 2\n6\n-1 2\n2 0\n1 -2\n1 1\n-1 -1\n-1 -1\n3 5", "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\nJAG-channel\n\nNathan O. Davis o... | [{"type": "stdin_stdout", "input": "6\nhoge\n.fuga\n..foobar\n..jagjag\n...zigzag\n.piyo\n8\njagjag\n.hogehoge\n..fugafuga\n...ponyoponyo\n....evaeva\n....pokemon\n...nowawa\n.buhihi\n8\nhello\n.goodmorning\n..howareyou\n.goodafternoon\n..letshavealunch\n.goodevening\n.goodnight\n..gotobed\n3\ncaution\n.themessagelengt... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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-Aun's breathing\n\nProblem Sta... | [{"type": "stdin_stdout", "input": "4\nA\nUn\nA\nUn", "output": "YES"}, {"type": "stdin_stdout", "input": "4\nA\nUn\nB\nUn", "output": "NO\n"}, {"type": "stdin_stdout", "input": "4\n@\nUn\nB\nUn", "output": "NO\n"}, {"type": "stdin_stdout", "input": "4\n@\nUn\nB\nnU", "output": "NO\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nAOR Ika made a set $ ... | [{"type": "stdin_stdout", "input": "5\n2 1 3 4 5\n3 4 2 5 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5\n2 4 3 5 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n1 3 2 4 5\n3 4 2 5 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n2 1 3 4 5\n2 4 3 5 1", "output": "Yes\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 chef is preparing a birthday... | [{"type": "stdin_stdout", "input": "3\n2 1 1 8 1 6 3 1 2 1\n0 1 1 1 1 1 1 1 1 1\n2 2 1 3 1 1 2 1 1 1", "output": "11\n10\n22\n"}, {"type": "stdin_stdout", "input": "3\n2 1 1 4 1 6 3 2 2 2\n0 1 1 2 2 1 1 1 1 1\n2 1 1 2 1 1 3 1 1 1", "output": "11\n10\n11\n"}, {"type": "stdin_stdout", "input": "3\n2 1 1 4 0 6 3 2 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\nChef has learned a new technique... | [{"type": "stdin_stdout", "input": "3\nelax axle\nesidarap djapers\nalice bob", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\nelax ayle\nesidarap djapers\nalice bob", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\nelax ayle\nesidarap srepajd\nalice bob", "output": "YES\nYES\nY... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 star is a figure of the follow... | [{"type": "stdin_stdout", "input": "100 3\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***\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 Metropolis computer network ... | [{"type": "stdin_stdout", "input": "10 40 10\n838 215 738 782 183 422 127 283 103 129\n1 2\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n2 10\n3 3\n3 5\n3 6\n3 7\n3 8\n3 9\n3 10\n4 5\n4 6\n4 7\n4 9\n4 10\n5 7\n5 8\n5 9\n5 10\n6 7\n6 8\n6 9\n6 10\n7 9\n7 10\n8 10\n9 10\n", "output": "1028608\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 matrix a, consis... | [{"type": "stdin_stdout", "input": "5 5\n1337 1466 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 5\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStudent Dima from Kremland has a... | [{"type": "stdin_stdout", "input": "1 249\n0 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 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 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 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 0 0 0 0 0 67 0 0 0 0 0 -1 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\nNauuo is a girl who loves writin... | [{"type": "stdin_stdout", "input": "000 100 100\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "?"}, {"type": "stdin_stdout", "input": "101 0 100\n", "output": "+\n"}, {"type": "stdin_stdout", "input": "25 24 100\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "123 29 43\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n points on the plane,... | [{"type": "stdin_stdout", "input": "35\n8 1\n6 8\n4 1\n1 2\n1 4\n5 10\n10 8\n9 1\n9 9\n10 2\n6 5\n16 8\n7 6\n10 6\n9 4\n4 9\n3 2\n1 8\n3 9\n7 3\n3 4\n2 7\n3 8\n3 1\n2 2\n5 5\n7 2\n4 10\n6 3\n5 1\n8 10\n4 3\n9 8\n9 7\n3 10\n", "output": "390\n"}, {"type": "stdin_stdout", "input": "35\n8 1\n6 8\n4 1\n1 2\n1 4\n5 10\n10 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an easier version of the... | [{"type": "stdin_stdout", "input": "100 0\n6 7 100 8 5 61 5 75 59 65 51 47 83 37 34 54 87 46 4 26 21 87 12 97 86 68 60 11 62 76 14 83 29 31 91 62 57 80 47 75 85 97 62 77 91 86 14 25 48 77 83 65 39 61 78 77 45 46 90 74 100 91 86 98 55 5 84 42 91 69 100 4 74 98 11 37 75 44 41 12 15 34 36 1 99 16 7 87 36 26 79 42 41 84 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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. Every... | [{"type": "stdin_stdout", "input": "1000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "477\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "124\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "480\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "141\n", "output": "YES\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\nYou are given n integers a_1, a_... | [{"type": "stdin_stdout", "input": "1\n10\n-3 -3 -3 -3 -3 -3 -3 -2 7 7\n", "output": "7\n10 3 6 9 2 5 8\n"}, {"type": "stdin_stdout", "input": "1\n10\n-3 0 -6 1 0 -3 -2 -2 1 7\n", "output": "4\n3 9 8 10\n"}, {"type": "stdin_stdout", "input": "1\n10\n-1 -5 -3 -1 0 -3 -2 -2 7 7\n", "output": "3\n2 7 9\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\nXenia is a girl being born a nob... | [{"type": "stdin_stdout", "input": "1\n10 10 10\n761 829 1037 1818 133 576 705 131 935 821\n896 163 569 957 169 475 342 1074 760 434\n131 383 243 247 908 799 56 1929 360 189\n", "output": "1928\n"}, {"type": "stdin_stdout", "input": "1\n10 10 10\n761 829 1037 1818 133 576 705 131 935 821\n896 163 569 656 169 475 342 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\nLevian works as an accountant in... | [{"type": "stdin_stdout", "input": "17\n-542470641 -617247806 1649173051 111521800 509758067 -860452587 447120886 234437807 707835273\n5\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "17\n-542470641 -617247806 998970243 699622219 732907519 -860452587 447120886 203125491 707835273\n5\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\nAcacius is studying strings theo... | [{"type": "stdin_stdout", "input": "6\n7\nabacaba\n7\n???????\n11\naba?abaaabc\n11\nabacaba?aba\n15\nrewq???f???fdsa\n11\ncbaaabacaba\n", "output": "yes\nabacaba\nyes\nabacaba\nyes\nabacabaaabc\nyes\nabacabazaba\nno\nyes\ncbaaabacaba\n"}, {"type": "stdin_stdout", "input": "6\n7\nabacaba\n7\n???????\n11\naba?abaaabc\n11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEasy and hard versions are actua... | [{"type": "stdin_stdout", "input": "4\n4 18\n2 1 9 2\n3 2 4 1\n4 1 1 2\n3 20\n2 1 8 1\n3 1 7 2\n5 50\n1 3 100 1\n1 5 10 2\n2 3 123 2\n5 4 55 1\n2 000\n1 2 409 2\n", "output": "0\n0\n11\n18\n"}, {"type": "stdin_stdout", "input": "4\n4 18\n2 1 18 2\n3 2 4 1\n4 1 2 2\n3 20\n2 1 2 1\n3 1 8 2\n5 50\n1 3 100 1\n1 5 10 2\n2 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\nConsider a long corridor which c... | [{"type": "stdin_stdout", "input": "3\n25 2 3 5\n2 7\n11 2 11 10\n1 1\n4 2 3 6\n4 4\n", "output": "1\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n11 2 3 20\n4 4\n7 2 3 -1\n5 1\n1 2 4 10\n0 1\n", "output": "2\n2\n2\n"}, {"type": "stdin_stdout", "input": "3\n13 2 3 1\n1 8\n7 2 1 6\n13 2\n7 2 3 12\n2 4\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour classmate, whom you do not ... | [{"type": "stdin_stdout", "input": "99 54\nfdabegacbffbgcacafcegfaegcacaegdbcabfgaecgbgfgefddggcdgebaaaccbcafdgcceabddfcacgdccfcgebccfffdaccac\nfdabegabffbgcaafcegfgcacaegdbcabfaecgbgfcgbccfffdaccac\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "94 51\ndfccgcagbebffedfgbccfgddcffdecegcgebgbaebadcgagagdceffcd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 satisfy his love of matching ... | [{"type": "stdin_stdout", "input": "4\n6 3 3\n1 2 3 2 2 2\n6 2 4\n1 1 2 2 2 2\n6 5 1\n6 5 4 3 2 1\n4 0 4\n4 4 4 3\n", "output": "\n2\n3\n5\n3\n"}, {"type": "stdin_stdout", "input": "4\n6 3 3\n1 2 6 2 2 2\n6 2 4\n1 1 2 2 2 2\n6 5 1\n6 5 4 3 2 1\n4 0 4\n4 4 4 3\n", "output": "2\n3\n5\n3\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\nLet f(i) denote the minimum posi... | [{"type": "stdin_stdout", "input": "6\n1\n4\n3\n4\n10\n10000000000000000\n", "output": "2\n10\n7\n10\n26\n366580019\n"}, {"type": "stdin_stdout", "input": "6\n1\n2\n3\n4\n10\n10000000000000000\n", "output": "2\n5\n7\n10\n26\n366580019\n"}, {"type": "stdin_stdout", "input": "1\n5897090464090076\n", "output": "428992762\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReca company makes monitors, the... | [{"type": "stdin_stdout", "input": "2000000000 2000000000 1999999998 1999999999\n", "output": "1999999998 1999999999"}, {"type": "stdin_stdout", "input": "2000000000 2000000000 1999999999 1999999998\n", "output": "1999999999 1999999998"}, {"type": "stdin_stdout", "input": "1688112099 1875662241 198852947 116042960\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\nFurik loves math lessons very mu... | [{"type": "stdin_stdout", "input": "1000 1010\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1000 1000\n", "output": "0"}, {"type": "stdin_stdout", "input": "1190 225\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1190 315\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1491 512\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\nMaxim has opened his own restaur... | [{"type": "stdin_stdout", "input": "50\n15 28 34 29 17 21 20 34 37 17 10 20 37 10 18 25 31 25 16 1 37 27 39 3 5 18 2 32 10 35 20 17 29 20 3 29 3 25 9 32 37 5 25 23 25 33 35 8 31 29\n39\n", "output": "1.499798753"}, {"type": "stdin_stdout", "input": "50\n15 28 34 29 17 21 20 34 37 17 10 20 37 10 18 25 31 25 16 1 37 27 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\nGerald is very particular to eig... | [{"type": "stdin_stdout", "input": "1000000 1000000\n1000000 999999\n1000000 999998\n999999 1000000\n999999 999998\n999998 1000000\n999998 999999\n999998 999998\n", "output": "respectable"}, {"type": "stdin_stdout", "input": "581646 464672\n493402 649074\n581646 649074\n214619 649074\n581646 252709\n214619 252709\n2146... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja loves number sequences ve... | [{"type": "stdin_stdout", "input": "7\n1 53989\n1 47249\n1 71935\n2 1 3\n1 84520\n1 84185\n2 6 1\n14\n1 2 3 4 5 6 7 8 9 10 11 12 13 14\n", "output": "53989 47249 71935 53989 53989 53989 84520 84185 53989 47249 71935 53989 53989 53989 "}, {"type": "stdin_stdout", "input": "7\n1 53989\n1 47249\n1 71935\n2 1 3\n1 84520\n1... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.