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\nÆsir - CHAOS Æsir - V.\n\n\"Ever... | [{"type": "stdin_stdout", "input": "87\n1120 1120 1120 872 1120 731 3583 2815 4019 1291 4568 973 1120 1705 1120 822 203 1120 1120 1120 1120 4196 3166 4589 3030 1120 1120 1120 711 1120 500 1120 1120 3551 1120 1120 1120 1700 1120 1120 2319 4554 1120 1312 1120 1120 4176 1120 1120 3661 1120 1120 1120 1120 142 63 4125 1120 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub and Sorin are the best com... | [{"type": "stdin_stdout", "input": "100\n-57 -64 83 76 80 27 60 76 -80 -56 52 72 -17 92 -96 87 41 -88 94 89 12 42 36 34 -100 -43 -42 62 3 87 -69 -6 -27 -59 -7 5 -90 -23 63 -87 -60 -92 -40 54 -16 -47 67 -64 10 33 -19 53 -7 -62 16 -74 -36 4 -75 -55 92 3 -22 43 -30 48 -27 88 -58 41 36 8 -40 -30 -18 16 22 -66 -91 -46 48 -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 is a string S of length N ... | [{"type": "stdin_stdout", "input": "3000 3000\n010100001010100010010011011011000111111011101010000011000111010111001001010101011101000010100101101110111010011111001010000100000010011000011000101110110010010111001111001111011001101010100010010100100101011011101000100010011001100101010000010011011100001110110111000100001... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGerald got a very curious hexago... | [{"type": "stdin_stdout", "input": "1000 1000 1000 1000 1000 1000\n", "output": "6000000\n"}, {"type": "stdin_stdout", "input": "718 466 729 470 714 481\n", "output": "2102808\n"}, {"type": "stdin_stdout", "input": "677 303 685 288 692 296\n", "output": "1365807\n"}, {"type": "stdin_stdout", "input": "1000 1000 1 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\nSquirrel Liss is interested in s... | [{"type": "stdin_stdout", "input": "49\n10 34 58 72 126 166 176 180 198 200 208 228 238 248 302 332 340 344 350 354 380 406 418 428 438 442 482 532 536 544 546 554 596 626 642 682 684 704 714 792 804 820 862 880 906 946 954 966 970\n", "output": "49\n"}, {"type": "stdin_stdout", "input": "44\n1 5 37 97 107 147 185 187 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are an intergalactic surgeon... | [{"type": "stdin_stdout", "input": "4\n14\nE 1 2 3 4 5 22 7 44 25 10 11 12 13 14 15 16 17 18 19 20 21 6 23 24 9 26 27 28\n57 56 55 54 53 52 51 50 49 48 47 46 45 8 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29\n2\nE 1 2 3 4\n6 7 8 9 5\n2\nE 1 2 3 4\n9 8 7 6 5\n2\nE 1 2 3 4\n9 8 7 6 5\n", "output": "SURGERY FAILED\nSURGER... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a permutation P[1... N] of i... | [{"type": "stdin_stdout", "input": "10 7 5\n", "output": "2 3 4 5 1 7 8 9 10 6 "}, {"type": "stdin_stdout", "input": "9 2 5\n", "output": "2 1 4 3 6 7 8 9 5 "}, {"type": "stdin_stdout", "input": "9 7 9\n", "output": "2 3 4 5 6 7 8 9 1 "}, {"type": "stdin_stdout", "input": "390612 20831 55790\n", "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\nEnough is enough. Too many times... | [{"type": "stdin_stdout", "input": "185 2\n0 14 2 11 5 17 9 11 8 12 8 17 17 0 4 15 4 17 8 1 2 10 8 0 8 16 1 7 10 4 0 18 2 15 2 1 4 1 10 11 6 10 19 5 5 18 2 1 15 17 0 4 12 19 12 8 11 4 7 15 13 0 9 6 2 6 5 2 17 4 7 9 11 17 1 13 4 6 4 10 1 14 0 13 17 16 10 5 7 19 19 9 2 2 17 17 11 6 11 15 4 17 18 18 14 9 15 10 10 10 14 18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIs there anything better than go... | [{"type": "stdin_stdout", "input": "wwwbbwbbbwbwbwwbwwbbbwbwbwwbbbwbwwwbwwbwbbbbwwbwwwwwbwwwwwwwwbbwwwwbbbbbwbwbbwwbbbbbwbwbbwbwwwbbwwbbbwwwbbwwbwwbbbbwwbwbbwbwwbbwbwbwbbwwbwwwbwbwbbbwwwwwwbwwbbbwwbwwbwbwwwbbwwwwwwwwwbwwbwbbbwbwwwwbwwbbwbbwbwwbwwbwwbbwbbwwwwbwwwbwwwbwbwwwbbwwbbwwbwbwwwwwwbwbwwwwbbwwwbwbwwwbbwwwwwbwwbwb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 set of $n$ weights. Y... | [{"type": "stdin_stdout", "input": "100\n50 50 51 50 51 51 51 51 51 50 50 50 50 50 50 51 50 51 50 51 51 50 50 51 51 51 51 51 51 50 50 51 51 51 50 50 50 51 50 51 51 51 50 51 51 50 50 50 50 50 50 51 50 50 51 51 51 50 50 50 51 50 51 50 51 51 50 51 50 51 51 51 50 51 50 50 51 50 51 51 51 51 50 51 51 51 51 50 51 51 51 51 51 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose you are given a string $... | [{"type": "stdin_stdout", "input": "255 3880 4590\nwgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwkwgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwawgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwkwgwzwgwuwgwzwgwxwgwzwgwuwgwzwgwewgwzwgwuwgwzwgwxwgwzwgwuwgwzwgw\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\nMolly Hooper has n different kin... | [{"type": "stdin_stdout", "input": "89 -7\n5972 4011 3914 670 3727 2913 6935 6927 2118 6645 7141 3585 9811 2859 459 8870 6578 8667 468 5152 3241 7455 7323 8817 4866 1040 5102 9146 621 5002 396 4967 9822 4200 3899 4416 5225 9415 9606 4802 5589 1798 9094 5453 7163 264 1026 6187 3918 4237 -17 4306 8960 3321 2927 9205 6248... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 evening Polycarp decided ... | [{"type": "stdin_stdout", "input": "27 8 1 0 1\nBcd A\nA b\nb BcDc\ndc dbaC\ndbaC dcCB\nB d\nd BbAc\nCBC b\nDBDca d\ncAbb AA\nAA Ba\ncAccb DBDca\ncb DdaB\nAAcBc Ba\nBa dc\ndc DDCd\nbcBDA da\nbDD ADD\nAA b\nb cb\ncb CCBbd\nCCBbd bcDdb\nbcDdb ddc\nddc C\nC Adc\nAdc BbAc\nBbAc DD\n", "output": "111\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya came up with his own weath... | [{"type": "stdin_stdout", "input": "100\n-85 -80 -76 -72 -68 -64 -60 -56 -52 -48 -44 -40 -36 -32 -28 -24 -20 -16 -12 -8 -4 0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 192 196 200 204 208 212 216 220 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\nNote that this is the first prob... | [{"type": "stdin_stdout", "input": "60\n26 6\n59 30\n31 12\n31 3\n38 23\n59 29\n53 9\n38 56\n53 54\n29 21\n17 55\n59 38\n26 16\n24 59\n24 25\n17 35\n24 41\n30 15\n31 27\n8 44\n26 5\n26 48\n8 32\n53 17\n3 34\n3 51\n30 28\n47 10\n53 60\n36 42\n24 53\n59 22\n53 40\n26 52\n36 4\n59 8\n29 37\n36 20\n17 47\n53 18\n3 50\n30 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\nBoy Dima gave Julian a birthday ... | [{"type": "stdin_stdout", "input": "10\n221998069488770316 954736809508793543 598658276983441394 74222410330038206 823279423814526176 807704234927978303 752441720796406299 872983354198335776 826110873403601011 45690579225458516\n", "output": "6\n598658276983441394 74222410330038206 221998069488770316 45690579225458516 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider a table G of size n × m... | [{"type": "stdin_stdout", "input": "1000000000000 1000000000000 116\n1587924000 7 2 3 4 5 6 1 56 9 10 1 12 13 2 105 16 1 18 1 620 3 14 1 24 25 26 27 4 203 30 1 32 3 2 5 252 1 2 39 40 1 6 7 4 45 2 1 48 1 350 93 52 1 54 5 8 21 58 1 60 1 2 9 224 65 6 1 4 3 10 7 72 1 2 75 4 1 546 1 80 81 62 1 12 35 2 87 8 1 90 13 28 3 2 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\nThere is a square grid of size $... | [{"type": "stdin_stdout", "input": "1000 24\n190 39 552 958\n539 146 763 587\n31 526 423 673\n208 432 953 442\n263 69 719 635\n162 428 623 797\n49 126 94 963\n749 623 979 919\n190 461 367 855\n211 240 939 914\n169 80 336 203\n684 546 829 582\n80 218 324 327\n560 452 656 637\n316 534 982 642\n521 634 758 686\n514 324 75... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSlime has a sequence of positive... | [{"type": "stdin_stdout", "input": "5\n5 3\n1 5 2 6 1\n1 6\n6\n3 2\n1 2 3\n4 3\n3 1 2 3\n10 3\n1 2 3 4 5 6 7 8 9 10\n", "output": "no\nyes\nyes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "2\n1 1\n1000000000\n3 1000000000\n1000000000 996 251\n", "output": "no\nno\n"}, {"type": "stdin_stdout", "input": "1\n17 15\n3 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlyona's mother wants to present... | [{"type": "stdin_stdout", "input": "10 10\n1 5\n7 10\n2 10\n2 5\n2 9\n5 9\n3 10\n4 9\n6 9\n2 7\n", "output": "4\n0 1 2 3 0 1 2 3 0 1\n"}, {"type": "stdin_stdout", "input": "10 10\n1 9\n4 8\n4 8\n5 9\n1 9\n3 8\n1 6\n1 9\n1 6\n6 9\n", "output": "4\n0 1 2 3 0 1 2 3 0 1\n"}, {"type": "stdin_stdout", "input": "9 9\n4 5\n5 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\nMoriarty has trapped n people in... | [{"type": "stdin_stdout", "input": "13 11\n0 1 1 0 1 0 0 0 1 0 0 1 1\n6 2 8 9 11 12 13\n3 1 3 11\n1 12\n1 7\n3 6 10 13\n3 1 3 8\n2 7 9\n1 4\n1 2\n2 5 10\n3 4 5 6\n", "output": "NO"}, {"type": "stdin_stdout", "input": "11 10\n0 0 1 0 0 0 0 1 1 0 1\n3 2 3 11\n1 3\n2 6 7\n1 5\n1 11\n1 10\n5 4 6 8 9 10\n2 1 5\n1 7\n5 1 2 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUser ainta loves to play with ca... | [{"type": "stdin_stdout", "input": "206 209\n", "output": "34847\nxxxxxxxxxxxxxxxxxxxoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, Bob and Charlie are playi... | [{"type": "stdin_stdout", "input": "300000 300000 300000\n", "output": "415274335\n"}, {"type": "stdin_stdout", "input": "123321 287789 256654\n", "output": "507348047\n"}, {"type": "stdin_stdout", "input": "298865 299673 299514\n", "output": "652837961\n"}, {"type": "stdin_stdout", "input": "299983 299972 299996\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\nDora loves adventures quite a lo... | [{"type": "stdin_stdout", "input": "1 100\n855 693 601 329 311 798 783 920 504 868 521 358 367 467 623 767 481 635 855 608 157 95 273 261 110 713 948 897 546 476 855 337 93 321 648 441 215 979 505 69 858 99 877 337 237 116 824 98 955 192 773 99 485 385 861 849 772 993 470 215 792 635 986 515 84 7 476 831 903 74 79 545 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "20 30\n0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0\n34095514 37349809 60555988 40280455 19504485 77297461 41415742 66290058 20631093 185280391 7151718 64927972 15611855 4317891 24600598 24588269 60808977 9108470 13217752 191209824\n", "output": "313283482\n21804622\n682197550\n361027027\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArtem has an array of n positive... | [{"type": "stdin_stdout", "input": "10\n96 66 8 18 30 48 34 11 37 42\n", "output": "299\n"}, {"type": "stdin_stdout", "input": "9\n72 49 39 50 68 35 75 94 56\n", "output": "435\n"}, {"type": "stdin_stdout", "input": "8\n77 84 26 34 17 56 76 3\n", "output": "279\n"}, {"type": "stdin_stdout", "input": "10\n4 2 2 4 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\nSomeone give a strange birthday ... | [{"type": "stdin_stdout", "input": "33 2\n3 13\n17 3\n2 6\n5 33\n4 18\n1 2\n31 5\n4 19\n3 16\n1 3\n9 2\n10 3\n5 1\n5 28\n21 4\n7 2\n1 4\n5 24\n30 5\n14 3\n3 11\n27 5\n8 2\n22 4\n12 3\n20 4\n26 5\n4 23\n32 5\n25 5\n15 3\n29 5\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "25 2\n1 2\n1 3\n1 4\n2 5\n2 6\n2 7\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 monopole magnet is a magnet th... | [{"type": "stdin_stdout", "input": "18 22\n....................#.\n...................#..\n..........#...........\n..................#...\n..................#...\n..................#...\n......................\n......................\n...........#..........\n..............#.......\n..............#.......\n................ | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 there was an array $a$... | [{"type": "stdin_stdout", "input": "50 200000\n0 199989 0 0 0 0 200000 200000 0 200000 0 200000 200000 0 0 200000 0 0 0 0 200000 200000 200000 200000 0 0 0 200000 0 0 0 0 200000 200000 0 200000 0 200000 0 200000 200000 0 200000 0 199999 199980 199978 199978 199964 199952\n", "output": "YES\n1 199989 1 1 1 1 200000 2000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 GCD table G of size n × n fo... | [{"type": "stdin_stdout", "input": "5\n537163 537163 537163 537163 537163 537163 1074326 537163 537163 537163 515139317 1074326 537163 537163 537163 539311652 321760637 170817834 537163 537163 537163 537163 537163 537163 392666153\n", "output": "170817834 321760637 392666153 515139317 539311652 "}, {"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\nThere are $n$ points on the plan... | [{"type": "stdin_stdout", "input": "35\n8 1\n6 8\n4 1\n1 2\n1 4\n5 10\n10 8\n9 1\n9 9\n10 2\n6 5\n8 8\n7 6\n10 6\n9 4\n4 9\n3 2\n1 8\n3 9\n7 3\n3 7\n2 7\n3 8\n3 1\n2 2\n5 5\n7 2\n4 10\n6 3\n5 1\n8 10\n4 3\n9 8\n9 7\n3 10\n", "output": "316\n"}, {"type": "stdin_stdout", "input": "35\n4 2\n9 6\n3 10\n2 5\n7 9\n6 9\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\nYou are an adventurer currently ... | [{"type": "stdin_stdout", "input": "17\n.EEEEE...EEEE..EE\nEEE..E...EEEEE..E\n.E..E..EEE.EE...E\n.EEE.EE..EE...E..\nE..EEEEEE.EE.....\nE.EE...EEEEEEE.E.\nEEEE....EE..E.EEE\n...EEEEE.E..EE...\nEEE.E..EEEE.EEE..\n..E.E....EEE.....\nEE..E..E.E..EEEEE\nEEE..E.EEEEE.E...\n..EEEEE.E..EE.EE.\nEE.E...E..E..E.EE\n..E.EEE.EE..EE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 usual, Sereja has array a, it... | [{"type": "stdin_stdout", "input": "116 10\n477 -765 -756 376 -48 -75 768 -658 263 -207 362 -535 96 -960 630 -686 609 -830 889 57 -239 346 -298 -18 -107 853 -607 -443 -517 371 657 105 479 498 -47 432 503 -917 -656 610 -466 216 -747 -587 -163 -174 493 -882 853 -582 -774 -477 -386 610 -58 557 968 196 69 610 -38 366 -79 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 n numbers a_1, a_2... | [{"type": "stdin_stdout", "input": "5 10 8\n1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1073741825000000000\n"}, {"type": "stdin_stdout", "input": "3 2 6\n724148075 828984987 810015532\n", "output": "29996605423\n"}, {"type": "stdin_stdout", "input": "1 2 3\n612635770\n", "output": "5513721930... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 throws N dice, each ha... | [{"type": "stdin_stdout", "input": "2000 3\n", "output": "337087647\n337087647\n337085647\n337085647\n337083647\n337083647\n337081647\n337081647\n337079647\n337079647\n337077647\n337077647\n337075647\n337075647\n337073647\n337073647\n337071647\n337071647\n337069647\n337069647\n337067647\n337067647\n337065647\n337065647... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTreeland is a country in which t... | [{"type": "stdin_stdout", "input": "35 15\n6 12 32 18 11 10 29 9 30 27 31 14 8 24 28 25 19 15 21 3 4 1 33 22 23 17 16 13 7 2\n1 2\n20 3\n1 4\n20 5\n20 6\n1 7\n13 8\n4 9\n1 10\n1 11\n1 12\n1 13\n18 14\n10 15\n1 16\n16 17\n1 18\n1 19\n1 20\n20 21\n1 22\n27 23\n25 24\n1 25\n20 26\n20 27\n18 28\n4 29\n13 30\n4 31\n1 32\n20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOleg writes down the history of ... | [{"type": "stdin_stdout", "input": "0000000000011001100011110101000101000010010111000100110110000011010011110110001100100001001001010010\n", "output": "22\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n7 9 24 25 26 27 28 29\n7 10 13 14 17 18 23 30\n11 11 12 15 16 19 22 31 32 33 34 35\n3 20 21 36\n3 37 46 47\n9 38 39 40 45 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\nIt's that time of the year, Feli... | [{"type": "stdin_stdout", "input": "100 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 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\nSomething happened in Uzhlyandia... | [{"type": "stdin_stdout", "input": "100\n23 64 60 -45 -36 -64 -59 15 -75 69 -30 -7 -20 17 -77 58 93 -76 -98 -22 -31 16 -50 6 -20 -85 1 64 -88 -8 -15 -6 -57 25 91 10 2 -90 74 -66 -42 73 28 49 -85 59 96 79 -25 49 -59 -89 -75 12 -96 -33 -65 -8 -100 -81 17 99 -91 -5 7 -21 1 85 63 86 -26 85 -31 11 -75 35 -82 15 98 93 -55 66... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, little Vasya found hims... | [{"type": "stdin_stdout", "input": "129\n1 1 3 3 1 4 7 4 3 5 8 11 3 9 15 4 11 17 1 6 18 9 11 13 17 22 8 18 26 13 16 20 3 16 35 26 23 28 27 30 39 29 43 8 14 6 17 32 26 31 2 18 3 47 52 21 57 1 35 35 53 47 16 26 30 65 48 2 32 11 10 5 4 1 4 53 71 21 53 8 58 49 17 6 19 80 1 49 43 60 12 60 35 25 86 45 47 97 52 74 10 91 93 31... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 types of coins in By... | [{"type": "stdin_stdout", "input": "100\n4 1 5 3 2 1 1 1 4 1 1 2 1 1 1 4 1 1 3 1 3 1 1 1 1 4 5 1 5 2 5 3 1 1 1 1 1 1 1 3 2 1 1 3 1 1 3 4 3 2 4 1 1 4 1 1 2 2 4 1 4 1 2 5 1 2 2 1 5 3 1 5 4 2 1 1 2 5 5 1 4 4 2 3 1 4 1 3 2 1 1 1 4 1 3 1 1 5 1\n0 18 10 2 1 9 9 0 9 5 6 8 11 6 28 11 29 50 25 15 9 4 3 51 13 4 68 31 4 6 2 5 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\nProgrammers working on a large p... | [{"type": "stdin_stdout", "input": "123 432 342 1000000007\n72 20 34 115 65 29 114 41 18 16 122 104 88 37 119 11 108 91 13 110 47 73 80 35 62 12 9 116 55 66 54 113 50 57 8 25 98 105 0 120 93 78 61 17 84 48 42 106 63 103 7 59 90 89 28 49 53 71 51 83 75 67 64 95 107 3 32 85 69 99 33 79 109 56 10 23 87 19 121 94 44 82 102... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 text consisting ... | [{"type": "stdin_stdout", "input": "4\n13 11 15 15\nto be or not to be that is the question\nwhether tis nobler in the mind to suffer\nthe slings and arrows of outrageous fortune\nor to take arms against a sea of troubles\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "2\n26 35\ngouojxaoobw iu bkaadyo degnjk... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEmuskald is an avid horticulturi... | [{"type": "stdin_stdout", "input": "20 15\n6 8719.787178\n10 13066.663722\n15 58623.690996\n9 184321.819759\n3 227999.294560\n2 279836.330518\n9 282806.308675\n8 311056.507765\n1 312315.562927\n5 459200.373445\n14 563454.265947\n7 647364.984868\n13 679761.613732\n4 684192.647497\n1 733119.607626\n7 748637.778398\n12 82... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlex doesn't like boredom. That'... | [{"type": "stdin_stdout", "input": "100\n4 8 10 1 8 8 8 1 10 3 1 8 6 8 6 1 10 3 3 3 3 7 2 1 1 6 10 1 7 9 8 10 3 8 6 2 1 6 5 6 10 8 9 7 4 3 10 5 3 9 10 5 10 8 8 5 7 8 9 5 3 9 9 2 7 8 1 10 4 9 2 8 10 10 5 8 5 1 7 3 4 5 2 5 9 3 2 5 6 2 3 10 1 5 9 6 10 4 10 8\n", "output": "380\n"}, {"type": "stdin_stdout", "input": "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\nPolycarpus just has been out of ... | [{"type": "stdin_stdout", "input": "-+++---+++++++++++++-++-++++++-++-+-+++-\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "++-++--+++++-+++++---+++-++-++-\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "----+-+--++---++---++-+-----+--\n", "output": "11\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\nNatasha travels around Mars in t... | [{"type": "stdin_stdout", "input": "60\nAND 20 4\nNOT 42\nAND 48 59\nOR 17 7\nIN 0\nAND 36 37\nIN 1\nIN 0\nIN 1\nNOT 47\nAND 52 49\nOR 44 35\nIN 0\nIN 1\nAND 33 56\nIN 0\nIN 0\nIN 0\nAND 31 41\nOR 15 3\nOR 43 46\nIN 1\nXOR 22 28\nIN 1\nIN 1\nIN 1\nAND 34 21\nIN 1\nIN 1\nIN 0\nXOR 51 23\nXOR 10 54\nOR 57 40\nIN 0\nNOT 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\nSereja has two sequences a and b... | [{"type": "stdin_stdout", "input": "82 50 1\n4 2 2 4 4 3 2 2 3 3 4 3 4 1 4 1 4 3 5 3 4 2 4 4 5 2 5 4 2 4 2 5 3 2 3 4 2 5 4 3 3 4 3 4 1 1 5 2 4 1 3 3 2 4 1 2 2 5 4 4 5 3 3 1 2 3 4 5 3 1 2 3 3 5 5 2 4 1 4 2 3 1\n4 3 3 3 4 1 4 4 5 5 5 2 5 4 1 2 2 1 3 3 3 3 2 5 3 2 4 3 2 2 4 4 4 3 4 2 1 2 3 2 1 1 5 2 3 5 4 5 3 4\n", "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\nHongcow is ruler of the world. A... | [{"type": "stdin_stdout", "input": "24 38 2\n4 13\n7 1\n24 1\n2 8\n17 2\n2 18\n22 2\n23 3\n5 9\n21 5\n6 7\n6 19\n6 20\n11 7\n7 20\n13 8\n16 8\n9 10\n14 9\n21 9\n12 10\n10 22\n23 10\n17 11\n11 24\n20 12\n13 16\n13 23\n15 14\n17 14\n14 20\n19 16\n17 20\n17 23\n18 22\n18 23\n22 19\n21 20\n23 24\n", "output": "215\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou all know that the Library of... | [{"type": "stdin_stdout", "input": "10 10\n8 1 1 6 10 2 2 9 7\n6 2 7 1 9 5 10\n1 5\n7 3 6 9 6 3 7 6\n10 3 9 10 3 6 7 10 6 9 6\n10 4 4 9 8 2 10 3 6 2 9\n8 4 8 6 4 6 4 8 6\n2 7 5\n6 8 6 2 1 9 8\n3 10 2 10\n", "output": "Yes\n3\n1 2 5 "}, {"type": "stdin_stdout", "input": "10 10\n8 2 1 3 2 10 5 4 1\n6 2 1 7 5 7 1\n9 2 1 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\nAfter the war, the supersonic ro... | [{"type": "stdin_stdout", "input": "8 8\n53212775 61830464\n32047271 31958754\n46845363 47341547\n46097536 79640734\n25559819 90360169\n5442822 40309249\n57656501 31139219\n1191345 7784770\n61052639 71686018\n53542361 10165576\n61963163 25946318\n15498921 83261369\n97981085 40697107\n35269685 20583089\n50275077 3751318... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Morse code, an letter of Engl... | [{"type": "stdin_stdout", "input": "50\n1\n1\n0\n1\n0\n0\n0\n0\n0\n1\n1\n0\n1\n1\n1\n0\n0\n1\n1\n0\n1\n1\n1\n1\n0\n1\n0\n0\n1\n1\n1\n0\n1\n0\n1\n1\n1\n1\n0\n1\n0\n0\n0\n0\n1\n0\n1\n0\n0\n1\n", "output": "1\n3\n10\n24\n51\n109\n221\n437\n853\n1682\n3168\n6140\n11860\n22892\n44135\n82151\n158191\n304543\n564961\n1085797\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and Ann are sitting in the ... | [{"type": "stdin_stdout", "input": "dequudpveoozswafkmdadrxtnmagtpcdqzhxkitrbqytichoswltzzasfoeqktomxlypvhjyjnjymvlrvglvyursfm\n", "output": "Mike\nAnn\nAnn\nAnn\nAnn\nMike\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn\nMike\nAnn\nAnn\nAnn\nAnn\nMike\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn\nMike\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn\nAnn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 penguin Polo adores strin... | [{"type": "stdin_stdout", "input": "128 26\n", "output": "ababababababababababababababababababababababababababababababababababababababababababababababababababababcdefghijklmnopqrstuvwxyz\n"}, {"type": "stdin_stdout", "input": "123 21\n", "output": "abababababababababababababababababababababababababababababababababababa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 dragon symbolizes wisdom, powe... | [{"type": "stdin_stdout", "input": "200\n2 1 1 2 1 2 2 2 2 2 1 2 2 1 1 2 2 1 1 1 2 1 1 2 2 2 2 2 1 1 2 1 2 1 1 2 1 1 1 1 2 1 2 2 1 2 1 1 1 2 1 1 1 2 2 2 1 1 1 1 2 2 2 1 2 2 2 1 2 2 2 1 2 1 2 1 2 1 1 1 1 2 2 2 1 1 2 1 2 1 2 1 2 2 1 1 1 2 2 2 2 1 2 2 2 1 1 1 1 2 1 1 1 2 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 2 2 1 2 2 2 1 1 1 1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has a graph containing bot... | [{"type": "stdin_stdout", "input": "14 19 14\n2 5 7\n1 4 1\n2 9 8\n1 7 3\n2 14 2\n2 2 8\n2 6 7\n2 14 7\n1 7 8\n2 10 8\n2 11 10\n1 11 7\n2 3 13\n1 5 4\n1 14 8\n2 3 1\n2 6 1\n2 6 10\n2 8 1\n", "output": "13\n--+--+--+---+\n2\n++-++-++++++-\n"}, {"type": "stdin_stdout", "input": "10 20 10\n2 7 3\n1 7 9\n1 3 6\n2 8 3\n2 9 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have number a, whose decimal... | [{"type": "stdin_stdout", "input": "2717172350336955863014903670481525170997949309274087058935108848979319747543008692128164875210350026\n", "output": "2771723503355630149036704815251709979493092740870589351088489793197475430086921281648752103500261986\n"}, {"type": "stdin_stdout", "input": "982599565604028679312800604... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Absurdistan, there are n town... | [{"type": "stdin_stdout", "input": "4 6\n1 2\n1 3\n1 4\n2 3\n2 4\n3 4\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5 5\n4 2\n3 5\n4 5\n5 1\n1 2\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "4 5\n1 3\n2 1\n3 4\n4 2\n2 3\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5 5\n2 5\n1 2\n1 4\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\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\nIt is a holiday season, and Koal... | [{"type": "stdin_stdout", "input": "70\n0010011111011101101111000111101011010101000011000000010100010101010001\n3 1\n1 5\n3 1\n4 1\n3 3\n2 4\n2 1\n5 1\n2 4\n5 2\n5 2\n4 1\n2 5\n2 2\n4 2\n5 1\n1 2\n2 4\n3 1\n1 1\n5 3\n5 2\n3 5\n4 4\n2 1\n3 2\n1 3\n5 1\n3 4\n2 3\n1 5\n4 1\n2 2\n5 1\n3 3\n4 2\n1 4\n5 2\n1 2\n4 1\n1 4\n5 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\nLet $s$ be some string consistin... | [{"type": "stdin_stdout", "input": "100 80\n", "output": "0000000000100000000001000000000010000000000100000000001000000000010000000000100000000001000000000010"}, {"type": "stdin_stdout", "input": "101 3\n", "output": "00000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000010"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 we all know Barney's job is \... | [{"type": "stdin_stdout", "input": "12\n254904759290707697 475737283258450340 533306428548398547 442127134828578937 779740159015946254 272877594683860919 93000149670491971 349640818793278778 498293278222136720 551099726729989816 149940343283925029 989425634209891686\n", "output": "674872752/24618241\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\nAlyona has a tree with n vertice... | [{"type": "stdin_stdout", "input": "10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1 1000000000\n2 1000000000\n3 1000000000\n4 1000000000\n5 1000000000\n6 1000000000\n7 1000000000\n8 1000000000\n9 1000000000\n", "output": "1 1 1 1 1 1 1 1 1 0\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA group of n friends enjoys play... | [{"type": "stdin_stdout", "input": "2\n71 70\n", "output": "0\n71\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\n11\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\nAtCoDeer the deer has N square t... | [{"type": "stdin_stdout", "input": "400\n196 345 527 695\n685 207 136 831\n303 497 409 762\n464 670 120 403\n867 799 702 490\n986 9 287 852\n519 89 617 973\n291 551 957 275\n329 210 75 744\n685 560 225 510\n568 429 313 112\n94 659 30 204\n51 891 791 326\n890 977 807 600\n203 468 753 791\n738 279 376 58\n377 694 954 955... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 unweighted tree... | [{"type": "stdin_stdout", "input": "9\n9 2\n6 8\n4 1\n2 5\n1 9\n8 7\n3 6\n5 7\n", "output": "8 \n4 1 3\n"}, {"type": "stdin_stdout", "input": "9\n3 1\n7 4\n1 4\n1 8\n2 1\n2 6\n9 1\n1 5\n", "output": "5\n6 9 7\n"}, {"type": "stdin_stdout", "input": "9\n8 9\n6 2\n1 6\n1 4\n3 1\n9 1\n1 5\n1 7\n", "output": "5\n2 7 8\n"}, ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently you have received two p... | [{"type": "stdin_stdout", "input": "128\n540 90 378 3780 270 35 180 15 6 14 20 3780 2520 140 1080 54 540 120 1890 15 420 840 20 756 10 126 42 54 36 14 216 8 168 210 60 7 63 2 216 21 30 189 28 135 2 630 21 30 60 1512 7560 70 5 12 40 7560 252 378 3 108 5 72 10 3 28 24 1 27 9 45 180 56 1260 945 1080 420 168 2520 18 70 1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between prob... | [{"type": "stdin_stdout", "input": "93\n6 6 10 10 8 4 7 10 2 3 4 10 7 2 8 8 4 2 4 4 7 7 3 2 3 1 5 3 7 2 4 9 10 8 10 5 1 6 2 1 10 3 5 6 6 9 3 10 1 10 1 6 2 3 8 7 1 5 4 10 4 3 5 8 8 1 3 8 2 3 10 7 2 4 5 2 6 4 10 4 4 8 5 1 6 3 1 9 5 4 9 4 3\n", "output": "4\nRRLR\n"}, {"type": "stdin_stdout", "input": "89\n4 5 4 8 3 3 6 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 sequence $a_1, a... | [{"type": "stdin_stdout", "input": "100\n49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a white sheet of paper ... | [{"type": "stdin_stdout", "input": "347722 718484 584813 736820\n280059 317406 997137 588815\n388486 281361 399827 854715\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "623181 608349 717362 757936\n654173 174442 707580 812338\n649542 255816 917899 810891\n", "output": "YES\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's denote a function $f(x)$ i... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "91\n"}, {"type": "stdin_stdout", "input": "932415950\n", "output": "53\n"}, {"type": "stdin_stdout", "input": "987654321\n", "output": "46\n"}, {"type": "stdin_stdout", "input": "916073472\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "999999999\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ friends who want t... | [{"type": "stdin_stdout", "input": "148\n0 110 76 0 0 106 56 107 0 115 0 0 8 0 0 0 0 74 15 58 108 78 0 0 0 29 28 0 103 25 0 0 0 13 0 0 0 126 0 0 0 0 124 12 0 10 0 0 141 19 135 0 84 30 0 100 86 118 95 0 0 134 0 0 0 0 101 0 128 7 5 0 91 0 138 57 112 43 9 0 52 0 0 0 16 0 11 0 0 63 109 0 0 142 53 99 0 0 129 148 21 0 1 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a huge decimal num... | [{"type": "stdin_stdout", "input": "213 5 3\n111001111110111001101011111100010010011001000001111010110110011000100000101010111110010001111110001010011001101000000011111110101001101100100100110100000111111100010100011010010001011100111011000001110000111000101\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "107 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 three integers $a ... | [{"type": "stdin_stdout", "input": "10\n3351 6383 6479\n7051 9793 9929\n1 1061 9572\n5401 5401 5865\n9777 9987 9987\n3393 7229 9665\n8014 8533 8665\n9549 9917 9998\n3336 6686 9962\n5351 8201 9241\n", "output": "208\n3239 6478 6478\n2223\n4964 9928 9928\n7\n1 1063 9567\n464\n5401 5401 5401\n210\n9987 9987 9987\n2608\n32... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ consi... | [{"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\nPetya studies at university. The... | [{"type": "stdin_stdout", "input": "100 43\n76 77 1\n24 25 1\n2 3 1\n85 86 1\n49 50 1\n15 16 1\n30 31 1\n78 79 1\n54 55 1\n58 59 1\n17 18 1\n67 68 1\n21 22 1\n80 81 1\n35 36 1\n8 9 1\n83 84 1\n44 45 1\n62 63 1\n64 65 1\n72 73 1\n27 28 1\n56 57 1\n12 13 1\n40 41 1\n32 33 1\n52 53 1\n70 71 1\n97 98 1\n37 38 1\n87 88 1\n4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 plays \"Game 23\". Init... | [{"type": "stdin_stdout", "input": "289777775 341477104\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "100000000 100000001\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "139999978 419999934\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "300000007 300000007\n", "output": "0\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\nLet's call an array good if ther... | [{"type": "stdin_stdout", "input": "4\n500000 500000 1000000 1000000\n", "output": "2\n3 4 \n"}, {"type": "stdin_stdout", "input": "6\n4 7 1 1 1 1\n", "output": "5\n2 3 4 5 6 \n"}, {"type": "stdin_stdout", "input": "4\n2 1000000 1000000 14\n", "output": "0\n\n"}, {"type": "stdin_stdout", "input": "6\n16 4 4 4 4 16\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "100 1000000000000\ndjgykfqaywhkhpocyxcpvbiiouyielmighclnuopadzuvrirbecucwnzwahahagvfstbxxaednajfauscxwttiglbbxtomnnalcl\n", "output": "8854753825335\n"}, {"type": "stdin_stdout", "input": "100 1000000000\ngaoxttalzmmhfhjphaftcwnnhjotuyxcnzlhqoynmcfhhmpzumichrghshdmbtjxmkwegnajkbtfhgl... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 unwe... | [{"type": "stdin_stdout", "input": "13 18 4\n12 10\n4 12\n13 12\n5 4\n13 8\n5 10\n1 8\n7 8\n10 3\n5 2\n9 8\n6 11\n12 1\n9 2\n11 1\n7 1\n5 1\n10 1\n", "output": "YES\n9 2\n10 5\n1 11\n1 8\n13 8\n4 12\n10 3\n5 4\n11 6\n7 1\n12 1\n8 9\n"}, {"type": "stdin_stdout", "input": "13 18 2\n4 5\n11 8\n10 8\n5 8\n2 12\n9 2\n3 9\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\nPolycarp is going to participate... | [{"type": "stdin_stdout", "input": "10:00\n11:00\n", "output": "10:30\n"}, {"type": "stdin_stdout", "input": "11:10\n11:12\n", "output": "11:11\n"}, {"type": "stdin_stdout", "input": "01:02\n03:02\n", "output": "02:02\n"}, {"type": "stdin_stdout", "input": "00:00\n23:58\n", "output": "11:59\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\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "64\n", "output": "267\n"}, {"type": "stdin_stdout", "input": "16\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "24\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "32\n", "output": "51\n"}, {"type": "stdin_stdout", "input": "36\n", "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\nYou are given $n$ segments on a ... | [{"type": "stdin_stdout", "input": "6\n2 4\n3 5\n2 5\n1 6\n2 4\n3 6\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6\n6 6\n3 4\n3 5\n4 5\n1 2\n5 6\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\n2 4\n3 6\n2 6\n2 5\n1 4\n1 4\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "6\n1 5\n1 4\n1 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\nVova's family is building the Gr... | [{"type": "stdin_stdout", "input": "20\n10 5 2 3 5 7 7 9 4 9 9 4 9 7 7 5 3 2 5 10\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "14\n7 7 7 4 3 3 4 5 4 4 5 7 7 7\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "13\n5 2 2 1 1 2 5 2 1 1 2 2 5\n", "output": "NO\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\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "100 100\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "4950\n"}, {"type": "stdin_stdout", "input": "100 100\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\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\nMasha has $n$ types of tiles of ... | [{"type": "stdin_stdout", "input": "6\n3 4\n1 2\n5 6\n5 7\n7 4\n8 9\n9 8\n2 5\n1 1\n1 1\n2 2\n2 2\n1 100\n10 10\n10 10\n1 2\n4 5\n8 4\n2 2\n1 1\n1 1\n1 2\n3 4\n1 2\n1 1\n1 1\n", "output": "YES\nNO\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1\n8 2\n3 5\n10 7\n3 3\n7 9\n5 9\n7 4\n6 8\n3 8\n7 6\n1 6\n5 7\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 integer sequenc... | [{"type": "stdin_stdout", "input": "2000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1999999999\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1999999997\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1999999998\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000271094\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a bracket sequence... | [{"type": "stdin_stdout", "input": "100\n()()))(()()))))((()()))))(()()(()())()))))()())()()((((()(()()((())))((()()())())(())((()((()))(((()(()))))))())))((((()())))(()(()(())))(()))()()())((())()((())(()(((()((())))())))()()()((()))()()())\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "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\nYou are given $n$ strings. Each ... | [{"type": "stdin_stdout", "input": "5\na\naba\nabacaba\nba\naba\n", "output": "YES\na\nba\naba\naba\nabacaba\n"}, {"type": "stdin_stdout", "input": "3\nqwerty\nqwerty\nqwerty\n", "output": "YES\nqwerty\nqwerty\nqwerty\n"}, {"type": "stdin_stdout", "input": "3\nababc\nabababc\nab\n", "output": "YES\nab\nababc\nabababc\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is an infinite board of sq... | [{"type": "stdin_stdout", "input": "99999999999973 99999999999971\n", "output": "199999999999948\n"}, {"type": "stdin_stdout", "input": "99999999999962 99999999999973\n", "output": "133333333333296\n"}, {"type": "stdin_stdout", "input": "99999999999973 99999999999930\n", "output": "399999999999808\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\nFind the price of a product befo... | [{"type": "stdin_stdout", "input": "80 100\n", "output": "1000\n"}, {"type": "stdin_stdout", "input": "68 85\n", "output": "850\n"}, {"type": "stdin_stdout", "input": "24 30\n", "output": "300\n"}, {"type": "stdin_stdout", "input": "25 32\n", "output": "320\n"}, {"type": "stdin_stdout", "input": "27 34\n", "output": "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\nPolycarp has to solve exactly $n... | [{"type": "stdin_stdout", "input": "849600011 46\n", "output": "YES\n18469542 18469543 18469545 18469546 18469547 18469548 18469549 18469550 18469551 18469552 18469553 18469554 18469555 18469556 18469557 18469558 18469559 18469560 18469561 18469562 18469563 18469564 18469565 18469566 18469567 18469568 18469569 18469570... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "50 15000\n142 -300\n20 -298\n560 -300\n1815 -292\n282 -297\n92 -293\n34 -284\n555 -299\n408 -293\n504 -284\n278 -284\n139 -291\n64 -298\n311 -293\n130 -293\n89 -298\n129 -294\n385 -295\n136 -288\n41 -293\n112 -290\n416 -295\n178 -294\n154 -300\n110 -300\n346 -299\n209 -294\n1394 -295... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 some square matrix wi... | [{"type": "stdin_stdout", "input": "13\n1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 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\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "58 168\n25 -3\n70 -3\n169 2\n182 -4\n183 2\n178 4\n14 2\n18 0\n167 3\n8 4\n215 -4\n146 -3\n229 1\n27 3\n88 3\n202 4\n208 3\n33 2\n161 -4\n87 -1\n115 0\n175 2\n220 -4\n119 3\n188 -4\n50 1\n71 -2\n118 4\n55 1\n55 -4\n144 0\n66 -3\n90 -2\n147 3\n83 0\n111 -2\n10 1\n106 4\n117 -1\n43 3\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a river of width $n$. T... | [{"type": "stdin_stdout", "input": "93 66 2\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 6 3 21\n", "output": "YES\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "izoiweukqszkkhwapzxyotbaarpqxbybsjxilhylbbjbvoedrezyluaabsfzvtxxvncdwxrlfdtfvbfoqwlzqwneimwzpoygfdcldmxdhoxzensxlspituzocvzzrfomhggrwurdccgfoorvhyzsdkpjhwakuoxwdjhzaalanyzwuuqwlrtmvmdraleyusjqdyxuztvc\nizoiweukqszkkhwapzxyotbaarpqxbybsjxilhylbbjbvoedrezyluaabsfzvtxxvncdwxrlfdtfvbfoqw... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$\\text{A}$ \n\n\n-----Input----... | [{"type": "stdin_stdout", "input": "4.472136\n", "output": "10 10\n"}, {"type": "stdin_stdout", "input": "2.572479\n", "output": "10 3\n"}, {"type": "stdin_stdout", "input": "0.499376\n", "output": "1 10\n"}, {"type": "stdin_stdout", "input": "1.483405\n", "output": "3 10\n"}, {"type": "stdin_stdout", "input": "3.12347... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 three integers $n$... | [{"type": "stdin_stdout", "input": "26 5 4\n", "output": "YES\n2 13\n2 10\n25 10\n1 25\n1 12\n26 10\n10 22\n5 25\n25 16\n19 2\n2 6\n15 1\n14 1\n24 26\n26 17\n7 26\n4 22\n22 21\n18 22\n9 5\n5 20\n23 5\n11 16\n3 16\n16 8\n"}, {"type": "stdin_stdout", "input": "22 6 3\n", "output": "YES\n2 13\n10 2\n10 3\n1 3\n12 1\n12 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\nYou are given two strings $s$ an... | [{"type": "stdin_stdout", "input": "100\nab\nac\n", "output": "YES\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.