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\nWe have a tree with N vertices. ... | [{"type": "stdin_stdout", "input": "10\n2 8\n6 0\n4 1\n7 6\n2 3\n8 6\n6 9\n2 4\n5 8", "output": "3"}, {"type": "stdin_stdout", "input": "5\n0 1\n0 2\n0 3\n3 4", "output": "2"}, {"type": "stdin_stdout", "input": "5\n0 1\n0 2\n1 3\n3 4", "output": "1"}, {"type": "stdin_stdout", "input": "2\n0 18", "output": "1"}, {"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 signed up for a new websit... | [{"type": "stdin_stdout", "input": "atcoderbeeinnercontgst\natcoderregularcontest", "output": "aattccooddeerrbreeegiunlnaerrccoonnttegsstt\n"}, {"type": "stdin_stdout", "input": "atcoderbeeinnercontgst\natcoaerreguldrcontest", "output": "aattccoodaeerrbreeegiunlnderrccoonnttegsstt\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\nTakahashi is playing with N card... | [{"type": "stdin_stdout", "input": "15 10\n1 5 6 10 11 11 11 20 21 25 25 26 99 124 99", "output": "6\n"}, {"type": "stdin_stdout", "input": "15 10\n0 5 6 10 11 11 11 20 21 25 25 26 99 131 99", "output": "5\n"}, {"type": "stdin_stdout", "input": "15 10\n0 5 6 10 11 11 11 20 21 46 25 26 99 131 99", "output": "5\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\nYou are given circle $A$ with ra... | [{"type": "stdin_stdout", "input": "2\n1.3018830993798196 1.1804991696233216 6.678597997840617 2.1321559253491804 2.072303142011048 4.898405435743801\n1.6154186783950772 0.39921226227011497 2.512872370263131 5.273208013897418 2.169775861927481 3.924014997809771", "output": "2\n1\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe brothers Hiroshi and Kenjiro... | [{"type": "stdin_stdout", "input": "0 11\n10 0\n-1 1 41 0", "output": "kenjiro\n"}, {"type": "stdin_stdout", "input": "0 11\n10 0\n-1 2 41 0", "output": "kenjiro\n"}, {"type": "stdin_stdout", "input": "0 10\n10 0\n-1 2 41 0", "output": "kenjiro\n"}, {"type": "stdin_stdout", "input": "0 10\n10 1\n-1 2 41 0", "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\nMy arm is stuck and I can't pull... | [{"type": "stdin_stdout", "input": "1\n11\n111111\n111111111111\n12345\n11111111119999999999\n11111111113333333333\n11111111118888888888\n11111111112222222222111111111\n11111111110000000000444444444\n11224111122411\n888888888888999999999999888888888888999999999999999999\n666666666666666777333333333338888888888\n1111114... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring a voyage of the starship ... | [{"type": "stdin_stdout", "input": "4\n10.431258066320945 10.00000 10.963374203026609\n21.297630146026126 10.00000 10.00000\n20.00000 20.997700286656844 10.00000\n11.414338431837134 20.00000 10.00000\n4\n11.03531062521475 12.469639655902677 10.968703737628516\n10.00000 51.12714506944212 50.70404839090845\n51.1844286530... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\ncrc\n1\n\n\n... | [{"type": "stdin_stdout", "input": "epi\n-2", "output": "eipie\n"}, {"type": "stdin_stdout", "input": "eoi\n-2", "output": "eioie\n"}, {"type": "stdin_stdout", "input": "eoj\n-2", "output": "ejoje\n"}, {"type": "stdin_stdout", "input": "enj\n-2", "output": "ejnje\n"}, {"type": "stdin_stdout", "input": "fnj\n-2", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nYamano Mifune Gakuen'... | [{"type": "stdin_stdout", "input": "5 10 5\n0 1 1 2\n0 2 1 2\n0 1 2 3\n1 2 0 2\n1 4 2 3\n2 1 1 1\n2 1 1 2\n3 3 2 3\n4 1 1 2\n4 2 1 2", "output": "13\n"}, {"type": "stdin_stdout", "input": "5 10 5\n0 1 1 2\n0 2 1 2\n0 1 2 3\n1 2 0 2\n1 4 2 3\n2 1 1 1\n2 1 1 2\n3 3 2 4\n4 1 1 2\n4 2 0 2", "output": "14\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\nFind places where a string P is ... | [{"type": "stdin_stdout", "input": "aaaaab\naa", "output": "0\n1\n2\n3\n"}, {"type": "stdin_stdout", "input": "baaaaa\naa", "output": "1\n2\n3\n4\n"}, {"type": "stdin_stdout", "input": "aaabaa\naa", "output": "0\n1\n4\n"}, {"type": "stdin_stdout", "input": "baaaab\naa", "output": "1\n2\n3\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\nIn the online judge system, a ju... | [{"type": "stdin_stdout", "input": "3\n14\n11\n14\n2\n58\n0", "output": "Case 1: 3\nCase 2: 14\nCase 3: 11\nCase 4: 14\nCase 5: 2\nCase 6: 58\n"}, {"type": "stdin_stdout", "input": "3\n5\n11\n14\n26\n34\n0", "output": "Case 1: 3\nCase 2: 5\nCase 3: 11\nCase 4: 14\nCase 5: 26\nCase 6: 34\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings s and ... | [{"type": "stdin_stdout", "input": "50\naabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyz\nzyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\n", "output": "1201\n49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 49 48 47 46 45 44 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 binary string s.... | [{"type": "stdin_stdout", "input": "40\n1111110111111111111111011111111111111110\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "40\n0000000000100000100000000000000000000000\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "40\n0000010010000000000001000110000001010100\n", "output": "40\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 came to the exhibition and o... | [{"type": "stdin_stdout", "input": "50 1000000000\n824428839 821375880 831521735 868908015 86990853 248293447 886713846 425716910 443947914 504402098 40124673 774093026 271211165 873482658 592754073 490097471 947930201 69692739 145291746 418475785 80274059 696889747 854947829 231642778 141525047 57563878 92067934 38750... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Fair Nut is going to travel ... | [{"type": "stdin_stdout", "input": "10\n81 34 31 38 69 62 54 18 72 29\n4 8 12\n2 9 25\n4 5 17\n5 7 35\n10 1 13\n9 3 53\n7 6 22\n1 6 82\n3 10 42\n", "output": " 187\n"}, {"type": "stdin_stdout", "input": "10\n11 43 11 96 18 53 25 89 31 41\n2 4 41\n7 1 88\n3 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\nYou are policeman and you are pl... | [{"type": "stdin_stdout", "input": "100 2 2\n1 73456 13268 11914 2 1 2 1 1 2 1 1 87480 65464 2 40468 7016 70750 28675 92808 74100 22702 47484 22345 61255 1 104206 62017 89058 61094 76626 1 171051 98876 97451 18228 2 2 1 38979 1 144831 1 43289 73591 2 1 91061 89577 13598 1 2 2 57020 2 82044 24974 1 1 958 8399 1 98709 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\nAlice lives on a flat planet tha... | [{"type": "stdin_stdout", "input": "10\n9 9\n2 2\n1111111111\n1000111111\n1000111111\n1111111111\n1111000001\n1111011111\n1111010001\n1111010101\n1111000101\n1111111111\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n2 2\n9 9\n1111111111\n1000111111\n1000111111\n1111111111\n1111000001\n1111011111\n11110100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, Tokitsukaze found an i... | [{"type": "stdin_stdout", "input": "1000000000000000000 20 365\n31881893160049984 103938857870698567 103962228223609431 140762820261865064 175962215264653912 239086305245565642 354522451098745823 383839975876242372 443471287955807705 478923027151493682 511195154588214957 619570919279066139 677571312513476877 7058647976... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "40\n2 2\n5 2\n1 5\n1 1\n3\n1 2\n1 1\n1 2\n1 1\n1 2\n2 3\n2 1\n1\n1\n1 1\n1\n2 1\n1\n1\n1 2\n2 3\n2 2\n1 3\n3 3\n1 1\n1\n2 1\n3\n4\n1 1\n2\n2 2\n1 1\n1 1\n2 2\n1 1\n1 1\n1 1\n1\n2 1\n1\n1\n2 1\n5\n3\n1 1\n2\n1 2\n2 2\n2 1\n1\n1\n2 2\n3 2\n2 4\n1 1\n5\n1 2\n2 1\n1 2\n1 1\n1 2\n1 1\n1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis problem is interactive.\n\n... | [{"type": "stdin_stdout", "input": "49 48 47\n747080538 138591411 638550649 673032887 796857375 832746364 509949708 311532132 460813705 216311740 165294553 956747626 618288861 357459930 221681705 949165023 594484764 720355327 152613351 968837649 507974993 368359947 153531713 845369067 168627715 32853845 361562163 35799... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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[3R2 - Standby for Action](https... | [{"type": "stdin_stdout", "input": "100000\n", "output": "12.090146129863335\n"}, {"type": "stdin_stdout", "input": "111735\n", "output": "12.201105415046918\n"}, {"type": "stdin_stdout", "input": "178482\n", "output": "12.669461501082823\n"}, {"type": "stdin_stdout", "input": "152946\n", "output": "12.515059130925348\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNikolay has only recently starte... | [{"type": "stdin_stdout", "input": "25\n5 1 1\n5 2 3\n5 5 5\n5 5 1\n5 4 4\n10 1 2\n10 3 7\n10 10 10\n10 3 1\n10 7 6\n1000000 21232 1234\n999999 999999 999999\n1000000 300001 966605\n1000000 290001 679121\n500000 111099 123456\n100 1 1\n1000000000 1 1000000000\n1000000000 1 500000000\n100000000 1 12345678\n1000000000 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "6\n8\n1 1 4 2 1 2 1 1\n3\n1 3 12\n4\n1 10 10 1\n1\n26\n2\n2 4\n3\n2 1 1\n", "output": "6\n1\n4\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6\n8\n1 1 2 2 3 2 1 1\n3\n1 3 3\n4\n1 10 10 1\n1\n26\n2\n2 1\n3\n1 1 1\n", "output": "7\n2\n4\n1\n1\n3\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\nMaria is the most active old lad... | [{"type": "stdin_stdout", "input": "4\n5\n1 1 0 2 1\n6\n2 3 4 4 12 7\n6\n2 5 4 5 0 11\n5\n1 2 1 5 6\n", "output": "6\n5\n6\n4\n"}, {"type": "stdin_stdout", "input": "4\n5\n1 1 2 2 1\n6\n2 3 4 4 6 7\n6\n2 5 4 5 0 11\n5\n1 2 1 5 6\n", "output": "6\n5\n6\n4\n"}, {"type": "stdin_stdout", "input": "4\n5\n2 0 2 2 -1\n6\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\nYou are given a tree with n vert... | [{"type": "stdin_stdout", "input": "15\n4 6\n8 4\n12 11\n7 6\n9 8\n5 1\n14 13\n6 13\n1 4\n1 2\n6 11\n10 8\n15 14\n3 1\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "15\n9 11\n8 15\n6 5\n12 10\n1 2\n5 11\n10 7\n3 2\n6 7\n4 8\n3 5\n9 13\n13 14\n3 4\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "15\n9 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n people who want to p... | [{"type": "stdin_stdout", "input": "4\n14\n2 6 5 9 5 8 13 14 12 5 6 14 5 2\n36\n15 22 27 14 23 36 10 17 33 21 18 22 3 4 32 24 8 19 36 22 17 11 24 10 33 4 30 6 2 17 11 16 18 1 2 20\n2\n2 2\n12\n4 9 10 6 1 9 5 8 12 9 9 12\n", "output": "3\n11\n1\n4\n"}, {"type": "stdin_stdout", "input": "4\n14\n2 6 5 9 5 8 13 14 12 5 6 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 call a sequence b_1, b_2, ... | [{"type": "stdin_stdout", "input": "3\n8\n1 2 7 3 2 1 2 3\n2\n2 1\n7\n4 1 5 2 6 3 7\n", "output": "\n6\n2\n7\n"}, {"type": "stdin_stdout", "input": "3\n8\n1 2 7 3 2 1 2 5\n2\n2 1\n7\n4 1 5 2 6 3 7\n", "output": "6\n2\n7\n"}, {"type": "stdin_stdout", "input": "3\n8\n1 2 7 6 2 1 1 3\n2\n2 1\n7\n4 1 5 2 6 3 7\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\nOnce Bob took a paper stripe of ... | [{"type": "stdin_stdout", "input": "100\n-4 2 4 4 1 3 -3 -3 2 1 -4 0 0 2 3 -1 -4 -3 4 -2 -3 -3 -3 -1 -2 -3 -1 -4 0 4 0 -1 4 0 -4 -4 4 -4 -2 1 -4 1 -3 -2 3 -4 4 0 -1 3 -1 4 -1 4 -1 3 -3 -3 -2 -2 4 -3 -3 4 -3 -2 -1 0 -2 4 0 -3 -1 -2 -3 1 -4 1 -3 -3 -3 -2 -3 0 1 -2 -2 -4 -3 -1 2 3 -1 1 1 0 3 -3 -1 -2\n", "output": "1\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou've decided to carry out a su... | [{"type": "stdin_stdout", "input": "10000 1000000 60000\n", "output": "793662"}, {"type": "stdin_stdout", "input": "100000 1000000 7821\n", "output": "108426"}, {"type": "stdin_stdout", "input": "100000 1000000 8225\n", "output": "114000"}, {"type": "stdin_stdout", "input": "100001 1000000 8225\n", "output": "114000"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRoma (a popular Russian name tha... | [{"type": "stdin_stdout", "input": "49 2\n34644511 221617567 136135827 144208961 359490601 86708232 545390603 188605873 64330753 488776302 104482891 112998614 437791390 46521319 70778345 339141601 136198441 292941209 299339510 582531183 555958105 437904637 74219097 135224808 236010407 122674666 438442529 186501223 6393... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 permutation p of size n is the... | [{"type": "stdin_stdout", "input": "16440\n", "output": "2 16440 4 16438 6 16436 8 16434 10 16432 12 16430 14 16428 16 16426 18 16424 20 16422 22 16420 24 16418 26 16416 28 16414 30 16412 32 16410 34 16408 36 16406 38 16404 40 16402 42 16400 44 16398 46 16396 48 16394 50 16392 52 16390 54 16388 56 16386 58 16384 60 163... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCurrently Tiny is learning Compu... | [{"type": "stdin_stdout", "input": "3119 2029631\n", "output": "0 0\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n0 7\n0 8\n0 9\n0 10\n0 11\n0 12\n0 13\n0 14\n0 15\n0 16\n0 17\n0 18\n0 19\n0 20\n0 21\n0 22\n0 23\n0 24\n0 25\n0 26\n0 27\n0 28\n0 29\n0 30\n0 31\n0 32\n0 33\n0 34\n0 35\n0 36\n0 37\n0 38\n0 39\n0 40\n0 41\n0 42\n0 43\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\nBerland scientists know that the... | [{"type": "stdin_stdout", "input": "100\n17 18 22 15 14 18 9 21 14 19 14 20 12 15 9 23 19 20 19 22 13 22 17 11 21 22 8 17 23 18 21 23 22 23 15 18 21 17 17 9 13 21 23 19 18 23 15 14 17 19 22 23 12 16 23 16 20 9 12 17 18 11 10 17 16 21 8 21 16 19 21 17 12 20 14 16 17 10 22 20 17 13 15 19 9 22 12 20 20 13 19 16 18 7 15 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\nInna likes sweets and a game cal... | [{"type": "stdin_stdout", "input": "10 10\nG********S\n*G*******S\n**G******S\n***G*****S\n****G****S\nS***G*****\n******G**S\n*******G*S\n********GS\nG********S\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 10\nG********S\n*G*******S\n**G******S\n***G*****S\n****S****G\nS***G*****\n******G**S\n*******G*... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 city has n junctions. There... | [{"type": "stdin_stdout", "input": "100\n174 174 49 152 10 185 101 157 28 177 105 83 155 178 119 123 197 197 56 174 39 53 85 94 72 166 71 43 177 123 186 11 64 82 145 81 11 29 100 10 106 45 138 79 131 90 80 104 149 116 129 30 96 192 11 182 92 157 95 136 152 38 68 34 42 95 164 134 117 75 186 185 28 146 86 24 147 12 166 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n children in Jzzhu's ... | [{"type": "stdin_stdout", "input": "100 20\n21 19 61 70 54 97 98 14 61 72 25 94 24 56 55 25 12 80 76 11 35 17 80 26 11 94 52 47 84 61 10 2 74 25 10 21 2 79 55 50 30 75 10 64 44 5 60 96 52 16 74 41 20 77 20 44 8 86 74 36 49 61 99 13 54 64 19 99 50 43 12 73 48 48 83 55 72 73 63 81 30 27 95 9 97 82 24 3 89 90 33 14 47 88 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 way to create a task is to l... | [{"type": "stdin_stdout", "input": "100 100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 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\nMike is the president of country... | [{"type": "stdin_stdout", "input": "20\n452405440 586588704 509061481 392584366 16115810 148658854 66743034 290624691 677780684 519361360 208050516 401554301 954478790 989443769 387546138 832279893 1081316002 80960260 846049648 588066499\n", "output": "1081316002 954478790 452405440 392584366 387546138 387546138 208050... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has recently bought a new ... | [{"type": "stdin_stdout", "input": "100 1\n5 3 1 5 6 2 4 8 3 3 1 1 2 8 2 3 8 2 5 2 6 2 3 5 2 1 2 1 2 8 4 3 3 5 1 4 2 2 2 5 8 2 2 6 2 9 3 4 1 8 1 5 5 6 6 2 2 7 3 3 4 2 4 1 2 6 6 4 9 4 3 2 3 8 2 3 1 4 1 4 1 3 5 3 5 5 2 3 4 1 1 8 1 5 6 9 4 2 5 1\n6 0 4 5 3 1 0 7 5 3 5 4 5 4 0 2 1 6 2 2 4 3 1 9 5 9 2 2 6 8 6 5 9 6 4 9 9 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\nCalculate the value of the sum: ... | [{"type": "stdin_stdout", "input": "10000000000000 10000000000000\n", "output": "869957328\n"}, {"type": "stdin_stdout", "input": "2213058376259 2126643910770\n", "output": "971336268\n"}, {"type": "stdin_stdout", "input": "7244641009859 6300054748096\n", "output": "955368330\n"}, {"type": "stdin_stdout", "input": "469... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBad news came to Mike's village,... | [{"type": "stdin_stdout", "input": "1000000000000000\n", "output": "4949100894494448\n"}, {"type": "stdin_stdout", "input": "998749999999991\n", "output": "4942914518376840\n"}, {"type": "stdin_stdout", "input": "999999999999993\n", "output": "4949100894494416\n"}, {"type": "stdin_stdout", "input": "999999999999997\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\nZS the Coder and Chris the Baboo... | [{"type": "stdin_stdout", "input": "61\nOX|XX\nOX|XX\nOX|XX\nXO|XO\nXX|XO\nXX|XX\nXX|XX\nOX|XX\nXO|XO\nOX|XO\nXO|OX\nXX|XX\nXX|XX\nOX|OX\nXX|OX\nOX|XO\nOX|XO\nXO|OX\nXO|XX\nOX|XX\nOX|XX\nXO|OX\nXO|XX\nXO|XX\nOX|XX\nXX|XX\nXX|XO\nXO|XX\nXX|XX\nXO|OX\nXX|XO\nXO|XX\nXO|XO\nXO|OX\nXX|OX\nXO|OX\nOX|XX\nXX|OX\nXX|XX\nOX|XO\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 new innovative ticketing syste... | [{"type": "stdin_stdout", "input": "10\n13\n45\n46\n60\n103\n115\n126\n150\n256\n516\n", "output": "20\n20\n10\n0\n20\n0\n0\n20\n20\n10\n"}, {"type": "stdin_stdout", "input": "10\n11\n45\n46\n60\n103\n115\n126\n150\n256\n516\n", "output": "20\n20\n10\n0\n20\n0\n0\n20\n20\n10\n"}, {"type": "stdin_stdout", "input": "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\nDuring the lesson small girl Aly... | [{"type": "stdin_stdout", "input": "11 1\n501465490\n366941771\n415080944\n385243536\n445132523\n697044413\n894369800\n812743722\n23684788\n466526046\n953916313\n45\n2 4\n8 9\n7 7\n4 9\n2 9\n2 11\n4 4\n5 7\n1 2\n5 10\n5 6\n1 7\n4 4\n1 6\n2 7\n10 11\n1 8\n6 11\n8 8\n8 10\n1 1\n5 10\n9 10\n6 9\n6 11\n1 1\n9 9\n10 11\n1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour search for Heidi is over – ... | [{"type": "stdin_stdout", "input": "80 4\n71 49 41 21 72 71 37 14 51 59 73 11 70 15 36 46 32 57 58 15 72 67 16 75 70 11 67 3 40 36 2 9 63 68 32 22 63 52 67 55 35 19 72 59 22 19 44 55 59 74 4 34 53 3 22 57 32 27 78 12 71 4 26 15 43 21 79 10 67 39 34 74 38 26 31 78 2 78 69 42\n", "output": "62\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\nIt's well known that the best wa... | [{"type": "stdin_stdout", "input": "15 17\n1 10 8\n5 19 1\n12 14 6\n9 19 8\n6 7 3\n5 11 9\n7 12 5\n17 20 8\n6 12 6\n11 19 4\n3 14 1\n15 19 10\n3 20 5\n5 19 9\n10 18 10\n", "output": "11"}, {"type": "stdin_stdout", "input": "15 24\n2 14 5\n7 14 4\n6 11 6\n3 5 6\n4 13 5\n10 11 4\n8 8 6\n5 14 4\n2 2 3\n9 14 5\n2 16 6\n14 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 plans to conduct a load... | [{"type": "stdin_stdout", "input": "100\n9997 9615 4045 2846 7656 2941 2233 9214 837 3312 5832 578 6146 8773 164 7303 3260 8684 1732 6608 9061 9224 7263 7279 1361 1823 8075 5946 2236 6529 6783 7494 510 1217 1135 8745 6517 141 8180 1948 6827 6091 2730 897 1254 705 1990 1806 1957 2571 8355 5542 5536 1527 886 2093 1532 48... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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— This is not playing but duty a... | [{"type": "stdin_stdout", "input": "2048 4096 1024\n", "output": "445542375\n"}, {"type": "stdin_stdout", "input": "1171 2989 2853\n", "output": "234725427\n"}, {"type": "stdin_stdout", "input": "4998 4998 4998\n", "output": "259368717\n"}, {"type": "stdin_stdout", "input": "3238 2923 4661\n", "output": "636587126\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\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"}, {"type": "stdin_stdout", "input": "5 1000000000 0\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\nJamie has recently found undirec... | [{"type": "stdin_stdout", "input": "965 5451\n", "output": "967 967\n1 2 1\n2 3 1\n3 4 1\n4 5 1\n5 6 1\n6 7 1\n7 8 1\n8 9 1\n9 10 1\n10 11 1\n11 12 1\n12 13 1\n13 14 1\n14 15 1\n15 16 1\n16 17 1\n17 18 1\n18 19 1\n19 20 1\n20 21 1\n21 22 1\n22 23 1\n23 24 1\n24 25 1\n25 26 1\n26 27 1\n27 28 1\n28 29 1\n29 30 1\n30 31 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\nValya and Tolya are an ideal pai... | [{"type": "stdin_stdout", "input": "242\nrrrrrrrrrrrrrmmmmmmmmmmmmmgggggggggggggwwwwwwwwwwwwwyyyyyyyyyyyyyhhhhhhhhhhhhhoooooooooooooqqqqqqqqqqqqqjjjjjjjjjjjjjvvvvvvvvvvvvvlllllllllllllnnnnnnnnnnnnnfffffffffffffeeeeeeeeaaaaaaaaiiiiiiiiuuuuuuuuzzyzzzzzbbbbbbbbxxxxxxxxttttttttsscckppdd\nzpdpkcscstxbzuiaetxbzuiaetxbduiaetx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 make a paper airplane, one ha... | [{"type": "stdin_stdout", "input": "10000 10000 1 1\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "10000 10000 3 2\n", "output": "16670000\n"}, {"type": "stdin_stdout", "input": "10000 10000 2 4\n", "output": "12500000\n"}, {"type": "stdin_stdout", "input": "10000 10000 1 4\n", "output": "25000000\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\nNastya owns too many arrays now,... | [{"type": "stdin_stdout", "input": "13\n-2075 -32242 27034 -37618 -96962 145894 64846 29532 -71761 28908 -21222 -61370 46899\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "13\n-2075 -32242 27034 -37618 -96962 82203 64846 48249 -71761 28908 -21222 -61370 46899\n", "output": "13\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\nChandu and Kundu are bored of dr... | [{"type": "stdin_stdout", "input": "45\n14 13 2 4 6 5 7 22 8 9 11 18 3 10 17 21 20 16 12 1 19 15\n33\n28 10 9 14 15 20 27 22 21 4 13 30 17 18 6 2 1 5 8 12 3 26 11 24 23 19 25 16 29 7\n48\n21 38 16 23 32 5 27 19 9 28 17 35 30 20 43 11 42 15 39 8 22 31 36 34 18 29 25 1 6 24 44 2 26 33 37 14 3 13 10 40 7 4 41 12\n67\n5 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\nLittle Jhool was was the most in... | [{"type": "stdin_stdout", "input": "10\n134\n4 43\n172\n67 23\n54\n13 29\n56\n23 33\n128\n50 19\n75\n15 39\n98\n52 43\n31\n5 2\n5\n5 6\n96\n41 12", "output": "Little Jhool wins!\nLittle Jhool wins!\nLittle Jhool wins!\nLittle Jhool wins!\nLittle Jhool wins!\nLittle Jhool wins!\nLittle Jhool wins!\nLittle Jhool wins!\nT... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSamu is playing a shooting game ... | [{"type": "stdin_stdout", "input": "10\n2 3 327 123 7 18\n8 5 29 132 18 17\n2 2 69 28 12 6\n8 10 81 77 16 0\n5 9 82 182 1 8\n7 4 92 133 16 17\n1 3 55 56 3 17\n3 9 37 160 4 14\n5 3 11 109 10 9\n5 9 82 182 1 8", "output": "99.703827\n0.000122\n3.312847\n85.413494\n0.000137\n14.183985\n0.127003\n0.000051\n0.000000\n0.0001... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSunny, Arpit and Kunal are playi... | [{"type": "stdin_stdout", "input": "2\n-2 -2 -2\n-2 -2 -2\n\nEDNSMN", "output": "-1\n-1\n"}, {"type": "stdin_stdout", "input": "2\n11 -10 0\n13 -3 -7\n\nULOCEO", "output": "10\n15\n"}, {"type": "stdin_stdout", "input": "2\n-2 -2 -2\n-2 -1 -2\n\nEDNSMN", "output": "-1\n0\n"}, {"type": "stdin_stdout", "input": "2\n5 -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\nYou have to go on a trip in your... | [{"type": "stdin_stdout", "input": "6\n250 763 230 116 210 306\n4704 1883 4000 3500 3166 3000\n50000\n\nSAMPLE", "output": "20260.223\n"}, {"type": "stdin_stdout", "input": "6\n233 763 230 116 210 211\n4704 2941 7334 3500 3166 3000\n50000\n\nSAMPLE", "output": "12971.778\n"}, {"type": "stdin_stdout", "input": "6\n51 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\nGiven are strings S and T. Consi... | [{"type": "stdin_stdout", "input": "eeffocfopuc\ncupofhottea", "output": "11\n"}, {"type": "stdin_stdout", "input": "ffgdmdfqpuc\noevt`ieuppd", "output": "10\n"}, {"type": "stdin_stdout", "input": "efffocfopuc\ncupofhottea", "output": "11\n"}, {"type": "stdin_stdout", "input": "efffodfopuc\ncupofhottea", "output": "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\nIn AtCoder City, there are three... | [{"type": "stdin_stdout", "input": "AAB", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ABB", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "BAA", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "BAB", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "BAA", "output": "Yes\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\nTakahashi has N sticks that are ... | [{"type": "stdin_stdout", "input": "7\n218 1140 1051 233 449 890 389", "output": "15\n"}, {"type": "stdin_stdout", "input": "7\n218 1140 1051 233 636 890 389", "output": "13\n"}, {"type": "stdin_stdout", "input": "7\n218 1140 1051 40 1181 890 389", "output": "14\n"}, {"type": "stdin_stdout", "input": "7\n218 1140 704 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\nGiven an integer N not less than... | [{"type": "stdin_stdout", "input": "-636", "output": "-114840\n"}, {"type": "stdin_stdout", "input": "-729", "output": "-131580\n"}, {"type": "stdin_stdout", "input": "-102", "output": "-18720\n"}, {"type": "stdin_stdout", "input": "-161", "output": "-29340\n"}, {"type": "stdin_stdout", "input": "-151", "output": "-275... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 prime number is an integer tha... | [{"type": "stdin_stdout", "input": "19\n10887", "output": "17 23\n10883 10889\n"}, {"type": "stdin_stdout", "input": "19\n17073", "output": "17 23\n17053 17077\n"}, {"type": "stdin_stdout", "input": "19\n30085", "output": "17 23\n30071 30089\n"}, {"type": "stdin_stdout", "input": "19\n21592", "output": "17 23\n21589 21... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, who aims to become a web d... | [{"type": "stdin_stdout", "input": "#ffe075\n#787878\n#decade\n#ff55ff\n0", "output": "yellow\nblack\nwhite\nfuchsia\n"}, {"type": "stdin_stdout", "input": "#ffe075\n#787878\n#decace\n#ff55ff\n0", "output": "yellow\nblack\nwhite\nfuchsia\n"}, {"type": "stdin_stdout", "input": "#ffe085\n#787878\n\"decade\n#ff55ff\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\nThe \"Western calendar\" is a co... | [{"type": "stdin_stdout", "input": "1 1914", "output": "3781\n"}, {"type": "stdin_stdout", "input": "2 1914", "output": "3825\n"}, {"type": "stdin_stdout", "input": "1 125", "output": "1992\n"}, {"type": "stdin_stdout", "input": "2 125", "output": "2036\n"}, {"type": "stdin_stdout", "input": "2 141", "output": "2052\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\nIOI Real Estate rents condominiu... | [{"type": "stdin_stdout", "input": "10\n8\n0\n12\n10\n12\n13\n20\n17\n19\n25", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n4\n7\n9\n10\n12\n13\n20\n17\n19\n20", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n8\n7\n8\n10\n12\n13\n20\n17\n19\n20", "output": "4\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\nTravelling by train is fun and e... | [{"type": "stdin_stdout", "input": "6 5\n 1 3 10\n 2 3 12\n 3 4 2\n 2 5 13\n 4 6 11\n10 10\n 1 3 11\n 2 3 25\n 2 5 81\n 3 6 82\n 4 10 58\n 5 9 68\n 6 7 80\n 6 9 67\n 8 9 44\n 9 10 21\n 0 0", "output": "38\n5 2 3 4 6\n446\n4 10 9 5 2 3 6 9 8\n"}, {"type": "stdin_stdout", "input": "6 5\n ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMeikyokan University is very fam... | [{"type": "stdin_stdout", "input": "8\n2\nomura\ntoshio\nraku\ntanaka\ninura\nyoshoi\nhayashi\nmiura\n3\n1\ntasaka\nnakata\ntanaka\n1\n1\nfoo\n5\n2\npsqt\nabcdef\nabzdefa\npqrst\nabdxcef\n0", "output": "inura,miura\ninura,omura\nmiura,omura\ntoshio,yoshoi\n4\ntanaka,tasaka\n1\n0\nabcdef,abdxcef\nabcdef,abzdefa\npqrst,p... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 F Pizza Delivery\n\nAlys... | [{"type": "stdin_stdout", "input": "4 5\n1 3 7\n4 2 6\n4 3 0\n2 1 34\n3 3 12", "output": "SOSO\nSOSO\nHAPPY\nHAPPY\nSOSO\n"}, {"type": "stdin_stdout", "input": "4 5\n1 1 5\n3 4 6\n4 2 13\n2 1 6\n2 3 17", "output": "SOSO\nSOSO\nSOSO\nHAPPY\nSOSO\n"}, {"type": "stdin_stdout", "input": "4 5\n1 3 5\n3 4 6\n2 2 7\n2 1 1\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBamboo Blossoms\n\nThe bamboos l... | [{"type": "stdin_stdout", "input": "3 2\n2 6\n10 10\n110 181\n2 371896\n0 0", "output": "5\n17\n21\n379\n5361757\n"}, {"type": "stdin_stdout", "input": "12 1\n3 1\n10 20\n100 50\n3 202868\n0 0", "output": "13\n4\n47\n150\n2792771\n"}, {"type": "stdin_stdout", "input": "2 4\n3 1\n13 35\n100 47\n4 346519\n0 0", "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\ncurtain\n\nSummer is coming soon... | [{"type": "stdin_stdout", "input": "4\n0 0\n10 0\n10 10\n0 10\n0 0\n5 0\n5 10\n0 10\n6\n0 0\n10 0\n10 5\n5 5\n5 10\n0 10\n2 0\n8 0\n8 10\n2 10\n12\n1 1\n1 3\n-1 3\n-1 1\n-3 1\n-3 -1\n-1 -1\n-1 -3\n1 -3\n1 -1\n3 -1\n3 1\n2 2\n-2 2\n-2 -2\n2 -2\n4\n20000 20000\n-20000 20000\n-20000 -20000\n20000 -20000\n1000 1000\n-1000 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProof of knowledge\n\nThe entran... | [{"type": "stdin_stdout", "input": "[+c[+a[^bd]]]\n0404\n[*b[*[*cd]a]]\n15341\n[^[^ab][^cd]]\n1295\na\n9876\n[^dd]\n9090\n.", "output": "0 10\n0 8895\n15 544\n9 1000\n0 10000\n"}, {"type": "stdin_stdout", "input": "[+c[+a[^bd]]]\n0404\n[*b[*[*cd]a]]\n15341\n[^[^ab][^cd]]\n1295\na\n4682\n[^dd]\n1131\n.", "output": "0 10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nThere are $ N $ Amida... | [{"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 1 2 0", "output": "yes\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 1 2 1", "output": "yes\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 1 3 1", "output": "yes\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n0 1\n1 2 -1 2 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\nWrite a program which counts and... | [{"type": "stdin_stdout", "input": "This is ` pen.", "output": "a : 0\nb : 0\nc : 0\nd : 0\ne : 1\nf : 0\ng : 0\nh : 1\ni : 2\nj : 0\nk : 0\nl : 0\nm : 0\nn : 1\no : 0\np : 1\nq : 0\nr : 0\ns : 2\nt : 1\nu : 0\nv : 0\nw : 0\nx : 0\ny : 0\nz : 0\n"}, {"type": "stdin_stdout", "input": "This si a pen.", "output": "a : 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 faculty of application manag... | [{"type": "stdin_stdout", "input": "1\n4 2 3 14\n7 5 7\n10 6 10\n7 10 9\n9 0", "output": "Impossible\n"}, {"type": "stdin_stdout", "input": "1\n4 2 3 14\n7 5 7\n10 6 10\n7 10 9\n9 1", "output": "Impossible\n"}, {"type": "stdin_stdout", "input": "1\n4 2 3 2\n14 7 7\n10 6 7\n7 14 11\n9 9", "output": "Impossible\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\nVasya came up with a password to... | [{"type": "stdin_stdout", "input": "6\n11b\n4bh\nBeh\nTuY\n1YJ\nP28\n", "output": "A1b\n4Ah\nB1h\n1uY\n1aJ\nPa8\n"}, {"type": "stdin_stdout", "input": "6\n11b\n4bh\nBeh\nTvY\n1YJ\nP28\n", "output": "A1b\n4Ah\nB1h\n1vY\n1aJ\nPa8\n"}, {"type": "stdin_stdout", "input": "6\n11b\n4bh\nBeh\nvTY\n1YJ\nP28\n", "output": "A1b\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\nVasya has got n books, numbered ... | [{"type": "stdin_stdout", "input": "10\n4 7 10 2 1 8 3 5 9 6\n4 2 7 1 8 10 5 3 9 6\n", "output": "1 3 0 1 1 0 2 0 1 1 "}, {"type": "stdin_stdout", "input": "10\n4 7 10 2 1 8 3 5 9 6\n4 2 7 1 8 10 5 3 7 6\n", "output": "1 3 0 1 1 0 2 0 0 2\n"}, {"type": "stdin_stdout", "input": "10\n4 7 10 2 1 8 3 5 9 6\n4 2 7 1 7 10 5 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a consist... | [{"type": "stdin_stdout", "input": "82\n53931 67166 20637 68570 4855 63080 53128 28375 54407 70564 46622 46903 32659 68966 20614 11381 51217 94774 90448 13368 51098 46518 15907 1090 44331 39269 17316 22813 66082 78034 58245 36364 45200 78881 4933 66406 58312 74413 94780 12718 61328 57754 75973 93986 26719 12938 21718 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\nThe number \"zero\" is called \"... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000\n", "output": "20833333333333332\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 743008370688\n", "output": "45454545454545452\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 200560490130\n", "output": "33333333333333329\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\nGildong is experimenting with an... | [{"type": "stdin_stdout", "input": "4\n4 -9 -1 -1\n2\n2 3\n1\n2\n3\n2 4 1\n4\n3 1 2 1\n6\n1 -1\n3 -1\n3 -1\n4 -4\n2 1\n1 5\n", "output": "1\n1\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "4\n4 -9 -1 -1\n2\n2 3\n1\n2\n3\n2 4 1\n4\n3 1 2 1\n6\n1 -1\n3 0\n3 -1\n4 -4\n2 1\n1 5\n", "output": "1\n1\n1\n1\n1\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\nHappy new year! The year 2020 is... | [{"type": "stdin_stdout", "input": "10 12\nsin im gye gap eul bynoeg jeong mu gj gyeong\nyu sul hae jb chuk in myo jin as o li sin\n14\n1\n1\n3\n4\n17\n17\n12\n13\n73\n2016\n32\n2018\n2019\n2020\n", "output": "sinyu\nsinyu\ngyehae\ngapjb\njeongchuk\njeongchuk\nimsin\ngyeyu\ngyeyu\nbynoegsin\nimjin\nmusul\ngjhae\ngyeong... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 wants to assemble his o... | [{"type": "stdin_stdout", "input": "5\nababa\ncodfdoca\ncbada\nzxzytyz\nabcdefghjjkllnopqrstuvwxyza\n", "output": "YES\nabcdefghijklmnopqrstuvwxyz\nYES\nacodfbeghijklmnpqrstuvwxyz\nYES\ncbadefghijklmnopqrstuvwxyz\nYES\ntyzxabcdefghijklmnopqrsuvw\nNO\n"}, {"type": "stdin_stdout", "input": "5\nababa\ncodedoca\nabcda\nzxz... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 colored permutat... | [{"type": "stdin_stdout", "input": "3\n4\n1 3 4 2\n1 1 2 3\n5\n2 3 4 5 1\n1 2 5 10 3\n8\n7 4 5 6 1 8 3 2\n5 3 4 4 12 5 8 9\n", "output": "1\n5\n4\n"}, {"type": "stdin_stdout", "input": "3\n4\n1 3 4 2\n1 2 2 3\n5\n2 3 4 5 1\n1 2 10 4 5\n8\n7 4 5 6 1 8 3 2\n5 3 6 4 7 5 8 4\n", "output": "1\n5\n2\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGottfried learned about binary n... | [{"type": "stdin_stdout", "input": "37\n1048575 327657 1046479 686078 513773 589787 387035 736754 1038077 1048056 59263 753353 784318 647131 519679 294910 185560 604141 456668 849789 521404 782287 6137 1047551 849874 523933 521721 278491 1042415 581468 1013705 439526 1011709 917469 655311 327646 917499\n", "output": "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\nYou are given n segments [l_1, r... | [{"type": "stdin_stdout", "input": "13\n3 7 2\n7 7 2\n5 12 2\n1 8 1\n10 12 1\n3 7 1\n10 12 1\n11 13 2\n2 3 2\n11 12 1\n1 12 2\n11 13 1\n9 11 1\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "13\n3 7 2\n7 7 2\n5 12 2\n1 8 1\n10 12 1\n3 7 2\n10 12 1\n11 13 2\n2 3 2\n11 12 1\n1 12 2\n11 13 1\n9 11 1\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\nAs meticulous Gerald sets the ta... | [{"type": "stdin_stdout", "input": "40\n1 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4\n", "output": "13\n4 3 2 \n4 3 2 \n4 3 1 \n4 2 1 \n3 2 1 \n4 3 2 \n4 3 1 \n4 2 1 \n3 2 1 \n4 3 2 \n4 3 1 \n4 2 1 \n3 2 1 \n"}, {"type": "stdin_stdout", "input": "40\n1 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a directed acyclic... | [{"type": "stdin_stdout", "input": "18 50\n10 3 14\n5 16 64931\n12 1 34517\n6 7 18587\n8 4 9\n5 1 29\n8 1 4538\n13 11 16087\n3 16 101\n12 15 49\n5 4 5\n12 4 1\n8 11 24\n12 3 1\n9 8 51757\n9 11 81\n18 6 8141\n16 6 8\n17 14 15\n5 11 2337\n13 17 1553\n5 18 15\n15 7 14\n10 11 2798\n8 15 9\n9 3 1\n4 18 36637\n18 14 1\n9 18 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence a, init... | [{"type": "stdin_stdout", "input": "5\n3\n1 1 1\n5\n1 2 3 4 5\n5\n1 2 3 2 1\n7\n1 2 3 1 2 3 1\n11\n2 2 1 2 3 2 1 2 3 1 2\n", "output": "\n0\n1\n1\n2\n3\n"}, {"type": "stdin_stdout", "input": "5\n3\n1 1 1\n5\n1 2 3 4 5\n5\n1 2 3 2 1\n7\n1 2 3 1 2 4 1\n11\n2 2 1 2 3 2 1 2 3 1 2\n", "output": "0\n1\n1\n2\n3\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\nNezzar has n balls, numbered wit... | [{"type": "stdin_stdout", "input": "5\n6\n1 1 1 2 3 4\n5\n1 1 2 2 3\n4\n2 2 2 2\n3\n1 2 3\n1\n1\n", "output": "\n3\n2\n4\n1\n1\n"}, {"type": "stdin_stdout", "input": "5\n6\n1 1 1 2 3 4\n5\n1 1 2 2 3\n4\n2 2 2 2\n3\n2 2 3\n1\n1\n", "output": "3\n2\n4\n2\n1\n"}, {"type": "stdin_stdout", "input": "5\n6\n1 1 1 2 3 3\n5\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\n\n\nInput\n\nThe input contains ... | [{"type": "stdin_stdout", "input": "33 16\n", "output": "\nYES\n"}, {"type": "stdin_stdout", "input": "11 11\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "12 16\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11 20\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "15 11\n", "output": "Y... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Shaazzzlan... | [{"type": "stdin_stdout", "input": "10 10\n0 6 997411747\n1 0 999893123\n2 6 999733804\n3 7 999612727\n4 6 999688283\n5 7 997515369\n6 5 995899470\n7 0 999851011\n8 6 999094306\n9 4 999864664\n", "output": "0 997411752 997411753 997411754 997411755 997411756 997411747 997411748 997411749 997411750\n999893123 0 99989312... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 stone quarries in Pe... | [{"type": "stdin_stdout", "input": "30\n53 12\n13 98\n21 60\n76 58\n39 5\n62 58\n73 80\n13 75\n37 45\n44 86\n1 85\n13 33\n17 50\n12 26\n97 48\n52 40\n2 71\n95 79\n38 76\n24 54\n91 39\n97 92\n94 80\n50 61\n33 56\n22 91\n39 94\n31 56\n28 16\n20 44\n", "output": "tolik\n"}, {"type": "stdin_stdout", "input": "30\n53 12\n13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's actual name, \"Le... | [{"type": "stdin_stdout", "input": "zzzzzzzzzz\n", "output": "zzzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "aaaaaaaaaa\n", "output": "aaaaaaaaaa\n"}, {"type": "stdin_stdout", "input": "zzzzzzzazz\n", "output": "zzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "abbbbbbbbb\n", "output": "bbbbbbbbb\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\nA film festival is coming up in ... | [{"type": "stdin_stdout", "input": "129 37\n15 22 28 15 30 16 11 20 4 26 14 37 29 17 15 15 14 18 1 9 16 22 13 32 5 18 25 11 6 33 33 22 17 9 1 5 27 27 37 4 6 1 3 18 17 33 6 17 2 24 23 1 1 37 35 21 21 17 18 6 31 17 29 18 10 10 30 31 8 3 25 20 34 11 12 12 24 13 5 27 20 31 28 1 36 2 4 13 14 9 33 25 4 26 36 6 2 7 15 9 20 33... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKsusha is a beginner coder. Toda... | [{"type": "stdin_stdout", "input": "5\n506904227 214303304 136194869 838256937 183952885\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5\n238711016 214303304 136194869 838256937 183952885\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5\n310947607 214303304 136194869 838256937 183952885\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn mathematics, a subsequence is... | [{"type": "stdin_stdout", "input": "UAYQUMTSNGMYBORUYXJJQZVAGBRVDWUTGUYYYOTWAHVKGGOHADXULFUFQULSAGDWFJCSDKPWBROYZIFRGGRVZQMEHKHCKNHTQSMK\nSVKVTPUZOBRKGLEASXMIUSRISOTDIFFUCODYGNYIPSWEEBHGNWRZETXAVVMQTRBVFZMYHOHUCMLBUXBMPMSNCSHFZTAFUVTMQFGL\nTNICVANBEBOQASUEJJAOJXWNMDGAAVYNHRPSMKGMXZDJHCZHFHRRMIDWUOQCZSBKDPLSGHNHFKFYDRGV... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt's holiday. Mashmokh and his b... | [{"type": "stdin_stdout", "input": "16199 5506872\n", "output": "5498774 10997548 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 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\nProf. Vasechkin wants to represe... | [{"type": "stdin_stdout", "input": "768617061415848\n", "output": "390\n"}, {"type": "stdin_stdout", "input": "973546235465729\n", "output": "263\n"}, {"type": "stdin_stdout", "input": "898453513288965\n", "output": "248\n"}, {"type": "stdin_stdout", "input": "694855944531976\n", "output": "348\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs you know, an undirected conne... | [{"type": "stdin_stdout", "input": "300 34\n777 497 1099 1221 1255 733 1119 533 1130 822 1000 1272 1104 575 1012 1137 1125 733 1036 823 845 923 1271 949 709 766 935 1226 1088 765 1269 475 1709 977\n5 18\n5 8\n1 20\n2 25\n4 19\n11 34\n6 9\n14 23\n21 22\n12 30\n7 11\n3 12\n18 21\n1 4\n2 6\n1 2\n11 15\n2 31\n4 13\n25 28\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 Happy Farm 5 creators decide... | [{"type": "stdin_stdout", "input": "60\n-20 179\n-68 0\n-110 68\n-22 177\n47 140\n-49 -4\n-106 38\n-23 22\n20 193\n47 173\n-23 22\n-100 32\n-97 29\n47 124\n-49 -4\n20 193\n-20 179\n-50 149\n-59 -7\n4 193\n-23 22\n-97 29\n-23 22\n-66 133\n47 167\n-61 138\n-49 -4\n-91 108\n-110 84\n47 166\n-110 77\n-99 100\n-23 22\n-59 -... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.