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\nRecently, the Fair Nut has writt... | [{"type": "stdin_stdout", "input": "100 1000000000\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaabaabbb\nbaaaaaaaaababbbbaaabbbbbababbbbabbbabbaaaaabaabbaabbbbabaaaabbaaaabaaabaabbbabbbbbbbbabaaabbababbabb\n", "output": "71075285949\n"}, {"type": "stdin_stdout", "input":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s consist... | [{"type": "stdin_stdout", "input": "69\n000000000000000000000000000000000000000000000000000000000000000000000\n", "output": "000000000000000000000001111111111111111111111122222222222222222222222\n"}, {"type": "stdin_stdout", "input": "69\n000000000000000000000000000000000000000000000000000000000010000000000\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\nThis is a simplified version of ... | [{"type": "stdin_stdout", "input": "100 50\n29 35\n10 75\n29 34\n10 87\n29 13\n29 38\n41 21\n10 6\n29 94\n10 47\n31 27\n41 24\n41 8\n10 93\n41 52\n41 36\n31 32\n85 81\n31 32\n41 79\n41 99\n85 88\n41 25\n31 68\n41 93\n10 87\n85 97\n41 85\n10 64\n10 68\n85 22\n10 45\n85 15\n10 16\n10 21\n41 66\n29 68\n41 96\n29 34\n10 22... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and CSL are playing ... | [{"type": "stdin_stdout", "input": "14\n9 9 1000 2000 39999 48888 16 32 123456 959658 111 987584 125632 125468\n", "output": "sjfnb\n"}, {"type": "stdin_stdout", "input": "14\n9 9 1000 2000 39999 48888 16 32 123456 959658 111 987584 125632 125477\n", "output": "cslnb\n"}, {"type": "stdin_stdout", "input": "14\n6 66 143... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 n Γ n square grid and a... | [{"type": "stdin_stdout", "input": "250 1000000000\n", "output": "770503193\n"}, {"type": "stdin_stdout", "input": "216 1142401243\n", "output": "820247611\n"}, {"type": "stdin_stdout", "input": "246 1140071398\n", "output": "783102336\n"}, {"type": "stdin_stdout", "input": "218 1771958988\n", "output": "699159875\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 set of nβ₯ 2 pair... | [{"type": "stdin_stdout", "input": "30\n356796 133718\n-38697 -144546\n752937 -464381\n-392266 -895367\n726142 440342\n499761 520681\n21493 780572\n-145605 -690458\n229737 334279\n-428414 -690909\n981381 -134684\n805755 -16870\n-195583 -163277\n-210762 -226125\n-616716 -572983\n-881116 774672\n-767924 -504231\n-101294 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n[3R2 as DJ Mashiro - Happiness B... | [{"type": "stdin_stdout", "input": "10 83\n1 3\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n2 2\n1 4\n2 2\n2 3\n2 3\n2 3\n2 3\n2 3\n2 3\n1 4\n1 5\n1 7\n2 2\n2 2\n1 5\n2 2\n1 3\n2 1\n2 6\n1 5\n2 6\n2 9\n1 2\n2 5\n1 2\n2 5\n2 4\n2 4\n1 2\n1 2\n1 4\n2 6\n2 6\n2 4\n2 4\n1 2\n1 2\n2 4\n2 4\n2 3\n2 3\n1 2\n2 9\n1 2\n1 2\n1 2\n2 6\n2 6\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an easier version of the... | [{"type": "stdin_stdout", "input": "100\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 22 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 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\nThere is a rectangular grid of s... | [{"type": "stdin_stdout", "input": "3\n1 2\n01\nRL\n3 3\n001\n101\n110\nRLL\nDLD\nULL\n3 3\n000\n000\n000\nRRD\nRLD\nULL\n", "output": "2 1\n4 3\n2 2\n"}, {"type": "stdin_stdout", "input": "3\n1 2\n01\nRL\n3 3\n000\n101\n110\nRLL\nDLD\nULL\n3 3\n000\n000\n000\nRRD\nRLD\nULL\n", "output": "2 1\n4 3\n2 2\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\nDuring the quarantine, Sicromoft... | [{"type": "stdin_stdout", "input": "1\n118730819 699217111 1229905591 978426672\n", "output": "310250620284395093\n"}, {"type": "stdin_stdout", "input": "1\n118730819 699217111 995255402 1762535216\n", "output": "932024458581475216\n"}, {"type": "stdin_stdout", "input": "1\n118730819 699217111 1571293294 978426672\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 binary string s ... | [{"type": "stdin_stdout", "input": "4\n4\n0011\n6\n111111\n5\n10101\n8\n01010000\n", "output": "2\n1 2 2 1 \n6\n1 2 3 4 5 6 \n1\n1 1 1 1 1 \n4\n1 1 1 1 1 2 3 4 \n"}, {"type": "stdin_stdout", "input": "4\n4\n0011\n6\n111111\n5\n10101\n8\n01000000\n", "output": "2\n1 2 2 1\n6\n1 2 3 4 5 6\n1\n1 1 1 1 1\n6\n1 1 1 2 3 4 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\nThree swimmers decided to organi... | [{"type": "stdin_stdout", "input": "10\n992222955174044630 49635415 8474 173727148\n618311281854681640 657834994 40173216 75996939\n710602478618400425 332897175 71490165 534449640\n768753872531302819 113476460 449 799174641\n633188994852953277 834175592 3132 788542124\n964246686346975322 539872840 295075 782348226\n683... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPhoenix is playing with a new pu... | [{"type": "stdin_stdout", "input": "3\n524304\n61032704\n61560720\n", "output": "NO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "3\n524304\n61032704\n10950212\n", "output": "NO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "3\n524304\n61032704\n14778357\n", "output": "NO\nNO\nNO\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a multiset (i. e. ... | [{"type": "stdin_stdout", "input": "2\n28\n15 72 79 36 2 43 100 11 236 94 76 83 90 20 58 39 47 57 37 88 92 92 59 80 97 22 20 47 9 88 21 82 94 71 25 38 45 51 23 76 58 5 39 11 15 9 11 24 9 84 90 58 0 37 54 65\n43\n79 24 82 7 26 19 63 22 94 22 4 72 19 5 92 92 83 93 35 19 45 87 40 61 58 65 21 48 96 85 63 100 86 63 30 50 58... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAccording to a new ISO standard,... | [{"type": "stdin_stdout", "input": "20 19\n1111111111111111111\n8247715032316286876\n0000001000000000000\n4784876473600342372\n1111111111111111111\n2222222222222222222\n4444444444444444444\n5555555555555555555\n0000000000000000010\n4444444444444444444\n0000000000000000000\n5555555555555555555\n11500026576261848309\n999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLast year Bob earned by selling ... | [{"type": "stdin_stdout", "input": "50\nwin 596\nwin 1799\nwin 1462\nsell 460\nwin 731\nwin 723\nwin 731\nwin 329\nwin 838\nsell 728\nwin 728\nwin 460\nwin 723\nwin 1462\nwin 1462\nwin 460\nwin 329\nwin 1462\nwin 460\nwin 460\nwin 723\nwin 731\nwin 723\nwin 596\nwin 731\nwin 596\nwin 329\nwin 728\nwin 715\nwin 329\nwin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou've got a undirected tree s, ... | [{"type": "stdin_stdout", "input": "25\n13 1\n4 17\n15 25\n3 21\n1 6\n1 9\n12 15\n13 4\n24 19\n22 24\n8 20\n4 11\n11 14\n17 16\n15 7\n23 3\n22 13\n3 5\n6 10\n16 18\n24 23\n10 2\n9 8\n7 22\n", "output": "24\n2 13 1\n2 4 17\n2 15 25\n2 3 21\n2 1 6\n2 1 9\n2 12 15\n2 13 4\n2 24 19\n2 22 24\n2 8 20\n2 4 11\n2 11 14\n2 17 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\nRoma works in a company that sel... | [{"type": "stdin_stdout", "input": "78 13\n-9961 -9922 -9817 -9813 -9521 -9368 -9361 -9207 -9153 -9124 -9008 -8981 -8951 -8911 -8551 -8479 -8245 -8216 -7988 -7841 -7748 -7741 -7734 -7101 -6846 -6804 -6651 -6526 -6519 -6463 -6297 -6148 -6090 -5845 -5209 -5201 -5161 -5061 -4537 -4529 -4433 -4370 -4266 -4189 -4125 -3945 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInna and Dima decided to surpris... | [{"type": "stdin_stdout", "input": "63 67 18046757 61758841 85367218 68\n22 30\n25 40\n56 58\n29 11\n34 63\n28 66\n51 5\n39 64\n1 23\n24 61\n19 47\n10 31\n55 28\n52 26\n38 7\n28 31\n13 27\n37 42\n10 52\n19 33\n7 36\n13 1\n46 40\n21 41\n1 1\n6 35\n10 4\n46 9\n21 57\n1 49\n34 14\n14 35\n43 4\n1 41\n25 22\n18 25\n27 23\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\nJzzhu has invented a kind of seq... | [{"type": "stdin_stdout", "input": "-1000000000 1000000000\n2000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "-1030333966 -143148799\n1287886520\n", "output": "856851208\n"}, {"type": "stdin_stdout", "input": "-1048223347 -1308375581\n154879215\n", "output": "739847773\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\nA way to make a new task is to m... | [{"type": "stdin_stdout", "input": "6\nzfnkpxaavrcvqhhkclcuiswawpghlqrlq wnvbzhvsjozlkwxowcvyclmehjkkvkxin\nzkxkvlnovnloxjdydujkjydaegzjypsgrzq dmiilhmkspokltabpvwalijhlitbfp\nldfbfggqsdqethdgkmbcwloluguxiluqjyr fewoondewvndcxticvpiqnvvdhsnzfd\nepokfmixjnawdfgkmqlcyirxuprrvudh xvijbdzqdyjwsyhjucytuxrxuiynxf\nxntrjusjwb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and Gena love playing tabl... | [{"type": "stdin_stdout", "input": "186\n2 1 2 1 1 1 1 1 2 1 1 2 2 2 1 1 2 2 1 1 1 2 1 1 2 2 1 1 1 2 2 1 1 1 1 1 2 1 1 1 2 1 2 1 1 2 1 1 1 2 2 2 2 2 2 2 1 2 1 2 1 1 2 1 2 2 1 1 1 1 1 2 2 1 2 2 1 2 2 1 1 1 2 2 1 1 2 2 1 2 2 1 2 2 2 2 2 1 1 1 1 2 1 1 2 2 2 2 2 2 1 1 1 1 1 2 1 1 2 2 1 2 2 1 1 1 1 1 2 2 1 1 2 2 1 2 2 2 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\nA word or a sentence in some lan... | [{"type": "stdin_stdout", "input": "100\nmKtsiDRJypUieHIkvJaMFkwaKxcCIbBszZQLIyPpCDCjhNpAnYFngLjRpnKWpKWtGnwoSteeZXuFHWQxxxOpFlNeYTwKocsXuCoa\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100\naoCuXscoKwTYeNlFpOxxxQWHFuXZeetSownGtWKpWKnpRjLgnFYnApNhjCDCpPyILQZzsBbICcxKawkFMaJvkIHeiUpyJRDistKm\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\nIn the official contest this pro... | [{"type": "stdin_stdout", "input": "20\n713900269 224495293 592111899 609607891 585084800 601258511 223103775 876894656 751583891 230837577 971499807 312977833 344314550 397998873 558637732 216574673 913028292 762852863 464376621 61315042\n", "output": "375537226\n"}, {"type": "stdin_stdout", "input": "20\n713900269 22... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 celebrating the midcourse ... | [{"type": "stdin_stdout", "input": "40\n119631 119631 772776 119631 658661 119631 108862 524470 125132 700668 69196 844949 154577 108862 108862 108862 597344 940938 989698 108862 154577 69196 125132 687080 940938 125132 69196 69196 125132 566152 953083 406319 380068 119631 134748 125132 413984 69196 154577 154577\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\nBuses run between the cities A a... | [{"type": "stdin_stdout", "input": "60 120\n17 120\n23:00\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "60 120\n17 175\n23:00\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "111 120\n24 100\n13:00\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "88 120\n17 175\n23:00\n", "output": "14\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\nMike and !Mike are old childhood... | [{"type": "stdin_stdout", "input": "17\n714413739 -959271262 714413739 -745891378 926207665 -404845105 -404845105 -959271262 -189641729 -670860364 714413739 -189641729 192457837 -745891378 -670860364 536388097 -959271262\n-417715348 -959271262 -959271262 714413739 -189641729 559486188 571055593 571055593 -417715348 -41... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nZS the Coder and Chris the Baboo... | [{"type": "stdin_stdout", "input": "9\n1 1000000000 1 1000000000 1 1000000000 1 1000000000 1\n1000000000 1 1000000000 1 1 1 1000000000 1 1000000000\n1 1000000000 1 1000000000 1 1000000000 1 1000000000 1\n1000000000 1 1000000000 1 1 1 1000000000 1 1000000000\n1 1 1 1 0 1 1 1 1\n1000000000 1 1000000000 1 1 1 1000000000 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently a dog was bought for Po... | [{"type": "stdin_stdout", "input": "100 500\n64 140 15 221 24 106 73 30 275 97 296 55 5 30 47 199 130 44 72 170 7 204 359 40 128 117 45 192 344 112 0 11 196 78 73 53 222 93 88 151 99 283 60 71 4 87 226 46 66 74 23 89 77 60 397 181 0 101 358 54 124 155 19 218 9 140 161 130 308 85 103 85 300 128 19 108 225 136 100 54 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\nVasya is an administrator of a p... | [{"type": "stdin_stdout", "input": "2\n#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\n#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhereas humans nowadays read few... | [{"type": "stdin_stdout", "input": "11 1\n1 2 3 10 1 10 10 1 1 3 5\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "11 1\n1 2 3 5 1 10 10 1 1 3 5\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "11 1\n1 4 3 5 1 10 10 1 1 3 5\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "11 1\n1 2 3 5 1 10 8 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\nPetya was late for the lesson to... | [{"type": "stdin_stdout", "input": "20\n20 34 51 40 70 64 14 30 24 20 6 1 70 28 38 43 9 60 31 69\n", "output": "2047\n"}, {"type": "stdin_stdout", "input": "18\n22 41 40 8 36 48 23 5 58 12 26 44 53 49 3 56 58 57\n", "output": "127\n"}, {"type": "stdin_stdout", "input": "17\n44 57 54 57 54 65 40 57 59 16 39 51 32 51 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\nYou are given a multiset S consi... | [{"type": "stdin_stdout", "input": "88\n1 1411\n2\n1 1783\n1 2132\n2\n2\n1 2799\n2\n2\n1 7856\n1 10551\n2\n2\n1 10868\n1 15159\n1 16497\n2\n1 20266\n2\n2\n2\n1 21665\n2\n2\n2\n2\n1 25670\n2\n2\n2\n1 26767\n1 31392\n2\n2\n2\n1 35319\n1 38575\n1 40111\n2\n1 41305\n1 49444\n1 53013\n2\n2\n1 53117\n2\n2\n1 55113\n2\n2\n2\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\nArkady is playing Battleship. Th... | [{"type": "stdin_stdout", "input": "19 6\n##..............###\n#......#####.....##\n.....#########.....\n....###########....\n...#############...\n..###############..\n.#################.\n.#################.\n.#################.\n.#################.\n#####....##....####\n####............###\n###............####\n#####... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday on Informatics class Nasty... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000100000 1000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "11678540 172842392 2335708 864211960\n", "output": "4\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\nKuldeep is tired from all the fu... | [{"type": "stdin_stdout", "input": "2\n4 12\n1 2\n\nNUMALG", "output": "239439360000\n1\n"}, {"type": "stdin_stdout", "input": "2\n4 9\n3 2\n\nNUMALG", "output": "439360000\n20\n"}, {"type": "stdin_stdout", "input": "2\n1 1\n4 9\n\nGLMSAO", "output": "1\n439360000\n"}, {"type": "stdin_stdout", "input": "2\n2 1\n4 9\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\nLittle Jhool is still out of his... | [{"type": "stdin_stdout", "input": "73\naclnbkbzqtvjvtvxdahhimirlsk\nxdcraywfygqxzctmtqsxqmsnbrswwvazwrhgzjo\nxwikhrbybfbvmzbildlhjidjhuoukqxxgadscimzfeiwnzhfeaxkgtehfjslrowxyvjbn\nyvlhmfqxvhbhnwixluolzwflqsvnoqsgpcgxjrxpanofgnhevk\nwpykolkxskhjhryenwliuscqdevoutaknwnjwyaj\naeswrxzrngwdttkwhbcvbcsqxggeezmwenvcpiunnwspx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAshima has brought home n cats. ... | [{"type": "stdin_stdout", "input": "2\n-1 -1\n-1 11\n\nUMHAIR", "output": "-10\n"}, {"type": "stdin_stdout", "input": "2\n15 -1\n-1 -2\n\nSOKI@P", "output": "-13\n"}, {"type": "stdin_stdout", "input": "2\n-1 -1\n0 11\n\nUMHAIR", "output": "-11\n"}, {"type": "stdin_stdout", "input": "2\n-2 -2\n-1 7\n\nIMHBUR", "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\nIn the Mathematical world of Dr.... | [{"type": "stdin_stdout", "input": "2\n2+3+5\n1+3*3\n\nS@LPLF", "output": "10\n10\n"}, {"type": "stdin_stdout", "input": "2\n2+5*3\n2*3*2\n\nELPMSA", "output": "17\n12\n"}, {"type": "stdin_stdout", "input": "2\n3+5*2\n2*3*2\n\nPLENAR", "output": "13\n12\n"}, {"type": "stdin_stdout", "input": "2\n1+5*3\n2*3*2\n\nELPMSA"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSamu is in super market and in a... | [{"type": "stdin_stdout", "input": "10\n82\n9414 595 5212\n2756 7474 3494\n787 9298 9010\n1897 4914 3531\n2321 8057 2194\n392 6614 2713\n2540 761 9297\n6482 693 4263\n4213 2219 7479\n1705 9724 3161\n1842 4363 7671\n1208 2195 1036\n5718 1227 595\n6438 2392 640\n1683 148 4386\n2071 5238 111\n5621 885 4033\n2265 3147 4948... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 two desks: A and B. Desk... | [{"type": "stdin_stdout", "input": "5 4 1\n1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 1000000000 1000000010 1000000000", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 4 1\n1000000000 1000000001 1000000000 1000000000 1000000000\n1000000000 1000000000 1000000000 1000000000", "output": "0\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi has many red balls and... | [{"type": "stdin_stdout", "input": "69 -13 14", "output": "-910\n"}, {"type": "stdin_stdout", "input": "32 -13 14", "output": "-429\n"}, {"type": "stdin_stdout", "input": "149 -3 -1", "output": "111\n"}, {"type": "stdin_stdout", "input": "189 -3 -1", "output": "141\n"}, {"type": "stdin_stdout", "input": "248 -3 -1", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is competing in a sumo... | [{"type": "stdin_stdout", "input": "xoxoxoxoxoxoxo", "output": "YES\n"}, {"type": "stdin_stdout", "input": "oxoxowoxoxoxox", "output": "YES\n"}, {"type": "stdin_stdout", "input": "oxoxowoooxoxxx", "output": "YES\n"}, {"type": "stdin_stdout", "input": "xxxoxooowoxoxo", "output": "YES\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given strings s and t. F... | [{"type": "stdin_stdout", "input": "abracadabra\navaeakedavra", "output": "aaadara\n"}, {"type": "stdin_stdout", "input": "abracbdaara\navadakedavra", "output": "aadaara\n"}, {"type": "stdin_stdout", "input": "abracbdaara\narvadekadava", "output": "aradaaa\n"}, {"type": "stdin_stdout", "input": "araadbcarba\narvadekada... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "15607691432", "output": "15607691432\n"}, {"type": "stdin_stdout", "input": "8325199727", "output": "16650399454\n"}, {"type": "stdin_stdout", "input": "1604548808", "output": "1604548808\n"}, {"type": "stdin_stdout", "input": "1558666763", "output": "3117333526\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\nA subsequence of a string S is a... | [{"type": "stdin_stdout", "input": "frqnvhydscshfcgdemurlfrutcpzhopfotpifgepnqjxupnskapziurswqazdwnwbgdhzktfyhqqxpoidfhjdakoxraiedxskywuepzfniuyskxiyjpjlxuqnfgmnjcvtlpnclfkpervxmdbvrbrdn", "output": "aca\n"}, {"type": "stdin_stdout", "input": "ndrbrvbdmxvrepkflcnpltvcjnmgenquxldpjyhxksyuhnfzpeuwykpxdeiarxojajjhfdiopxqq... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 grid with 3 rows and N... | [{"type": "stdin_stdout", "input": "7\n21 12 1 16 14 6 10\n20 11 0 27 14 7 8\n19 10 3 18 7 4 12", "output": "No\n"}, {"type": "stdin_stdout", "input": "7\n21 12 1 16 14 6 10\n20 12 0 27 14 7 8\n19 10 3 18 7 4 12", "output": "No\n"}, {"type": "stdin_stdout", "input": "7\n21 12 1 16 12 6 10\n20 12 0 27 14 7 8\n19 10 3 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\nCreate a program that reads the ... | [{"type": "stdin_stdout", "input": "02,001\n50,10\n8,531", "output": "4750\n181\n"}, {"type": "stdin_stdout", "input": "0,1000\n01,05\n134,8", "output": "1077\n338\n"}, {"type": "stdin_stdout", "input": "0,1000\n01,05\n134,9", "output": "1211\n338\n"}, {"type": "stdin_stdout", "input": "0,1000\n11,05\n134,9", "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\nCreate a program that calculates... | [{"type": "stdin_stdout", "input": "35.997652258458864 139.77 51.15 361.449066466584\n1.6512558665331527 105.35573273382599 41.78 272.61282853754\n51.62303215206055 360.59086045680647 -34.03891385785915 302.61951676416413\n-1 -1 -1 -1", "output": "9516\n15035\n11082\n"}, {"type": "stdin_stdout", "input": "36.4199056430... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Aizu prefecture, we decided t... | [{"type": "stdin_stdout", "input": "10 29 10", "output": "2900\n"}, {"type": "stdin_stdout", "input": "10 29 13", "output": "3770\n"}, {"type": "stdin_stdout", "input": "4 -1 104", "output": "-416\n"}, {"type": "stdin_stdout", "input": "20 -1 18", "output": "-360\n"}, {"type": "stdin_stdout", "input": "12 -1 14", "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\nproblem\n\nFive students, Taro, ... | [{"type": "stdin_stdout", "input": "10\n130\n100\n37\n101", "output": "82\n"}, {"type": "stdin_stdout", "input": "10\n130\n100\n65\n101", "output": "87\n"}, {"type": "stdin_stdout", "input": "10\n130\n100\n98\n101", "output": "93\n"}, {"type": "stdin_stdout", "input": "10\n130\n110\n98\n100", "output": "95\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\nIn the 17th century, Fermat wrot... | [{"type": "stdin_stdout", "input": "6\n3\n13\n0", "output": "27\n11\n126\n"}, {"type": "stdin_stdout", "input": "6\n25\n12\n0", "output": "27\n64\n54\n"}, {"type": "stdin_stdout", "input": "6\n6\n15\n0", "output": "27\n27\n119\n"}, {"type": "stdin_stdout", "input": "6\n15\n2\n0", "output": "27\n119\n6\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\nLetβs try a dice puzzle. The rul... | [{"type": "stdin_stdout", "input": "4\n0 0 1\n0 1 0\n0 2 2\n0 2 2\n1 2 2\n6 -1 0\n0 7 4\n0 4 1\n4 1 0\n6 1 0\n12 -1 0\n4 1 -2\n1 -1 0\n1 2 0\n0 -1 -1\n5 1 2\n10 0 2\n-2 1 -2\n3 -1 -1\n-1 6 -2\n0 0 -1\n0 1 0\n-2 1 0\n3 0 0", "output": "0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\n0 0 1\n0 1 0\n0 2 2\n0 2 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\nProblem Statement\n\nWe have pla... | [{"type": "stdin_stdout", "input": "3\n10\n4 3 4 14\n5 4 5 39\n6 5 1 30\n3\n0\n-4 3 4 -10\n5 4 5 36\n6 5 6 30\n3\n1\n0 3 4 -10\n-5 4 5 -20\n6 5 7 30\n3\n10\n-4 3 8 -10\n-5 5 5 -20\n-6 5 6 -30\n0", "output": "61.2\n14.1\n8.28571\n0\n"}, {"type": "stdin_stdout", "input": "3\n10\n4 3 4 10\n5 4 5 18\n6 5 6 30\n3\n7\n-4 3 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\nEarly morning in summer camp\n\n... | [{"type": "stdin_stdout", "input": "2\n0.60 1 2\n0.60 0\n2\n0.60 1 2\n0.60 1 1\n5\n0.10 1 2\n0.20 1 3\n0.30 1 4\n0.40 1 5\n0.7162042433937126 1 1\n5\n0.10 0\n0.20 1 1\n0.8904968944594156 1 1\n0.40 1 1\n0.50 1 1\n5\n0.5337845409531047 4 2 3 4 5\n0.20 0\n0.30 0\n0.6372471713101545 0\n0.8924320362064917 0\n4\n0.10 1 2\n0.... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNumber of tanka\n\nWishing to di... | [{"type": "stdin_stdout", "input": "1\n1\n3\n1531\n2317\n714\n225725068861419081\n0", "output": "10\n10\n13\n55955\n155155\n7277\n3223333233333322222322232232233222323233333233223332\n"}, {"type": "stdin_stdout", "input": "1\n1\n4\n1531\n2317\n714\n225725068861419081\n0", "output": "10\n10\n14\n55955\n155155\n7277\n322... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nGiven $ N $ a pair of... | [{"type": "stdin_stdout", "input": "10 1 12\n15 70\n36 -1\n18 43\n26 46\n33 20\n58 10\n0 -1\n80 5\n98 32\n23 84", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 1 12\n15 70\n36 -1\n18 43\n26 46\n33 20\n58 10\n0 -1\n80 5\n98 32\n23 30", "output": "1\n"}, {"type": "stdin_stdout", "input": "10 1 12\n15 70\n58 -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\nWrite a program which reads a se... | [{"type": "stdin_stdout", "input": "5\n-1 5 10 1 21\n8\n1 8 31 11 16 14 001 40", "output": "yes\nno\nyes\nyes\nyes\nyes\nyes\nno\n"}, {"type": "stdin_stdout", "input": "5\n1 5 13 3 21\n8\n0 4 17 11 22 21 010 42", "output": "yes\nyes\nyes\nno\nyes\nyes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "5\n1 5 7 3 21\n8\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which finds a pa... | [{"type": "stdin_stdout", "input": "vanceknowledgetoad\nbdvanced", "output": "No\n"}, {"type": "stdin_stdout", "input": "vanceknowledgetoad\ncdvanced", "output": "No\n"}, {"type": "stdin_stdout", "input": "vanceknowmedgetoad\ncdvanced", "output": "No\n"}, {"type": "stdin_stdout", "input": "vbnceknowmedgetoad\ncdvanced"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 get more and more news about ... | [{"type": "stdin_stdout", "input": "100\n70 111 5 73 69 22 79 62 101 99 249 88 75 31 27 49 7 36 37 62 61 77 75 38 203 61 81 43 98 224 114 48 98 8 67 46 80 83 81 64 15 72 95 39 79 93 79 140 27 65 67 44 294 170 89 97 73 48 18 53 31 49 47 13 88 70 5 46 256 81 26 9 89 38 43 28 219 30 10 71 96 95 241 96 98 96 82 29 219 85 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\nPetya is having a party soon, an... | [{"type": "stdin_stdout", "input": "100000000 1\n", "output": "1500000000\n"}, {"type": "stdin_stdout", "input": "100000010 1\n", "output": "1500000150\n"}, {"type": "stdin_stdout", "input": "100010010 1\n", "output": "1500150150\n"}, {"type": "stdin_stdout", "input": "103616972 10575\n", "output": "146976\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 a string good if and ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "4000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1010000000 1000000000\n", "output": "4000000001\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 99999999\n", "output": "2199999998\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\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "100\n1\n2\n3\n4\n5\n6\n7\n8\n14\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Anna got the following t... | [{"type": "stdin_stdout", "input": "50\n363510947 363510954 363510943 363510964 363510969 363510950 363510951 363510960 363510967 363510952 363510956 363510948 363510944 363510946 363510965 363510946 363510963 363510962 363510947 363510955 363510954 363510948 363510961 363510964 363510963 363510945 363510965 363510953 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has got addicted to a game... | [{"type": "stdin_stdout", "input": "1555494676 853938121 172337487 490664825\n", "output": "866256663\n"}, {"type": "stdin_stdout", "input": "885636311 1133047284 232531966 493119835\n", "output": "572179871\n"}, {"type": "stdin_stdout", "input": "1076117758 300009121 565317265 947272048\n", "output": "963831390\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers n and... | [{"type": "stdin_stdout", "input": "5\n1 100\n2 -1\n5 5\n2 1000000000\n1000100000 1000000000\n", "output": "0\n-1\n10\n1000000000\n2000000000\n"}, {"type": "stdin_stdout", "input": "5\n1 100\n2 2\n5 5\n2 1000000000\n1000000000 1000000000\n", "output": "0\n2\n10\n1000000000\n2000000000\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\nSo, the New Year holidays are ov... | [{"type": "stdin_stdout", "input": "VXINHOMEQCATZUGAJEIUIZZLPYFGUTVLNBNWCUVMEENUXKBWBGZTMRJJVJDLVSLBABVCEUDDSQFHOYPYQTWVAGTWOLKYISAGHBMC\nZMRGXPZSHOGCSAECAPGVOIGCWEOWWOJXLGYRDMPXBLOKZVRACPYQLEQGFQCVYXAGBEBELUTDAYEAGPFKXRULZCKFHZCHVCWIRGPK\nTRBRDDGGZIAVEXBCWGMEYAXATPQSLCWPKLEPIVOLTKMWVYYHJEQDNNELLDURGFWNVQGXUVCR\n", "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\nAndre has very specific tastes. ... | [{"type": "stdin_stdout", "input": "100\n1\n0\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n19\n18\n19\n16\n21\n74\n23\n24\n45\n26\n23\n14\n57\n30\n22\n32\n33\n34\n35\n1\n37\n38\n11\n40\n53\n42\n43\n86\n45\n46\n19\n62\n95\n50\n9\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n89\n64\n65\n66\n17\n68\n69\n114\n71\n72\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 found n segments on the... | [{"type": "stdin_stdout", "input": "4\n3\n1 4\n2 3\n3 6\n4\n1 2\n2 3\n3 5\n2 5\n5\n0 0\n1 13\n4 1\n6 14\n9 10\n5\n1 5\n2 4\n3 5\n2 8\n4 8\n", "output": "0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 4\n2 3\n3 6\n4\n1 2\n2 3\n3 5\n2 5\n5\n0 0\n1 13\n4 1\n6 14\n9 10\n5\n1 5\n2 4\n3 5\n2 9\n4 8\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\nLet's define the cost of a strin... | [{"type": "stdin_stdout", "input": "97849 7\n", "output": "aabacadaeafagbbcbdbebfbgccdcecfcgddedfdgeefegffggaabacadaeafagbbcbdbebfbgccdcecfcgddedfdgeefegffggaabacadaeafagbbcbdbebfbgccdcecfcgddedfdgeefegffggaabacadaeafagbbcbdbebfbgccdcecfcgddedfdgeefegffggaabacadaeafagbbcbdbebfbgccdcecfcgddedfdgeefegffggaabacadaeafagbbc... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 once wrote a sad love song... | [{"type": "stdin_stdout", "input": "13 7\nsonokhisumiwo\n1 5\n2 10\n7 10\n1 13\n1 8\n1 9\n3 6\n", "output": "74\n125\n62\n191\n110\n131\n48\n"}, {"type": "stdin_stdout", "input": "13 7\nowimusihkooos\n1 7\n2 10\n7 8\n2 13\n2 8\n2 4\n6 9\n", "output": "109\n128\n17\n177\n102\n45\n47\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 permutation is a sequence of i... | [{"type": "stdin_stdout", "input": "102\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49 52 51 54 53 56 55 58 57 60 59 62 61 64 63 66 65 68 67 70 69 72 71 74 73 76 75 78 77 80 79 82 81 84 83 86 85 88 87 90 89 92 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 are given a rectangle grid. ... | [{"type": "stdin_stdout", "input": "1000000000 1000001000 286536427 579261823 230782719 1150170645\n", "output": "209608854 195871608 363464000 962652038\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 500000000 500000000 500000000 500000001\n", "output": "250000000 249999999 750000000 750000000\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\nUser ainta is making a web site.... | [{"type": "stdin_stdout", "input": "100 10 100\n", "output": "1 2 3 4 5 6 7 8 9 (10) 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 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\nRecently, a start up by two stud... | [{"type": "stdin_stdout", "input": "OVWIHIWVYXMVAAAATOXWOIUUHYXHIHHVUIOOXWHOXTUUMUUVHVWWYUTIAUAITAOMHXWMTTOIVMIVOTHOVOIOHYHAOXWAUVWAVIVM\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "QDPINBMCRFWXPDBFGOZVVOCEMJRUCTOADEWEGTVBVBFWWRPGYEEYGPRWWFBVBVTGEWEDAOTCURJMECOVVZOGFBDPXWFRCMBNIPDQ\n", "output": "NO\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA kindergarten teacher Natalia P... | [{"type": "stdin_stdout", "input": "102\n", "output": "2 4 7 11 16 22 29 37 46 56 67 79 92 4 19 35 52 70 89 7 28 50 73 97 20 46 73 101 28 58 89 19 52 86 19 55 92 28 67 5 46 88 29 73 16 62 7 55 2 52 1 53 4 58 11 67 22 80 37 97 56 16 79 41 4 70 35 1 70 38 7 79 50 22 97 71 46 22 101 79 58 38 19 1 86 70 55 41 28 16 5 97 88... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVanya walks late at night along ... | [{"type": "stdin_stdout", "input": "46 615683844\n431749087 271781274 274974690 324606253 480870261 401650581 13285442 478090364 266585394 425024433 588791449 492057200 391293435 563090494 317950 173675329 473068378 356306865 311731938 192959832 321180686 141984626 578985584 512026637 175885185 590844074 47103801 21221... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDrazil is playing a math game wi... | [{"type": "stdin_stdout", "input": "15\n989898989898989\n", "output": "777777777777777333333333333333322222222222222222222222222222\n"}, {"type": "stdin_stdout", "input": "15\n999999999999990\n", "output": "77777777777777333333333333333333333333333322222222222222\n"}, {"type": "stdin_stdout", "input": "15\n987654329876... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Beroil corporation structure... | [{"type": "stdin_stdout", "input": "ZLWSYH:WNMTNAI:FTCKPGZBJ.,UZSCFZVXXK.,LNGCU.,TCT.,LNGCU.,U.,NEHYSET..,FBLI:NEHYSET:IFY..,VN.,VN.,IFY.,FBLI.,YH.,FBLI.,DTXG.,NEHYSET.,WNMTNAI.,VN.,SVXN.,NEHYSET.,TCT.,DTXG..,UZSCFZVXXK:KZQRJFST.,FTCKPGZBJ.,WNMTNAI.,SVXN:DHONBXRZAL..,NEHYSET.,IFY..,MPOEEMVOP:DHONBXRZAL.,DTXG.,FTCKPGZBJ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHarry Potter and He-Who-Must-Not... | [{"type": "stdin_stdout", "input": "1000\n148\n500\n", "output": "228.39506172839506\n"}, {"type": "stdin_stdout", "input": "425\n458\n118\n", "output": "337.93402777777777\n"}, {"type": "stdin_stdout", "input": "496\n326\n429\n", "output": "214.16688741721853\n"}, {"type": "stdin_stdout", "input": "745\n152\n417\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 permutation of length n is an ... | [{"type": "stdin_stdout", "input": "100\n94 22 24 99 58 97 20 29 67 30 38 64 77 50 15 44 92 88 39 42 25 70 2 76 84 6 37 49 17 71 31 19 26 79 10 35 65 63 32 95 5 8 52 27 83 18 53 93 13 81 48 68 54 82 34 60 87 23 16 86 55 40 61 45 28 7 74 41 14 91 3 72 33 11 98 89 90 69 78 36 80 59 56 21 43 1 75 46 47 12 96 73 57 51 4 85... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 piece of a devilish mi... | [{"type": "stdin_stdout", "input": "7 4\n1 1 3 3 5 3\n1\n2\n3\n5\n", "output": "3\n2\n3\n5\n"}, {"type": "stdin_stdout", "input": "7 4\n1 1 3 3 5 3\n2\n2\n3\n5\n", "output": "2\n2\n3\n5\n"}, {"type": "stdin_stdout", "input": "7 4\n1 1 3 3 5 3\n2\n4\n3\n5\n", "output": "2\n4\n3\n5\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\nOne tradition of welcoming the N... | [{"type": "stdin_stdout", "input": "30\n4 1 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\n", "output": "60096\n"}, {"type": "stdin_stdout", "input": "30\n1 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\n", "output": "61237\n"}, {"type": "stdin_stdout", "input": "30\n2 5 5 5 5 5 5 5 5 5 5 5 5 5 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\nStepan is a very experienced oly... | [{"type": "stdin_stdout", "input": "20 10 761\n66 41\n47 7\n35 6\n22 40\n15 2\n47 28\n46 47\n3 45\n12 19\n44 41\n46 2\n49 23\n9 8\n7 41\n5 3\n16 42\n12 50\n17 22\n25 9\n45 12\n56 44\n34 47\n33 35\n32 47\n119 6\n27 18\n43 36\n23 6\n39 22\n38 45\n", "output": "1009\n"}, {"type": "stdin_stdout", "input": "20 10 761\n66 41... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 pack of n t-shirts came to... | [{"type": "stdin_stdout", "input": "20\n414468312 20329584 106106409 584924603 666547477 670032002 726095027 276840253 368277336 940941705 531635095 213813062 440421387 959075599 240727854 495316522 838268432 786936631 586382273 806443734\n3 1 2 3 3 2 2 1 3 2 3 2 3 3 3 2 1 3 1 2\n3 1 2 2 2 2 3 1 2 3 2 1 1 2 3 1 2 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\nSome time ago Mister B detected ... | [{"type": "stdin_stdout", "input": "108\n1 102 33 99 6 83 4 20 61 100 76 71 44 9 24 87 57 2 81 82 90 85 12 30 66 53 47 36 43 29 31 64 96 84 77 23 93 78 58 68 42 55 13 70 62 19 92 14 10 65 63 75 91 48 11 105 37 50 32 94 18 26 52 89 104 106 86 97 80 95 17 72 40 22 79 103 25 101 35 51 15 98 67 5 34 69 54 27 45 88 56 16 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\nIt's another Start[c]up finals, ... | [{"type": "stdin_stdout", "input": "25 6\n1 10 5\n1 8 4\n1 8 2\n4 8 9\n3 2 8\n1 9 5\n2 10 10\n1 9 6\n3 5 4\n2 7 8\n2 3 2\n2 6 8\n3 7 8\n4 3 7\n1 8 1\n3 6 4\n3 2 8\n2 2 1\n4 8 8\n4 13 4\n3 10 2\n3 6 6\n2 2 5\n1 6 2\n4 1 5\n", "output": "451\n"}, {"type": "stdin_stdout", "input": "25 6\n1 10 5\n1 8 4\n1 5 2\n4 8 9\n3 2 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 an array a with n ... | [{"type": "stdin_stdout", "input": "22\n133295371 188010892 71730560 282666912 193069109 184556873 87395258 234247052 230809052 211444018 148989732 17810977 158722706 11753932 100093528 1000000000 43672080 61357581 171830832 13873487 34865589 114340079\n", "output": "148989732 193069109 87395258 1000000000 211444018 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\nAncient Egyptians are known to h... | [{"type": "stdin_stdout", "input": "((((4?6)?9)?((5?(7?1))?(6?(4?(((((((7?3)?7)?(((((8?(6?7))?((1?2)?(5?8)))?8)?7)?4))?6)?7)?1)?((7?(2?((1?(((8?(((((2?7)?(((((3?6)?3)?(((((9?4)?7)?(1?(5?5)))?(8?((3?(1?2))?((8?5)?(7?((9?((9?8)?7))?1))))))?1))?1)?(9?2)))?((7?5)?((9?(4?(9?6)))?(8?(((5?7)?2)?(6?(3?8)))))))?(((4?(2?2))?(7?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 are given n points on Cartes... | [{"type": "stdin_stdout", "input": "59\n1 0\n0 2\n0 3\n0 4\n0 5\n6 0\n7 0\n8 0\n9 0\n10 0\n0 11\n12 0\n13 0\n14 0\n15 0\n0 16\n0 17\n18 0\n19 0\n20 0\n21 0\n0 22\n23 0\n24 0\n0 25\n26 0\n27 0\n0 28\n0 29\n30 0\n31 0\n0 32\n33 0\n34 0\n0 35\n0 36\n37 0\n0 38\n39 0\n40 0\n0 41\n42 0\n0 43\n0 44\n0 45\n0 46\n47 0\n0 48\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs the boat drifts down the rive... | [{"type": "stdin_stdout", "input": "100 100 100 100\n", "output": "50 50\nAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB\nABABABABABABABABABABABABABCBCBCBCBCBCBCBCBCBCBCBCB\nAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB\nABABABABABABABABABABABABABCBCBCBCBCBCBCBCBCBCBCBCB\nAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 looking for a place to p... | [{"type": "stdin_stdout", "input": "46\n---B--S-D--S--\nDDBDDBDDBDD\n--S--S--S--S--\nSSD-B---BD-DDSB-----S-S--------S-B----BSB-S--B-S-D\n-SB---S----DD-D-DS---B--BD-S-SD---D----D-B---B-SDD\n------BB-----D--------S--D-BSSS-----B---S-S-SSS---\n----------S--S----D---------SD---DD--D---DSB-B----\n-S---------DDDB---BB----SSD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 some boxes. All of them... | [{"type": "stdin_stdout", "input": "5\n-1 3 2 1 1\n4\n2 2\n1 3\n5 8\n1 1\n\nMASPLF", "output": "1\n4\n0\n2\n"}, {"type": "stdin_stdout", "input": "5\n2 3 2 1 2\n4\n0 1\n1 3\n5 11\n1 2\n\nMASPLF", "output": "1\n5\n0\n4\n"}, {"type": "stdin_stdout", "input": "5\n-1 3 2 1 2\n4\n2 2\n1 3\n5 8\n1 1\n\nMASPLF", "output": "2\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonk A loves to complete all his... | [{"type": "stdin_stdout", "input": "10\n384\n846930887 1681692778 1714636916 1957747794 424238336 719885387 1649760493 596516650 1189641422 1025202363 1350490028 783368691 1102520060 2044897764 1967513927 1365180541 1540383427 304089173 1303455737 35005212 521595369 294702568 1726956430 336465783 861021531 278722863 23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs we have seen our little Vaish... | [{"type": "stdin_stdout", "input": "100\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211\n212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231\n232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n200\n201\n202\n203\n204\n205\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nM-kun has the following three ca... | [{"type": "stdin_stdout", "input": "13 4 1\n10", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "13 5 1\n10", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 3 4\n9", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 4 4\n9", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12 4 2\n9", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have N balls. The i-th ball h... | [{"type": "stdin_stdout", "input": "8\n1 1 1 1 1 0 4 1", "output": "10\n10\n10\n10\n10\n15\n15\n10\n"}, {"type": "stdin_stdout", "input": "8\n1 1 0 1 1 1 6 1", "output": "10\n10\n15\n10\n10\n10\n15\n10\n"}, {"type": "stdin_stdout", "input": "8\n1 1 1 3 1 0 4 1", "output": "6\n6\n6\n10\n6\n10\n10\n6\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\nHow many ways are there to choos... | [{"type": "stdin_stdout", "input": "3256265", "output": "1628132\n"}, {"type": "stdin_stdout", "input": "1527191", "output": "763595\n"}, {"type": "stdin_stdout", "input": "1743342", "output": "871670\n"}, {"type": "stdin_stdout", "input": "1412384", "output": "706191\n"}, {"type": "stdin_stdout", "input": "1339977", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ball will bounce along a numbe... | [{"type": "stdin_stdout", "input": "3 12\n16 5 1 12", "output": "1\n"}, {"type": "stdin_stdout", "input": "3 12\n16 5 1 17", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 14\n13 18 1 1", "output": "2\n"}, {"type": "stdin_stdout", "input": "3 12\n16 9 1 17", "output": "1\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\nLa Confiserie d'ABC sells cakes ... | [{"type": "stdin_stdout", "input": "-111", "output": "No\n"}, {"type": "stdin_stdout", "input": "-106", "output": "No\n"}, {"type": "stdin_stdout", "input": "-123", "output": "No\n"}, {"type": "stdin_stdout", "input": "-207", "output": "No\n"}, {"type": "stdin_stdout", "input": "-226", "output": "No\n"}, {"type": "stdi... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.