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\nYou are given an array consistin... | [{"type": "stdin_stdout", "input": "9\n100 50 6\n1 49\n51 100\n40 60\n30 70\n20 30\n70 80\n100 1 11\n1 1\n1 1\n1 1\n2 2\n2 100\n1 4\n2 3\n3 7\n5 6\n6 100\n4 5\n1 1 5\n1 1\n1 1\n1 1\n1 1\n1 1\n11 6 4\n6 6\n1 5\n7 11\n6 6\n3 3 2\n1 2\n2 3\n1000000000 1 1\n1 1000000000\n1000000000 1 1\n1 999999999\n1000000000 1 1\n2 10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a non-decreasing a... | [{"type": "stdin_stdout", "input": "6\n4 1\n0 0 0 1\n3 1\n3 3 3\n11 3\n0 1 2 2 3 3 3 4 4 4 4\n5 3\n1 2 3 4 5\n9 4\n2 2 3 5 7 11 13 13 17\n10 7\n0 1 1 2 3 3 4 5 5 6\n", "output": "-1\n1\n2\n2\n2\n1\n"}, {"type": "stdin_stdout", "input": "1\n5 5\n5 5 5 5 5\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n5 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 are some rabbits in Singap... | [{"type": "stdin_stdout", "input": "54 42164\n810471 434523 262846 930807 148016 633714 247313 376546 142288 30094 599543 829013 182512 647950 512266 827248 452285 531124 257259 453752 114536 833190 737596 267349 598567 781294 390500 318098 354290 725051 978831 905185 849542 761886 55532 608148 631077 557070 355245 929... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJeel and Ashish play a game on a... | [{"type": "stdin_stdout", "input": "5\n5 5\n0 126 30 105 44\n126 98 21 0 108\n124 30 110 82 31\n119 117 87 99 97\n55 72 124 61 0\n5 5\n0 154 44 96 5\n82 20 16 99 66\n56 10 90 63 70\n99 87 103 0 23\n107 26 70 23 -1\n5 5\n100 112 41 120 29\n32 20 36 160 50\n100 11 92 7 30\n80 93 0 83 60\n69 31 24 102 48\n5 2\n0 100\n73 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\nMasha works in an advertising ag... | [{"type": "stdin_stdout", "input": "3\n4 3\n1 3 1 2\n4 2\n1 1 1 1\n2 1\n1 2\n", "output": "\n2\n6\n1\n"}, {"type": "stdin_stdout", "input": "3\n4 3\n1 3 1 2\n4 2\n1 2 1 1\n2 1\n1 2\n", "output": "2\n3\n1\n"}, {"type": "stdin_stdout", "input": "3\n4 3\n1 3 1 2\n4 2\n1 1 1 1\n2 1\n2 2\n", "output": "2\n6\n2\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\nMonocarp is playing a game \"Ass... | [{"type": "stdin_stdout", "input": "3 5\n1 4 4 3 4\n1 4 1 4 2\n1 4 4 4 3\n", "output": "\n166374062\n"}, {"type": "stdin_stdout", "input": "3 5\n1 4 4 3 4\n1 4 2 4 2\n1 4 4 4 3\n", "output": "831870297\n"}, {"type": "stdin_stdout", "input": "3 5\n1 4 4 3 4\n1 4 2 4 2\n1 3 4 4 3\n", "output": "166374062\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, as Sherlock Holmes was ... | [{"type": "stdin_stdout", "input": "100\n901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Smart Beaver from ABBYY bega... | [{"type": "stdin_stdout", "input": "120\n242 524 420 973 816 432 247 666 134 849 145 366 1119 930 613 315 863 628 97 109 65 704 741 314 736 17 872 971 559 648 223 771 171 327 782 837 303 393 292 339 730 834 794 868 540 251 789 893 23 305 116 220 699 863 580 992 861 393 98 253 544 171 336 207 348 496 316 285 286 727 613... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 saw a string. It contai... | [{"type": "stdin_stdout", "input": "100\n8 43 55 27 70 81 66 10 49 67 24 61 53 0 2 76 96 16 16 1 78 1 69 69 4 59 6 87 98 14 98 20 12 48 20 41 67 90 20 96 44 8 77 94 84 2 61 27 90 42 66 84 5 19 68 13 5 53 13 87 70 41 48 40 19 61 72 31 4 4 59 100 50 64 84 10 96 16 73 3 63 85 67 91 74 63 22 34 6 96 78 42 61 85 3 95 98 84 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima's got a staircase that cons... | [{"type": "stdin_stdout", "input": "5\n1 2 3 6 6\n25\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\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\nKalila and Dimna are two jackals... | [{"type": "stdin_stdout", "input": "6\n1 2 3 10 20 30\n6 5 4 3 2 0\n", "output": "138\n"}, {"type": "stdin_stdout", "input": "6\n2 2 3 10 20 30\n6 5 4 3 2 0\n", "output": "138\n"}, {"type": "stdin_stdout", "input": "6\n1 2 3 10 20 25\n6 5 4 3 2 0\n", "output": "118\n"}, {"type": "stdin_stdout", "input": "6\n1 1 2 10 20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMad scientist Mike does not use ... | [{"type": "stdin_stdout", "input": "10 11\n1 909090909 1818181817 2727272725 3636363633 4545454541 5454545449 6363636357 7272727265 8181818173\n454545455 1363636363 2272727271 3181818179 4090909087 4999999995 5909090903 6818181811 7727272719 8636363627 9545454535\n", "output": "1363636362\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\nDima loves Inna very much. He de... | [{"type": "stdin_stdout", "input": "11 11 9 11\n1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 2 2 1\n1 1 1 1 1 1 1 1 3 1 1\n1 1 1 1 1 1 1 3 1 1 1\n1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1\n1 1 1 2 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1\n3 3 3 3 3 3 3 3 3 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOnce Vasya played bricks. All th... | [{"type": "stdin_stdout", "input": "20\n-10 17 -4 11\n1 22 -15 6\n-5 12 -9 16\n-9 16 -5 12\n-2 19 -12 9\n-10 17 -4 11\n-8 13 -6 15\n-5 12 -9 16\n-3 18 -11 10\n-1 20 -13 8\n29 9 -12 50\n29 50 -11 10\n29 9 -12 50\n29 50 -10 11\n-14 50 29 7\n-9 12 29 50\n-14 7 29 50\n29 9 -12 50\n-11 10 29 50\n-11 50 29 10\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\nLast year the world's largest sq... | [{"type": "stdin_stdout", "input": "100000 -100000 100000 100000\n", "output": " 200001\n"}, {"type": "stdin_stdout", "input": "100000 100000 100000 -100000\n", "output": " 200001\n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOf course our child likes walkin... | [{"type": "stdin_stdout", "input": "10 19\n13637 26970 19043 3616 12880 19387 12539 25190 2452 1261\n1 2\n1 3\n1 4\n2 5\n3 6\n6 7\n3 8\n5 9\n3 10\n4 10\n9 3\n2 8\n4 3\n2 3\n7 10\n7 8\n5 10\n5 6\n7 4\n", "output": "8241.4222222222\n"}, {"type": "stdin_stdout", "input": "10 19\n15704 19758 26631 25050 22778 15041 8487 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\nPermutation p is an ordered set ... | [{"type": "stdin_stdout", "input": "18247 939\n", "output": "1 940 2 939 3 938 4 937 5 936 6 935 7 934 8 933 9 932 10 931 11 930 12 929 13 928 14 927 15 926 16 925 17 924 18 923 19 922 20 921 21 920 22 919 23 918 24 917 25 916 26 915 27 914 28 913 29 912 30 911 31 910 32 909 33 908 34 907 35 906 36 905 37 904 38 903 39... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of positi... | [{"type": "stdin_stdout", "input": "100 10000000\n300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKevin Sun wants to move his prec... | [{"type": "stdin_stdout", "input": "100 49990\n221 257 543 613 818 855 884 1195 1233 1293 1327 1474 1567 1568 1728 1789 1809 1957 1994 2198 2217 2289 2298 2360 2441 2454 2517 2519 2597 2652 2909 2958 2970 3271 3310 3409 3450 3646 3950 3965 4016 4116 4134 4159 4462 4624 4631 4783 4804 5031 5276 5538 5729 5845 5880 5894 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDefine the simple skewness of a ... | [{"type": "stdin_stdout", "input": "40\n999999 999999 999998 999998 999996 999996 999992 999992 999984 999984 999968 999968 999936 999936 999872 999872 999744 999744 999488 999488 998976 998976 997952 997952 995904 995904 991808 991808 983616 983616 967232 967232 934464 934464 868928 868928 737856 737856 475712 0\n", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere exists an island called Ar... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "1902349577\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "0000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1065810635\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1760197508\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\nVanya wants to minimize a tree. ... | [{"type": "stdin_stdout", "input": "12\n12 6\n6 7\n8 11\n4 8\n10 4\n12 3\n2 10\n6 2\n12 9\n4 1\n9 5\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "12\n12 6\n6 7\n8 11\n7 8\n10 4\n12 3\n2 10\n6 2\n12 9\n4 1\n9 5\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "11\n11 9\n6 7\n7 1\n8 11\n5 6\n3 5\n9 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\nMasha really loves algebra. On t... | [{"type": "stdin_stdout", "input": "-3 0 92055 36\n-92974174 -486557474 -663622151 695596393 177960746 -563227474 -364263320 -676254242 -614140218 71456762 -764104225 705056581 -106398436 332755134 -199942822 -732751692 658942664 677739866 886535704 183687802 -784248291 -22550621 -938674499 637055091 -704750213 7803958... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor some reason in many American... | [{"type": "stdin_stdout", "input": "90\n1 1\n2 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n1 2\n2 2\n3 2\n4 2\n5 2\n6 2\n7 2\n8 2\n9 2\n1 3\n2 3\n3 3\n4 3\n5 3\n6 3\n7 3\n8 3\n9 3\n1 4\n2 4\n3 4\n4 4\n5 4\n6 4\n7 4\n8 4\n9 4\n1 5\n2 5\n3 5\n4 5\n5 5\n6 5\n7 5\n8 5\n9 5\n1 6\n2 6\n3 6\n4 6\n5 6\n6 6\n7 6\n8 6\n9 6\n1 7\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\nSome natural number was written ... | [{"type": "stdin_stdout", "input": "900\n13595314340746721027884681972026445045155446054797436718350397773609081581610067818125738383867204953\n", "output": "86\n"}, {"type": "stdin_stdout", "input": "900\n7570423817272967027553082464863962024635217372307919506594193055572300657732661146354209508997483330\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\nTwo best friends Serozha and Gen... | [{"type": "stdin_stdout", "input": "100000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "60989\n", "output": "142\n"}, {"type": "stdin_stdout", "input": "14577\n", "output": "113\n"}, {"type": "stdin_stdout", "input": "63478\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "56056\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\nWe had a string s consisting of ... | [{"type": "stdin_stdout", "input": "100 3\nzsk\nzsk\nzsk\nzsk\nskz\nskz\nkzs\nskz\nkzs\nkzs\nzsk\nkzs\nkzs\nkzs\nskz\nkzs\nskz\nskz\nkzs\nzsk\nkzs\nkzs\nkzs\nskz\nskz\nskz\nzsk\nskz\nzsk\nskz\nkzs\nskz\nskz\nskz\nkzs\nzsk\nzsk\nkzs\nskz\nskz\nkzs\nkzs\nskz\nkzs\nkzs\nskz\nkzs\nskz\nkzs\nkzs\nskz\nkzs\nkzs\nkzs\nkzs\nsk... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday you are going to lead a gr... | [{"type": "stdin_stdout", "input": "100 100 1000\n814 165 709 628 263 653 940 749 331 437 129 547 575 73 480 429 396 688 489 312 425 946 444 228 547 512 477 849 53 241 643 416 141 502 449 58 686 111 171 844 113 790 79 107 399 846 945 427 361 68 295 630 260 939 679 458 485 738 202 141 166 940 5 73 108 351 245 998 640 77... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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**\nProblem Statement is Updated... | [{"type": "stdin_stdout", "input": "1\n-3\n-1 -1 -1 -1\n\nANMDPL", "output": "3\n"}, {"type": "stdin_stdout", "input": "1\n-2\n-1 3 -4 0\n\nTEMPLA", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n-2\n-1 3 -1 0\n\nTEMPLA", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n-3\n-2 10 2 1\n\nTEMPLA", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Raju recently learnt abou... | [{"type": "stdin_stdout", "input": "4\n4521\n994\n5000\n10000", "output": "79728179662882457227576647453466692548803597891051066617654120269518723853720729222251526347026397515035442714307188357281539306875295261428766221766658302923133032431051274362347768081743273778236028473510850228289095802566593792840410500407058... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an array A. Delete an sing... | [{"type": "stdin_stdout", "input": "5\n1\n101\n2\n100 0\n2\n1 2\n3\n1 100 4\n3\n1 0 3\n3\n0 5 3\n0\n1 10 8\n1\n8 7 0\n1\n7 9 2\n0\n11 2 17", "output": "0\n0\n0\n1\n2\n"}, {"type": "stdin_stdout", "input": "5\n1\n101\n2\n100 0\n2\n1 2\n3\n1 000 4\n3\n1 0 3\n3\n0 5 3\n0\n1 10 8\n1\n8 7 0\n1\n7 9 2\n0\n11 2 4", "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\nYou have been given a set of N s... | [{"type": "stdin_stdout", "input": "2\n20\nengagfwhxalwaaucqieavxyutinrmtd\nnxhehybspixeykxillunrhswxskfrzkljeigxwaumrlfqlrrjlngxcyddtunll\nhcqpdelycqspbqrorpslpqwy\nzzjclluwfsyzxvzldjvdpfshbghqcepchuepklddqgtalcbupgexclfdjzjkctlnayuhgrvcsqyxatokefjwbnzvu\nfuxfecjlwilndrijri\naykqwypnriohkyizfvihjkyanijciyqxjslpqdjjjil... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 cells arranged in a ... | [{"type": "stdin_stdout", "input": "60 3\n11 16\n1 2\n10 26", "output": "469563953\n"}, {"type": "stdin_stdout", "input": "103 2\n5 4\n1 3\n10 15", "output": "883576557\n"}, {"type": "stdin_stdout", "input": "60 3\n9 16\n1 2\n10 26", "output": "634479161\n"}, {"type": "stdin_stdout", "input": "60 3\n5 4\n1 3\n10 15", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N children, numbered 1... | [{"type": "stdin_stdout", "input": "856 16\n399 491 665 432 206 61 784 548 422 313 848 478 827 26 398 63", "output": "652418319\n"}, {"type": "stdin_stdout", "input": "856 16\n399 491 665 432 206 61 784 548 422 313 848 478 827 23 222 63", "output": "293415485\n"}, {"type": "stdin_stdout", "input": "856 16\n399 263 665 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of N in... | [{"type": "stdin_stdout", "input": "8\n4\n4\n5\n1\n1\n1\n2\n3", "output": "18\n"}, {"type": "stdin_stdout", "input": "8\n5\n11\n3\n1\n2\n1\n2\n2", "output": "0\n"}, {"type": "stdin_stdout", "input": "8\n5\n11\n3\n1\n2\n1\n4\n2", "output": "0\n"}, {"type": "stdin_stdout", "input": "8\n4\n4\n4\n1\n1\n1\n2\n2", "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\n\"Teishi-zushi\", a Japanese res... | [{"type": "stdin_stdout", "input": "15 10000000000\n400000000 1000000000\n800000000 1000000000\n1900000000 1000000000\n2400000000 1000000000\n2900000000 1000000000\n3300000000 1000000000\n3700000000 1000000000\n3800000000 1000000000\n4000000000 1000000000\n4100000000 1000000000\n5200000000 1000000000\n6600000000 100000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, a person who has par... | [{"type": "stdin_stdout", "input": "20\n800 2054 820 830 840 850 384 433 1213 259 900 1139 920 1007 92 2243 960 970 1357 990", "output": "5 5\n"}, {"type": "stdin_stdout", "input": "20\n800 2108 443 830 840 2012 116 614 620 92 399 1139 1229 646 92 2243 174 1254 1914 990", "output": "6 6\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\nN hotels are located on a straig... | [{"type": "stdin_stdout", "input": "9\n1 3 6 13 15 18 19 29 31\n10\n4\n1 8\n7 3\n6 7\n8 3", "output": "4\n2\n1\n3\n"}, {"type": "stdin_stdout", "input": "9\n1 3 6 13 23 18 19 29 31\n12\n4\n1 8\n1 5\n9 7\n8 7", "output": "3\n2\n1\n1\n"}, {"type": "stdin_stdout", "input": "9\n1 3 6 13 23 19 19 29 31\n10\n4\n1 9\n7 6\n6 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\nAn English booklet has been crea... | [{"type": "stdin_stdout", "input": "3\nHoshimo\nHashino\nMasayuki Hoshino was the grandson of Ieyasu Tokugawa.", "output": "Hoshimo\nHashino\nMasayuki Hoshina was the grandson of Ieyasu Tokugawa.\n"}, {"type": "stdin_stdout", "input": "3\nHoshimo\nHashino\nMasayuki Hoshino was the grandspn of Ieyasu Tokugawa.", "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\nAizu has an ancient legend of bu... | [{"type": "stdin_stdout", "input": "3 3\n100 10 10\n-100 -10 -100\n-100 -20 -100\n-117 -20 -195\n3 3\n100 10 10\n-100 -20 -100\n-100 -20 -20\n-100 -60 -20\n3 3\n100 19 3\n-100 -20 -100\n-20 -20 -20\n-20 -100 -20\n3 3\n100 3 3\n-100 -20 -30\n-100 -20 2\n-127 -20 -20\n4 5\n1500 5 4\n-10 -380 -250 -312\n-90 2 -144 12\n-25... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPlaying with Stones\n\nKoshiro a... | [{"type": "stdin_stdout", "input": "4\n24 99\n15 68\n12 155\n95 79", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n24 99\n15 97\n12 149\n95 79", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n39 99\n15 97\n12 149\n95 79", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n24 99\n15 68\n12 90\n95... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 working for an administr... | [{"type": "stdin_stdout", "input": "4 5\n..33\n33..\n2222\n..1.\n.111\n5 7\n....1\n.1..1\n1..1.\n11..1\n.2222\n..111\n...1.\n3 6\n.3.\n233\n23.\n22.\n.11\n.11\n4 3\n2222\n..11\n..11\n4 5\n.3..\n..33\n322.\n2211\n.11.\n3 3\n222\n2.1\n111\n3 4\n11.\n11.\n.2/\n222\n3 4\n.11\n.11\n.2.\n222\n2 7\n11\n.1\n21\n22\n23\n.3\n33\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are working as a night watch... | [{"type": "stdin_stdout", "input": "1 1 1\n0\n2 2 1\n1 1\n1 1\n3 2 1\n1 0 1\n0 1 -1\n3 3 1\n1 0 0\n0 1 0\n1 0 1\n4 4 2\n1 1 0 1\n0 0 0 1\n1 0 1 1\n1 0 0 0\n5 5 1\n1 1 1 0 1\n0 1 0 1 0\n1 0 1 0 1\n0 1 1 1 0\n1 0 1 0 0\n5 1 2\n0 0 0 0 0\n0 0 0 0 0\n0 0 1 0 0\n0 0 0 0 0\n0 0 0 0 1\n11 11 3\n0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nAizu Magic School is ... | [{"type": "stdin_stdout", "input": "10 3\n2 0 1\n4 2 1\n8 1 1", "output": "9\n"}, {"type": "stdin_stdout", "input": "10 3\n2 2 1\n4 2 1\n8 1 1", "output": "8"}, {"type": "stdin_stdout", "input": "30 0\n2 0 1\n-1 2 1", "output": "30\n"}, {"type": "stdin_stdout", "input": "20 2\n2 6 1\n1 5 -1", "output": "14\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\nA small country called Maltius w... | [{"type": "stdin_stdout", "input": "2 2\nQE\nEA\n3 1\nQAE\n3 1\nAQE\n5 5\n..E..\n.###.\nA###Q\n.###.\n..E..\n5 1\nA.E.Q\n5 5\nA....\n.\n..E..\n###.#\n....Q\n0 0", "output": "Queen can not escape and Army can not catch Queen.\nArmy can catch Queen.\nQueen can escape.\nQueen can not escape and Army can not catch Queen.\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 evil creature in a s... | [{"type": "stdin_stdout", "input": "4 3 3\nS..\n...\n..#\n.#G", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 3 3\nS/.\n...\n..#\n.#G", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 3 2\nS..\n..-\n..#\nG#.", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 3 2\nS.-\n..-\n..#\nG#.", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nAOR Ika and you came ... | [{"type": "stdin_stdout", "input": "66 -51", "output": "116\n"}, {"type": "stdin_stdout", "input": "66 -87", "output": "152\n"}, {"type": "stdin_stdout", "input": "66 -49", "output": "114\n"}, {"type": "stdin_stdout", "input": "96 -49", "output": "144\n"}, {"type": "stdin_stdout", "input": "96 -45", "output": "140\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 histogram is made of a number ... | [{"type": "stdin_stdout", "input": "8\n1 20 9 13 4 10 1 26", "output": "27\n"}, {"type": "stdin_stdout", "input": "8\n1 36 9 13 4 10 1 26", "output": "36\n"}, {"type": "stdin_stdout", "input": "8\n1 36 9 13 4 10 1 38", "output": "38\n"}, {"type": "stdin_stdout", "input": "8\n1 20 3 13 4 7 1 26", "output": "26\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\nDifference of Big Integers\n\nGi... | [{"type": "stdin_stdout", "input": "-2 -1280", "output": "1278\n"}, {"type": "stdin_stdout", "input": "-2 -1243", "output": "1241\n"}, {"type": "stdin_stdout", "input": "-2 -2265", "output": "2263\n"}, {"type": "stdin_stdout", "input": "-1 -2265", "output": "2264\n"}, {"type": "stdin_stdout", "input": "-1 -2368", "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\nYou received a notebook which is... | [{"type": "stdin_stdout", "input": "16 2\n999999999 999999999 999999999 856501885 1080831631 999999999 768581442 1196229362 999999999 999999999 1341911334 1890212075 1581621479 999999999 999999999 999999999\n", "output": "499999999 500000000 499999999 428250943 540415815 500000000 384290721 598114681 499999999 50000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 average miner Vaganych took ... | [{"type": "stdin_stdout", "input": "50\n515844718 503470143 928669067 209884122 322869098 241621928 844696197 105586164 552680307 968792756 135928721 842094825 298782438 829020472 791637138 285482545 811025527 428952878 887796419 11883658 546401594 6272027 100292274 308219869 372132044 955814846 644008184 521195760 919... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJATC's math teacher always gives... | [{"type": "stdin_stdout", "input": "252601\n", "output": "252601 0\n"}, {"type": "stdin_stdout", "input": "999958\n", "output": "999958 0\n"}, {"type": "stdin_stdout", "input": "999979\n", "output": "999979 0\n"}, {"type": "stdin_stdout", "input": "499979\n", "output": "499979 0\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 Fair Nut lives in n story ho... | [{"type": "stdin_stdout", "input": "100\n95 81 40 82 80 78 4 86 37 94 1 46 85 6 41 87 100 69 100 87 12 61 55 81 81 32 40 54 22 32 24 73 61 68 76 16 83 76 73 77 41 37 88 46 72 63 2 37 14 49 45 81 75 56 10 101 73 85 41 17 5 2 16 75 28 53 35 77 66 53 69 82 50 95 2 12 35 62 84 46 29 95 91 49 78 14 88 75 58 52 49 31 56 43 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\nThe Kingdom of Kremland is a tre... | [{"type": "stdin_stdout", "input": "44\n42 44 4 24 29 17 32 30 30 9 28 9 22 16 20 41 17 19 41 23 28 19 38 44 1 34 41 34 19 36 32 37 22 31 4 3 27 23 21 21 26 39 20 8\n", "output": "6926\n"}, {"type": "stdin_stdout", "input": "40\n35 33 20 13 21 4 16 21 22 35 20 39 32 29 27 5 24 3 12 10 15 13 2 31 1 11 20 39 17 37 21 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\nTokitsukaze is one of the charac... | [{"type": "stdin_stdout", "input": "100\n", "output": "1 A\n"}, {"type": "stdin_stdout", "input": "101\n", "output": "0 A\n"}, {"type": "stdin_stdout", "input": "130\n", "output": "1 B\n"}, {"type": "stdin_stdout", "input": "121\n", "output": "0 A\n"}, {"type": "stdin_stdout", "input": "118\n", "output": "1 B\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\nPetya loves lucky numbers. Every... | [{"type": "stdin_stdout", "input": "485 9554485\n7759121368632736852539182753173468028218114958118158732302477551670775608015153610483175626465946144780731573954182900412248382710280376491925985206156109890139333293746203940442347501294009600230166311978044218247083102712257326301109220002496805123344816427514286225153... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integer a c... | [{"type": "stdin_stdout", "input": "3\n0709\n1337\n246432\n", "output": "0079\n1337\n234642\n"}, {"type": "stdin_stdout", "input": "3\n477\n1337\n246432\n", "output": "477\n1337\n234642\n"}, {"type": "stdin_stdout", "input": "3\n477\n1216\n246432\n", "output": "477\n1126\n234642\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\nA new delivery of clothing has a... | [{"type": "stdin_stdout", "input": "100000\n100000\n100000\n100000\n1000\n1000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "100000\n100000\n100100\n100000\n1000\n1000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "100000\n100000\n100000\n100000\n1000\n1\n", "output": "100000000\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 robot in a warehouse ... | [{"type": "stdin_stdout", "input": "3\n5\n1 3\n1 2\n3 3\n5 5\n4 3\n2\n1 0\n0 1\n1\n4 3\n", "output": "YES\nRUUURRRRUU\nNO\nYES\nRRRRUUU\n"}, {"type": "stdin_stdout", "input": "3\n5\n1 3\n1 2\n3 3\n5 5\n2 3\n2\n1 0\n0 1\n1\n4 3\n", "output": "YES\nRUUURRRRUU\nNO\nYES\nRRRRUUU\n"}, {"type": "stdin_stdout", "input": "3\n5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is the easy version of the ... | [{"type": "stdin_stdout", "input": "54 53\n8192 2147483648 134217728 8589934592 64 131072 137438953472 67108864 16384 536870912 256 4096 1099511627776 549755813888 32768 2 1048576 8 4194304 4294967296 262144 268435456 8388608 140737488355328 1073741824 4398046511104 512 2199023255552 2048 281474976710656 16777216 70368... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 might have remembered Theatr... | [{"type": "stdin_stdout", "input": "1\n9 9 9 9\n.........\n.........\n.........\n.........\n.........\n.........\n.........\n.........\n.........\n", "output": "405\n"}, {"type": "stdin_stdout", "input": "4\n1 1 10 1\n.\n1 2 10 1\n..\n2 1 10 1\n.\n.\n3 3 3 7\n..*\n*..\n.*.\n", "output": "10\n1\n20\n18\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHaving bought his own apartment,... | [{"type": "stdin_stdout", "input": "20\n110 466 472\n112 153 152\n424 492 490\n348 366 113\n208 337 415\n491 448 139\n287 457 403\n444 382 160\n325 486 284\n447 454 136\n216 412 418\n217 208 228\n109 436 291\n293 382 421\n483 339 174\n213 327 183\n278 268 147\n181 424 457\n388 289 430\n174 269 305\n20\n221 4 334\n257 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\nA famous gang of pirates, Sea Do... | [{"type": "stdin_stdout", "input": "1000000000 3\n30490 19232\n45250 999980767\n264372930 1\n", "output": "-1"}, {"type": "stdin_stdout", "input": "221407444 1\n999999999 999999999\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "300 4\n1 200\n2 200\n50 100\n70 100\n", "output": "-1"}, {"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\nThe hobbits Frodo and Sam are ca... | [{"type": "stdin_stdout", "input": "5 9990\n300000 909\n366685 9999\n370849 9998\n379178 9996\n400000 1\n", "output": "25178.6601865589\n"}, {"type": "stdin_stdout", "input": "4 90\n362174 10000\n365957 13123\n373522 9997\n400000 3804\n", "output": "35378.024406478464\n"}, {"type": "stdin_stdout", "input": "4 90\n36217... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Fire City, there are n inters... | [{"type": "stdin_stdout", "input": "4 4\n1 2 1\n2 3 1\n3 1 2\n1 4 3\n3\n1 1 3\n1 2 4\n4 0 1\n", "output": "\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 0\n2 3 1\n3 1 2\n1 4 3\n3\n1 1 2\n1 2 1\n4 0 1\n", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 1\n2 3 1\n3 1 2\n1 4 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\n\n\nInput\n\nThe input contains ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1000000001\n"}, {"type": "stdin_stdout", "input": "1000000000 0000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "1999999999\n"}, {"type": "stdin_stdout", "input": "937477084 827336327\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\nBerland starts to seize the init... | [{"type": "stdin_stdout", "input": "63 5\n76826 79919 83599 93821 79919 46132 46132 46132 79919 76826 79919 79919 76826 79919 79919 76826 76826 46132 76826 40347 79919 46132 76826 83599 79919 79919 46132 46132 46132 83599 83599 79919 46132 83599 93821 76826 81314 79919 79919 83599 76826 76826 76826 76826 46132 76826 46... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 programming language ... | [{"type": "stdin_stdout", "input": "2 100\n44\n1 2\n2 2\n2 2\n1 2\n1 1\n2 2\n2 2\n1 2\n1 1\n1 1\n1 2\n1 1\n1 2\n1 1\n2 2\n1 1\n1 2\n2 2\n1 2\n1 2\n2 2\n2 2\n1 2\n1 1\n1 1\n1 2\n1 1\n2 2\n1 2\n1 2\n2 2\n1 2\n1 2\n2 2\n1 2\n2 2\n1 1\n1 1\n1 2\n1 2\n2 2\n1 2\n1 1\n1 2\n1 2\n2 2\n1 1\n2 2\n1 2\n1 1\n2 2\n1 1\n1 2\n2 2\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\nVova, the Ultimate Thule new sha... | [{"type": "stdin_stdout", "input": "499999998500000000 1000000000\n", "output": "999955279\n"}, {"type": "stdin_stdout", "input": "499999999500000000 1000000000\n", "output": "999999998\n"}, {"type": "stdin_stdout", "input": "499999998500000001 1000000000\n", "output": "999955279\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\nSmallR is an archer. SmallR is t... | [{"type": "stdin_stdout", "input": "125 1283 234 1112\n", "output": "0.33904754471037046\n"}, {"type": "stdin_stdout", "input": "719 1275 626 1265\n", "output": "0.7232359328271274\n"}, {"type": "stdin_stdout", "input": "125 1283 148 603\n", "output": "0.30545998322249646\n"}, {"type": "stdin_stdout", "input": "125 128... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nOur good friend Mole is trying t... | [{"type": "stdin_stdout", "input": "R\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n", "output": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n"}, {"type": "stdin_stdout", "input": "R\nxxxxxxxxxxxxxxxxxxxxx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 became interested in bioin... | [{"type": "stdin_stdout", "input": "318\nTATCAATCGGTACGTGCGCATCATTGTCAATCGGGCTTCATGGCTTGCGGGCGCTACCCGAGGGGAAGCTGCGGACAGGTAGGTAAGATACACACGAACCAAACGGAGTTATGTTGGATAAATTGGCTGGAAGGGCGTAGGTATATCGAGTCGCGGACCTGGCATAGACTATCAGGGGCAGCGGTACAAGGCAACCGTGAGCGGGGTCTGCCCACCATTAGACCGATGCGCCGGCTCGTATATGTGATTCTGGTGAAAAGTATCATGCCGGGACGCGTA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWilbur is playing with a set of ... | [{"type": "stdin_stdout", "input": "40\n0 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\n1 0\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n2 0\n3 0\n4 0\n5 0\n6 0\n7 0\n8 0\n9 0\n10 0\n11 0\n12 0\n13 0\n14 0\n15 0\n16 0\n17 0\n18 0\n19 0\n20 0\n0 1 2 -1 -2 3 4 -3 5 6 7 8 0 -4 -5 1 -6 -7 -8 -9 -10 -11 9 2 -12 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 face a very i... | [{"type": "stdin_stdout", "input": "94\nkmwbq\nmw\nwbq\ns\nlx\nf\npf\nl\nkmwb\na\nfoynt\nnt\nx\npf\npf\nep\nqs\nwbqse\nrl\nfoynt\nntzjd\nlxc\npfoy\nlx\nr\nagikm\nr\ntzjd\nep\nyntz\nu\nmw\nyntz\nfoynt\ntzjd\njdrlx\nwbqse\nr\nkmw\nwbq\nlx\nfoyn\nkm\nsepfo\nikmw\nf\nrlxch\nzjdrl\nyn\nhv\nynt\nbqs\nvu\nik\nqse\nxchvu\nmwbq... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMemory is performing a walk on t... | [{"type": "stdin_stdout", "input": "RDDLLDLUUUDDRDRURLUUURLLDDLRLUURRLLRRLDRLLUDRLRULLDLRRLRLRLRUDUUDLULURLLDUURULURLLRRRURRRDRUUDLDRLRDRLRRDDLDLDLLUDRUDRLLLLDRDUULRUURRDLULLULDUDULRURRDDDLLUDRLUDDLDDDRRDDDULLLLDLDRLRRLRRDDRLULURRUDRDUUUULDURUDRDLDDUDUDRRURDULRRUDRLRRDLUURURDLDRLRDUDDDLDDDURURLUULRDUUULRURUDUDRRUDULLLU... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, the Grasshopper was jum... | [{"type": "stdin_stdout", "input": "VRPHBNWNWVWBWMFJJDCTJQJDJBKSJRZLVQRVVFLTZFSGCGDXCWQVWWWMFVCQHPKXXVRKTGWGPSMQTPKNDQJHNSKLXPCXDJDQDZZD\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "DZZDQDJDXCPXLKSNHJQDNKPTQMSPGWGTKRVXXKPHQCVFMWWWVQWCXDGCGSFZTLFVVRQVLZRJSKBJDJQJTCDJJFMWBWVWNWNBHPRV\n", "output": "101\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\nBash has set out on a journey to... | [{"type": "stdin_stdout", "input": "95\n72 38 75 62 87 30 11 65 35 16 73 23 18 48 19 4 22 42 14 60 49 83 59 15 51 27 80 97 37 100 64 81 54 71 52 20 5 98 78 86 26 55 25 57 36 3 8 74 82 21 29 1 76 2 79 61 39 9 89 77 70 63 56 28 92 53 31 45 93 47 67 99 58 12 84 44 32 34 69 40 13 7 66 68 17 85 6 90 33 91 94 24 46 10 50\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\nPeter decided to lay a parquet i... | [{"type": "stdin_stdout", "input": "13 14\nLRLRLRLRLRLRLR\nULRLRLRLRLRLRU\nDULRLRLRLRLRUD\nUDULRLRLRLRUDU\nDUDULRLRLRUDUD\nUDUDULRLRUDUDU\nDUDUDULRUDUDUD\nUDUDUDLRDUDUDU\nDUDUDLRLRDUDUD\nUDUDLRLRLRDUDU\nDUDLRLRLRLRDUD\nUDLRLRLRLRLRDU\nDLRLRLRLRLRLRD\nLRLRLRLRLRLRLR\nULRLRLRLRLRLRU\nDULRLRLRLRLRUD\nUDULRLRLRLRUDU\nDUDUL... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 it's the first of April, Heid... | [{"type": "stdin_stdout", "input": "sjvmovplbrnakthytvanvvbscgdcdkdkbgginnbiyczyrkywcuvbgolznifdyiilonvqblbywxzgjnntldeuhhlecubshirsdxugezholvufotprjovwqiitypvaghlcxlrajrtufmysbpegjfvdboewogamnunalynjvwiopqfhndupfqxfatbpklpzdsdmzwvtitvdxkefremodmlferuxyisxmvjydjthekokldjkwoiffmhlquulcbogdnnzqaisoxqpgztuzvbleiitrqbzljbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMakes solves problems on Decofor... | [{"type": "stdin_stdout", "input": "100 10\n246 286 693 607 87 612 909 312 621 37 801 558 504 914 416 762 187 974 976 123 635 488 416 659 988 998 93 662 92 749 889 78 214 786 735 625 921 372 713 617 975 119 402 411 878 138 548 905 802 762 940 336 529 373 745 835 805 880 816 94 166 114 475 699 974 462 61 337 555 805 968... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArkady wants to water his only f... | [{"type": "stdin_stdout", "input": "10 300 100\n35 25 110 40 60 7 44 145 23 96\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 300 100\n35 42 110 40 60 7 44 145 23 96\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 300 100\n35 42 110 40 60 7 26 145 23 96\n", "output": "6\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\nTwo participants are each given ... | [{"type": "stdin_stdout", "input": "12 12\n1 6 2 6 8 3 6 4 4 8 7 2 7 5 9 4 2 4 9 5 8 5 3 6\n2 8 6 15 2 6 7 4 6 5 6 3 5 8 7 8 7 1 1 9 9 7 7 3\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "12 12\n6 7 5 4 4 8 2 9 8 5 3 5 1 6 7 3 7 9 5 7 1 8 6 8\n6 4 2 1 7 8 1 6 8 5 9 8 1 5 7 2 5 9 6 3 9 2 9 4\n", "output": "-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\nLittle Chiku is very choosy abou... | [{"type": "stdin_stdout", "input": "3\n11101111\n1100\n01010\n\nSAMPLE", "output": "6\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n11101111\n1100\n01110\n\nSAMPLE", "output": "6\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n11101111\n0100\n01110\n\nSAMPLE", "output": "6\n2\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\nGudi enters the castle, and mov... | [{"type": "stdin_stdout", "input": "2\n12\n4 1\n152\n24 3\n\nSAMOLE", "output": "01\n112\n"}, {"type": "stdin_stdout", "input": "2\n10\n4 2\n152\n24 3\n\nSAMOLE", "output": "10\n112\n"}, {"type": "stdin_stdout", "input": "2\n20\n4 1\n152\n24 3\n\nSAMOLE", "output": "00\n112\n"}, {"type": "stdin_stdout", "input": "2\n12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Shino loves to play with ... | [{"type": "stdin_stdout", "input": "10\n10 15\n1 110\n4 100\n110 100\n15 7\n99 86\n14 46\n4 3\n5 0\n4 0", "output": "932\n474113\n424098\n999956003\n999999418\n999943239\n144696\n0\n1000000003\n1000000005\n"}, {"type": "stdin_stdout", "input": "10\n10 15\n1 110\n2 100\n110 100\n15 7\n121 103\n14 73\n4 3\n5 0\n2 2", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBob loves sorting very much. He ... | [{"type": "stdin_stdout", "input": "10\n41 467\n6334 26500 19169 15724 11478 29358 26962 24464 5705 28145 23281 16827 9961 491 2995 11942 4827 5436 32391 14604 3902 153 292 12382 17421 18716 19718 19895 5447 21726 14771 11538 1869 19912 25667 26299 17035 9894 28703 23811 31322 \n333 673\n4664 15141 7711 28253 6868 2554... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 shop sells N kinds of fruits, ... | [{"type": "stdin_stdout", "input": "5 3\n83 000 130 120 145", "output": "203\n"}, {"type": "stdin_stdout", "input": "3 3\n83 001 130 120 145", "output": "204\n"}, {"type": "stdin_stdout", "input": "3 3\n158 001 113 -1 126", "output": "113\n"}, {"type": "stdin_stdout", "input": "3 4\n158 001 113 -1 126", "output": "239\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 wants to print a docum... | [{"type": "stdin_stdout", "input": "1073", "output": "537\n"}, {"type": "stdin_stdout", "input": "282", "output": "141\n"}, {"type": "stdin_stdout", "input": "557", "output": "279\n"}, {"type": "stdin_stdout", "input": "284", "output": "142\n"}, {"type": "stdin_stdout", "input": "276", "output": "138\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\nGiven are N points on the circum... | [{"type": "stdin_stdout", "input": "10 100\n2\n11\n35\n42\n54\n69\n89\n91\n93\n99", "output": "0.352886583546338 -0.109065017701873"}, {"type": "stdin_stdout", "input": "10 100\n2\n11\n40\n46\n54\n69\n89\n91\n93\n183", "output": "-0.215229840673 -0.027898226758\n"}, {"type": "stdin_stdout", "input": "10 100\n2\n10\n35\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 apples and P pieces of... | [{"type": "stdin_stdout", "input": "1052 1", "output": "1578\n"}, {"type": "stdin_stdout", "input": "1829 1", "output": "2744\n"}, {"type": "stdin_stdout", "input": "3156 1", "output": "4734\n"}, {"type": "stdin_stdout", "input": "1450 1", "output": "2175\n"}, {"type": "stdin_stdout", "input": "845 4", "output": "1269\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 always an integer in Ta... | [{"type": "stdin_stdout", "input": "--+-", "output": "-2\n"}, {"type": "stdin_stdout", "input": "---+", "output": "-2\n"}, {"type": "stdin_stdout", "input": "+---", "output": "-2\n"}, {"type": "stdin_stdout", "input": "--+-", "output": "-2\n"}, {"type": "stdin_stdout", "input": "---+", "output": "-2\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\nYou are going out for a walk, wh... | [{"type": "stdin_stdout", "input": "2 1000000000\n1 1\n1 00000000\n0 30000000\n2 164820504", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "4 1000000000\n1 1\n1 00000000\n1 30000000\n1 164820504", "output": "805179498\n"}, {"type": "stdin_stdout", "input": "4 1000000000\n1 1\n1 00000000\n0 30000000\n2 16... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a tree with N vert... | [{"type": "stdin_stdout", "input": "10\n1 2 1000000000\n2 3 1000000000\n3 4 1000000000\n4 5 1000000000\n5 6 1000000000\n6 7 1000000000\n7 9 1000000000\n8 9 1000000000\n9 10 1000000000\n1 1\n9 10", "output": "15000000000\n"}, {"type": "stdin_stdout", "input": "10\n1 2 1000100000\n2 3 1000000000\n3 4 1000000000\n4 5 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\nThere is a square-shaped grid wi... | [{"type": "stdin_stdout", "input": "3\n...\n.$.\n../", "output": "-1"}, {"type": "stdin_stdout", "input": "3\n...\n/$.\n../", "output": "-1"}, {"type": "stdin_stdout", "input": "3\n...\n/$.\n...", "output": "-1"}, {"type": "stdin_stdout", "input": "3\n...\n/$.\n./.", "output": "-1"}, {"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\nn! = n Γ (n β 1) Γ (n β 2) Γ ...... | [{"type": "stdin_stdout", "input": "2\n51\n11000\n0", "output": "0\n12\n2748\n"}, {"type": "stdin_stdout", "input": "2\n58\n10011\n0", "output": "0\n13\n2501\n"}, {"type": "stdin_stdout", "input": "2\n59\n10111\n0", "output": "0\n13\n2525\n"}, {"type": "stdin_stdout", "input": "2\n62\n10110\n0", "output": "0\n14\n2525\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhite Tiger University holds a p... | [{"type": "stdin_stdout", "input": "4 11\n0 2 7\n0 2 5\n0 3 8\n1 1\n1 2\n1 3\n0 3 2\n1 1\n0 2 1\n1 2\n1 1", "output": "2 12\n3 8\n1 0\n2 12\n3 10\n2 13\n"}, {"type": "stdin_stdout", "input": "4 11\n0 2 7\n0 2 5\n0 3 8\n1 1\n1 2\n1 3\n0 3 2\n1 1\n0 2 1\n1 2\n1 3", "output": "2 12\n3 8\n1 0\n2 12\n3 10\n1 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\nThe deadline of Prof. Hachiojiβs... | [{"type": "stdin_stdout", "input": "2 1 1\n1\n50\n4 2 2\n1\n50\n1\n60\n2 1 2\n2\n60 61\n1\n93\n4 2 3\n3\n89 61 62\n1\n70\n2\n47 50\n3 1 2\n3\n60 61 62\n2\n70 60\n1 2 5\n2\n87 95\n3\n96 71 35\n2\n68 2\n3\n1 18 93\n2\n57 2\n2 2 1\n4\n1 0 1 3 1\n0 0 0", "output": "4\n12\n28\n68\n58\n98\n21\n0\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\nArithmetic Progressions\n\nAn ar... | [{"type": "stdin_stdout", "input": "6\n-2 11 12 30 3 0", "output": "2\n"}, {"type": "stdin_stdout", "input": "6\n-4 1 6 2 13 -1", "output": "3\n"}, {"type": "stdin_stdout", "input": "6\n-2 1 -1 8 13 9", "output": "2\n"}, {"type": "stdin_stdout", "input": "6\n-2 11 5 20 8 0", "output": "3\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\nTaro's Shopping\n\nMammy decided... | [{"type": "stdin_stdout", "input": "3 13\n17 20 30\n6 7\n1 2 5 1 4 11\n7 000\n22 34 102 94 59 39 61\n4 100\n133 98 100 50\n4 5\n10 5 10 13\n0 0", "output": "NONE\n7\nNONE\nNONE\nNONE\n"}, {"type": "stdin_stdout", "input": "3 48\n17 20 30\n6 1\n1 2 5 1 4 11\n7 000\n22 34 102 94 59 39 70\n4 100\n80 70 119 50\n4 20\n10 5 ... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.