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\nThere are n cities in Bearland, ... | [{"type": "stdin_stdout", "input": "100 100\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 60\n1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen Masha came to math classes ... | [{"type": "stdin_stdout", "input": "100\n2 2 2 2 3 3 3 3 3 3 1 3 3 2 3 3 0 3 3 3 2 3 3 3 3 1 3 3 3 3 3 3 3 1 1 2 2 2 2 2 1 3 3 2 2 1 3 3 3 2 3 3 3 1 1 2 3 1 0 0 1 3 3 3 1 3 2 2 2 2 3 3 2 2 2 3 3 2 2 3 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 2 3 3 3\n0 0 0 2 2 1 0 0 0 0 0 0 2 2 2 0 0 0 3 2 2 2 2 2 1 1 1 3 3 1 0 2 1 1 0 0 2 2 2 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\nOm Nom is the main character of ... | [{"type": "stdin_stdout", "input": "6\n87 62 58 32 81 92 12 50 23 27 38 39 64 74 16 35 84 59 91 87 14 48 90 47 44 95 64 45 31 11 67 5 80 60 36 15 91 3 21 2 40 24 37 69 5 50 23 37 49 19 68 21 49 9 100 94 45 41 22 31 31 48 25 70 25 25 95 88 82 1 37 53 49 31 57 74 94 45 55 93 43 37 13 85 59 72 15 68 3 90 96 55 100 64 63 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\nEverybody knows that the Berland... | [{"type": "stdin_stdout", "input": "2000\naabaaabaabababbbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\naaaaaaaaaaaaaaaa\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\nabbbaaabbbaaaab\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "9\naaaabaaaaa\n", "output": "1\n"}, {"type... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis task will exclusively conce... | [{"type": "stdin_stdout", "input": "100 20\n2 2 2 1 1 2 1 2 1 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 2 1 1 1 1 2 2 2 2 1 2 1 1 2 2 2 2 1 2 1 2 1 2 1 1 2 1 2 2 2 1 2 2 2 2 2 2 2 2 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 1 2 2 1 2 1 2 1 2 1 1 2 2 1 2 2 1 1 1\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "100 25\n2 2 1 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nManao is trying to open a rather... | [{"type": "stdin_stdout", "input": "2000\n", "output": "1333335000\n"}, {"type": "stdin_stdout", "input": "1999\n", "output": "1331335999\n"}, {"type": "stdin_stdout", "input": "1837\n", "output": "1033182073\n"}, {"type": "stdin_stdout", "input": "1747\n", "output": "888644743\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 set of n element... | [{"type": "stdin_stdout", "input": "6 2\n2578 6301 8624 6020 8513 9486\n", "output": "4401332\n"}, {"type": "stdin_stdout", "input": "6 3\n4759 5555 7401 8003 2501 6345\n", "output": "7431260\n"}, {"type": "stdin_stdout", "input": "6 1\n3100 7048 8360 9845 7229 5331\n", "output": "245478\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\nLittle Elephant loves magic squa... | [{"type": "stdin_stdout", "input": "0 100000 100000\n100000 0 100000\n100000 100000 0\n", "output": "100000 100000 100000\n100000 100000 100000\n100000 100000 100000\n"}, {"type": "stdin_stdout", "input": "0 98721 99776\n99575 0 99123\n98922 99977 0\n", "output": "99550 98721 99776\n99575 99349 99123\n98922 99977 99148... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInitially Ildar has an empty arr... | [{"type": "stdin_stdout", "input": "3\n0 1 1000000000\n", "output": "3"}, {"type": "stdin_stdout", "input": "2\n0 1000000000\n", "output": "2"}, {"type": "stdin_stdout", "input": "1\n1000000000\n", "output": "1"}, {"type": "stdin_stdout", "input": "5\n0 0 0 0 0\n", "output": "-1"}, {"type": "stdin_stdout", "input": "4\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPasha is participating in a cont... | [{"type": "stdin_stdout", "input": "44\n750 672 846 969 981 698 380 968 813 587 156 28 446 917 849 449 173 764 226 958 335 622 236 782 416 689 113 728 452 265 585 217 707 50 520 712 946 275 423 123 175 268 583 528\n4\n869 870\n1353 1354\n1683 1685\n2532 2540\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "42\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rebel leader and you a... | [{"type": "stdin_stdout", "input": "5\n1 1000000000 999999998\n1 1000000000 999999999\n1 1000000000 1000000000\n1000000000 1000000000 2\n1000000000 1000000000 1000000000\n", "output": "REBEL\nREBEL\nOBEY\nOBEY\nOBEY\n"}, {"type": "stdin_stdout", "input": "3\n3 7 2\n2 9 2\n999999937 999999929 2\n", "output": "REBEL\nREB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYet another Armageddon is coming... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "128207"}, {"type": "stdin_stdout", "input": "258634\n", "output": "35024"}, {"type": "stdin_stdout", "input": "12343\n", "output": "1778"}, {"type": "stdin_stdout", "input": "11010\n", "output": "1568"}, {"type": "stdin_stdout", "input": "47320\n", "output": "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 going to hold a competit... | [{"type": "stdin_stdout", "input": "146037 73018\n", "output": "146037 73018\n"}, {"type": "stdin_stdout", "input": "179651 89825\n", "output": "179651 89825\n"}, {"type": "stdin_stdout", "input": "104070 52034\n", "output": "104070 52034\n"}, {"type": "stdin_stdout", "input": "137684 68841\n", "output": "137684 68841\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sequences \\{A_1,...,A_... | [{"type": "stdin_stdout", "input": "100000 100000\n", "output": "742202979\n"}, {"type": "stdin_stdout", "input": "99991 99989\n", "output": "215961669\n"}, {"type": "stdin_stdout", "input": "23857 50338\n", "output": "123598436\n"}, {"type": "stdin_stdout", "input": "86918 71567\n", "output": "531753154\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\nSnuke had N cards numbered 1 thr... | [{"type": "stdin_stdout", "input": "7961\n570641734 802212645 776309598 809873412 803841293 359931843 792939994 233099102 401692872 600486353 217303985 108107734 560874418 799955982 883190766 630019949 636623822 273032982 235540677 331099668 777155291 724397459 613181400 534080974 922902142 15555595 732730818 469781636... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 piles of stones. The... | [{"type": "stdin_stdout", "input": "300\n384661649102 749740371860 182994067519 635480054507 188947792922 485525176794 78108687147 989617350189 631154348796 697481765405 265428579953 267391231487 298335916571 638840284853 801747319246 75872927591 763161973616 67416808051 855953652500 952149595553 120076702790 865269978... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet us denote by f(x, m) the rem... | [{"type": "stdin_stdout", "input": "10000000000 99201 99975\n", "output": "992010000000000\n"}, {"type": "stdin_stdout", "input": "9999999995 82382 99996\n", "output": "309280000028478\n"}, {"type": "stdin_stdout", "input": "9999999997 38566 99996\n", "output": "309280000067758\n"}, {"type": "stdin_stdout", "input": "9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEveryone knows that agents in Va... | [{"type": "stdin_stdout", "input": "1\n33\n200000000000000000000000000000022\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n1\n2\n1\n3\n4\n2068\n4\n2069\n", "output": "2\n1\n2\n2\n"}, {"type": "stdin_stdout", "input": "4\n1\n2\n1\n3\n3\n102\n4\n2069\n", "output": "2\n1\n1\n2\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\nOne industrial factory is reform... | [{"type": "stdin_stdout", "input": "100000 100000\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "32768 65536\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "65535 65536\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "98812 100000\n", "output": "No\n"}, {"type": "stdin_stdout", "input":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n points on a line... | [{"type": "stdin_stdout", "input": "100\n457 827 807 17 871 935 907 -415 536 170 551 -988 865 758 -457 -892 -875 -488 684 19 0 555 -807 -624 -239 826 318 811 20 -732 -91 460 551 -610 555 -493 -154 442 -141 946 -913 -104 704 -380 699 32 106 -455 -518 214 -464 -861 243 -798 -472 559 529 -844 -32 871 -459 236 387 626 -318... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is a student at Berland Sta... | [{"type": "stdin_stdout", "input": "4 113 370\n01110100100010110100110000000011001111110000100111111001011001110111110111001011010110000110110010101010110001000\n01101001111110001010001100101100111100111001001001001101110101100110110110001110100010111011101011101110011110100\n0110011000100111101000001010110011110001111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArthur and Alexander are number ... | [{"type": "stdin_stdout", "input": "200000000 794 1000 117 2000000000\n", "output": "2038505096\n"}, {"type": "stdin_stdout", "input": "20000000 280 1000 25 2000000000\n", "output": "2030769231\n"}, {"type": "stdin_stdout", "input": "19999 346 1000 141 2000000000\n", "output": "2328265426\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\nThis problem uses a simplified n... | [{"type": "stdin_stdout", "input": "10 14\n3 2\n7 2\n6 4\n8 1\n3 9\n5 6\n6 3\n4 1\n2 5\n7 10\n9 5\n7 1\n8 10\n3 4\n", "output": "unknown topology\n"}, {"type": "stdin_stdout", "input": "10 9\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n", "output": "star topology\n"}, {"type": "stdin_stdout", "input": "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\nAndrew often reads articles in h... | [{"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\n", "output": "0"}, {"type": "stdin_stdout", "input": "7\npavel\nerika\nalexxxxxxx\ngracio\nzhenya\nsudarev\nchelyaba\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArkady decides to observe a rive... | [{"type": "stdin_stdout", "input": "100\n0 1 2 2 3 0 1 5 6 6 0 0 8 7 1 9 9 4 10 11 12 2 12 12 12 12 9 13 14 8 15 15 15 19 15 7 17 17 18 19 9 10 21 0 22 9 2 24 24 4 24 7 25 14 5 8 28 29 30 31 31 31 0 3 15 31 8 33 6 35 35 35 36 36 37 37 38 39 28 0 2 23 41 9 9 0 6 25 41 41 12 42 43 43 36 44 51 45 43 4\n", "output": "761\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\nPolycarp is mad about coding, th... | [{"type": "stdin_stdout", "input": "501\noilesjbgowlnayckhpoaitijewsyhgavnthycaecwnvzpxgjqfjyxnjcjknvvsmjbjwtcoyfbegmnnheeamvtfjkigqoanhvgdfrjchdqgowrstlmrjmcsuuwvvoeucfyhnxivosrxblfoqwikfxjnnyejdiihpenfcahtjwcnzwvxxseicvdfgqhtvefswznuyohmmljlnxubhevywpmnitnkhecsgccpstxkmdzabsnwxkokdfsogzbpnfvgudvqlstxojzfzugxbfrozveai... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCalculate the value of the sum: ... | [{"type": "stdin_stdout", "input": "10000000000000 10000000000000\n", "output": "869957328\n"}, {"type": "stdin_stdout", "input": "7244641009859 6300054748096\n", "output": "955368330\n"}, {"type": "stdin_stdout", "input": "3483524125987 5259923264237\n", "output": "953462184\n"}, {"type": "stdin_stdout", "input": "972... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 returned from forest, Alyo... | [{"type": "stdin_stdout", "input": "120 362 6\ncaaccbbbabbbcbaacbaccacaaccacaaababccaccaabaccacccbbaaaaababbccbbacccaacabacbaaacabbacbabcccbccbcbbcaabaaabaabcccaabacbb\nabcbbaaccbbcabbcbbcacbabaacbaaacabcbabcabbabccbcaaacaccaaabbcbaacccccbcabacaacabbbcabaabcbbccabacbaaaacbbbbbccabccccbababcbacbbbcbbaabcaabcacbaaaaaccba... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMemory is performing a walk on t... | [{"type": "stdin_stdout", "input": "RDDLLDLUUUDDRDRURLUUURLLDDLRLUURRLLRRLDRLLUDRLRULLDLRRLRLRLRUDUUDLULURLLDUURULURLLRRRURRRDRUUDLDRLRDRLRRDDLDLDLLUDRUDRLLLLDRDUULRUURRDLULLULDUDULRURRDDDLLUDRLUDDLDDDRRDDDULLLLDLDRLRRLRRDDRLULURRUDRDUUUULDURUDRDLDDUDUDRRURDULRRUDRLRRDLUURURDLDRLRDUDDDLDDDURURLUULRDUUULRURUDUDRRUDULLLU... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOmkar is building a house. He wa... | [{"type": "stdin_stdout", "input": "21 16\n6\n1 7\n8 8\n9 9\n10 12\n13 15\n16 16\n3\n1 1\n2 8\n9 16\n2\n1 13\n14 16\n3\n1 9\n10 13\n14 16\n3\n1 2\n3 15\n16 16\n2\n1 15\n16 16\n4\n1 6\n7 11\n12 13\n14 16\n4\n1 1\n2 10\n11 15\n16 16\n4\n1 7\n8 9\n10 13\n14 16\n3\n1 2\n3 10\n11 16\n2\n1 9\n10 16\n2\n1 2\n3 16\n3\n1 2\n3 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAre you going to Scarborough Fai... | [{"type": "stdin_stdout", "input": "67 39\nacbcbccccbabaabcabcaaaaaaccbcbbcbaaaacbbcccbcbabbcacccbbabbabbabaac\n4 36 a b\n25 38 a a\n3 44 b c\n35 57 b a\n4 8 a c\n20 67 c a\n30 66 b b\n27 40 a a\n2 56 a b\n10 47 c a\n22 65 c b\n29 42 a b\n1 46 c b\n57 64 b c\n20 29 b a\n14 51 c a\n12 55 b b\n20 20 a c\n2 57 c a\n22 60 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 you've discovered a new... | [{"type": "stdin_stdout", "input": "10 79\n2 2 70\n2 10 35\n10 10 76\n11 11 66\n12 12 75\n12 14 88\n15 16 76\n17 18 97\n19 20 105\n20 20 46\n", "output": "862\n"}, {"type": "stdin_stdout", "input": "10 85\n3 5 57\n6 8 86\n9 10 46\n11 11 19\n11 12 37\n12 12 62\n14 14 60\n15 15 78\n16 16 69\n19 20 50\n", "output": "629\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn 2013, the writers of Berland ... | [{"type": "stdin_stdout", "input": "40\n10 23 54 73\n11 10 58 84\n11 9 65 84\n11 20 45 92\n11 11 35 96\n11 6 66 16\n11 12 1 13\n11 15 8 18\n11 18 72 86\n10 24 62 38\n10 27 79 12\n11 11 24 59\n11 14 6 99\n11 6 33 100\n11 10 37 60\n11 10 67 8\n11 6 73 25\n11 8 91 3\n10 28 45 32\n11 14 64 37\n11 21 15 79\n10 29 79 53\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\nVasya wrote down two strings s o... | [{"type": "stdin_stdout", "input": "340\nbaa?b?abab??ab??aaabaa???bbbb??abaaaba?a?b?bb?ab?bbaa??aaaa???aaa?b???ba?a??b?bb?bbbabb?bb?a?a?bbbabbba?b?ababbb?b?a??bbb??bb?ababb?abbbbba??aabbaab?aaa??a???bbaa?bb?bb?babaa?bb?a???b?abbb???bb?a?a??b?b?abbba?b??a?bab??baa?aabaabb?abbbab?aa???bbaab?bbab?ba?aab?b?baabb???aaa??bb?... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nColonel has n badges. He wants t... | [{"type": "stdin_stdout", "input": "50\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\n", "output": "1225"}, {"type": "stdin_stdout", "input": "50\n49 37 30 2 18 48 14 48 50 27 1 43 46 5 21 28 44 2 24 17 41 38 25 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\nVasya wants to turn on Christmas... | [{"type": "stdin_stdout", "input": "1 100\n100 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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhile Vasya finished eating his ... | [{"type": "stdin_stdout", "input": "100 2 1\n1 2 2 2 1 2 1 2 2 2 2 1 2 1 1 2 1 2 2 1 1 2 1 1 2 2 1 1 2 1 2 2 2 2 2 1 1 1 2 1 2 1 2 1 2 1 2 2 1 2 2 2 1 1 1 2 2 1 1 2 2 1 1 1 1 1 1 2 2 1 1 2 2 1 2 2 1 2 1 2 2 1 2 1 1 1 2 2 1 1 2 1 2 2 1 1 2 2 2 1\n", "output": "5200\n"}, {"type": "stdin_stdout", "input": "5 1000000000 1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCaptain Marmot wants to prepare ... | [{"type": "stdin_stdout", "input": "3\n-2248 6528 -2144 6181\n-2245 6663 -2100 7054\n-4378 7068 -4061 7516\n-4274 6026 -3918 5721\n4942 -6793 5014 -6807\n3463 -5170 3112 -5181\n2870 -6992 3038 -6567\n5688 -4318 5358 -4744\n5249 7233 5016 6863\n4312 7385 4162 7383\n5965 9138 5607 8728\n4053 8349 4124 8389\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\nAn atom of element X can exist i... | [{"type": "stdin_stdout", "input": "50 64\n257 258 350 375 1014 1017 1051 1097 1169 1177 1223 1836 1942 1983 2111 2131 2341 2418 2593 2902 2948 3157 3243 3523 3566 4079 4499 4754 5060 5624 6279 6976 7011 7071 7278 7366 7408 7466 7526 7837 7934 8532 8577 8680 9221 9271 9327 9411 9590 9794\n", "output": "0.91891891891891... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRamesses came to university to a... | [{"type": "stdin_stdout", "input": "10 10\n1 1 1 0 1 1 0 0 0 1\n1 1 1 1 0 0 0 0 0 1\n0 1 0 0 0 0 0 0 1 0\n0 0 0 0 0 1 0 0 0 0\n0 1 1 1 0 1 1 1 0 0\n0 0 0 1 1 1 0 1 0 0\n0 0 0 0 1 1 0 0 1 1\n0 0 0 1 1 0 1 1 1 1\n1 1 0 1 1 0 1 1 0 0\n1 0 0 0 0 0 0 0 1 0\n0 1 0 1 0 1 1 1 0 0\n0 1 1 0 0 0 0 0 0 1\n0 1 0 0 0 1 0 0 0 0\n0 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\nHacker Zhorik wants to decipher ... | [{"type": "stdin_stdout", "input": "50 50\n5733 740 547 3647 5382 5109 6842 7102 5879 1502 3574 1628 7905 4357 8569 9564 8268 3542 2487 8532 425 7713 2585 925 6458 2697 2844 69 324 9030 495 4428 6724 3524 3304 4874 1303 2098 1136 1048 2464 7316 274 9586 534 2450 2368 8060 7795 70692\n1918 4122 6806 4914 6517 6278 9842 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVanya smashes potato in a vertic... | [{"type": "stdin_stdout", "input": "25 1000000000 1\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 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\nWe often go to supermarkets to b... | [{"type": "stdin_stdout", "input": "50 37\n78 49\n96 4\n86 62\n28 4\n19 2\n79 43\n79 92\n95 35\n33 60\n54 84\n90 25\n2 25\n53 21\n86 52\n72 25\n6 78\n41 46\n3 68\n42 89\n33 35\n57 43\n99 45\n1 82\n38 62\n11 50\n55 84\n1 97\n12 67\n51 96\n51 7\n1 100\n79 61\n66 54\n97 93\n52 75\n80 54\n98 73\n29 28\n73 96\n24 73\n3 25\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n\"We've tried solitary confineme... | [{"type": "stdin_stdout", "input": "98\n-99 -98 -95 -90 97 93 96 95 98 98 -94 -92 -99 -92 -91 -87 -83 -84 -87 -88 -90 -79 -79 -82 -77 -76 92 82 91 91 90 91 -69 -72 -65 -68 -65 -58 -59 -63 -56 -57 -59 -53 -55 -45 -51 -52 73 81 75 71 77 72 67 70 60 70 61 64 -34 -41 -41 -41 -37 -39 -36 -33 -36 -36 -33 -36 54 49 53 51 50 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n-27433367 -21216390 1 303383863 -799030648 -1 160141051 -1 -342089574 -215298491\n", "output": "28 27\n"}, {"type": "stdin_stdout", "input": "10\n4 2 -4 3 1 2 -4 3 2 3\n", "output": "28 27\n"}, {"type": "stdin_stdout", "input": "2\n1000000000 -1000000000\n", "output": "2 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 king's birthday dinner was a... | [{"type": "stdin_stdout", "input": "100 100\n97 64 64 35 35 97 39 83 26 97 92 97 83 11 83 97 97 64 23 97 97 11 26 11 11 39 64 11 23 39 64 26 26 97 39 39 39 64 83 26 83 97 64 11 64 64 64 83 64 92 64 26 83 26 27 64 11 83 92 92 23 11 11 97 92 64 97 64 97 83 64 27 83 23 11 26 11 92 83 64 83 11 11 11 97 83 97 26 26 97 23 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\nEvery person likes prime numbers... | [{"type": "stdin_stdout", "input": "25\n", "output": "29\n1 25\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 8\n8 9\n9 10\n10 11\n11 12\n12 13\n13 14\n14 15\n15 16\n16 17\n17 18\n18 19\n19 20\n20 21\n21 22\n22 23\n23 24\n24 25\n1 13\n2 14\n3 15\n4 16\n"}, {"type": "stdin_stdout", "input": "24\n", "output": "29\n1 24\n1 2\n2 3\n3 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\nYou are given string s consists ... | [{"type": "stdin_stdout", "input": "<(([)]<[}>{)>][[(<()({{{>>((]<}<{{<>}><<[)}[[)([[)[)}<]<{(<>){([)><{[([[][({])})<][(}]}>>[){)[({>){(}[}})>}>]>)]}))})>}]\n", "output": "45\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\nHasan loves playing games and ha... | [{"type": "stdin_stdout", "input": "93 2364 1182\n", "output": "952630216\n"}, {"type": "stdin_stdout", "input": "83 2813 123\n", "output": "758958584\n"}, {"type": "stdin_stdout", "input": "100 5000 30\n", "output": "860412292\n"}, {"type": "stdin_stdout", "input": "45 2315 860\n", "output": "256332294\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\nVasily exited from a store and n... | [{"type": "stdin_stdout", "input": "amhppqxei543.370.32o544.196nocwgxticn776.562nm212.195dcftrrg635.773n646.814.94vrfmjjsgoi405.114k821.983.12rb749.955.62jifmdlgs615.101hg42.083.41gdqififg908.729qrrgopyn684.451avcjul727.150s864.068bcd196.732.37jd349.984.25ghn379.763.11dw881.650.19eysthrm790.534.68gilg546.048qs648.876pd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array a with n int... | [{"type": "stdin_stdout", "input": "10 10\n318890 307761 832732 700511 820583 522866 130891 914566 128429 739710\n4 9 178864\n6 9 741003\n4 9 172997\n4 6 314469\n1 4 694802\n8 8 401658\n7 10 376243\n7 8 508771\n3 5 30038\n2 10 591490\n", "output": "9\n9\n9\n6\n4\n8\n10\n8\n5\n10\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\nAfter a long day, Alice and Bob ... | [{"type": "stdin_stdout", "input": "40\n5 40 6 27 39 37 17 34 3 30 28 13 12 8 11 10 31 4 1 16 38 22 29 35 33 23 7 9 24 14 18 26 19 21 15 36 2 20 32 25\n", "output": "ABABBBABABAAAAAABAAABBBBBBAAAABABBABABBB\n"}, {"type": "stdin_stdout", "input": "16\n14 15 3 11 5 4 7 8 1 6 10 2 12 9 13 16\n", "output": "BBBBBAAAAAAAABA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTomorrow is a difficult day for ... | [{"type": "stdin_stdout", "input": "8\n80 72 20 12 10\n81 72 20 12 11\n80 73 20 12 11\n81 73 20 12 12\n80 73 20 12 10\n3 99 5 1 100\n99 1 1 4 100\n53 37 13 3 17\n", "output": "4 6\n5 6\n4 7\n5 7\n-1\n1 99\n99 1\n-1\n"}, {"type": "stdin_stdout", "input": "3\n7 5 4 5 8\n7 5 4 5 2\n20 53 45 26 4\n", "output": "7 1\n-1\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\nDisclaimer: there are lots of un... | [{"type": "stdin_stdout", "input": "228\n1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 31 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 63 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 31 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 127 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 31 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 63 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 31 1 3 1 7 1 3 1 15 1 3 1 7 1 3 1 255 1 3 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has got an undirected grap... | [{"type": "stdin_stdout", "input": "100000 3950493829\n", "output": "0 11111\n"}, {"type": "stdin_stdout", "input": "18889 138011083\n", "output": "0 2274\n"}, {"type": "stdin_stdout", "input": "100000 4999950000\n", "output": "0 0\n"}, {"type": "stdin_stdout", "input": "100000 49997\n", "output": "6 99683\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\nYour friend gave you a dequeue D... | [{"type": "stdin_stdout", "input": "50 100\n-10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nN players will participate in a ... | [{"type": "stdin_stdout", "input": "171\n158 2 11 40 53 51 26 89 135 78 167 25 123 157 100 152 72 35 39 126 124 119 68 105 162 150 84 82 59 109 28 70 34 110 85 136 57 145 134 47 99 20 83 95 154 98 73 138 48 29 120 116 66 58 96 18 102 24 153 127 125 61 32 129 16 131 50 46 10 113 91 75 13 86 65 45 146 133 122 103 128 93 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a sequence of N intege... | [{"type": "stdin_stdout", "input": "2896 1518\n498 2010 1723 2089 76 1224 1972 612 465 880 283 143 1538 372 841 1998 292 2096 423 728 2199 807 2325 1185 1664 2349 531 40 1039 2006 2179 1842 2954 2847 2540 1045 2697 2112 1625 2062 631 2136 544 2420 1199 2592 2820 802 1157 383 1164 617 1513 2876 2625 947 1720 1640 1772 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\nWe will create an artwork by pai... | [{"type": "stdin_stdout", "input": "300 150\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 late autumn evening n robots ... | [{"type": "stdin_stdout", "input": "4 3\n5 1000000000 999999999 12\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "4 5\n5 1000000000 999999999 12\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "4 8\n5 1000000000 999999999 12\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is sitting on an extremely... | [{"type": "stdin_stdout", "input": "200 100\n56988719755815575893282254081467698462485803782142631369385180999746639622554559884281193367342283559238834106917388166048020056852911293394377949964185368886333934084399980368238188117302968424219707\n", "output": "295455656"}, {"type": "stdin_stdout", "input": "200 99\n999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRyouko is an extremely forgetful... | [{"type": "stdin_stdout", "input": "100 100\n28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPaul is at the orchestra. The st... | [{"type": "stdin_stdout", "input": "10 10 10 1\n8 10\n2 9\n1 10\n3 1\n8 5\n10 1\n4 10\n10 2\n5 3\n9 3\n", "output": "1787\n"}, {"type": "stdin_stdout", "input": "10 10 10 1\n1 10\n10 8\n7 4\n7 2\n1 3\n6 6\n10 1\n2 7\n9 3\n3 10\n", "output": "1991\n"}, {"type": "stdin_stdout", "input": "10 10 10 1\n8 2\n9 10\n6 8\n10 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\nDreamoon is a big fan of the Cod... | [{"type": "stdin_stdout", "input": "5\n6 2\n3 1 1 5 7 10\n1 100\n100\n11 1\n1 1 1 1 1 1 1 1 1 1 1\n1 1\n1\n4 57\n80 60 40 20\n", "output": "5\n101\n2\n2\n60\n"}, {"type": "stdin_stdout", "input": "5\n1 1\n2\n2 1\n1 1\n4 1\n3 1 3 1\n1 100\n1\n1 100\n2\n", "output": "2\n2\n3\n101\n101\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\nRecently, Anton has found a set.... | [{"type": "stdin_stdout", "input": "{a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ITone 6 has been release... | [{"type": "stdin_stdout", "input": "141 12 6\n66 53 86 91 12 27 5 74 79 50 33 2 100 26 2 73 16 14 50 86 75 9 66 48 19 34 25 1 22 50 63 39 38 42 98 71 76 27 80 16 74 21 36 1 32 20 65 28 68 40 41 6 0 77 65 84 0 34 60 0 42 65 2 16 25 85 35 57 74 66 26 33 39 14 0 6 2 15 87 99 47 67 75 63 72 32 93 7 5 63 35 99 89 61 18 25 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\nGiven an integer N, find two per... | [{"type": "stdin_stdout", "input": "129\n", "output": "NO\nYES\n7 3 6 5 1 2 4 9 10 11 12 13 14 15 8 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 16 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 32 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 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\nHeidi the Cow is aghast: cracks ... | [{"type": "stdin_stdout", "input": "350000 140000\n", "output": "453366\n"}, {"type": "stdin_stdout", "input": "350000 160000\n", "output": "155549\n"}, {"type": "stdin_stdout", "input": "350000 180000\n", "output": "708073\n"}, {"type": "stdin_stdout", "input": "350000 200000\n", "output": "504934\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\nIn order to make the \"Sea Battl... | [{"type": "stdin_stdout", "input": "100000000 100000000 100000000 100000000\n", "output": "600000004\n"}, {"type": "stdin_stdout", "input": "100000000 100000000 99999999 100000000\n", "output": "600000004\n"}, {"type": "stdin_stdout", "input": "98948781 84140283 95485812 84557929\n", "output": "535293990\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\nUnlike Knights of a Round Table,... | [{"type": "stdin_stdout", "input": "11 10\n1 2 3 4 5 6 7 8 9 10 11\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1000000000 2000000000 3000000000 4000000000 5000000000 6000000000 7000000000 8000000000 9000000000 10000000000 11000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a permutation of n... | [{"type": "stdin_stdout", "input": "6 1\n5 3 4 6 2 1\n", "output": "10.142857142857142\n"}, {"type": "stdin_stdout", "input": "6 1\n4 2 5 1 3 6\n", "output": "6.380952380952381\n"}, {"type": "stdin_stdout", "input": "6 2\n1 4 6 5 2 3\n", "output": "6.954648526077097\n"}, {"type": "stdin_stdout", "input": "6 1\n5 2 3 4 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe R1 company wants to hold a w... | [{"type": "stdin_stdout", "input": "80 50\n15160 6853 20254 11358 19535 27691 2983 31650 9219 11833 32053 31695 21511 4320 4384 24843 1454 31543 18796 13815 1546 27926 16276 14315 12542 25370 24890 29647 3584 17867 12446 15072 19852 30207 16361 7964 5343 398 10837 31114 9252 12767 15098 22562 32637 31823 8160 12658 642... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's define the sum of two perm... | [{"type": "stdin_stdout", "input": "84\n83 4 68 34 24 2 48 38 22 51 5 62 31 67 66 53 49 70 9 71 46 41 30 8 50 17 28 79 15 80 32 43 14 74 29 42 81 60 56 65 23 0 77 76 58 78 1 11 37 27 75 35 18 73 54 20 57 33 36 6 61 69 64 55 39 10 3 45 13 26 59 82 21 25 63 52 16 44 47 72 19 12 7 40\n63 41 80 52 36 45 17 69 22 66 37 21 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\nFrom \"ftying rats\" to urban sa... | [{"type": "stdin_stdout", "input": "10\n9 16 19 23 7 14 21 15 14 6\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "10\n5 20 18 1 12 17 22 20 26 4\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "9\n17 16 8 13 6 29 22 27 18\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "8\n22 27 29 29 27 26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEach employee of the \"Blake Tec... | [{"type": "stdin_stdout", "input": "28 7\n1-a 1-b 1-c 1-d 1-e 1-f 1-t 1-a 1-b 1-c 1-d 1-e 1-f 1-j 1-a 1-b 1-c 1-d 1-e 1-f 1-g 1-a 1-b 1-c 1-d 1-e 1-f 2-g\n1-a 1-b 1-c 1-d 1-e 1-f 1-g\n", "output": "2"}, {"type": "stdin_stdout", "input": "15 7\n1-b 1-a 1-b 1-c 1-b 1-a 1-b 1-c 1-b 1-a 1-b 1-c 1-b 1-a 1-b\n1-b 1-a 1-b 1-c... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGame \"Minesweeper 1D\" is playe... | [{"type": "stdin_stdout", "input": "?2*?2*??1*2**?2*1???*2???100?????*???*?*????0????2?*?*?1??1??*?01**2**1001??**??**??1*?*???00??**??*\n", "output": "147483634\n"}, {"type": "stdin_stdout", "input": "21?20*0000?2?22??0001*?1??12?20020200?**0*12?*221*0*1200*?0*11?022*110*2*2022120*2*2100*0?0*02?012?1\n", "output": "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\nSince you are the best Wraith Ki... | [{"type": "stdin_stdout", "input": "100 20\n9149 9142 7686 5769 1871 4565 5670 8587 663 637 3421 4267 6884 8142 7634 5748 936 316 9300 771 6906 9230 8994 9690 7155 9393 6274 3183 932 7460 1611 6122 4031 6922 5466 1499 5290 4907 4673 5665 9744 1602 9891 8260 6351 4640 9930 9756 5242 3752 82 3287 824 6897 5579 9095 883 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\nA Christmas party in city S. had... | [{"type": "stdin_stdout", "input": "100 10\n6 8 4 4 6 6 4 1 4 1 6 1 4 6 1 10 1 4 6 10 6 1 6 1 6 4 4 1 4 9 1 6 1 1 4 6 4 4 6 6 4 6 1 1 1 1 6 4 1 6 1 6 1 1 6 4 1 8 6 4 6 4 2 4 6 4 4 6 4 6 6 1 6 1 4 1 4 6 4 10 1 1 6 1 6 6 4 1 6 1 1 4 3 4 4 4 4 4 4 5\n", "output": "100\n4 6\n4 6\n4 6\n3 4\n9 4\n4 6\n6 1\n1 4\n1 4\n1 4\n4 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n points on a straight... | [{"type": "stdin_stdout", "input": "10\n711183437 845779129 -106125616 -481773790 66231250 -183390793 -711197523 -196001897 -440633306 -873649505\n", "output": "156311685\n"}, {"type": "stdin_stdout", "input": "7\n996073710 -246878649 34663194 35526441 634003254 -704646201 -905166147\n", "output": "15411\n"}, {"type": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp is in really serious tr... | [{"type": "stdin_stdout", "input": "50\n5 289 6\n16 126 16\n12 16 13\n12 71 8\n4 6 5\n9 57 4\n13 120 16\n3 54 17\n5 374 3\n7 345 9\n18 74 6\n10 17 6\n11 38 8\n19 40 2\n8 49 12\n20 6 1\n14 159 19\n6 90 10\n8 24 15\n12 2 18\n17 215 13\n8 91 19\n15 60 20\n14 247 14\n5 177 20\n11 90 9\n2 107 17\n11 8 10\n16 66 9\n15 2 7\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\nTwo semifinals have just been in... | [{"type": "stdin_stdout", "input": "8\n100 101\n200 201\n300 301\n310 400\n320 500\n330 600\n340 700\n350 800\n", "output": "11111000\n11110000\n"}, {"type": "stdin_stdout", "input": "4\n9900 9850\n9940 9930\n10000 10020\n10060 10110\n", "output": "1100\n1100\n"}, {"type": "stdin_stdout", "input": "4\n9840 9920\n9860 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\nWhile sailing on a boat, Inessa ... | [{"type": "stdin_stdout", "input": "1 1000000\n", "output": "499999999999.5000000000000\n"}, {"type": "stdin_stdout", "input": "65634 756534\n", "output": "4327298.8938659839332\n"}, {"type": "stdin_stdout", "input": "7882 399082\n", "output": "10099233.4940370470285\n"}, {"type": "stdin_stdout", "input": "91306 947926... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nNowadays, most of the internet a... | [{"type": "stdin_stdout", "input": "5\n3778 9170\n2657 6649\n4038 9722\n3392 7255\n4890 8961\n", "output": "6938.4627241727\n"}, {"type": "stdin_stdout", "input": "5\n2194 6947\n2062 8247\n4481 8430\n3864 9409\n3784 5996\n", "output": "6373.5390940730\n"}, {"type": "stdin_stdout", "input": "5\n4787 9531\n3133 9597\n175... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhile Farmer John rebuilds his f... | [{"type": "stdin_stdout", "input": "13 78\n10 2\n6 5\n5 7\n10 3\n6 13\n4 7\n4 13\n1 12\n13 2\n1 7\n10 5\n10 13\n12 2\n10 6\n5 3\n10 8\n9 11\n6 1\n4 5\n12 3\n6 7\n8 2\n1 9\n4 11\n5 8\n6 3\n9 5\n5 2\n13 11\n10 4\n12 7\n5 13\n12 8\n10 12\n6 12\n5 11\n1 8\n7 8\n12 4\n10 7\n1 5\n1 2\n10 11\n2 11\n12 13\n9 7\n8 3\n12 9\n9 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\nBerland National Library has rec... | [{"type": "stdin_stdout", "input": "50\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\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\nVus the Cossack has $n$ real num... | [{"type": "stdin_stdout", "input": "12\n186.62750\n627.48262\n-10.75090\n-421.01607\n-276.10237\n-330.00000\n-301.09007\n571.50722\n976.10893\n-335.61496\n-535.76625\n-151.38565\n", "output": "187\n628\n-10\n-421\n-276\n-330\n-301\n571\n976\n-336\n-536\n-152\n"}, {"type": "stdin_stdout", "input": "14\n-2.79549\n1.19725... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sharks who grow flow... | [{"type": "stdin_stdout", "input": "20 999999937\n999999936 999999937\n999999937 999999938\n999999936 999999937\n999999937 999999938\n999999936 999999937\n999999937 999999938\n999999936 999999937\n999999937 999999938\n999999936 999999937\n999999937 999999938\n999999936 999999937\n999999937 999999938\n999999936 99999993... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima has a hamsters farm. Soon N... | [{"type": "stdin_stdout", "input": "947264836 50\n977141206 956777871 186433588 538218068 759102378 327484438 88827268 266300062 670616672 756092978 414181331 913675814 898008516 343057716 99416265 236586817 52751842 550467703 684435578 844649988 917709231 550467703 493542638 707106470 414181331 198095018 913675814 994... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 R1 company has recently boug... | [{"type": "stdin_stdout", "input": "15 3\n!..!?!,!,..,?!.\n", "output": "LEFT\nLEFT\nPRINT !\nRIGHT\nPRINT .\nRIGHT\nPRINT .\nRIGHT\nPRINT !\nRIGHT\nPRINT ?\nRIGHT\nPRINT !\nRIGHT\nPRINT ,\nRIGHT\nPRINT !\nRIGHT\nPRINT ,\nRIGHT\nPRINT .\nRIGHT\nPRINT .\nRIGHT\nPRINT ,\nRIGHT\nPRINT ?\nRIGHT\nPRINT !\nRIGHT\nPRINT .\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\nChouti is working on a strange m... | [{"type": "stdin_stdout", "input": "82\n24 192 896 1568 2907 4840 7475 9775 11109 29939 22475 45951 46552 36859 66787 106329 85211 94423 65627 147436 143259 128699 139277 167743 178063 192167 150133 162719 177103 160732 139859 157301 176681 199291 152867 182611 199632 199535 199905 199959 23333\n", "output": "No\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 have a given integer $n$. Fi... | [{"type": "stdin_stdout", "input": "60\n", "output": "1073741824"}, {"type": "stdin_stdout", "input": "56\n", "output": "268435456"}, {"type": "stdin_stdout", "input": "44\n", "output": "4194304"}, {"type": "stdin_stdout", "input": "36\n", "output": "262144"}, {"type": "stdin_stdout", "input": "18\n", "output": "512"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStepan likes to repeat vowel let... | [{"type": "stdin_stdout", "input": "200\nmmffggzvuuzzlkafduueqocuybiiaaeeoiioouaaurccuqoouuooooooyjjtyyxxiipneeueyuuoyxxhhkaaooooyaaauuoppzabuuoiiuuggcciissuugejjiirruummsiifaauyypauwoofiemzaeeeeeeiioozzttyyidaaaiggizzerkooooeeepueeauuppthhb\n", "output": "mmffggzvuzzlkafdueqocuybiaeeoioouaurccuqoouoyjjtyxxipneeueyuoyx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of inte... | [{"type": "stdin_stdout", "input": "20 22\n858276994 -568758442 -918490847 -983345984 -172435358 389604931 200224783 486556113 413281867 -258259500 -627945379 -584563643 444685477 -602481243 -370745158 965672503 630955806 -626138773 -997221880 633102929\n-61330638 -977252080 -212144219 385501731 669589742 954357160 563... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVova, the Ultimate Thule new sha... | [{"type": "stdin_stdout", "input": "499999998500000001 1000000000\n", "output": "999955279\n"}, {"type": "stdin_stdout", "input": "499999998500000000 1000000000\n", "output": "999955279\n"}, {"type": "stdin_stdout", "input": "499999999500000000 1000000000\n", "output": "999999998\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\nWhile playing yet another strate... | [{"type": "stdin_stdout", "input": "11\n559227829 -118401759 491756598 -50857099 491152214 -500410377 141179566 -414122877 144131087 -460846619 791017750\n", "output": "3779030445\n"}, {"type": "stdin_stdout", "input": "9\n286474128 -767346318 14465977 -736068092 594841463 -281215614 214724210 -313802706 43797330\n", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an undirected grap... | [{"type": "stdin_stdout", "input": "12 58\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 10\n1 11\n1 12\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n2 10\n2 11\n2 12\n3 4\n3 5\n3 6\n3 7\n3 8\n3 9\n3 10\n3 11\n3 12\n4 5\n4 6\n4 8\n4 11\n4 12\n5 6\n5 7\n5 8\n5 9\n5 10\n5 11\n6 7\n6 8\n6 9\n6 10\n6 11\n6 12\n7 8\n7 9\n7 10\n7 11\n7 12\n8 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\nNian is a monster which lives de... | [{"type": "stdin_stdout", "input": "24 24\n299931317 581208095 975349898 832722683 817690798 482251493 336949323 145902930 573001018 802990442 898055771 253410043 150981561 225791789 53290960 405421751 723296526 565432511 256399554 374970926 22699716 104391316 121063780 149329252\n-295118728 -830122321 -294539299 -9059... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integer X is said to ... | [{"type": "stdin_stdout", "input": "100000\n", "output": "3234566667\n"}, {"type": "stdin_stdout", "input": "94598\n", "output": "2345654334\n"}, {"type": "stdin_stdout", "input": "91278\n", "output": "2332345676\n"}, {"type": "stdin_stdout", "input": "97979\n", "output": "3223456555\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\nGiven is a permutation P of \\{1... | [{"type": "stdin_stdout", "input": "95\n41 7 46 26 89 2 78 92 8 16 45 57 17 6 35 62 91 95 63 48 19 79 74 52 1 77 28 93 56 31 25 54 40 64 9 34 53 11 10 55 94 24 67 58 27 60 90 87 18 73 50 80 20 21 61 42 88 14 44 76 39 70 51 66 83 32 30 81 23 82 72 65 15 68 75 71 69 13 4 3 85 84 49 59 22 33 5 47 12 37 29 36 38 86 43\n", ... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.