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\nMaria participates in a bicycle ... | [{"type": "stdin_stdout", "input": "24\n-10000 -10000\n-10000 9998\n9998 9998\n9998 -10000\n-6364 -10000\n-6364 6362\n6362 6362\n6362 -6364\n-2728 -6364\n-2728 2726\n2726 2726\n2726 -910\n908 -910\n908 908\n-910 908\n-910 -4546\n4544 -4546\n4544 4544\n-4546 4544\n-4546 -8182\n8180 -8182\n8180 8180\n-8182 8180\n-8182 -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\nPolandBall is playing a game wit... | [{"type": "stdin_stdout", "input": "2 2\nkremowka\nwadowicka\nkremowka\nwiedenska\n", "output": "YES"}, {"type": "stdin_stdout", "input": "5 1\npolandball\nis\na\ncool\ncharacter\nnope\n", "output": "YES"}, {"type": "stdin_stdout", "input": "6 5\na\nb\nc\nd\ne\nf\nf\ne\nd\nz\ny\n", "output": "YES"}, {"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\nVasya has the square chessboard ... | [{"type": "stdin_stdout", "input": "500 43\n176 85\n460 171\n233 260\n73 397\n474 35\n290 422\n309 318\n280 415\n485 169\n106 22\n355 129\n180 301\n205 347\n197 93\n263 318\n336 382\n314 350\n476 214\n367 277\n333 166\n500 376\n236 17\n94 73\n116 204\n166 50\n168 218\n144 369\n340 91\n274 360\n171 360\n41 251\n262 478\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 particularly well-known fact... | [{"type": "stdin_stdout", "input": "10 9\n2 3\n6 8\n10 1\n1 8\n6 7\n8 7\n10 5\n7 10\n2 5\n", "output": "no\n"}, {"type": "stdin_stdout", "input": "200 5\n93 101\n199 164\n14 94\n115 61\n106 156\n", "output": "no\n"}, {"type": "stdin_stdout", "input": "10 9\n6 5\n9 2\n4 7\n2 3\n7 3\n3 4\n10 6\n1 2\n5 8\n", "output": "no... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 length of the longest common... | [{"type": "stdin_stdout", "input": "1\n100\n2 2 3 3 2 1 2 1 1 3 2 2 1 1 1 3 1 3 1 2 2 3 3 3 1 2 2 1 1 1 3 1 2 1 2 2 3 2 1 2 1 3 1 1 2 1 3 1 2 1 3 2 1 2 3 3 2 1 1 3 1 1 2 3 2 2 2 2 2 3 2 3 3 3 3 1 3 1 1 1 1 3 1 2 3 3 1 3 2 3 3 2 3 3 3 1 1 3 3 3\n", "output": "aaa\naab\naaa\naaa\naaa\naab\nabb\naba\naaa\nabb\nabb\naba\na... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer array $... | [{"type": "stdin_stdout", "input": "50\n170081 797965 40736 224325 102476 20832 954026 923972 391400 247099 95141 927386 79799 749285 104039 200818 623552 872203 355273 838168 352783 850365 389351 930945 847154 608047 727586 549184 520573 608953 338849 536466 345479 589848 882827 771475 874283 787115 992590 128903 9780... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 student of z-school found a ki... | [{"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 13 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\nA palindrome is a string $t$ whi... | [{"type": "stdin_stdout", "input": "11\n4\n0\n1\n1\n0\n2\n0001000\n0000000000000\n2\n1\n0\n1\n1\n1\n0\n2\n11\n00\n2\n111\n000\n2\n111\n00\n2\n00\n111\n2\n11111\n00\n2\n00000100000\n000\n", "output": "4\n2\n2\n1\n1\n2\n2\n2\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "1\n4\n110101\n0\n1011001011010101001110010111110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Christmas Santa gave Masha ... | [{"type": "stdin_stdout", "input": "100 50\n66 3\n92 79\n9 44\n84 45\n30 63\n30 20\n33 86\n8 83\n40 75\n7 36\n91 4\n76 88\n77 76\n28 27\n6 52\n41 57\n8 23\n34 75\n50 15\n86 68\n36 98\n30 84\n37 62\n22 4\n6 45\n72 80\n98 74\n78 84\n1 54\n99 27\n84 91\n78 7\n80 61\n67 48\n51 52\n36 72\n97 87\n25 17\n20 80\n20 39\n72 5\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\nA permutation of length n is an ... | [{"type": "stdin_stdout", "input": "100\n99 5 40 32 4 31 38 57 94 47 26 16 89 72 9 80 55 86 78 90 42 41 46 74 56 97 21 48 66 27 93 85 88 59 64 95 10 45 12 22 84 60 8 98 62 51 14 65 39 30 11 71 92 19 76 43 87 54 15 53 37 6 25 18 96 35 13 91 2 3 0 23 1 7 49 75 81 33 50 52 63 44 69 36 17 61 24 20 68 34 73 29 70 83 58 79 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\nMahmoud wants to write a new dic... | [{"type": "stdin_stdout", "input": "8 4 12\nhello hi welcome goaway hateyou mmmm momo mana\n1 hello hi\n1 hi welcome\n2 goaway welcome\n2 hateyou hi\nhateyou goaway\nhateyou hi\nhateyou hi\nhateyou welcome\nmmmm momo\nwelcome hi\nwelcome hateyou\nhateyou goaway\nhello goaway\nhello goaway\nhello hateyou\ngoaway mmmm\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\nCity X consists of n vertical an... | [{"type": "stdin_stdout", "input": "9\n4 5\n2 3\n8 3\n5 6\n9 3\n4 4\n5 4\n4 7\n1 7\n8 4\n1 4\n1 5\n5 7\n7 8\n7 1\n9 9\n8 7\n7 5\n3 7\n6 6\n7 3\n5 2\n3 6\n7 4\n9 6\n5 8\n9 7\n6 3\n7 9\n1 2\n1 1\n6 2\n5 3\n7 2\n1 6\n4 1\n6 1\n8 9\n2 2\n3 9\n2 9\n7 7\n2 8\n9 4\n2 5\n8 6\n3 4\n2 1\n2 7\n6 5\n9 1\n3 3\n3 8\n5 5\n4 3\n3 1\n1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHeidi and Doctor Who hopped out ... | [{"type": "stdin_stdout", "input": "1 2\n824625204\n309211451 5643\n115368061 3866\n", "output": "9509\n"}, {"type": "stdin_stdout", "input": "1 2\n754725914\n561572949 6885\n312543334 2667\n", "output": "9552\n"}, {"type": "stdin_stdout", "input": "1 2\n458828651\n579090223 7592\n208642144 8751\n", "output": "8751\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\nSereja has an array a, consistin... | [{"type": "stdin_stdout", "input": "10 10\n1 2 3 4 1 2 3 4 100000 99999\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n", "output": "6\n6\n6\n6\n6\n5\n4\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "7 10\n1 3 8 6 2 2 7\n4\n2\n6\n3\n4\n4\n6\n2\n7\n4\n", "output": "3\n5\n2\n4\n3\n3\n2\n5\n1\n3\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Department of economic devel... | [{"type": "stdin_stdout", "input": "1000 1000 -999\n", "output": "0.617586685675881\n-1.617586685675881"}, {"type": "stdin_stdout", "input": "-181 -227 368\n", "output": "0.930608581348335\n-2.184752227757175"}, {"type": "stdin_stdout", "input": "-779 -814 321\n", "output": "0.305204386055057\n-1.350133782717445"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem you are to calcu... | [{"type": "stdin_stdout", "input": "16\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n100100\n", "output": "5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n5009792908\n500979... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJanusz is a businessman. He owns... | [{"type": "stdin_stdout", "input": "30\n13469 121221 107752 94283 107752 296318 67345 296318 161628 215504 121221 215504 296318 134690 282849 161628 148159 202035 242442 107752 80814 80814 107752 255911 67345 53876 255911 215504 202035 175097\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "25\n32942 232281 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\nOne day Sasha visited the farmer... | [{"type": "stdin_stdout", "input": "166\n61 19 19 67 11 11 73 89 73 11 47 2 59 43 61 31 19 83 71 19 29 97 89 97 2 11 5 73 19 2 19 7 41 53 5 23 11 89 2 23 47 47 83 71 17 71 67 67 43 3 29 97 17 83 11 19 67 17 97 7 19 29 29 41 13 71 29 19 19 43 47 17 71 3 13 71 41 19 47 7 29 43 29 97 31 11 43 17 23 83 37 61 79 31 17 5 59 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 black king is standing on a ... | [{"type": "stdin_stdout", "input": "30 14 39 19\n31\n35 7 11\n37 11 12\n32 13 13\n37 5 6\n46 13 13\n37 14 14\n31 13 13\n43 13 19\n45 15 19\n46 13 13\n32 17 17\n41 14 19\n30 14 14\n43 13 17\n34 16 18\n44 11 19\n38 13 13\n40 12 20\n37 16 18\n46 16 18\n34 10 14\n36 9 10\n36 15 19\n38 15 19\n42 13 19\n33 14 15\n35 15 19\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou wrote down all integers from... | [{"type": "stdin_stdout", "input": "10\n", "output": "943963054 482289529 666000000 58500000 5040000 423000 34200 2610 180 10\n"}, {"type": "stdin_stdout", "input": "9\n", "output": "482289529 666000000 58500000 5040000 423000 34200 2610 180 10\n"}, {"type": "stdin_stdout", "input": "8\n", "output": "666000000 58500000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan recently bought a detective... | [{"type": "stdin_stdout", "input": "17\n9 4 3 6 7 6 8 8 9 10 11 12 13 14 15 16 17\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "15\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "13\n1 2 3 4 5 6 7 8 9 10 11 12 13\n", "output": "13\n"}, {"type": "stdin_stdout", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have an integer $n$. Let's d... | [{"type": "stdin_stdout", "input": "6\n53 61\n35 53\n35 39\n34 53\n34 54\n34 62\n43 54\n23 43\n12 43\n1 54\n1 7\n1 57\n40 62\n30 40\n28 40\n4 62\n4 60\n4 45\n19 61\n19 36\n36 42\n36 52\n10 19\n10 48\n10 46\n2 61\n2 51\n2 27\n5 51\n3 51\n15 27\n22 27\n39 47\n6 47\n6 59\n6 24\n9 47\n9 49\n9 21\n20 39\n14 20\n14 18\n13 14... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 had an array of $n$ intege... | [{"type": "stdin_stdout", "input": "10 40\n8 3\n6 8\n7 1\n9 10\n1 3\n2 8\n3 7\n1 8\n8 10\n4 5\n5 1\n10 3\n9 7\n4 6\n5 3\n2 3\n3 9\n9 8\n7 8\n4 1\n1 6\n4 7\n7 6\n6 10\n6 9\n2 6\n5 10\n10 4\n7 2\n5 9\n2 4\n3 6\n9 2\n1 10\n5 8\n5 7\n4 8\n1 9\n6 5\n5 2\n", "output": "YES\n1 2 3 4 5 6 7 8 9 10 \n1 1 3 4 5 6 7 8 9 10 \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\nGraph constructive problems are ... | [{"type": "stdin_stdout", "input": "100\n1 5 1 1 1 2 3 2 1 4 2 2 1 2 1 2 2 2 2 1 1 2 2 2 2 2 2 1 2 2 2 1 1 1 2 2 1 1 2 3 2 2 3 1 2 4 2 1 2 1 2 4 2 1 2 3 1 3 1 2 2 1 2 2 3 1 1 1 5 2 2 2 3 3 1 3 1 2 2 4 1 2 1 3 1 5 3 3 1 1 2 1 3 2 1 2 2 2 3 2\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "17\n1 2 3 4 5 6 7 8 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 permutation $p_1... | [{"type": "stdin_stdout", "input": "100 77\n59 92 18 16 45 82 63 43 50 68 19 13 53 79 48 28 94 49 25 77 54 8 61 66 40 100 99 20 35 14 52 56 22 17 57 36 23 90 4 65 84 42 30 27 3 15 87 32 93 74 46 91 41 9 34 12 11 7 10 86 78 72 81 73 51 55 58 97 39 31 5 24 29 88 95 6 44 37 60 62 83 33 47 21 2 38 26 98 71 75 96 70 76 69 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\nOne unknown hacker wants to get ... | [{"type": "stdin_stdout", "input": "10\ngzjzzjjjzjzgjgzzgzjjjzzzggjjggggjjzzgzz\nyyyyyyyyyyyyyy\nuuuuuuuuuuuuuuuuuuuuuuuu\nssssssssssssssssssssss\nuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu\ngzjgjzzzjgjzggjjjjjzjzzgjgjzgjgjzzjjggzgjzgjgj\ny\nsssssssssss\ngzjzgjjjzggjgzjzgzzz\nsssssssssssssssssssssssssssssss\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe city park of IT City contain... | [{"type": "stdin_stdout", "input": "100\n", "output": "680185280130048000"}, {"type": "stdin_stdout", "input": "83\n", "output": "101159538130177920"}, {"type": "stdin_stdout", "input": "95\n", "output": "402852449038723320"}, {"type": "stdin_stdout", "input": "99\n", "output": "613867215317368320"}, {"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\nFind out if it is possible to pa... | [{"type": "stdin_stdout", "input": "37\n", "output": "Yes\n1 19\n36 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 \n"}, {"type": "stdin_stdout", "input": "22\n", "output": "Yes\n1 11\n21 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 \n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer number ... | [{"type": "stdin_stdout", "input": "10000000000\n", "output": "5000000000\n"}, {"type": "stdin_stdout", "input": "9999999999\n", "output": "4999999999\n"}, {"type": "stdin_stdout", "input": "9998200081\n", "output": "4999050046\n"}, {"type": "stdin_stdout", "input": "3000000021\n", "output": "1500000010\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 numbers of all offices in th... | [{"type": "stdin_stdout", "input": "54\n", "output": "36028797018963966"}, {"type": "stdin_stdout", "input": "55\n", "output": "72057594037927934"}, {"type": "stdin_stdout", "input": "49\n", "output": "1125899906842622"}, {"type": "stdin_stdout", "input": "43\n", "output": "17592186044414"}, {"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\nBees Alice and Alesya gave beeke... | [{"type": "stdin_stdout", "input": "24 4\nSETS\nETES\nSSST\nESTE\nTSES\nSSES\nTESS\nSEEE\nETEE\nETSS\nSSEE\nESTT\nSTSS\nTTTT\nTEEE\nTSEE\nESET\nTTTE\nETTT\nSTEE\nSTTE\nESSS\nTEET\nTETE\n", "output": "31"}, {"type": "stdin_stdout", "input": "10 3\nTSS\nSEE\nESS\nSES\nSTS\nTET\nTEE\nSSE\nETS\nTSE\n", "output": "2"}, {"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\nAndryusha is an orderly boy and ... | [{"type": "stdin_stdout", "input": "50\n30 47 31 38 37 50 36 43 9 23 2 2 15 31 14 49 9 16 6 44 27 14 5 6 3 47 25 26 1 35 3 15 24 19 8 46 49 41 4 26 40 28 42 11 34 35 46 18 7 28 18 40 19 42 4 41 38 48 50 12 29 39 33 17 25 22 22 21 36 45 27 30 20 7 13 29 39 44 21 8 37 45 34 1 20 10 11 17 33 12 43 13 10 16 48 24 32 5 23 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\nThe Bitlandians are quite weird ... | [{"type": "stdin_stdout", "input": "10\n1 999\n1 999\n1 999\n1 999\n1 999\n1 999\n1 999\n1 999\n1 999\n1 999\n", "output": "AAAAAAAAAA\n"}, {"type": "stdin_stdout", "input": "3\n400 600\n400 600\n400 600\n", "output": "AGA\n"}, {"type": "stdin_stdout", "input": "3\n500 500\n1 999\n400 600\n", "output": "AGA\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 magic island Geraldion, where ... | [{"type": "stdin_stdout", "input": "50\n474421 421097 217233 156339 27075 733996 281778 863492 184707 956857 288561 70997 393786 337382 663642 131184 637 273801 799870 295017 392338 842567 161819 297705 102013 930684 375703 838048 154915 138503 629056 256591 893619 19263 787927 684541 320265 841090 421423 490879 394582... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 this problem your goal is to ... | [{"type": "stdin_stdout", "input": "5\n1000000000 -10000000 0 8888888 7777777\n", "output": "3\n0 1\n2 1\n4 2\n"}, {"type": "stdin_stdout", "input": "3\n100000000 100000002 100000001\n", "output": "1\n1 2\n"}, {"type": "stdin_stdout", "input": "8\n5 2 6 8 3 1 6 8\n", "output": "4\n0 5\n4 2\n5 3\n6 5\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 given an integer $n$.\n\... | [{"type": "stdin_stdout", "input": "10\n", "output": "24\n1 2\n3 4\n1 3\n2 4\n5 6\n7 8\n5 7\n6 8\n1 5\n2 6\n3 7\n4 8\n3 4\n5 6\n3 5\n4 6\n7 8\n9 10\n7 9\n8 10\n3 7\n4 8\n5 9\n6 10\n"}, {"type": "stdin_stdout", "input": "8\n", "output": "24\n1 2\n3 4\n1 3\n2 4\n5 6\n7 8\n5 7\n6 8\n1 5\n2 6\n3 7\n4 8\n1 2\n3 4\n1 3\n2 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\nAmr has got a large array of siz... | [{"type": "stdin_stdout", "input": "10\n1 10 100 1000 10000 1 10 100 1000 10000\n", "output": "1 6"}, {"type": "stdin_stdout", "input": "10\n1 1000000 2 1000000 3 2 1000000 1 2 1\n", "output": "2 7"}, {"type": "stdin_stdout", "input": "10\n1 11 111 1111 1 11 11 1 1111 1111\n", "output": "2 7"}, {"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\nConsider some set of distinct ch... | [{"type": "stdin_stdout", "input": "1000000000 2 2\n1 500000000\n", "output": "933660593\n"}, {"type": "stdin_stdout", "input": "2 1 1000000000\n1\n", "output": "858035449\n"}, {"type": "stdin_stdout", "input": "9 2 26\n2 3\n", "output": "150352234\n"}, {"type": "stdin_stdout", "input": "1000000000 1 1\n1\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\nYou have a multiset containing s... | [{"type": "stdin_stdout", "input": "20\n1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "16\n1 1 2 3 3 4 5 6 6 6 4 3 2 1 1 1\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "1\n1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n1 0 1 0 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\nZS the Coder is coding on a craz... | [{"type": "stdin_stdout", "input": "2 1000000000\n1 1000000000\n", "output": "2"}, {"type": "stdin_stdout", "input": "6 5\n1 3 8 14 19 20\n", "output": "3"}, {"type": "stdin_stdout", "input": "6 1\n1 3 5 7 9 10\n", "output": "2"}, {"type": "stdin_stdout", "input": "5 5\n1 7 12 13 14\n", "output": "4"}, {"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\nDevu is a dumb guy, his learning... | [{"type": "stdin_stdout", "input": "20 10\n6 6 1 2 6 4 5 3 6 5 4 5 6 5 4 6 6 2 3 3\n", "output": "196\n"}, {"type": "stdin_stdout", "input": "20 4\n1 1 3 5 5 1 3 4 2 5 2 4 3 1 3 3 3 3 4 3\n", "output": "65\n"}, {"type": "stdin_stdout", "input": "4 2\n5 1 2 1\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt was decided in IT City to dis... | [{"type": "stdin_stdout", "input": "999999929 1000000000\n", "output": "1047197551196597556.500000000000"}, {"type": "stdin_stdout", "input": "11 1000000000\n", "output": "1061689977712182980.125000000000"}, {"type": "stdin_stdout", "input": "7369339 31415926\n", "output": "1033542520749354.968872070312"}, {"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\nIT City administration has no re... | [{"type": "stdin_stdout", "input": "1000 1000 1000\n", "output": "655056222.989098310000"}, {"type": "stdin_stdout", "input": "999 997 998\n", "output": "650782658.915145640000"}, {"type": "stdin_stdout", "input": "709 328 709\n", "output": "157775455.683012100000"}, {"type": "stdin_stdout", "input": "982 948 879\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\nIahub has drawn a set of n point... | [{"type": "stdin_stdout", "input": "50\n-768 -243\n-741 -984\n-370 213\n-808 571\n-726 442\n234 452\n-105 -990\n-876 -278\n987 473\n-968 -531\n-274 -842\n259 -655\n-59 -555\n976 -396\n878 -85\n551 213\n675 599\n-990 -507\n1 48\n-147 919\n-218 798\n-191 928\n916 263\n-975 169\n567 -967\n394 16\n-224 915\n280 -613\n804 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 (a connecte... | [{"type": "stdin_stdout", "input": "19 20\n8 10 1\n17 15 1\n14 5 0\n6 14 0\n7 15 0\n19 8 1\n12 14 0\n2 18 0\n13 3 0\n17 1 1\n4 2 1\n11 3 0\n4 6 0\n6 9 0\n7 11 1\n16 4 1\n5 13 1\n16 19 0\n", "output": "928042611"}, {"type": "stdin_stdout", "input": "13 3\n9 13 1\n8 3 1\n11 9 0\n8 13 0\n10 9 0\n2 7 0\n4 8 1\n11 5 0\n10 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\nTwo neighboring kingdoms decided... | [{"type": "stdin_stdout", "input": "100\nRUURUURRUURUUUUURRUUURRRRUURRURRURRRRUUUUUURRUURRRRURUUURUURURRRRRURUURRUURUURRUUURUUUUUURRUUUURUUUR\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "15\nRUURRRRURRUUUUU\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\nURRRUUU\n", "output": "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\nVanya has a table consisting of ... | [{"type": "stdin_stdout", "input": "5\n4 11 20 20\n6 11 20 16\n5 2 19 15\n11 3 18 15\n3 2 14 11\n", "output": "694\n"}, {"type": "stdin_stdout", "input": "5\n4 11 20 15\n7 5 12 20\n10 8 16 12\n7 5 12 15\n2 2 20 13\n", "output": "510\n"}, {"type": "stdin_stdout", "input": "5\n1 1 1 100\n1 1 1 100\n1 1 1 100\n1 1 1 100\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe polar bears are going fishin... | [{"type": "stdin_stdout", "input": "39 -1000000000 -1000000000 -999999997 -1000000000\nENEENWSWSSWESNSSEESNSESWSWNSWESNENWNWEE\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "41 -264908123 -86993764 -264908123 -86993723\nNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN\n", "output": "41\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 protection of a popular prog... | [{"type": "stdin_stdout", "input": "12345\n", "output": "71232"}, {"type": "stdin_stdout", "input": "13542\n", "output": "84443"}, {"type": "stdin_stdout", "input": "71232\n", "output": "10151"}, {"type": "stdin_stdout", "input": "11111\n", "output": "36551"}, {"type": "stdin_stdout", "input": "10000\n", "output": "000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProfessor Ibrahim has prepared t... | [{"type": "stdin_stdout", "input": "100 7\n39 242 238 155 95 30 129 132 72 59 22 61 133 113 99 81 253 204 160 109 92 187 11 227 145 148 100 42 78 14 113 91 140 197 123 182 4 185 208 27 182 207 63 146 102 79 159 195 26 100 72 127 157 159 152 53 0 117 111 125 19 188 179 145 240 50 205 207 113 246 42 56 181 13 188 244 159... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 preparing for an exam on... | [{"type": "stdin_stdout", "input": "10 481\n4 25\n3 85\n6 96\n6 13\n1 9\n4 27\n2 7\n3 42\n9 66\n9 70\n", "output": "4\n4\n4 1 6 9\n"}, {"type": "stdin_stdout", "input": "5 300\n3 100\n4 150\n4 80\n2 90\n2 300\n", "output": "2\n2\n3 4\n"}, {"type": "stdin_stdout", "input": "5 100\n1 10\n1 10\n1 10\n1 10\n1 10\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValera's finally decided to go o... | [{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n38 2 49 55 6 42 12 100 25 69 85 76 13 22 78 73 37 64 5 21 0 23 61 87 4 16 44 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\nOne department of some software ... | [{"type": "stdin_stdout", "input": "15 250 200\n71 2 77 69 100 53 54 40 73 32 82 58 24 82 41\n", "output": "Yes\n11 3\n13 10 8 15 6 7 12 4 1 9 3\n11 14 5\n"}, {"type": "stdin_stdout", "input": "2 1 1\n1000000000 1000000000\n", "output": "Yes\n1 1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6 8 16\n3 5 2 9 8 7\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\nOne company of IT City decided t... | [{"type": "stdin_stdout", "input": "666\n", "output": "11292070960994226"}, {"type": "stdin_stdout", "input": "700\n", "output": "16017044425409540"}, {"type": "stdin_stdout", "input": "776\n", "output": "33019955679376860"}, {"type": "stdin_stdout", "input": "777\n", "output": "33319741730082870"}, {"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\nCapitalization is writing a word... | [{"type": "stdin_stdout", "input": "ABACABA\n", "output": "ABACABA\n"}, {"type": "stdin_stdout", "input": "konjac\n", "output": "Konjac\n"}, {"type": "stdin_stdout", "input": "ApPLe\n", "output": "ApPLe\n"}, {"type": "stdin_stdout", "input": "Xyzzy\n", "output": "Xyzzy\n"}, {"type": "stdin_stdout", "input": "Zzz\n", "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\nFinally, a basketball court has ... | [{"type": "stdin_stdout", "input": "100\n4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1\n1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 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\nImagine that there is a group of... | [{"type": "stdin_stdout", "input": "100 48\n1 56 6\n2 42 3\n3 52 1\n9 50 8\n10 96 8\n11 39 2\n12 51 6\n12 68 7\n13 40 5\n14 18 10\n14 70 6\n15 37 4\n15 38 8\n15 82 6\n15 85 5\n16 48 4\n16 50 9\n16 71 9\n17 18 3\n17 100 10\n20 73 3\n22 32 9\n22 89 9\n23 53 3\n24 53 1\n27 78 10\n30 50 5\n33 94 8\n34 87 9\n35 73 3\n36 51 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike and some bears are playing ... | [{"type": "stdin_stdout", "input": "5 5 30\n0 1 1 1 0\n1 1 0 1 1\n0 1 1 1 1\n0 0 1 1 0\n0 0 0 0 0\n3 2\n2 2\n2 2\n4 3\n1 4\n3 2\n4 1\n2 4\n1 4\n2 1\n5 2\n4 1\n4 1\n5 1\n2 4\n2 4\n4 4\n1 2\n3 1\n4 5\n1 2\n2 3\n1 1\n5 1\n3 4\n1 1\n5 4\n1 5\n5 4\n2 2\n", "output": "3\n3\n3\n3\n3\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n5\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\nThanos wants to destroy the aven... | [{"type": "stdin_stdout", "input": "5 3 10000 3241\n5 12 2\n", "output": "58892\n"}, {"type": "stdin_stdout", "input": "5 3 3521 10000\n5 12 2\n", "output": "58168\n"}, {"type": "stdin_stdout", "input": "3 3 5 10000\n1 4 5\n", "output": "30020\n"}, {"type": "stdin_stdout", "input": "3 3 10000 5\n1 4 5\n", "output": "40... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 city administration of IT Ci... | [{"type": "stdin_stdout", "input": "10000 2000000000\n", "output": "35849124123571.66604124267909180280\n"}, {"type": "stdin_stdout", "input": "1587 1941728048\n", "output": "2996928752532.893524588882808611548\n"}, {"type": "stdin_stdout", "input": "4907 244618708\n", "output": "72346.60521729832602747499118899866\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\nJoe has been hurt on the Interne... | [{"type": "stdin_stdout", "input": "20 20\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\nHiasat registered a new account ... | [{"type": "stdin_stdout", "input": "64 2\n1\n1\n2 csxom\n1\n2 csxom\n1\n1\n1\n1\n1\n2 yl\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "61 1\n1\n2 wrlc... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter a probationary period in t... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "3000000003000000001"}, {"type": "stdin_stdout", "input": "748629743\n", "output": "1681339478558627377"}, {"type": "stdin_stdout", "input": "945234000\n", "output": "2680401947103702001"}, {"type": "stdin_stdout", "input": "900000000\n", "output": "243000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen Sasha was studying in the s... | [{"type": "stdin_stdout", "input": "ZUBQNDCHHKWNWRVSDSRRRTGZDDPNTVJFKTCNGWND\n", "output": "7.5320861\n"}, {"type": "stdin_stdout", "input": "MTOESEPRFEIWAIWLAFJMGBIQB\n", "output": "127.2203685\n"}, {"type": "stdin_stdout", "input": "EZYYOIYUZXEVRTOUYXIQ\n", "output": "124.0168163\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\nDr. Bruce Banner hates his enemi... | [{"type": "stdin_stdout", "input": "34\n", "output": "I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that I hate that I love that 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\nThis time the Berland Team Olymp... | [{"type": "stdin_stdout", "input": "10 5 1000000000\n1 1 1 2 2 1 2 2 2 2\n", "output": "10000000000\n"}, {"type": "stdin_stdout", "input": "1 1000000000 1000000000\n100000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 3 2\n1 1 2 1 1\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "5 3 3\n1 2 2 1 1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVova promised himself that he wo... | [{"type": "stdin_stdout", "input": "10 5\n1 6 2 7 3 8 4 9 5 10\n1 2\n3 4\n5 6\n7 8\n9 10\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "2 0\n1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "10 0\n1 2 3 4 5 6 7 8 9 10\n", "output": "55\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArcady is a copywriter. His toda... | [{"type": "stdin_stdout", "input": "thun-thun-thunder, thunder, thunder\nthunder, thun-, thunder\nthun-thun-thunder, thunder\nthunder, feel the thunder\nlightning then the thunder\nthunder, feel the thunder\nlightning then the thunder\nthunder, thunder\n", "output": "183\n"}, {"type": "stdin_stdout", "input": "snow aff... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 preparing a contest, an... | [{"type": "stdin_stdout", "input": "25\ndadddhrdhradrdzzzahazaddr\n582987584 956970393 414785252 587245865 701672370 65936511 563890835 69653917 387506178 123924921 989335244 647820709 445085282 809768866 105799145 196558041 783108504 134067229 875977231 488184174 41982468 225574390 702881847 472688490 185455403\n", "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\nLittle Artem likes electronics. ... | [{"type": "stdin_stdout", "input": "3 10 2\n1 2\n3 2 7 5\n", "output": "0 0 0 0 0 0 0 0 0 0 \n0 0 0 0 0 0 0 5 0 0 \n0 0 0 0 0 0 0 0 0 0 \n"}, {"type": "stdin_stdout", "input": "5 5 1\n1 5\n", "output": "0 0 0 0 0 \n0 0 0 0 0 \n0 0 0 0 0 \n0 0 0 0 0 \n0 0 0 0 0 \n"}, {"type": "stdin_stdout", "input": "2 2 6\n2 1\n2 2\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIT City company developing compu... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "228571428571428571"}, {"type": "stdin_stdout", "input": "718281828459045235\n", "output": "164178703647781768"}, {"type": "stdin_stdout", "input": "987654321234567890\n", "output": "225749559139329804"}, {"type": "stdin_stdout", "input": "5040000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 crowdedness of the discotheq... | [{"type": "stdin_stdout", "input": "20\n-961747 0 961747\n-957138 0 957138\n-921232 0 921232\n-887450 0 887450\n-859109 0 859109\n-686787 0 686787\n-664613 0 664613\n-625553 0 625553\n-464803 0 464803\n-422784 0 422784\n-49107 0 49107\n-37424 0 37424\n134718 0 134718\n178903 0 178903\n304415 0 304415\n335362 0 335362\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\nLee bought some food for dinner ... | [{"type": "stdin_stdout", "input": "50 50\n1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n25 30\n7 47\n42 15\n19 38\n16 10\n8 6\n26 50\n3 44\n41 26\n32 17\n48 23\n15 50\n39 12\n24 2\n11 13\n21 20\n44 19\n16 35\n43 45\n35 41\n38 34\n42 4\n40 9\n30 5\n24 21\n14 28\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\nYou helped Dima to have a great ... | [{"type": "stdin_stdout", "input": "50 10\n1 2 3 4 5 6 7 8 9 10 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "20 10\n3 3 3 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 6 4\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "20 4\n1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo quickly hire highly skilled s... | [{"type": "stdin_stdout", "input": "29\n", "output": "1161928703861587968"}, {"type": "stdin_stdout", "input": "30\n", "output": "4809844402031689728"}, {"type": "stdin_stdout", "input": "28\n", "output": "280349076803813376"}, {"type": "stdin_stdout", "input": "15\n", "output": "2214592512"}, {"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\nYou are given a sorted array $a_... | [{"type": "stdin_stdout", "input": "8 1\n1 1 2 3 5 8 13 21\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "5 3\n99 101 103 105 107\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "6 3\n4 8 15 16 23 42\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "5 2\n3 3 4 5 6\n", "output": "2\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\nBoboniu gives you\n\n $r$ red b... | [{"type": "stdin_stdout", "input": "4\n0 1 1 1\n8 1 9 3\n0 0 0 0\n1000000000 1000000000 1000000000 1000000000\n", "output": "No\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "1\n1 1 0 101\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "1\n2 0 0 0\n", "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\nIt's the year 4527 and the tanks... | [{"type": "stdin_stdout", "input": "6\n1000000000000000000000000000000000000 6643573784 1000000000000000000000000000000000000 1000000000000000000000000000000000000 1000000000000000000000000000000000000 1000000000000000000000000000000000000\n", "output": "66435737840000000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $t$ and $... | [{"type": "stdin_stdout", "input": "abacabadabacaba\n22\na\nb\nc\nd\naba\naca\nabacabadabacaba\naa\ndab\nac\nca\nba\nab\nad\nda\nabacaba\nabacaba\nabacabad\nabacabad\ndabacaba\ndabacaba\nabacabadabacabaa\n", "output": "108\n"}, {"type": "stdin_stdout", "input": "aa\n7\na\naa\naaa\naaaa\naaaaa\naaaaaa\naaaaaaa\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn n × n table a is defined as f... | [{"type": "stdin_stdout", "input": "10\n", "output": "48620"}, {"type": "stdin_stdout", "input": "9\n", "output": "12870"}, {"type": "stdin_stdout", "input": "8\n", "output": "3432"}, {"type": "stdin_stdout", "input": "6\n", "output": "252"}, {"type": "stdin_stdout", "input": "7\n", "output": "924"}, {"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\nBoboniu likes bit operations. He... | [{"type": "stdin_stdout", "input": "30 55\n194 478 207 22 344 507 374 462 107 506 317 299 326 308 459 396 330 317 138 342 126 473 423 180 41 165 435 72 53 71\n44 229 106 350 420 462 412 115 452 364 452 294 280 171 325 250 94 266 33 329 197 384 50 36 495 464 67 283 83 3 335 62 101 307 474 296 484 388 315 444 203 304 110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUh oh! Applications to tech comp... | [{"type": "stdin_stdout", "input": "100 89826\n1076 402 6 202 1196 687 966 243 1715 847 608 1446 1901 106 1622 222 865 204 1700 1001 1834 726 1158 1497 1928 1787 254 275 1788 1972 687 611 1983 1085 1876 311 1979 1845 1706 1360 528 1842 1041 1636 657 443 895 158 725 1884 13 1916 326 406 216 1040 677 620 785 1424 596 454... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and Bob are playing a game... | [{"type": "stdin_stdout", "input": "100\n591 417 888 251 792 847 685 3 182 461 102 348 555 956 771 901 712 878 580 631 342 333 285 899 525 725 537 718 929 653 84 788 104 355 624 803 253 853 201 995 536 184 65 205 540 652 549 777 248 405 677 950 431 580 600 846 328 429 134 983 526 103 500 963 400 23 276 704 570 757 410 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 legend in the IT City... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "2"}, {"type": "stdin_stdout", "input": "999999999999999999\n", "output": "1"}, {"type": "stdin_stdout", "input": "321392715309062180\n", "output": "2"}, {"type": "stdin_stdout", "input": "95451113283177888\n", "output": "2"}, {"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\nYura has been walking for some t... | [{"type": "stdin_stdout", "input": "995078784 16\n623812784 347467913 233267735 582455459\n306396207 277980472\n78770458 786182235\n815219022 611815511\n786044046 363376661\n290398527 925153345\n846155104 388600335\n91118406 155695413\n287078777 918827034\n432395923 126620751\n52941102 329010981\n237509699 743843421\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\nSnuke is standing on a two-dimen... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000\n", "output": "192151600\n"}, {"type": "stdin_stdout", "input": "799999 789898 979797 999999\n", "output": "50188529\n"}, {"type": "stdin_stdout", "input": "53245 34234 643323 948342\n", "output": "574642047\n"}, {"type": "stdin_stdout", "input": "3340... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers A, B, and N.\... | [{"type": "stdin_stdout", "input": "1000000 1000000000000 1000000000000\n", "output": "999999\n"}, {"type": "stdin_stdout", "input": "1000000 948240928204 329810943092\n", "output": "347813\n"}, {"type": "stdin_stdout", "input": "133333 329230329032 493028310923\n", "output": "133332\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrew skipped lessons on the su... | [{"type": "stdin_stdout", "input": "100\n0 1 1 1 0 0 0 2 1 2 2 1 2 2 2 0 0 2 1 2 0 1 1 0 2 0 1 2 2 0 2 0 1 0 1 2 0 2 1 1 0 1 0 1 0 0 1 2 2 2 2 1 1 1 0 2 1 0 0 0 0 0 1 0 2 0 1 0 0 2 0 2 2 1 0 2 2 0 2 0 2 1 2 1 1 1 0 2 1 0 2 1 1 2 1 2 0 1 2 2\n", "output": "36 29 38 33 35 33 34 31 28 21 21 21 17 14 17 18 21 22 23 24 24 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\nPolycarp is a frequent user of t... | [{"type": "stdin_stdout", "input": "10 20\n10 1 5 7 1 2 5 3 6 3 9 4 3 4 9 6 8 4 9 6\n", "output": "1 8\n1 7\n1 6\n1 9\n1 6\n1 8\n1 9\n1 10\n1 10\n1 10\n"}, {"type": "stdin_stdout", "input": "5 5\n1 1 4 2 2\n", "output": "1 3\n1 3\n3 4\n1 4\n5 5\n"}, {"type": "stdin_stdout", "input": "5 4\n3 5 1 4\n", "output": "1 3\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\nInna loves sweets very much. Tha... | [{"type": "stdin_stdout", "input": "10 10 10\n", "output": "30\n(1,1) (1,2) (1,3) (1,4)\n(1,1) (1,2) (1,3) (2,3)\n(1,1) (1,2) (2,2) (3,2)\n(1,1) (2,1) (3,1) (4,1)\n(1,1) (1,2) (1,3)\n(1,1) (1,2) (2,2)\n(1,1) (2,1) (3,1)\n(1,1) (1,2)\n(1,1) (2,1)\n(1,1)\n"}, {"type": "stdin_stdout", "input": "50 50 10\n", "output": "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\nThe prison of your city has n pr... | [{"type": "stdin_stdout", "input": "57 2 10\n7 5 2 7 4 1 0 5 2 9 2 9 8 6 6 5 9 6 8 1 0 1 0 3 2 6 5 2 8 8 8 8 0 9 4 3 6 6 2 4 5 1 2 0 1 7 1 1 5 4 5 0 7 5 1 9 6\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2 228885628 1\n90897004 258427916\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "11 4 2\n2 2 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA permutation of size $n$ is an ... | [{"type": "stdin_stdout", "input": "69\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "1173\n"}, {"type": "stdin_stdout", "input": "5\n-1 -1 5 -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\nA card pyramid of height $1$ is ... | [{"type": "stdin_stdout", "input": "50\n11833308\n5211498\n64660\n9077929\n2699416\n2432035\n234901\n1337830\n8457191\n10523566\n5722429\n5452712\n5511654\n8587879\n348160\n3141182\n2661936\n395300\n6950223\n2119926\n4407089\n3559060\n10228325\n5752720\n1607500\n647047\n8904557\n1954681\n698061\n9852830\n1972893\n13760... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnton's favourite geometric figu... | [{"type": "stdin_stdout", "input": "28\nOctahedron\nDodecahedron\nOctahedron\nOctahedron\nDodecahedron\nIcosahedron\nIcosahedron\nDodecahedron\nDodecahedron\nDodecahedron\nCube\nDodecahedron\nCube\nTetrahedron\nCube\nCube\nTetrahedron\nDodecahedron\nDodecahedron\nDodecahedron\nIcosahedron\nIcosahedron\nDodecahedron\nIc... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sequence a_1, a_2,... | [{"type": "stdin_stdout", "input": "10 6\n2 2 1 5 6 4 9 8 5 4\n1 2\n1 10\n2 10\n2 9\n5 5\n2 8\n", "output": "1\n1\n4\n5\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "6 5\n1 2 1 3 2 3\n4 6\n1 3\n2 5\n2 4\n1 6\n", "output": "2\n2\n3\n-1\n2\n"}, {"type": "stdin_stdout", "input": "2 5\n1 1\n1 1\n1 2\n2 2\n1 2\n1 1\n", "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\nIf the girl doesn't go to Denis,... | [{"type": "stdin_stdout", "input": "30 8\n0 1 9 10 23 24 26 30\n40 7\n", "output": "30"}, {"type": "stdin_stdout", "input": "100 5\n3 100 7 13 0\n99 5\n", "output": "191"}, {"type": "stdin_stdout", "input": "15 5\n0 3 7 14 15\n11 11\n", "output": "45"}, {"type": "stdin_stdout", "input": "15 5\n15 3 7 0 14\n11 11\n", "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\nLet $LCM(x, y)$ be the minimum p... | [{"type": "stdin_stdout", "input": "69\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\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\nMishka is trying really hard to ... | [{"type": "stdin_stdout", "input": "200\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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\nMike wants to prepare for IMO bu... | [{"type": "stdin_stdout", "input": "9 6\n-44 -29\n-11 85\n11 84\n-63 1\n75 89\n-37 61\n14 73\n78 88\n-22 -18\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2 2\n26 99\n-56 40\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "2 2\n-93 -22\n12 72\n", "output": "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\nAnastasia loves going for a walk... | [{"type": "stdin_stdout", "input": "9 13\n132 87 200 62 168 51 185 192 118\n", "output": "48\n"}, {"type": "stdin_stdout", "input": "10 1\n1 1 1 1 1 1 1 1 1 1\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "5 72\n74 10 146 189 184\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "3 57\n78 165 54\n", "ou... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.