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\nOn the Internet, data is divided...
[{"type": "stdin_stdout", "input": "7\n1 4 2 5 5 3\n2 1 5\n3 1 6\n4 1 7\n5 2 7 6\n6 1 2\n7 0\n6\n1 2 0\n1 5 0\n1 2 0\n5 1 3\n6 3 0\n1 7 4", "output": "NA\nNA\nNA\nNA\nNA\n3\n"}, {"type": "stdin_stdout", "input": "7\n1 4 2 5 4 3\n2 1 5\n3 1 6\n4 1 7\n5 2 7 6\n6 1 1\n7 0\n6\n1 2 1\n1 3 6\n1 2 0\n5 2 3\n6 3 0\n3 7 4", "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\nWhen registering in a social net...
[{"type": "stdin_stdout", "input": "ELioO1lOoOIOiLoooi1iolul1O\n7\nOoEIuOIl1ui1010uiooOoi0Oio001L0EoEolO0\nOLIoOEuoE11u1u1iLOI0oO\nuEOuO0uIOOlO01OlEI0E1Oo0IO1LI0uE0LILO0\nEOo0Il11iIOOOIiuOiIiiLOLEOOII001EE\niOoO0LOulioE0OLIIIulli01OoiuOOOoOlEiI0EiiElIIu0\nlE1LOE1Oil\n1u0EOliIiIOl1u110il0l1O0u\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\nCreate a function that will retu...
[{"input": "\"Tue Sep 06 2016 01:46:38 GMT+0100\"", "output": "[false]", "fn_name": "date_checker"}, {"input": "\"01-09-2016 01;20\"", "output": "[false]", "fn_name": "date_checker"}, {"input": "\"01_09_2016 01:20\"", "output": "[false]", "fn_name": "date_checker"}, {"input": "\"Tenth of January\"", "output": "[false]"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 have completed the Tribon...
[{"input": "[0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n20", "output": "[[0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 1, 2, 4, 8, 16, 32, 64, 128]]", "fn_name": "Xbonacci"}, {"input": "[1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n20", "output": "[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256]]", "fn_name": "Xbonacci"}, {"i...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 number `n` is called `prime ha...
[{"input": "8", "output": "[false]", "fn_name": "is_prime_happy"}, {"input": "25", "output": "[true]", "fn_name": "is_prime_happy"}, {"input": "32", "output": "[true]", "fn_name": "is_prime_happy"}, {"input": "2", "output": "[false]", "fn_name": "is_prime_happy"}, {"input": "0", "output": "[false]", "fn_name": "is_prim...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI have n tickets for a train wit...
[{"type": "stdin_stdout", "input": "6 279 2 5 26 14", "output": "117\n"}, {"type": "stdin_stdout", "input": "17 256 2 3 10 9", "output": "67\n"}, {"type": "stdin_stdout", "input": "6 323 2 12 8 9", "output": "182\n"}, {"type": "stdin_stdout", "input": "6 279 2 5 46 14", "output": "57\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\nNoora is a student of one famous...
[{"type": "stdin_stdout", "input": "100 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...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAssume there is an Ideal Random ...
[{"type": "stdin_stdout", "input": "10 4 15", "output": "79/80"}, {"type": "stdin_stdout", "input": "12 2 6", "output": "1/12"}, {"type": "stdin_stdout", "input": "12 2 6", "output": "5/12"}, {"type": "stdin_stdout", "input": "10 4 13", "output": "1/2"}, {"type": "stdin_stdout", "input": "3 2 1", "output": "5/12"}, {"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\nAlice and Bob are playing a game...
[{"type": "stdin_stdout", "input": "3\n3\n2 3 12\n2 10 0\n3\n-1 4 17\n3 9 0\n1\n4\n3\n", "output": "12\n12\n0\n"}, {"type": "stdin_stdout", "input": "3\n3\n2 3 12\n2 10 1\n3\n-1 4 17\n2 9 0\n1\n4\n3\n", "output": "12\n11\n0\n"}, {"type": "stdin_stdout", "input": "3\n3\n2 3 12\n2 10 2\n3\n-1 4 17\n3 5 0\n1\n4\n3\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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "3\n4\n1 2 4 12\n3\n2 3 3\n5\n1 3 3 3 3", "output": "First\nSecond\nSecond\n"}, {"type": "stdin_stdout", "input": "3\n4\n1 2 4 12\n3\n1 3 3\n5\n1 3 3 3 3", "output": "First\nSecond\nSecond\n"}, {"type": "stdin_stdout", "input": "3\n4\n1 2 8 13\n3\n3 1 3\n5\n1 3 1 3 3", "output": "Firs...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCosmic market, commonly known as...
[{"type": "stdin_stdout", "input": "5 5 4\n0 0 1\n0 0 0\n0 2 0\n1 1 1\n1 0 0\n5 5 5\n1 4 0\n0 1 1\n0 4 1\n1 3 0\n0 3 1\n5 5 5\n1 0 0\n0 3 1\n1 2 1\n0 4 0\n1 1 1\n0 0 0", "output": "5\n0\n13\n12\n"}, {"type": "stdin_stdout", "input": "5 14 5\n2 0 2\n0 0 0\n0 0 1\n1 2 1\n1 0 0\n5 5 5\n1 4 1\n0 1 1\n1 1 1\n1 3 0\n1 3 0\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\nImplement `String#digit?` (in Ja...
[{"input": "\"1\\n0\"", "output": "[false]", "fn_name": "is_digit"}, {"input": "\"1\\n\"", "output": "[false]", "fn_name": "is_digit"}, {"input": "\"a5\"", "output": "[false]", "fn_name": "is_digit"}, {"input": "\"14\"", "output": "[false]", "fn_name": "is_digit"}, {"input": "\"\\\"\"", "output": "[false]", "fn_name": ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays of inte...
[{"type": "stdin_stdout", "input": "2\n10\n3 3 2 2 3 2 1 1 2 3\n3 3 2 1 2 3 2 3 1 1\n10\n1 1 3 1 2 2 1 3 3 3\n3 1 3 1 1 2 3 2 2 1\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "1\n10\n14 -91 -52 -82 -4 69 33 3 -46 81\n-45 15 -4 82 33 3 -90 -81 -51 69\n", "output": "YES\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\nFor given three points p1, p2, p...
[{"type": "stdin_stdout", "input": "0 0 3 -1\n3\n0 1\n4 20\n-1 2", "output": "-0.600000000 -0.800000000\n-8.800000000 -18.400000000\n-2.000000000 -1.000000000\n"}, {"type": "stdin_stdout", "input": "0 0 2 0\n3\n-1 1\n0 1\n1 1", "output": "-1.0000000000 -1.0000000000\n0.0000000000 -1.0000000000\n1.0000000000 -1.00000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 kata, you need to make a...
[{"input": "\"ABCDDEFGABCDEDBBDEAAEDAEDCDABC\"", "output": "[\"0A0B0C0D4E0F0G1B3D0E4B2D10A1E4A10D9A2C\"]", "fn_name": "encoder"}, {"input": "\"ABBCBCABABCAABCAABBCAA\"", "output": "[\"0A0B2C3A2A4A6B6\"]", "fn_name": "encoder"}, {"input": "\"ABCABCABCABCABCABC\"", "output": "[\"0A0B0C1B3A2C4C7A6\"]", "fn_name": "encoder...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 useless stuff ...
[{"type": "stdin_stdout", "input": "15 10\n2 3\n5 4\n5 6\n5 7\n3 8\n3 10\n11 12\n12 13\n13 14\n14 15\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "15 10\n2 3\n5 4\n5 6\n5 7\n3 8\n3 10\n11 12\n12 13\n13 14\n14 15\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "15 10\n2 3\n5 4\n5 4\n5 7\n3 8\n3 10\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\nLittle X used to play a card gam...
[{"type": "stdin_stdout", "input": "1000\n", "output": "YES\n1 * 2 = 2\n2 * 3 = 6\n6 * 4 = 24\n6 - 5 = 1\n24 * 1 = 24\n8 - 7 = 1\n24 * 1 = 24\n10 - 9 = 1\n24 * 1 = 24\n12 - 11 = 1\n24 * 1 = 24\n14 - 13 = 1\n24 * 1 = 24\n16 - 15 = 1\n24 * 1 = 24\n18 - 17 = 1\n24 * 1 = 24\n20 - 19 = 1\n24 * 1 = 24\n22 - 21 = 1\n24 * 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\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\n3 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 5 82\n9 9 25\n3 2 86\n3 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\nImp likes his plush toy a lot.\n...
[{"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "No\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBob is a farmer. He has a large ...
[{"type": "stdin_stdout", "input": "10 10\n....W.W.W.\n.........S\n.S.S...S..\nW.......SS\n.W..W.....\n.W...W....\nS..S...S.S\n....W...S.\n..S..S.S.S\nSS.......S\n", "output": "Yes\nDDDDWDWDWD\nDDDDDDDDDS\nDSDSDDDSDD\nWDDDDDDDSS\nDWDDWDDDDD\nDWDDDWDDDD\nSDDSDDDSDS\nDDDDWDDDSD\nDDSDDSDSDS\nSSDDDDDDDS\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\nWrite a function that removes ev...
[{"input": "\"165561786121789797\"", "output": "[\"16556178612178977\"]", "fn_name": "seven_ate9"}, {"input": "\"797 9 7\"", "output": "[\"77 9 7\"]", "fn_name": "seven_ate9"}, {"input": "\"7979797\"", "output": "[\"7777\"]", "fn_name": "seven_ate9"}, {"input": "\"17797a\"", "output": "[\"1777a\"]", "fn_name": "seven_a...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n"}, {"type": "stdin_stdout", "input": "2 1000000000\n1 1000000000\n", "output": "2"}, {"type": "stdin_stdout", "input": "6 5\n1 5 8 14 19 20\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "5 10\n-1 1 22 32 34\n", "output": "3\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a long-established seco...
[{"type": "stdin_stdout", "input": "7 7\n4 1\n13 2\n18 3\n64 3\n13 2\n16 10\n11 2", "output": "147\n"}, {"type": "stdin_stdout", "input": "7 7\n4 1\n13 2\n12 3\n48 3\n8 2\n16 10\n11 2", "output": "120\n"}, {"type": "stdin_stdout", "input": "7 5\n4 1\n13 3\n12 3\n48 3\n8 3\n16 10\n11 2", "output": "109\n"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA monster is attacking the Cyber...
[{"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100 100 100\n", "output": "100"}, {"type": "stdin_stdout", "input": "50 100 51\n100 100 100\n1 100 100\n", "output": "1384"}, {"type": "stdin_stdout", "input": "100 100 1\n100 100 100\n1 100 100\n", "output": "1891"}, {"type": "stdin_stdout", "input": "1 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 celebrate today's launch of m...
[{"input": "[\"Grouse\", \"Partridge\", \"Pheasant\", \"Goose\", \"Starling\", \"Robin\", \"Thrush\", \"Emu\", \"PearTree\", \"Chat\", \"Dan\", \"Square\", \"Toblerone\", \"Lynn\", \"AlphaPapa\", \"BMW\", \"Graham\", \"Tool\", \"Nomad\", \"Finger\", \"Hamster\"]", "output": "[\"Mine's a Pint!!!!!!!!\"]", "fn_name": "pa...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVladik is a competitive programm...
[{"type": "stdin_stdout", "input": "16 4 12\n0000000011111111\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "16 1 12\n0000000011111111\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "16 1 12\n0100000011111111\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "16 2 12\n0100000011111111\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 old document says that a Ninj...
[{"type": "stdin_stdout", "input": "2\n3 3 3 3 -3 3 2 -5 3 2 -5 -3 0\n3 5 3 -2 4 -3 -2 -2 -1 0", "output": "1 2 4 6\n2 1 3 8\n3 2 4 7\n4 1 3 5\n5 4 6 7\n6 1 5\n7 3 5 8\n8 2 7\n1 2 2 3 4\n2 1 1 3 4 4\n3 1 2 4\n4 1 2 2 3\n"}, {"type": "stdin_stdout", "input": "2\n3 3 3 3 -3 3 2 -5 3 2 -5 -3 0\n3 5 4 -2 4 -1 -2 -2 -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\nAnton and Dasha like to play dif...
[{"type": "stdin_stdout", "input": "12 -11 20 200\n11 189\n12 108\n19 190\n21 27\n24 193\n26 86\n26 123\n31 180\n39 196\n107 193\n122 46\n129 103\n131 129\n132 135\n142 51\n157 22\n161 27\n195 163\n198 55\n199 64\n", "output": "Anton\n"}, {"type": "stdin_stdout", "input": "12 -11 20 200\n11 189\n12 108\n19 190\n42 27\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nЗавтра у хоккейной команды, кото...
[{"type": "stdin_stdout", "input": "29 42 50\n605 254 369 842 889 103 937 235 135 698 482 883 738 467 848 70 1000 129 970 58 94 873 140 363 133 913 834 727 185\n17 676 703 245 149 296 800 106 153 111 285 382 12 704 830 664 30 533 604 380 469 155 216 466 36 347 270 170 10 349 86 5 164 599 517 593 373 461 908 34 569 573\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# The President's phone is broke...
[{"input": "\"FIREYYFURYYFURYYFURRYFIRE\"", "output": "[\"You are fired! I am really furious. You are fired!\"]", "fn_name": "fire_and_fury"}, {"input": "\"FIREFIREFIREFIREFIRE\"", "output": "[\"You and you and you and you and you are fired!\"]", "fn_name": "fire_and_fury"}, {"input": "\"FURYFURYFURYFURYFURY\"", "outpu...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 order to pass the entrance ex...
[{"type": "stdin_stdout", "input": "-1 011", "output": "-0.0909090909091\n"}, {"type": "stdin_stdout", "input": "1 106", "output": "0.00943396226415\n"}, {"type": "stdin_stdout", "input": "100 1\n", "output": "100.0000000000\n"}, {"type": "stdin_stdout", "input": "1 011", "output": "0.0909090909091\n"}, {"type": "stdin...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPirates have notorious difficult...
[{"input": "\"ortsp\"\n[\"sport\", \"parrot\", \"ports\", \"matey\"]", "output": "[[\"sport\", \"ports\"]]", "fn_name": "grabscrab"}, {"input": "\"oolp\"\n[\"donkey\", \"pool\", \"horse\", \"loop\"]", "output": "[[\"pool\", \"loop\"]]", "fn_name": "grabscrab"}, {"input": "\"ainstuomn\"\n[\"mountains\", \"hills\", \"mes...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlan's child can be annoying at ...
[{"input": "\"Today I didn't attempt to hardcode this Kata.\"", "output": "[\"I don't think you didn't attempt to hardcode this Kata today, I think you did attempt it!\"]", "fn_name": "alan_annoying_kid"}, {"input": "\"Today I learned to code like a pro.\"", "output": "[\"I don't think you learned to code like a pro to...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAny resemblance to any real cham...
[{"type": "stdin_stdout", "input": "MYCXFLPTHVGWDSRXCOI BERLAND 5:9\nSPSHVVQLXQNRUB BERLAND 0:5\nSPSHVVQLXQNRUB MYCXFLPTHVGWDSRXCOI 4:6\nZPIIZCGCLCHNLIXCPBRM MYCXFLPTHVGWDSRXCOI 7:5\nZPIIZCGCLCHNLIXCPBRM SPSHVVQLXQNRUB 3:9\n", "output": "1:0"}, {"type": "stdin_stdout", "input": "VJWNNQCMHKJVXAPRVAD BERLAND 9:3\nVJWNNQC...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 recently bought some l...
[{"type": "stdin_stdout", "input": "100 3000\n1 4\n2 1\n3 3\n1 1\n5 4\n4 1\n2 1\n5 4\n1 1\n3 3\n4 3\n3 4\n4 2\n2 4\n1 2\n3 4\n5 3\n1 4\n2 4\n4 5\n1 2\n5 2\n2 2\n3 2\n4 4\n1 4\n5 5\n3 4\n4 1\n3 3\n5 2\n3 3\n4 1\n1 5\n4 3\n5 3\n4 2\n3 3\n3 5\n5 1\n5 1\n3 3\n4 3\n1 3\n4 1\n2 3\n1 3\n1 2\n5 5\n5 2\n1 5\n4 2\n1 1\n1 1\n1 2\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrewid the Android is a galaxy...
[{"type": "stdin_stdout", "input": "20 10\n10 11 U\n12 9 U\n6 15 L\n17 4 U\n11 10 L\n7 14 L\n4 17 U\n2 19 L\n8 13 L\n14 7 U\n", "output": "11\n9\n6\n4\n1\n7\n2\n2\n8\n7\n"}, {"type": "stdin_stdout", "input": "10 10\n5 6 U\n4 7 U\n8 3 L\n8 3 L\n1 10 U\n9 2 U\n10 1 L\n10 1 L\n8 3 U\n8 3 U\n", "output": "6\n7\n3\n0\n10\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 sweet little monster Om Nom lo...
[{"type": "stdin_stdout", "input": "925819493 47350513 28377591 119226256 49881078\n", "output": "510796638\n"}, {"type": "stdin_stdout", "input": "930064129 32726326 25428197 158103592 64501049\n", "output": "355994758\n"}, {"type": "stdin_stdout", "input": "930064129 32726326 25428197 83013449 64501049\n", "output": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the game Lizard Era: Beginnin...
[{"type": "stdin_stdout", "input": "25\n26668 10412 12658\n25216 11939 10247\n28514 22515 5833\n4955 19029 22405\n12552 6903 19634\n12315 1671 505\n20848 9175 6060\n12990 5827 16433\n9184 30621 25596\n31818 7826 11221\n18090 4476 30078\n30915 11014 16950\n3119 29529 21390\n775 4290 11723\n29679 14840 3566\n4491 29480 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\nGiven a string s and m queries. ...
[{"type": "stdin_stdout", "input": "bcbccaacabbcbccaacabbcbccaacabbcbccaacabbcbccaacabbcbccaacabbcbccaacabbcbccaacabbcbccaacabbcbccaacab\n40\n37 c\n21 a\n18 a\n5 b\n1 a\n8 c\n9 a\n38 c\n10 b\n12 c\n18 a\n23 a\n20 c\n7 b\n33 c\n4 c\n22 c\n28 c\n9 a\n12 a\n22 a\n1 b\n6 a\n31 c\n19 b\n19 a\n15 a\n6 c\n11 c\n18 b\n19 c\n24...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 grid with n rows and ...
[{"type": "stdin_stdout", "input": "1848 1937\n", "output": "337952422\n"}, {"type": "stdin_stdout", "input": "2000 2000\n", "output": "111024599\n"}, {"type": "stdin_stdout", "input": "2021 2021\n", "output": "138387540\n"}, {"type": "stdin_stdout", "input": "1001 1000\n", "output": "450544063\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\nThe three friends, Kuro, Shiro, ...
[{"type": "stdin_stdout", "input": "1000 843\n", "output": "157\n"}, {"type": "stdin_stdout", "input": "1000 488\n", "output": "488\n"}, {"type": "stdin_stdout", "input": "1000 843\n", "output": "157\n"}, {"type": "stdin_stdout", "input": "1000 488\n", "output": "488\n"}, {"type": "stdin_stdout", "input": "1000 733\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\nWelcome\n\nThis kata is inspired...
[{"input": "\"this_test_will_hurt_you\"\n12345678987654321", "output": "[\"ti_etwl_utyuhsts_ilhr_o\"]", "fn_name": "jumbled_string"}, {"input": "\"codingisfornerdsyounerd\"\n10101010", "output": "[\"criyinodedsgufrnodnoser\"]", "fn_name": "jumbled_string"}, {"input": "\"better example\"\n2", "output": "[\"bexltept mera...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 mysterious langu...
[{"type": "stdin_stdout", "input": "-111\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-165\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-137\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-116\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-14\n", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOnce at a team training Vasya, P...
[{"type": "stdin_stdout", "input": "10\n5 2 10 8 3 1 9 7 6 4\n9\n2 1 9 2 9 2 10 9 8\n", "output": "40 59\n"}, {"type": "stdin_stdout", "input": "10\n5 2 10 8 3 1 9 7 6 4\n9\n3 1 9 2 9 2 10 9 8\n", "output": "43 56\n"}, {"type": "stdin_stdout", "input": "10\n5 2 10 8 3 1 9 7 6 4\n9\n2 1 6 2 9 2 10 9 8\n", "output": "42 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 very much likes rec...
[{"type": "stdin_stdout", "input": "-841 -205\n590 -205\n-1000 -1000\n-364 1385\n-682 113\n-841 -1000\n-1000 -205\n908 1067\n", "output": "YES\n2 4 5 8 \n1 3 6 7 \n"}, {"type": "stdin_stdout", "input": "-850 -1000\n-475 -325\n1025 800\n-325 575\n-325 -850\n-1000 -475\n-100 -775\n1250 -550\n", "output": "YES\n1 2 5 6 \n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently, Masha was presented wi...
[{"type": "stdin_stdout", "input": "5\n2 2\n1 1 2 2\n1 1 2 2\n3 4\n2 2 3 3\n3 1 4 3\n1 5\n1 1 3 1\n3 1 5 1\n6 4\n1 1 4 2\n1 3 4 4\n3 4\n1 2 4 2\n2 1 3 3\n", "output": "0 4\n4 8\n2 3\n12 12\n4 8\n"}, {"type": "stdin_stdout", "input": "5\n2 2\n1 1 2 2\n1 1 2 2\n3 5\n2 2 3 2\n3 1 4 3\n1 5\n1 1 5 1\n3 1 5 1\n4 4\n1 1 4 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\nPositive integers have so many g...
[{"input": "5263987", "output": "[true]", "fn_name": "consecutive_ducks"}, {"input": "382131", "output": "[true]", "fn_name": "consecutive_ducks"}, {"input": "118070", "output": "[true]", "fn_name": "consecutive_ducks"}, {"input": "32768", "output": "[false]", "fn_name": "consecutive_ducks"}, {"input": "161997", "outpu...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGoa'uld Apophis captured Jack O'...
[{"type": "stdin_stdout", "input": "8 10\n1 2 3\n2 8 3\n1 4 1\n4 3 6\n3 7 7\n4 5 5\n7 7 2\n7 8 1\n1 6 8\n6 8 7\n0\n4 1 2 3 4\n0\n0\n0\n0\n0\n0\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "8 10\n1 2 3\n2 8 3\n1 4 1\n4 3 6\n3 7 7\n4 5 5\n5 7 2\n7 8 1\n1 6 8\n6 8 7\n0\n4 1 2 3 4\n0\n0\n0\n0\n0\n0\n", "output":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis year, as in previous years,...
[{"type": "stdin_stdout", "input": "25\n1000000 999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976\n", "output": "999975\n"}, {"type": "stdin_stdout", "input": "25\n58115 794098 753382 484882 238434 6742...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKyoya Ootori is selling photoboo...
[{"type": "stdin_stdout", "input": "xulsyfkuizjauadjjopu\n", "output": "526\n"}, {"type": "stdin_stdout", "input": "cskgsxywlvfeicoueglr\n", "output": "526\n"}, {"type": "stdin_stdout", "input": "gggggggggggggggggggg\n", "output": "526\n"}, {"type": "stdin_stdout", "input": "qdqdddqddqqddqddqdqd\n", "output": "526\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 snail crawls up the column. ...
[{"input": "100\n20\n5", "output": "[7]", "fn_name": "snail"}, {"input": "10\n3\n1", "output": "[5]", "fn_name": "snail"}, {"input": "10\n3\n2", "output": "[8]", "fn_name": "snail"}, {"input": "5\n10\n3", "output": "[1]", "fn_name": "snail"}, {"input": "3\n2\n1", "output": "[2]", "fn_name": "snail"}]
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKarafs is some kind of vegetable...
[{"type": "stdin_stdout", "input": "469 128038 4\n143 914502 747\n74 1244223 74477\n835 246699 1021\n7 477777 444444\n", "output": "-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "469 128038 4\n82 914502 747\n80 1244223 74477\n1360 246699 1021\n7 477777 444444\n", "output": "-1\n-1\n-1\n-1\n"}, {"type": "stdin_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\nHexadecimal likes drawing. She h...
[{"type": "stdin_stdout", "input": "50 21\n27 16\n42 35\n15 28\n46 17\n30 39\n47 18\n35 25\n26 24\n24 30\n28 41\n40 38\n11 21\n33 20\n43 10\n37 14\n1 43\n32 49\n49 6\n10 45\n21 50\n39 3\n", "output": "YES\n29\n1 2\n2 3\n4 5\n4 6\n5 7\n7 8\n8 9\n9 11\n12 13\n12 14\n13 15\n16 17\n18 19\n19 20\n22 23\n22 25\n23 26\n27 29\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 priority queue is a data struc...
[{"type": "stdin_stdout", "input": "insert 8\ninsert -1\nextract\ninsert 12\nextract\ninsert 11\nextract\nextract\nend", "output": "8\n12\n11\n-1\n"}, {"type": "stdin_stdout", "input": "insert 9\ninsert -1\nextract\ninsert 12\nextract\ninsert 11\nextract\nextract\nend", "output": "9\n12\n11\n-1\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\nA ticket is a string consisting ...
[{"type": "stdin_stdout", "input": "5\n213132\n973894\n045207\n000000\n055776\n", "output": "YES\nNO\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "2\n193758\n123456\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "2\n192758\n123456\n", "output": "NO\nNO\n"}, {"type": "stdin_stdout", "input": "1\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\nYou are given an integer $n$ ($n...
[{"type": "stdin_stdout", "input": "97 100\n93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTask:\nGiven an array arr of str...
[{"input": "[\"OXOOOX\", \"OXOXOO\", \"XXOOOX\", \"OXXXOO\", \"OOXOOX\", \"OXOOOO\", \"OOXOOX\", \"OOXOOO\", \"OXOOOO\", \"OXOOXX\"]", "output": "[\"Total land perimeter: 60\"]", "fn_name": "land_perimeter"}, {"input": "[\"OXOOO\", \"OOXXX\", \"OXXOO\", \"XOOOO\", \"XOOOO\", \"XXXOO\", \"XOXOO\", \"OOOXO\", \"OXOOX\", ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSergei B., the young coach of Po...
[{"type": "stdin_stdout", "input": "100\nfAfhfNNNhfffAfNffNANhffNffffffNfffffhNfffNfefNfffNfNNNffNfffNfhNNNffffNfNfffAffNffNffNNfhfffNhNffNNN\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "100\nfAfhfNNNhfffAfNffNANhffNffffffNfffffhNfffNfffNfffNfNNNffNfffNfhNNNffffNfNfffAffNffNffNNfhfffNhNffNNN\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\nAtCoDeer the deer found N rectan...
[{"type": "stdin_stdout", "input": "5\n999999999 1000000000\n1 2\n314 315\n500000 500001\n999999999 1000000000\n", "output": "1999999680\n"}, {"type": "stdin_stdout", "input": "5\n999999999 1000001000\n1 -1\n269 106\n500000 500001\n999999999 1000000000", "output": "1999999892\n"}, {"type": "stdin_stdout", "input": "5\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 Smart Beaver from ABBYY love...
[{"type": "stdin_stdout", "input": "4\n-71868244 -24941524 -24941524 -24941524 -24941524 -24941524 -24941524 -6170836 21985196 21985196 21985196 21985196 40755884 40755884 40755884 68911916\n", "output": "12858032\n-24941524 -71868244 68911916 40755884\n21985196 40755884 -24941524 -24941524\n40755884 21985196 -24941524...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCurrently, people's entertainmen...
[{"type": "stdin_stdout", "input": "1 2 1 1 1 0\n1 2 1 0 0 -1\n1 0 0 0 1 1\n3 -1 0 0 2 0\n3 1 0 1 3 1\n0 2 0 2 -1 0\n0 0 1 1 0 7\n2 0 0 1 0 0\n0 0 0 0 0 0", "output": "1\n0\n1\n1\n3\n0\n2\n1\n"}, {"type": "stdin_stdout", "input": "1 2 1 1 1 0\n1 2 1 0 0 -1\n1 0 0 0 1 1\n3 -1 0 0 2 0\n3 0 0 1 3 1\n0 2 0 2 -1 0\n0 0 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\nM-kun is a student in Aoki High ...
[{"type": "stdin_stdout", "input": "15 1\n4 1 4 0 6 9 2 6 5 3 5 7 9 1 9", "output": "No\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo\nYes\nYes\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "15 1\n3 0 8 1 6 9 1 6 5 5 9 7 2 7 16", "output": "No\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo\nYes\nNo\nNo\nYes\nYes\n"}, {"type": "stdin...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA plurality of trampolines are a...
[{"type": "stdin_stdout", "input": "4\n163\n51\n2\n32", "output": "yes\n"}, {"type": "stdin_stdout", "input": "4\n001\n103\n-1\n0", "output": "no\n"}, {"type": "stdin_stdout", "input": "4\n001\n136\n-1\n0", "output": "no\n"}, {"type": "stdin_stdout", "input": "4\n001\n155\n-1\n0", "output": "no\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\nIn this kata you should simply d...
[{"input": "1234", "output": "[false]", "fn_name": "isLeapYear"}, {"input": "1100", "output": "[false]", "fn_name": "isLeapYear"}, {"input": "1194", "output": "[false]", "fn_name": "isLeapYear"}, {"input": "1984", "output": "[true]", "fn_name": "isLeapYear"}, {"input": "2000", "output": "[true]", "fn_name": "isLeapYear...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnn has recently started commuti...
[{"type": "stdin_stdout", "input": "1000 1 1000 1000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "1000 1 1000 1000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "1000 3 1000 1000\n", "output": "334000\n"}, {"type": "stdin_stdout", "input": "1000 3 1000 1000\n", "output": "334000\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\nGiven is a lowercase English let...
[{"type": "stdin_stdout", "input": "a\n", "output": "b\n"}, {"type": "stdin_stdout", "input": "y\n", "output": "z\n"}, {"type": "stdin_stdout", "input": "c\n", "output": "d\n"}, {"type": "stdin_stdout", "input": "p\n", "output": "q\n"}, {"type": "stdin_stdout", "input": "d\n", "output": "e\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\nGiven are an integer N and four ...
[{"type": "stdin_stdout", "input": "1000\nB\nA\nA\nA\n", "output": "589888339\n"}, {"type": "stdin_stdout", "input": "1000\nA\nB\nA\nA\n", "output": "336052903\n"}, {"type": "stdin_stdout", "input": "1000\nB\nB\nA\nA\n", "output": "336052903\n"}, {"type": "stdin_stdout", "input": "1000\nB\nA\nB\nA\n", "output": "336052...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 autumn sports festival is hel...
[{"type": "stdin_stdout", "input": "8\n65541 3 20 3 8 6 27 2 25\n20941 3 5 2 41 7 19 2 42\n90585 4 8 3 12 11 46 2 34\n92201 3 28 2 47 6 37 2 58\n10001 3 50 2 42 7 12 4 54\n63812 4 11 3 11 6 98 2 22\n54092 3 33 2 54 6 18 2 19\n25012 3 44 2 58 6 45 2 46\n4\n1 3 23 1 23 1 34 4 69\n2 5 12 2 12 3 41 2 29\n3 5 24 1 24 2 0 3 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given nonnegative intege...
[{"type": "stdin_stdout", "input": "1 1000000000000000000 3\n", "output": "333333333333333333\n"}, {"type": "stdin_stdout", "input": "-1 1010010100000100000 4", "output": "252502525000025001\n"}, {"type": "stdin_stdout", "input": "-1 1010010110000100000 3", "output": "336670036666700001\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\nYou were dreaming that you are t...
[{"type": "stdin_stdout", "input": "6\n10 5\nRRRRRRRRRRUUUUU\n1 -1\nUDDDRLLL\n-3 -5\nLDLDLDDDR\n-1 2\nUULLLL\n6 -2\nRDULRLLDR\n-1 6\nRUDURUUUUR\n", "output": "YES\nYES\nYES\nYES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "6\n10 5\nRRRRRRRRRRUUUUU\n1 -1\nUDDDRLLL\n-3 -5\nLDLDLDDDR\n0 2\nUULLLL\n6 -2\nRDULRLLDR\n-1 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\nAfter his wife's tragic death, E...
[{"type": "stdin_stdout", "input": "7\nbabba\nabaac\ncodeforces\nzeroorez\nabcdcba\nbbbbbbb\na\n", "output": "\n1\n1\n0\n1\n1\n4\n0\n"}, {"type": "stdin_stdout", "input": "7\nbabba\nabaac\ncodeforces\nzeroorez\nabcdcba\nbbbbbbb\na\n", "output": "1\n1\n0\n1\n1\n4\n0\n"}, {"type": "stdin_stdout", "input": "7\nabbab\nabaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYet another round on DecoForces ...
[{"type": "stdin_stdout", "input": "6\n10 10\n3 6 3 7\n4 9 5 9\n5 4 5 3\n7 1 8 1\n9 10 8 10\n7 7 7 8\n0 5 2 3\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6\n10 10\n3 6 3 7\n4 9 5 9\n5 4 5 3\n7 1 8 1\n9 10 8 10\n7 7 7 8\n0 5 2 3\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n4 6\n4 3 3 3\n4 2 4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nn evenly spaced points have been...
[{"type": "stdin_stdout", "input": "488\n453349582488862562152454328120974624021885842759505659322561694358728150516204337664755243733316681382547751353198982127441183878962690095592236469807087207161691714104527568781618875688104415243715506909284770554256616642020503116458540489226220383015748323400356936736149732496...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which solve a si...
[{"type": "stdin_stdout", "input": "3 -1 -3 1 0 -3\n2 -1 -3 -9 18 27", "output": "-3.000 -6.000\n-1.000 1.000\n"}, {"type": "stdin_stdout", "input": "3 -2 -3 1 0 -3\n2 -1 -3 -9 18 27", "output": "-3.000 -3.000\n-1.000 1.000\n"}, {"type": "stdin_stdout", "input": "3 -1 -3 1 0 -3\n2 -1 -3 -9 13 27", "output": "-3.000 -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\nYou are given a string $a$, cons...
[{"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\nLee just became Master in Codefo...
[{"type": "stdin_stdout", "input": "3\n4 2\n1 13 7 17\n1 3\n6 2\n10 10 10 10 11 11\n3 3\n4 4\n1000000000 1000000000 1000000000 1000000000\n1 1 1 1\n", "output": "48\n42\n8000000000\n"}, {"type": "stdin_stdout", "input": "3\n4 2\n1 13 12 1\n1 3\n6 2\n10 10 10 10 11 11\n3 3\n4 4\n1000000000 1000000000 1000000000 10000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nM-kun is a competitor in AtCoder...
[{"type": "stdin_stdout", "input": "1359", "output": "4\n"}, {"type": "stdin_stdout", "input": "1855", "output": "1\n"}, {"type": "stdin_stdout", "input": "1485", "output": "3\n"}, {"type": "stdin_stdout", "input": "1125", "output": "5\n"}, {"type": "stdin_stdout", "input": "1764", "output": "2\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\nYou are given an array $a$ consi...
[{"type": "stdin_stdout", "input": "100\n4 42 23 23 16 42 16 23 42 16 42 8 4 23 4 4 23 42 16 42 23 23 23 42 4 42 8 8 16 23 15 23 16 4 42 15 15 23 16 15 16 4 4 15 23 42 42 15 8 23 8 23 4 15 16 15 42 8 23 16 15 42 23 8 4 16 15 16 23 16 16 4 23 16 8 23 16 15 23 4 4 8 15 4 4 15 8 23 23 4 4 8 8 4 42 15 4 4 42 16\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\nJohn has some amount of money of...
[{"input": "100000000\n1.5\n10000000\n50\n1", "output": "[false]", "fn_name": "fortune"}, {"input": "9998.5\n61.8155\n10000.0\n3\n0", "output": "[false]", "fn_name": "fortune"}, {"input": "9999\n61.8161\n10000.0\n3\n0", "output": "[false]", "fn_name": "fortune"}, {"input": "100000000\n5\n1000000\n50\n1", "output": "[tr...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nManao is trying to open a rather...
[{"type": "stdin_stdout", "input": "2000\n", "output": "1333335000\n"}, {"type": "stdin_stdout", "input": "1999\n", "output": "1331335999\n"}, {"type": "stdin_stdout", "input": "1837\n", "output": "1033182073\n"}, {"type": "stdin_stdout", "input": "2000\n", "output": "1333335000\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 next lecture in a high schoo...
[{"type": "stdin_stdout", "input": "14\n137698508 528184026 54130884 239033739 1038011779 720680829 605286542 89272810 284191042 179359950 186766648 570400677 107541072 25121211\n195343970 709242622 422954170 980941827 265963618 812646456 943660193 344102432 295006337 221455256 203711937 632473368 334173424 49206958\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\nIt has been noted that if some a...
[{"type": "stdin_stdout", "input": "30000 39\n2650 -1515\n-3169 4818\n-1896 2727\n1323 -2335\n-387 901\n-4299 1481\n-2114 4435\n3654 -2730\n4569 3801\n-3815 -3355\n4777 1749\n4486 -780\n-3936 -158\n717 -3518\n4765 -909\n-3032 3726\n-2970 3346\n2067 -1560\n-521 -1331\n-4953 -2098\n-849 580\n-4941 4018\n1338 -2629\n-1444...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 list of numbers from ...
[{"type": "stdin_stdout", "input": "2\n1000000000 1\n1000000000 500000000\n", "output": "2\n1000000000\n"}, {"type": "stdin_stdout", "input": "2\n1000000000 1\n1000000000 500000000\n", "output": "2\n1000000000\n"}, {"type": "stdin_stdout", "input": "3\n3 1\n4 2\n69 6\n", "output": "2\n4\n12\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\nZS the Coder is playing a game. ...
[{"type": "stdin_stdout", "input": "6723\n", "output": "2\n17\n46\n97\n176\n289\n442\n641\n892\n1201\n1574\n2017\n2536\n3137\n3826\n4609\n5492\n6481\n7582\n8801\n10144\n11617\n13226\n14977\n16876\n18929\n21142\n23521\n26072\n28801\n31714\n34817\n38116\n41617\n45326\n49249\n53392\n57761\n62362\n67201\n72284\n77617\n8320...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the State of Takahashi in AtC...
[{"type": "stdin_stdout", "input": "10 39\n7 2\n7 1\n5 6\n5 8\n9 10\n2 8\n8 7\n3 10\n10 1\n8 10\n2 3\n7 4\n3 9\n4 10\n3 4\n6 1\n6 7\n9 5\n9 7\n6 9\n9 4\n4 6\n7 5\n8 3\n2 5\n9 2\n10 7\n8 6\n8 9\n7 3\n5 3\n4 5\n6 3\n2 10\n5 10\n4 2\n6 2\n8 4\n10 6\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "10 39\n7 2\n7 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\nWe will call a non-negative inte...
[{"type": "stdin_stdout", "input": "3704579452095997258280591217784156184311155893966777597430447796450532", "output": "32\n"}, {"type": "stdin_stdout", "input": "4271374355872521214646189206931447259915557225329718337053006899386612", "output": "33\n"}, {"type": "stdin_stdout", "input": "463636595558318557723662913943...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two squares, one w...
[{"type": "stdin_stdout", "input": "-17 -91 -17 -27 -81 -27 -81 -91\n-48 -21 -12 -57 -48 -93 -84 -57\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "-100 -100 -100 -99 -99 -99 -99 -100\n-10 -10 -9 -9 -10 -8 -11 -9\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-100 -100 -100 100 100 100 100 -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 following sorting operation ...
[{"type": "stdin_stdout", "input": "6\n1 4 1 3 2 4\n5\n1 2 5 4 5\n10\n1 1 1 1 1 1 1 1 1 1\n9\n1 1 1 1 1 1 1 1 1\n12\n1 4 1 3 2 4 3 3 2 1 2 2\n1\n5050\n3\n10000 10000 100\n0", "output": "24\n-1\n10\n-1\n48\n5049\n-1\n"}, {"type": "stdin_stdout", "input": "6\n1 4 1 3 2 4\n5\n1 2 5 4 5\n10\n1 1 1 1 1 1 1 1 1 1\n9\n1 1 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\nTranslator's note: in Russia's m...
[{"type": "stdin_stdout", "input": "100\n3 2 4 3 3 3 4 2 3 5 5 2 5 2 3 2 4 4 4 5 5 4 2 5 4 3 2 5 3 4 3 4 2 4 5 4 2 4 3 4 5 2 5 3 3 4 2 2 4 4 4 5 4 3 3 3 2 5 2 2 2 3 5 4 3 2 4 5 5 5 2 2 4 2 3 3 3 5 3 2 2 4 5 5 4 5 5 4 2 3 2 2 2 2 5 3 5 2 3 4\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "100\n2 2 2 2 2 2 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\nCompute A \\times B.\n\n-----Con...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "101 110", "output": "11110\n"}, {"type": "stdin_stdout", "input": "101 111", "output": "11211\n"}, {"type": "stdin_stdout", "input": "101 101", "output": "10201\n"}, {"type": "stdin_stdout", "input": "100 110", "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\nTonio has a keyboard with only t...
[{"type": "stdin_stdout", "input": "VVKKVKKVVKKVKKVKVVKKVKKVVKKVKVVKKVKKVKVVKKVVKKVKVVKKVKVVKKVVKVVKKVKKVKKVKKVKKVKVVKKVKKVKKVKKVKKVVKVK\n", "output": "32\n"}, {"type": "stdin_stdout", "input": "VVVVVKKVKVKVKVVKVVKKVVKVKKKKKKKVKKKVVVVVVKKVVVKVKVVKVKKVVKVVVKKKKKVVVVVKVVVVKVVVKKVKKVKKKVKKVKKVVKKV\n", "output": "25\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\nWe know that some number...
[{"input": "100", "output": "[2491]", "fn_name": "prime_product"}, {"input": "10", "output": "[25]", "fn_name": "prime_product"}, {"input": "12", "output": "[35]", "fn_name": "prime_product"}, {"input": "20", "output": "[91]", "fn_name": "prime_product"}, {"input": "7", "output": "[10]", "fn_name": "prime_product"}, {"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an array a consisting ...
[{"type": "stdin_stdout", "input": "100\n27 95 57 29 91 85 83 36 72 86 39 5 79 61 78 93 100 97 73 23 82 66 41 92 38 92 100 96 48 23 66 47 5 32 69 13 95 23 46 62 99 83 57 66 98 82 81 57 37 37 81 64 45 76 72 43 99 76 86 22 37 39 93 80 99 36 53 83 3 32 52 9 78 34 47 100 33 72 19 40 29 56 77 32 79 72 15 88 100 98 56 50 22 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya thinks that lucky tickets ...
[{"type": "stdin_stdout", "input": "10\n146767769 71795210 50866429 35232438 22664883 56785812 91050433 75677099 84393937 43832346\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n146767769 71795210 50866429 35232438 22664883 56785812 91050433 75677099 18053121 43832346\n", "output": "4\n"}, {"type": "stdin...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn integer X is called a Harshad...
[{"type": "stdin_stdout", "input": "12\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "148\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "112", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "224", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "133", "output": "Yes\n"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Story&Task\n There are three p...
[{"input": "13\n4\n7", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "11\n4\n6", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "16\n7\n8", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "16\n1\n8", "output": "[-1]", "fn_name": "pass_the_bill"}, {"input": "11\n4\n1", "output": "[2]", "fn_...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 army of n droids is lined up ...
[{"type": "stdin_stdout", "input": "49 2 1971\n794 866\n401 575\n341 83\n103 208\n352 134\n260 878\n497 931\n630 570\n885 464\n23 663\n60 1461\n416 870\n955 405\n392 961\n530 258\n73 404\n736 923\n44 436\n594 314\n904 138\n980 163\n76 720\n879 809\n81 838\n263 599\n218 139\n659 493\n1044 754\n679 302\n490 7\n204 530\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\nThere is a game called Packet Mo...
[{"type": "stdin_stdout", "input": "10\n4 17 1 9 5 18 2 3 2 1\n8 12 6 5 10 5 4 4 7 6\n5\n4 3 2 1 1\n2 4 4 4 4\n4\n1 1 3 2\n5 3 2 1\n0", "output": "1\nNA\nNA\n"}, {"type": "stdin_stdout", "input": "10\n4 17 1 9 5 18 2 3 2 1\n8 12 6 5 10 5 4 4 7 6\n5\n4 3 2 1 1\n2 4 4 4 4\n4\n2 1 3 2\n5 3 2 1\n0", "output": "1\nNA\nNA\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\nConsider a game, wherein the pla...
[{"input": "\"abcde\"\n\"abcde\"", "output": "[5]", "fn_name": "count_correct_characters"}, {"input": "\"same\"\n\"same\"", "output": "[4]", "fn_name": "count_correct_characters"}, {"input": "\"dog\"\n\"car\"", "output": "[0]", "fn_name": "count_correct_characters"}, {"input": "\"dog\"\n\"god\"", "output": "[1]", "fn_n...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNew Year is coming! Vasya has pr...
[{"type": "stdin_stdout", "input": "1\n50 1\n2 1 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 1...
code_stdio