messages listlengths 1 1 | ground_truth stringlengths 88 726k | dataset stringclasses 2
values |
|---|---|---|
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a of n po... | [{"type": "stdin_stdout", "input": "4\n3\n1 2 1\n5\n11 14 9 10 8\n5\n0 3 1 4 1\n4\n5 2 1 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n1 2 1\n5\n11 14 9 6 10\n5\n0 3 1 2 1\n4\n5 2 1 10\n", "output": "YES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n0 2 1\n5\n11 14 9 10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n sets of integers... | [{"type": "stdin_stdout", "input": "10\n2\n5 190511 174892 60413 161099 192095\n2 190511 174892\n2\n2 25224 33915\n2 33915 25224\n2\n2 102801 58269\n2 102801 58269\n2\n2 73575 66574\n2 73575 66574\n2\n2 191259 156476\n2 191259 156476\n2\n2 94903 80911\n2 94903 80911\n2\n2 134838 86551\n2 134838 86551\n2\n2 64258 10995\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a, consis... | [{"type": "stdin_stdout", "input": "28\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nBBBBAC\nABCA\nAABBAC\nCACA\nAABBAC\nCACA\n", "output": "YES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\nYES\nNO\nNO... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Baby Ehab will only cu... | [{"type": "stdin_stdout", "input": "6 3\n2 3 10 7 5 14\n1 6\n2 4\n3 5\n", "output": "\n3\n1\n2\n"}, {"type": "stdin_stdout", "input": "6 3\n2 3 10 12 5 14\n1 6\n2 4\n3 5\n", "output": "4\n2\n2\n"}, {"type": "stdin_stdout", "input": "6 3\n1 3 10 6 10 14\n1 6\n2 4\n3 5\n", "output": "4\n2\n3\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe official capital and the cul... | [{"type": "stdin_stdout", "input": "20 102\n73 79 75 27\n13 15 62 47\n74 75 85 86\n49 81 23 69\n43 17 45 27\n35 14 90 35\n51 74 35 33\n54 66 46 24\n33 76 49 3\n34 53 25 76\n69 72 76 31\n41 31 8 48\n49 48 85 24\n19 2 59 83\n19 31 51 86\n31 10 45 76\n56 47 79 86\n49 33 15 1\n77 89 26 64\n7 52 76 77\n", "output": "59201\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\nThis problem is the most boring ... | [{"type": "stdin_stdout", "input": "20 10\n12986238 12986234 12986240 12986238 12986234 12986238 12986234 12986234 12986236 12986236 12986232 12986238 12986232 12986239 12986233 18624672 12986237 12986232 12986231 12986235\n", "output": "5638449\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 "}, {"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\nSquirrel Liss is interested in s... | [{"type": "stdin_stdout", "input": "49\n10 34 58 72 126 166 176 180 198 200 208 228 238 248 302 332 340 344 350 354 380 406 418 428 438 442 482 532 536 544 546 554 596 626 642 682 684 704 714 792 804 820 862 880 906 946 954 966 970\n", "output": "49"}, {"type": "stdin_stdout", "input": "44\n1 5 37 97 107 147 185 187 19... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle penguin Polo loves his ho... | [{"type": "stdin_stdout", "input": "1000 2\n", "output": "675678679\n"}, {"type": "stdin_stdout", "input": "1000 1\n", "output": "760074701\n"}, {"type": "stdin_stdout", "input": "1000 8\n", "output": "339760446\n"}, {"type": "stdin_stdout", "input": "1000 3\n", "output": "330155123\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\nIlya the Lion wants to help all ... | [{"type": "stdin_stdout", "input": "#..##...#.\n7\n5 9\n6 10\n1 7\n2 10\n2 5\n2 10\n3 4\n", "output": "2\n2\n3\n4\n2\n4\n0\n"}, {"type": "stdin_stdout", "input": "#..##...#.\n7\n5 9\n6 10\n1 7\n2 10\n3 5\n2 10\n3 4\n", "output": "2\n2\n3\n4\n1\n4\n0\n"}, {"type": "stdin_stdout", "input": "#..##...#/\n7\n5 9\n6 10\n1 7\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call an undirected graph o... | [{"type": "stdin_stdout", "input": "5\n24 228\n24 228\n24 228\n24 228\n24 228\n", "output": "1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n1 10\n1 11\n1 12\n1 13\n1 14\n1 15\n1 16\n1 17\n1 18\n1 19\n1 20\n1 21\n1 22\n1 23\n1 24\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n2 10\n2 11\n2 12\n2 13\n2 14\n2 15\n2 16\n2 17\n2 18\n2 19\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\nVolodya has recently visited a v... | [{"type": "stdin_stdout", "input": "20\n", "output": "0 3 4 6 9 14 22 31 40 54 75 96 129 153 183 213 259 317 375 414\n3 0 5 7 10 15 23 32 41 55 76 97 130 154 184 214 260 318 376 415\n4 5 0 8 11 16 24 33 42 56 77 98 131 155 185 215 261 319 377 416\n6 7 8 0 13 18 26 35 44 58 79 100 133 157 187 217 263 321 379 418\n9 10 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\nMole is hungry again. He found o... | [{"type": "stdin_stdout", "input": "5\n1 3 2 4 2\n4\n1 5\n2 5\n3 5\n4 5\n", "output": "4\n4\n1\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 5 2 4 2\n4\n1 5\n2 5\n3 5\n4 5\n", "output": "4\n4\n1\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 3 4 4 2\n4\n1 5\n2 5\n3 5\n4 5\n", "output": "4\n4\n2\n1\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Polycarp published a fun... | [{"type": "stdin_stdout", "input": "10\nkkuLGEiHv reposted POLYcArp\n3oX1AoUqyw1eR3nCADY9hLwd reposted kkuLGeIHV\nwf97dqq5bx1dPIchCoT reposted 3OX1AOuQYW1eR3ncAdY9hLwD\nWANr8h reposted Wf97dQQ5bx1dpIcHcoT\n3Fb736lkljZK2LtSbfL reposted wANR8h\n6nq9xLOn reposted 3fB736lKlJZk2LtSbFL\nWL reposted 3Fb736lKLjZk2LTSbfl\ndvxn4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n cities in Westeros. ... | [{"type": "stdin_stdout", "input": "4 4\n391529 1208360 830662 659313\n", "output": "Daenerys\n"}, {"type": "stdin_stdout", "input": "4 4\n194368 347108 1051701 497749\n", "output": "Daenerys\n"}, {"type": "stdin_stdout", "input": "4 4\n391529 1208360 830662 467257\n", "output": "Daenerys\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\nFor the given sequence with n di... | [{"type": "stdin_stdout", "input": "100 7\n1\n2\n3\n4\n5\n6\n7\n8\n9\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\nRoger is a robot. He has an arm ... | [{"type": "stdin_stdout", "input": "50 50\n1 41 261\n2 47 324\n1 41 256\n1 31 339\n2 23 116\n2 44 184\n2 32 115\n1 40 301\n2 40 303\n1 29 309\n2 49 348\n2 47 356\n1 41 263\n2 42 276\n1 45 135\n1 33 226\n2 31 166\n1 50 171\n2 47 166\n2 50 146\n2 25 324\n2 48 307\n2 41 176\n1 50 353\n1 45 323\n2 50 343\n1 47 200\n2 48 26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe zombies are gathering in the... | [{"type": "stdin_stdout", "input": "10\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0000000000\n0012100000\n0024200000\n0012100000\n0000000000\n", "output": "Yes"}, {"type": "stdin_stdout", "input": "10\n0000000000\n0122210000\n0244420100\n0122210000\n0000000001\n0000000000\n0000000000\n0000000000\n0000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Nastya has a hobby, she l... | [{"type": "stdin_stdout", "input": "aaaaaaaadbaaabbbbbddaaabdadbbbbbdbbabbbabaabdbbdababbbddddbdaabbddbbbbabbbbbabadaadabaaaadbbabbbaddb\naaaaaaaaaaaaaa\n61 91 5 43 53 81 7 96 6 9 34 78 79 12 8 63 22 76 18 46 41 56 3 20 57 21 75 73 100 94 35 69 32 4 70 95 88 44 68 10 71 98 23 89 36 62 28 51 24 30 74 55 27 80 38 48 93 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\nIvan had string s consisting of ... | [{"type": "stdin_stdout", "input": "18\nabacab 2 329 401\nabadabacabae 1 293\nbacab 1 2\nabacabadabacabaga 1 433\nc 1 76\nbaca 1 26\ndab 1 72\nabagabaca 1 445\nabaea 1 397\ndabac 1 280\nab 2 201 309\nca 1 396\nabacabadab 1 497\nac 1 813\ncaba 1 444\nad 1 167\nbadab 1 358\naba 1 421\n", "output": "abacabaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhere do odds begin, and where d... | [{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem.\... | [{"type": "stdin_stdout", "input": "128\n0 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 87 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 89 90 91 92 93 94 95 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\nWhat are you doing at the end of... | [{"type": "stdin_stdout", "input": "10\n100000 873326525630182716\n100000 620513733919162415\n100000 482953375281256917\n100000 485328193417229962\n100000 353549227094721271\n100000 367447590857326107\n100000 627193846053528323\n100000 243833127760837417\n100000 287297493528203749\n100000 70867563577617188\n", "output"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs we all know, Max is the best ... | [{"type": "stdin_stdout", "input": "100 1\n92 93 p\n", "output": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\"We've tried solitary confineme... | [{"type": "stdin_stdout", "input": "98\n-99 -98 -95 -90 97 93 96 95 98 98 -94 -92 -99 -92 -91 -87 -83 -84 -87 -88 -90 -79 -79 -82 -77 -76 92 82 91 91 90 91 -69 -72 -65 -68 -65 -58 -59 -63 -56 -57 -59 -53 -55 -45 -51 -52 73 81 75 71 77 72 67 70 60 70 61 64 -34 -41 -41 -41 -37 -39 -36 -33 -36 -36 -33 -36 54 49 53 51 50 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves football very much. ... | [{"type": "stdin_stdout", "input": "1111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111111\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\n", "output": "YES\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 locked in a room with a ... | [{"type": "stdin_stdout", "input": "10 10\n1 2 3 4 5 6 7 8 9 0\n4 5 6 7 1 2 3 0 9 8\n", "output": "1 2 3 4 5 6 7 8 9 0\n"}, {"type": "stdin_stdout", "input": "10 6\n7 1 2 3 8 0 6 4 5 9\n1 5 8 2 3 6\n", "output": "1 2 3 8 6 5\n"}, {"type": "stdin_stdout", "input": "10 5\n3 7 1 2 4 6 9 0 5 8\n4 3 1 7 9\n", "output": "3 7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTired of playing Counter strike ... | [{"type": "stdin_stdout", "input": "-1 1 24\n\nBLMPSE", "output": "3055532591962383602987227818232998762632568116174555366893504593366676447967190098512548525977684438129178355333844915579515788526047825683253459725914819430492603739367407053309118089423532599518418471268454517780826915117095265098025972721477353954422... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMilly is at the examination hall... | [{"type": "stdin_stdout", "input": "1000 1000\n3181 31998 4632 1363 7992 5436 19660 27448 19149 7410 12169 2465 32499 10397 4460 23944 32202 1713 2220 24475 27484 24795 5837 20379 31605 649 25878 20226 12725 26796 9542 3816 26595 32444 27267 5415 3716 11517 3731 23742 23468 7170 30542 21875 23573 20847 20563 1725 6766 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 witch of magic-land captured t... | [{"type": "stdin_stdout", "input": "100\n42 688467 12000006334\n26501 689169 12000015724\n11479 699358 12000026962\n24465 675705 12000028145\n23282 686827 12000009961\n492 672995 12000011942\n4828 675436 12000032391\n14605 673902 12000000153\n293 682382 12000017421\n18717 689718 12000019895\n5448 691726 12000014771\n11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 standing on a two-d... | [{"type": "stdin_stdout", "input": "1329", "output": "120\n"}, {"type": "stdin_stdout", "input": "1162", "output": "180\n"}, {"type": "stdin_stdout", "input": "1369", "output": "360\n"}, {"type": "stdin_stdout", "input": "1527", "output": "120\n"}, {"type": "stdin_stdout", "input": "1874", "output": "180\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\nTakahashi is a teacher responsib... | [{"type": "stdin_stdout", "input": "8\n8 2 7 3 5 4 6 1", "output": "8 2 4 6 5 7 3 1 \n"}, {"type": "stdin_stdout", "input": "8\n8 2 7 3 4 5 6 1", "output": "8 2 4 5 6 7 3 1"}, {"type": "stdin_stdout", "input": "5\n2 1 3 4 5", "output": "2 1 3 4 5 \n"}, {"type": "stdin_stdout", "input": "5\n2 1 3 4 5", "output": "2 1 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\nThere is an infinitely large pon... | [{"type": "stdin_stdout", "input": "11\n0 -4 0 -99 107 13 -43 -39 207 37 0", "output": "271\n"}, {"type": "stdin_stdout", "input": "11\n0 -4 0 -99 31 14 -26 -39 115 29 0", "output": "140\n"}, {"type": "stdin_stdout", "input": "11\n0 -4 0 -99 31 14 -26 -39 115 27 0", "output": "138\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\nE869120's and square1001's 16-th... | [{"type": "stdin_stdout", "input": "-2 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "-3 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "-6 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "-4 -1", "output": "Yay!\n"}, {"type": "stdin_stdout", "input": "5 -1", "output": "Yay!\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 balance scale tips to the left... | [{"type": "stdin_stdout", "input": "0 8 7 1", "output": "Balanced\n"}, {"type": "stdin_stdout", "input": "4 3 5 2", "output": "Balanced\n"}, {"type": "stdin_stdout", "input": "8 3 8 3", "output": "Balanced\n"}, {"type": "stdin_stdout", "input": "3 4 5 2", "output": "Balanced"}, {"type": "stdin_stdout", "input": "12 6 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAtCoDeer the deer has N square t... | [{"type": "stdin_stdout", "input": "8\n0 0 0 0\n0 0 1 1\n0 1 0 1\n0 1 1 0\n1 0 0 1\n1 0 1 0\n1 1 0 0\n1 1 1 1", "output": "144"}, {"type": "stdin_stdout", "input": "8\n0 0 1 0\n0 0 1 1\n1 1 0 1\n1 1 1 0\n1 0 0 1\n1 0 1 0\n1 1 -1 1\n1 1 1 1", "output": "16"}, {"type": "stdin_stdout", "input": "8\n0 0 -1 0\n0 0 1 0\n0 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\nIf you draw a few infinitely lon... | [{"type": "stdin_stdout", "input": "1\n705", "output": "2\n248866\n"}, {"type": "stdin_stdout", "input": "1\n506", "output": "2\n128272\n"}, {"type": "stdin_stdout", "input": "1\n154", "output": "2\n11936\n"}, {"type": "stdin_stdout", "input": "1\n238", "output": "2\n28442\n"}, {"type": "stdin_stdout", "input": "1\n373... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\"Search\" is an operation to ob... | [{"type": "stdin_stdout", "input": "7\n11\n15\n-2\n53\n51\n17\n109\n42\n4\n1\n2\n3\n10\n-1\n0", "output": "3\n2\n"}, {"type": "stdin_stdout", "input": "7\n11\n15\n-2\n53\n51\n17\n109\n42\n4\n1\n2\n3\n10\n-2\n0", "output": "3\n2\n"}, {"type": "stdin_stdout", "input": "7\n11\n15\n-2\n53\n51\n17\n109\n42\n4\n2\n2\n3\n10\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is \"7 rows\" in the game ... | [{"type": "stdin_stdout", "input": "5\n1 2 3 4 5 6\n1 3 5 6 8 4\n1 2 3 4 6 8\n1 2 3 5 10 11\n1 3 3 6 9 11", "output": "yes\nyes\nyes\nyes\nno\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5 10\n1 3 5 6 12 3\n1 2 3 4 6 8\n1 2 4 5 10 11\n1 4 2 6 9 5", "output": "no\nno\nyes\nyes\nyes\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJOI Park\n\nIn preparation for t... | [{"type": "stdin_stdout", "input": "5 0 2\n-1 1 1\n0 2 4\n1 2 2\n2 2 4\n3 10 5", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 0 2\n-1 2 1\n0 2 4\n1 2 2\n2 2 4\n3 10 5", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 5 2\n2 3 1\n3 1 2\n1 4 3\n1 2 4\n2 5 5", "output": "11\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\nThere are cubes of the same size... | [{"type": "stdin_stdout", "input": "3\n1 3\n2 0\n0 0\n8\n4 1\n3 1\n1 2\n0 0\n19\n2 2\n3 1\n4 0\n3 4\n1 1\n0 0\n0", "output": "1\n2\nend\n1\n1\n1\n1\n1\n1\n2\nend\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n2\nend\n"}, {"type": "stdin_stdout", "input": "3\n1 3\n2 0\n0 0\n8\n4 1\n3 1\n1 2\n0 0\n19\n2 2\n2 1\n4 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\nGilbert is the network admin of ... | [{"type": "stdin_stdout", "input": "4\n 0 2 2 2\n 2 0 2 2\n 2 2 -1 2\n 2 2 2 0\n4\n -1 2 4 4\n 2 -1 4 4\n 4 4 -1 2\n 4 4 2 0\n2\n 0 12\n 12 0\n0", "output": "4\n2 3 3\n2 2 2 2 2 2 2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "4\n -1 2 2 2\n 2 0 2 2\n 2 2 -1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFolding a Ribbon\n\nThink of rep... | [{"type": "stdin_stdout", "input": "4 3 2\n30 578 1954\n59 471605241352156968 431565444592236940\n0 0 0", "output": "LRRR\nLLLLLRLLRLLLLLLLLLLRRRRLRLLLLL\nLRRRLRRLLRRRRLLLLRLLRRRLRRLLRLLLLLLRLRLLRLRLLLRLRLLRLLRRRLL\n"}, {"type": "stdin_stdout", "input": "4 3 2\n20 578 1954\n59 471605241352156968 431565444592236940\n0 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\nThe fearless Ikta has finally hu... | [{"type": "stdin_stdout", "input": "1 3 1000 1000 1 0 0 4", "output": "1047197552288\n"}, {"type": "stdin_stdout", "input": "1 2 1000 1000 1 0 0 4", "output": "1570796325024\n"}, {"type": "stdin_stdout", "input": "1 3 1000 1000 0 0 0 4", "output": "1047197542296\n"}, {"type": "stdin_stdout", "input": "1 3 1001 1000 1 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\nB: Nakajima, let's do that! --Ma... | [{"type": "stdin_stdout", "input": "5 1\n2 3", "output": "NAKAJIMA\n"}, {"type": "stdin_stdout", "input": "3 1\n1 0", "output": "NAKAJIMA\n"}, {"type": "stdin_stdout", "input": "2 1\n1 2", "output": "NAKAJIMA\n"}, {"type": "stdin_stdout", "input": "3 2\n1 0", "output": "NAKAJIMA\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\nProblem\n\nThere is a grid of $ ... | [{"type": "stdin_stdout", "input": "421 435 361 230 182 16", "output": "196 792283366\n"}, {"type": "stdin_stdout", "input": "421 547 377 188 235 13", "output": "156 501147202\n"}, {"type": "stdin_stdout", "input": "421 435 196 169 388 12", "output": "46 766230083\n"}, {"type": "stdin_stdout", "input": "421 435 196 169... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 given a... | [{"type": "stdin_stdout", "input": "1\nhhmkl\n-15", "output": "hhmkl\n"}, {"type": "stdin_stdout", "input": "1\nhhlkl\n-15", "output": "hhlkl\n"}, {"type": "stdin_stdout", "input": "1\nfknlg\n-1", "output": "lgnkf\n"}, {"type": "stdin_stdout", "input": "1\nglnkf\n-1", "output": "kfnlg\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\nYou are given a rectangular para... | [{"type": "stdin_stdout", "input": "10\n9 6 8\n5 5 2\n8 9 2\n2 7 9\n6 4 10\n1 1 5\n2 15 1\n10 2 3\n12 5 4\n17 6 4\n", "output": "41\n6\n21\n12\n39\n2\n8\n14\n30\n22\n"}, {"type": "stdin_stdout", "input": "10\n9 6 8\n5 5 2\n8 9 2\n2 7 9\n6 4 10\n1 1 5\n2 8 1\n10 2 3\n12 5 4\n17 5 4\n", "output": "41\n6\n21\n12\n39\n2\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\nVasya owns a cornfield which can... | [{"type": "stdin_stdout", "input": "9 3\n100\n0 0\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n0 7\n0 8\n0 9\n1 0\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n2 0\n2 1\n2 2\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n3 0\n3 1\n3 2\n3 3\n3 4\n3 5\n3 6\n3 7\n3 8\n3 9\n4 0\n4 1\n4 2\n4 3\n4 4\n4 5\n4 6\n4 7\n4 8\n4 9\n5 0\n5 1\n5 2\n5 3\n5 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\nOn a chessboard with a width of ... | [{"type": "stdin_stdout", "input": "1000000000000000000\n1000000000000000010 1000000000000000000\n", "output": "black\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n1100000000000000010 1000000000000000000\n", "output": "black\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n1100000000000001010... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a captain of a ship. Initial... | [{"type": "stdin_stdout", "input": "0 0\n1000000000 1000000000\n2\nDR\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "0 0\n1000000010 1000000000\n2\nDR\n", "output": "2000000010\n"}, {"type": "stdin_stdout", "input": "1 0\n1010000000 1000000000\n2\nDR\n", "output": "2010000000\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently Lynyrd and Skynyrd went... | [{"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 2 3 1 2 3\n1 5\n2 6\n3 5\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 2 3 1 2 3\n1 6\n2 6\n3 5\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 2 3 2 2 3\n1 5\n2 6\n3 5\n", "output": "100\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring a normal walk in the fore... | [{"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\nUjan has a lot of numbers in his... | [{"type": "stdin_stdout", "input": "5\n10 -251 650 475 -114 364 -75754 -982 -532 -151 -484\n10 -623 -132 -317561 -438 20 -275 -323 -530089 -311 -587\n10 450900 -519 903 -401 -789 -606529 277 -267 -682 -161\n10 -246 873 -641 838 719 234 789 -74 -287288 -772972\n10 186 741 -927 -866 -855 578 -1057019 202 162962 -458\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\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\nReturning back to problem solvin... | [{"type": "stdin_stdout", "input": "24 17\ngdnaevfczjayllndr\nwmuarvqwpbhuznpxz\nlurusjuzrkxmdvfhw\nyckftntrvdatssgbb\nzxpnzuhbpwqvraumw\nwaxuutbtbtbtuuxaw\ndgwjcwilgyrgpohnr\ntrcttthipihtttcrt\ncmbovzvfgdqlfkfqp\nqbgqnzkhixnnvzvqi\nqiursxnedmveeuxdq\nrdnllyajzcfveandg\nbzwxilleapxzcxmde\ncxcfjzlfdtytldtqf\nyhukzlipwdu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has a string s consistin... | [{"type": "stdin_stdout", "input": "9\n8 6\nchefspam\n11 7\nmonkeyeight\n8 1\nvcubingx\n6 1\namazed\n4 4\nhecs\n8 1\narolaliv\n9 7\nhiuavidhd\n33 17\ngosubtovcubingxheneedssubscribers\n7 4\nhiimbad\n", "output": "m\nm\nbcginuvx\naademz\ns\naaillorv\ni\nn\nh\n"}, {"type": "stdin_stdout", "input": "9\n8 6\nchefspam\n11 7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLee is going to fashionably deco... | [{"type": "stdin_stdout", "input": "4\n3\n4\n12\n1000000000\n", "output": "NO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n4\n12\n1010000000\n", "output": "NO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3\n4\n12\n1110000000\n", "output": "NO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 battling Shikamaru, Tayuya... | [{"type": "stdin_stdout", "input": "58260522 32004256 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 488012525 1035611341 800305059 992325267 138720156\n", "output": "837678839\n"}, {"type": "stdin_stdout", "input": "58260522 32004256 2436426 24979445 12477970 11891566\n10\n58... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 play ping-pong wit... | [{"type": "stdin_stdout", "input": "12\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n", "output": "0 1\n1 1\n0 7\n0 1\n1 1\n0 7\n0 1\n1 1\n0 7\n0 1\n1 1\n0 7\n"}, {"type": "stdin_stdout", "input": "2\n1000100 1110000\n1100000 6\n", "output": "1000099 1110000\n1099999 6\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\nYou are given the strings a and ... | [{"type": "stdin_stdout", "input": "5\na\na\nabcd\nbc\nhello\ncodeforces\nhello\nhelo\ndhjakjsnasjhfksafasd\nadjsnasjhfksvdafdser\n", "output": "\n0\n2\n13\n3\n20\n"}, {"type": "stdin_stdout", "input": "5\na\na\nabcc\nbc\nhello\ncodeforces\nhello\nhelo\ndhjakjsnasjhfksafasd\nadjsnasjhfksvdafdser\n", "output": "0\n2\n13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Vasya went out for a wal... | [{"type": "stdin_stdout", "input": "1000 2000\n226 566\n20\n0 -100\n-100 100\n100 0\n42 0\n-100 -79\n-66 -16\n0 -7\n-1 0\n0 100\n100 91\n99 0\n1 0\n-100 0\n70 -100\n-100 100\n100 1\n66 0\n-100 1\n-47 -100\n-42 0\n", "output": "708\n"}, {"type": "stdin_stdout", "input": "1010 2000\n226 566\n20\n0 -100\n-100 100\n100 0\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem you have to impl... | [{"type": "stdin_stdout", "input": "200 10\n17 110 31 67 40 144 57 90 186 25 112 3 14 12 193 159 26 165\n4 91 1 30 62\n11 64 94 60 49 176 172 54 106 68 51 22\n4 131 114 2 15\n33 58 83 164 190 5 21 17 19 181 46 7 140 29 132 147 6 28 192 27 39 196 101 10 53 156 23 98 48 195 88 126 170 55\n2 81 4\n10 13 16 32 78 119 69 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 not particularly beautiful e... | [{"type": "stdin_stdout", "input": "10 60\n6 7\n2 4\n3 6\n1 4\n8 7\n2 8\n5 7\n6 4\n5 10\n1 7\n3 9\n3 4\n9 2\n7 1\n3 8\n10 7\n9 7\n9 1\n5 5\n4 7\n5 8\n4 2\n2 2\n9 4\n3 3\n7 5\n7 4\n7 7\n8 2\n8 1\n4 5\n1 10\n9 6\n3 1\n1 3\n3 2\n10 10\n4 6\n5 4\n7 3\n10 1\n3 7\n5 1\n10 9\n4 10\n6 10\n7 10\n5 9\n5 6\n1 2\n7 8\n3 5\n9 8\n9 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya likes numbers a lot... | [{"type": "stdin_stdout", "input": "30\n285 214 1 421 145 3 52 54 62 24 2 245 2 28 8 2 2 20 2 0 3333 171 172 173 174 175 176 666 219 30\n", "output": " 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA car moves from point A to poin... | [{"type": "stdin_stdout", "input": "1001 999 1000 1000 1000\n", "output": "1.00100000\n"}, {"type": "stdin_stdout", "input": "29 12 569 939 259\n", "output": "0.0509666080844\n"}, {"type": "stdin_stdout", "input": "714 474 124 205 491\n", "output": "5.75806451613\n"}, {"type": "stdin_stdout", "input": "772 467 142 356 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is so boring in the summer ho... | [{"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 555489806 1596475927 1262387014 1000000000\n", "output": "Alice\n"}, {"type": "stdin_stdout", "input": "10\n100000000 200000000 300000000 400000000 500000000 600000000 555489806 1596475927 1262387014 1000000100\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\nInnocentius has a problem β his ... | [{"type": "stdin_stdout", "input": "8 16\n................\n................\n................\n................\n............w...\n................\n................\n..............w.\n", "output": "................\n................\n................\n................\n...........+w++.\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\nImagine you have an infinite 2D ... | [{"type": "stdin_stdout", "input": "34714265\n", "output": "196373536\n"}, {"type": "stdin_stdout", "input": "31975828\n", "output": "180882596\n"}, {"type": "stdin_stdout", "input": "39099999\n", "output": "221182992\n"}, {"type": "stdin_stdout", "input": "39999996\n", "output": "226274144\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\nBimokh is Mashmokh's boss. For t... | [{"type": "stdin_stdout", "input": "10 1 100000000\n999999999 1634812359 999999999 999999999 129546129 999999999 999999999 999999999 1815265208 999999999\n", "output": "99999999 34812359 99999999 99999999 29546129 99999999 99999999 99999999 15265208 99999999\n"}, {"type": "stdin_stdout", "input": "10 1 100000000\n99999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPaul hates palindromes. He assum... | [{"type": "stdin_stdout", "input": "333 9\nedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedce... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nGennady is one of the best child... | [{"type": "stdin_stdout", "input": "10\n9 8 8\n2 9 33\n10 7 42\n7 2 18\n3 5 82\n9 9 25\n3 2 86\n1 5 49\n5 3 72\n4 4 71\n", "output": "10\n1 2 3 4 5 6 7 8 9 10 "}, {"type": "stdin_stdout", "input": "10\n9 8 8\n2 9 33\n10 7 42\n7 2 18\n3 4 82\n9 9 25\n3 2 86\n1 5 49\n5 3 72\n4 4 71\n", "output": "10\n1 2 3 4 5 6 7 8 9 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\nGenos recently installed the gam... | [{"type": "stdin_stdout", "input": "50\n22 19 14 22 20 11 16 28 23 15 3 23 6 16 30 15 15 10 43 28 19 19 22 30 28 1 27 12 12 14 17 30 17 26 21 26 27 1 11 23 9 30 18 19 17 29 11 20 29 24\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "50\n22 19 14 22 20 11 16 28 38 15 3 23 6 16 30 15 15 10 43 28 19 19 22 30 28 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBtoh yuo adn yuor roomatme lhoat... | [{"type": "stdin_stdout", "input": "16\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n0 1 2 3 4 5 6 7 8 9 10 11 13 13 14 15\n", "output": "1.00000\n"}, {"type": "stdin_stdout", "input": "16\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n", "output": "1.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\nLet A = {a1, a2, ..., an} be any... | [{"type": "stdin_stdout", "input": "130 32\n72 56 81 71 45 17 65 13 87 22 17 75 72 80 68 76 62 35 14 53 49 72 19 55 10 57 28 35 66 59 45 24 37 65 46 31 34 1 30 12 37 13 40 41 39 6 31 28 30 0 2 7 23 32 0 34 21 0 23 3 18 33 7 6 20 19 21 10 27 28 19 23 5 15 22 13 14 1 3 14 0 5 1 14 0 0 7 11 10 1 1 1 6 5 3 3 0 1 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\nYou are given n integers a1, a2,... | [{"type": "stdin_stdout", "input": "100\n3 6 12 1 16 4 9 5 4 4 5 8 12 4 6 14 5 1 2 2 2 1 7 1 9 10 1 13 7 8 3 11 8 11 7 5 15 6 14 10 4 2 10 9 1 8 14 10 5 11 3 4 1 12 6 14 13 4 8 5 4 13 13 1 3 9 14 7 14 10 7 3 12 8 9 8 6 15 9 10 12 14 15 4 16 8 8 4 8 7 5 10 16 4 10 13 6 16 16 5\n", "output": "536\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are k sensors located in t... | [{"type": "stdin_stdout", "input": "11 17 10\n1 8\n1 7\n2 3\n3 2\n4 8\n5 3\n2 15\n8 6\n6 3\n3 1\n", "output": "-1\n109\n-1\n-1\n26\n71\n-1\n74\n-1\n69\n"}, {"type": "stdin_stdout", "input": "10 17 10\n1 8\n1 7\n2 3\n7 2\n4 8\n10 3\n2 8\n8 6\n6 3\n3 1\n", "output": "-1\n41\n-1\n-1\n76\n-1\n42\n28\n-1\n103\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 tram in Berland goes along a... | [{"type": "stdin_stdout", "input": "1000 812 976\n230 1000\n1006 -1\n", "output": "164000\n"}, {"type": "stdin_stdout", "input": "1000 394 798\n155 1242\n954 -1\n", "output": "271560\n"}, {"type": "stdin_stdout", "input": "1000 812 976\n230 1000\n696 -1\n", "output": "164000\n"}, {"type": "stdin_stdout", "input": "1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIgor the analyst fell asleep on ... | [{"type": "stdin_stdout", "input": "4\n17501 63318 51967 74514\n1305 84026 135736 -78504\n41159 81000 -44104 -42722\n31063 65435 25578 33487\n18330 79949 83467 -74531\n", "output": "0.15181873510135294\n"}, {"type": "stdin_stdout", "input": "4\n17501 63318 51967 74514\n1305 84026 135736 -78504\n41159 81000 -44104 -4272... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 all know the problem about th... | [{"type": "stdin_stdout", "input": "101\n", "output": "aaffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhllppt\nbbggkkoosswwaaeeiimmqquuyyccggkkoosswwaaeeiimmqquuyyccggkkoosswwaaeeiimmqquuyyccggkkoosswwaaeeiimmqqt\ncddhhllppttxxbbffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhll... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a small but very proud high s... | [{"type": "stdin_stdout", "input": "1000 1000 1000 1000 1000 1000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000 1001 1000 1000 1000 1000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1000 1001 1000 0000 1000 1000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1000 1000 1000 999 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 preferred way to generate us... | [{"type": "stdin_stdout", "input": "asdfghjkli ware\n", "output": "asdfghjkliw\n"}, {"type": "stdin_stdout", "input": "asdfghkkli ware\n", "output": "asdfghkkliw\n"}, {"type": "stdin_stdout", "input": "ilkkhgfdsa ware\n", "output": "ilkkhgfdsaw\n"}, {"type": "stdin_stdout", "input": "aaaaaaaaaz york\n", "output": "aaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYoung Teodor enjoys drawing. His... | [{"type": "stdin_stdout", "input": "43 1319\n750 1030\n857 946\n941 1203\n407 1034\n1052 1290\n546 585\n630 1201\n133 342\n693 1315\n34 719\n176 1097\n39 931\n198 885\n3 1025\n892 1054\n461 1287\n195 1273\n832 1039\n308 955\n642 866\n770 838\n440 777\n289 948\n98 814\n458 768\n82 265\n300 596\n182 706\n368 1225\n237 62... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Rebel fleet is on the run. I... | [{"type": "stdin_stdout", "input": "30\n(89+76)/87\n(81+78)/18\n(60+97)/32\n(41+14)/48\n(55+65)/27\n(29+15)/95\n(64+13)/96\n(78+30)/75\n(43+6)/60\n(69+34)/48\n(62+2)/97\n(85+42)/3\n(4+97)/42\n(1+18)/39\n(46+55)/76\n(22+59)/24\n(62+81)/98\n(64+8)/51\n(9+59)/48\n(47+2)/80\n(33+74)/76\n(61+83)/44\n(86+4)/51\n(65+41)/49\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 several queries. E... | [{"type": "stdin_stdout", "input": "11\n1 1000000000000000000 10000000\n2 999 9\n2 999 333111\n0 15 14\n17 128 2\n13 311992186885373952 18\n1971402979058461 97576870171850009 100\n14 19 23\n3 21914624432020321 23\n0 21914624432020321 46\n3 21914624432020321 47\n", "output": "Finite\nInfinite\nFinite\nFinite\nFinite\nFi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRahul has recently been obsessed... | [{"type": "stdin_stdout", "input": "1000\n1838622\n999998\n999997\n999996\n999995\n999994\n999993\n999992\n999991\n999990\n999989\n999988\n999987\n999986\n999985\n999984\n231374\n999982\n999981\n999980\n999979\n999978\n999977\n602335\n999975\n999974\n999973\n999972\n999971\n999970\n999969\n999968\n1152163\n999966\n9999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMilly and her classmates are sta... | [{"type": "stdin_stdout", "input": "3\n4\n2 4 5 7\n1\n1 2 4\n3\n4 6 0\n\nSAMPLE", "output": "-1 -1\n-1 -1\n-1 -1\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 4 5 7\n1\n1 2 4\n3\n4 6 0\n\nSALPLE", "output": "-1 -1\n-1 -1\n-1 -1\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 4 1 7\n3\n1 2 4\n3\n2 3 1\n\nELPMAS", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have been given an integer a... | [{"type": "stdin_stdout", "input": "5 10\n1 2 3 2 9\n\nSEMPLA", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5 9\n2 2 5 4 10\n\nSAMPLE", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5 10\n1 4 3 1 6\n\nSAMPLE", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5 10\n1 2 3 1 7\n\nELPBMS", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Ashish got a lot of strin... | [{"type": "stdin_stdout", "input": "7\naaaaaabbbbbbfgggggdddjjjdjddaaabdggzzzzyyy\nzzzzzzzzzaaaaaaaaaaaabbbbbbbbbbccddppqqrrsstt\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbc\nppqqrrssttuuvvwwxxyyzzaabbccddeeffgghhiijjkkll\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWalter White is on a tour to sel... | [{"type": "stdin_stdout", "input": "3\ndelhi\nbengaluru\nhyderabad\n-1 10 20\n10 -1 55\n20 55 1\n4\nbengaluru\ndelhi\nhyderabad\nbengaluru\n\nSALPME", "output": "95\n"}, {"type": "stdin_stdout", "input": "3\ndelhi\nbengaluru\nhyderabad\n-2 10 37\n10 0 55\n20 56 -1\n2\nbengaluru\ndelhi\nhyderabad\nbengaluru\n\nSALPME", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is a string S consisting o... | [{"type": "stdin_stdout", "input": "14702977823887", "output": "1\n"}, {"type": "stdin_stdout", "input": "11496323319863", "output": "0\n"}, {"type": "stdin_stdout", "input": "17016148553660", "output": "2\n"}, {"type": "stdin_stdout", "input": "28902087906084", "output": "4\n"}, {"type": "stdin_stdout", "input": "3054... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 organizing a party.... | [{"type": "stdin_stdout", "input": "110000 99999", "output": "10999890000\n"}, {"type": "stdin_stdout", "input": "110001 118998", "output": "4363299666\n"}, {"type": "stdin_stdout", "input": "110000 138162", "output": "7598910000\n"}, {"type": "stdin_stdout", "input": "110000 121574", "output": "6686570000\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\nHearing that energy drinks incre... | [{"type": "stdin_stdout", "input": "1 100000\n1000000100 100000", "output": "100000010000000\n"}, {"type": "stdin_stdout", "input": "1 100000\n1000000110 100010", "output": "100000011000000\n"}, {"type": "stdin_stdout", "input": "1 100000\n1000000101 100000", "output": "100000010100000\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOur world is one-dimensional, an... | [{"type": "stdin_stdout", "input": "4 2 -48 -1\n-20 -102 -91 -23\n-22 75", "output": "War\n"}, {"type": "stdin_stdout", "input": "4 2 -55 -1\n-20 -14 -35 -146\n-22 75", "output": "War\n"}, {"type": "stdin_stdout", "input": "4 -1 -55 -1\n-61 -6 -35 -150\n-22 75", "output": "War\n"}, {"type": "stdin_stdout", "input": "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\nSnuke built an online judge to h... | [{"type": "stdin_stdout", "input": "ACABA", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ACBAA", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ACAAA", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "AAACA", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "AAAC@", "output": "Yes\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\nIroha loves Haiku. Haiku is a sh... | [{"type": "stdin_stdout", "input": "13 4 -2", "output": "NO\n"}, {"type": "stdin_stdout", "input": "13 4 -1", "output": "NO\n"}, {"type": "stdin_stdout", "input": "20 4 -1", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-1 -1 3", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-1 -1 5", "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\nThere are league games and tourn... | [{"type": "stdin_stdout", "input": "4\nJapan 1 0 2\nEgypt 1 3 -1\nCanada 0 2 1\nSpain 1 0 1\n3\nJndia -1 2 0\nPoland 1 1 1\nItalx 1 -1 1\n0", "output": "Japan,5\nSpain,4\nEgypt,2\nCanada,1\n\nPoland,4\nItalx,4\nJndia,-3\n"}, {"type": "stdin_stdout", "input": "4\nnapaJ 1 0 0\nEgzpt 0 2 -1\naDaadn 0 2 3\nnibpS 2 0 0\n3\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\nTaro made a sugoroku so that eve... | [{"type": "stdin_stdout", "input": "3\n3\n-1\n1\n-1\n3\n0\n4\n2\n0\n-6\n4\n2\n-1\n-7\n0", "output": "OK\nOK\nOK\nOK\n"}, {"type": "stdin_stdout", "input": "3\n3\n0\n1\n-1\n3\n0\n4\n2\n0\n-6\n4\n2\n-1\n-8\n0", "output": "OK\nOK\nOK\nOK\n"}, {"type": "stdin_stdout", "input": "3\n3\n0\n1\n-1\n3\n0\n4\n2\n0\n-6\n4\n2\n-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\nproblem\n\nTaro often shop at JO... | [{"type": "stdin_stdout", "input": "380\n-48\n0", "output": "4\n10\n"}, {"type": "stdin_stdout", "input": "380\n10\n0", "output": "4\n10\n"}, {"type": "stdin_stdout", "input": "380\n12\n0", "output": "4\n13\n"}, {"type": "stdin_stdout", "input": "380\n16\n0", "output": "4\n13\n"}, {"type": "stdin_stdout", "input": "380... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a laboratory, an assistant, N... | [{"type": "stdin_stdout", "input": "2 2\n! 2 2 1\n? 0 2\n3 2\n! 2 2 1\n? 2 1\n4 7\n! 1 2 101\n? 2 3\n! 2 2 100\n? 2 4\n? 2 3\n! 3 3 150\n? 4 1\n0 0", "output": "UNKNOWN\nUNKNOWN\nUNKNOWN\nUNKNOWN\nUNKNOWN\nUNKNOWN\n"}, {"type": "stdin_stdout", "input": "2 2\n! 2 2 1\n? 0 2\n3 2\n! 2 2 1\n? 2 1\n4 7\n! 1 2 101\n? 2 3\n!... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.