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\nВ Берляндском государственном ун... | [{"type": "stdin_stdout", "input": "wajaubjjlsvvatkrwphykszmkwajaubjjlsvvatkrwphykszmkwajaubjjlsvvatkrwphykszmkwajaubjjlsvvatkrwphykszmk\n", "output": "YES\nwajaubjjlsvvatkrwphykszmkwajaubjjlsvvatkrwphykszmkwajaubjjlsvvatkrwphykszmk\n"}, {"type": "stdin_stdout", "input": "twfflboprkkjobbgoubmybfkbmmconrjhsktwfflboprkkj... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 famous olympiad, whic... | [{"type": "stdin_stdout", "input": "2\n1 2 2 1\n4 8 12 4\n", "output": "3\n16\n"}, {"type": "stdin_stdout", "input": "2\n1 2 3 1\n4 8 12 4\n", "output": "4\n16\n"}, {"type": "stdin_stdout", "input": "2\n1 2 2 1\n4 8 9 2\n", "output": "3\n12\n"}, {"type": "stdin_stdout", "input": "2\n1 2 2 1\n4 8 9 4\n", "output": "3\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\nYou are given a string s consist... | [{"type": "stdin_stdout", "input": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzabcdefghijklmnopqrstuvwxyzaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\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\nWhen Kefa came to the restaurant... | [{"type": "stdin_stdout", "input": "18 17 16\n298794979 56088167 220017066 212013239 193074498 269869999 238524920 107690830 236214025 114513789 305713075 41451289 198089336 246759776 267311824 142373649 312495533 217782770\n9 4 70536531\n13 14 235114377\n18 4 38527037\n3 7 39141694\n1 17 15392162\n6 17 35451325\n17 14... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently Ivan the Fool decided t... | [{"type": "stdin_stdout", "input": "100000 100000\n", "output": "870472905\n"}, {"type": "stdin_stdout", "input": "100000 100000\n", "output": "870472905\n"}, {"type": "stdin_stdout", "input": "86821 24538\n", "output": "1000000005\n"}, {"type": "stdin_stdout", "input": "99999 100000\n", "output": "758107445\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEverybody know that you passed t... | [{"input": "[\"cw\", \"CAT\", \"DOG\"]", "output": "[\"You need extra sleep\"]", "fn_name": "how_much_coffee"}, {"input": "[\"cw\", \"CAT\", \"cw=others\"]", "output": "[3]", "fn_name": "how_much_coffee"}, {"input": "[\"cw\", \"CAT\"]", "output": "[3]", "fn_name": "how_much_coffee"}, {"input": "[\"cw\"]", "output": "[1... | 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 chess tournament will be held ... | [{"type": "stdin_stdout", "input": "3\n3\n111\n2\n11\n4\n2122\n", "output": "YES\nX==\n=X=\n==X\nYES\nX=\n=X\nYES\nX=+-\n=X==\n-=X+\n+=-X\n"}, {"type": "stdin_stdout", "input": "3\n3\n111\n1\n1\n4\n2122\n", "output": "YES\nX==\n=X=\n==X\nYES\nX\nYES\nX=+-\n=X==\n-=X+\n+=-X\n"}, {"type": "stdin_stdout", "input": "3\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\n— Hey folks, how do you like thi... | [{"type": "stdin_stdout", "input": "3\n2 2\n2 1\n3 5\n1 3 3\n3 12\n1 2 2\n", "output": "0\n4\n20\n"}, {"type": "stdin_stdout", "input": "3\n2 2\n1 1\n3 10\n1 2 4\n3 7\n3 2 2\n", "output": "1\n14\n4\n"}, {"type": "stdin_stdout", "input": "3\n2 2\n2 1\n3 5\n1 3 3\n3 24\n1 2 2\n", "output": "0\n4\n44\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\nCalendars in widespread use toda... | [{"type": "stdin_stdout", "input": "1900:01:01\n2038:12:31\n", "output": "50768\n"}, {"type": "stdin_stdout", "input": "1903:09:27\n1988:06:15\n", "output": "30943\n"}, {"type": "stdin_stdout", "input": "1915:01:01\n2007:07:01\n", "output": "33784\n"}, {"type": "stdin_stdout", "input": "1925:07:15\n2010:06:22\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\nAs many of you know, we have two... | [{"type": "stdin_stdout", "input": "4 3\nmeiji 10 1877\ntaisho 6 1917\nrhowa 62 1987\nheisei 22 2010\n2046\n1917\n1988\n1 1\nuniversalbentury 218 2168\n2010\n0 0", "output": "Unknown\ntaisho 6\nUnknown\nuniversalbentury 60\n"}, {"type": "stdin_stdout", "input": "4 3\nmeiji 10 1877\nasisho 6 3102\nsiowa 62 1987\nieisei ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 white sheet of paper ... | [{"type": "stdin_stdout", "input": "676584 172869 696986 939949\n217531 247380 771662 973703\n630670 592931 1018961 967883\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "347722 718484 584813 736820\n280059 317406 1617512 588815\n388486 281361 399827 854715\n", "output": "YES\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\nMike and Joe are playing a game ... | [{"type": "stdin_stdout", "input": "1\n50\n260939408 52936453 298470524 981491199 699765 834662291 553329721 651730905 665925345 395625534 162042985 788733611 54572656 795877605 826562363 882540598 190947839 644851021 335204703 226590818 150893107 902210973 547195018 694426040 952704242 409352930 73032182 137337830 840... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour classmate, whom you do not ... | [{"type": "stdin_stdout", "input": "99 54\nfdabegacbffbgcacafcegfaegcacaegdbcabfgaecgbgfgefddggcdgebaaaccbcafdgcceabddfcacgdccfcgebccfffdaccac\nfdabegabffbgcaafcegfgcacaegdbcabfaecgbgfcgbccfffdaccac\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "99 54\nfdabegacbffbgcacafcegfaegcacaegdbcabfgaecgbgfgefddggcdge... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nGiven a natural numbe... | [{"type": "stdin_stdout", "input": "011", "output": "1024\n"}, {"type": "stdin_stdout", "input": "011", "output": "1024\n"}, {"type": "stdin_stdout", "input": "11", "output": "1024\n"}, {"type": "stdin_stdout", "input": "11", "output": "1024\n"}, {"type": "stdin_stdout", "input": "010", "output": "48\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\nConsider a string, $S$, of $n$ l... | [{"type": "stdin_stdout", "input": "kkkkkkz\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "kkkkkkz\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "ghhggh\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "abbaab\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "akakak\n", "output": "2\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWinnie-the-Pooh likes honey very... | [{"type": "stdin_stdout", "input": "100\n100\n100\n100\n", "output": "9900\n"}, {"type": "stdin_stdout", "input": "100\n100\n100\n100\n", "output": "9900\n"}, {"type": "stdin_stdout", "input": "100\n100\n110\n100\n", "output": "9900\n"}, {"type": "stdin_stdout", "input": "100\n100\n111\n100\n", "output": "9900\n"}, {"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\nA rabbit is playing a role-playi... | [{"type": "stdin_stdout", "input": "1\n-2 11 -1 -2\n11011 11101 11000 00111", "output": "-1\n"}, {"type": "stdin_stdout", "input": "1\n-2 17 -1 -2\n11011 11101 11000 00111", "output": "-1\n"}, {"type": "stdin_stdout", "input": "1\n-2 17 -1 -2\n11011 11101 11000 00011", "output": "-1\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi has come to a party as... | [{"type": "stdin_stdout", "input": "9 73\n67597 102019 5828 66249 138664 64141 11513 192153 16076", "output": "11787970\n"}, {"type": "stdin_stdout", "input": "9 73\n67597 52981 5828 66249 138664 64141 11513 192153 16076", "output": "10905286\n"}, {"type": "stdin_stdout", "input": "9 73\n67597 52981 5828 66249 138664 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\nThere are N persons called Perso... | [{"type": "stdin_stdout", "input": "4 10\n1 2\n2 1\n1 2\n2 1\n1 2\n1 3\n1 4\n2 3\n2 4\n3 4\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "1 0\n1 1\n1 2\n0 6\n-1 1\n1 4\n0 12\n2 1\n4 3\n2 4\n4 0", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 0\n1 1\n1 2\n0 6\n-1 1\n1 4\n0 12\n2 1\n4 3\n2 4\n7 0", "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\nIt was recycling day in Kekoland... | [{"type": "stdin_stdout", "input": "235810013 344493922 0 0 975204641 211157253\n18\n977686151 621301932\n408277582 166435161\n595105725 194278844\n967498841 705149530\n551735395 659209387\n492239556 317614998\n741520864 843275770\n585383143 903832112\n272581169 285871890\n339100580 134101148\n920610054 824829107\n6579... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNian is a monster which lives de... | [{"type": "stdin_stdout", "input": "24 24\n299931317 581208095 975349898 832722683 817690798 482251493 336949323 145902930 573001018 802990442 898055771 253410043 150981561 225791789 53290960 405421751 723296526 565432511 256399554 374970926 22699716 104391316 121063780 149329252\n-295118728 -830122321 -294539299 -9059... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSoma is a fashionable girl. She ... | [{"type": "stdin_stdout", "input": "4\nacb\nabcdef\naA\nabAZ\naaa\na\nwhat\nnone", "output": "3\n2\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\nacb\nabcdef\nAa\nabZA\naaa\n`\nwhat\nnone", "output": "3\n2\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\naca\nebcdaf\naA\nAbZa\n`aa\n`\nswha\nnomf", "output": "2\n2\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\nIn a public bath, there is a sho... | [{"type": "stdin_stdout", "input": "4 1000000000\n0 1000 1000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "9 10\n0 3 5 7 100 110 200 300 311\n", "output": "67\n"}, {"type": "stdin_stdout", "input": "2 4\n0 3\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "2 4\n0 5\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\nПрофиль горного хребта схематичн... | [{"type": "stdin_stdout", "input": "20 20\n........*...........\n........*........*..\n........*........*..\n.**.....*.......**..\n.**.....*.......**..\n.**.....*.....*.**..\n.**.....*.....*.**..\n.**.....*.....*.**..\n.**.....*.....*.**..\n.**.*...*.....*.**..\n.**.*...*.....*.**..\n.**.*...*....**.**..\n.**.*...*..*.... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n`EvilCode` is a game sim... | [{"input": "\"00:30:00\"\n\"00:15:00\"\n\"00:45:00\"\n\"01:15:00\"", "output": "[\"Silver\"]", "fn_name": "evil_code_medal"}, {"input": "\"00:10:01\"\n\"00:00:10\"\n\"00:01:40\"\n\"01:00:00\"", "output": "[\"Bronze\"]", "fn_name": "evil_code_medal"}, {"input": "\"03:15:00\"\n\"03:15:00\"\n\"03:15:01\"\n\"03:15:02\"", "... | 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 matrix with n rows... | [{"type": "stdin_stdout", "input": "100 10000\n", "output": "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCaisa solved the problem with th... | [{"type": "stdin_stdout", "input": "99\n1401 2019 1748 3785 3236 3177 3443 3772 2138 1049 353 1195 310 2388 1322 88 2160 2783 435 2248 1471 706 2468 2319 3156 3506 2794 1999 1983 2519 2597 3735 537 344 3519 3772 3872 2961 3895 2010 10 247 3269 671 2986 942 758 1146 77 1545 3745 1547 2250 2565 217 1406 2070 3010 3404 40... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's define the following recur... | [{"type": "stdin_stdout", "input": "8\n1 4\n487 1\n487 2\n487 3\n487 4\n487 5\n937 6\n487 1\n", "output": "42\n487\n519\n528\n544\n564\n1000\n487\n"}, {"type": "stdin_stdout", "input": "8\n1 4\n487 1\n487 2\n487 3\n487 4\n487 5\n487 6\n487 10\n", "output": "42\n487\n519\n528\n544\n564\n588\n716\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\nAlyona decided to go on a diet a... | [{"type": "stdin_stdout", "input": "39\n100 110 92 26 10 63 56 85 14 64 25 50 75 51 11 41 78 53 52 96 63 12 48 88 57 57 25 52 69 45 4 97 5 87 58 15 72 59 100\n35 -60\n33 -39\n1 65\n11 -65\n34 -63\n38 84\n4 76\n22 -9\n4 -91\n23 -65\n18 7\n2 -17\n29 -15\n19 26\n29 23\n14 -12\n30 -72\n9 14\n12 -1\n27 -21\n32 -67\n7 -3\n26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarpus is an amateur busines... | [{"type": "stdin_stdout", "input": "1000000000000000000 999999999999999999\n", "output": "999999999999999999\n"}, {"type": "stdin_stdout", "input": "1000010000000000000 999999999999999999\n", "output": "999999999999999999\n"}, {"type": "stdin_stdout", "input": "999999999999999998 999999999999999997\n", "output": "89999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 upon a time, a CodeWarrior,... | [{"input": "\"6 birds with 2 wings each = 12 legs\"", "output": "[\"6 birdzo with 2 buwing each = 12 galegga\"]", "fn_name": "sursurungal"}, {"input": "\"\\n3 pigs\\nmet 1 wolf\\n2 days ago\"", "output": "[\"\\n3 pigzo\\nmet 1 wolf\\n2 buday ago\"]", "fn_name": "sursurungal"}, {"input": "\"111 bananas\"", "output": "[\... | 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\nSnuke is conducting an optical e... | [{"type": "stdin_stdout", "input": "1435 1", "output": "4302\n"}, {"type": "stdin_stdout", "input": "1556 2", "output": "4662\n"}, {"type": "stdin_stdout", "input": "457 3", "output": "1368\n"}, {"type": "stdin_stdout", "input": "371 4", "output": "1110\n"}, {"type": "stdin_stdout", "input": "702 4", "output": "2100\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\nLet us define the oddness of a p... | [{"type": "stdin_stdout", "input": "49 1200\n", "output": "366641438\n"}, {"type": "stdin_stdout", "input": "50 1250\n", "output": "472467292\n"}, {"type": "stdin_stdout", "input": "38 716\n", "output": "810790165\n"}, {"type": "stdin_stdout", "input": "31 344\n", "output": "996412950\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\nGiven a string, return the minim... | [{"input": "\"())()))))()()(\"", "output": "[4]", "fn_name": "solve"}, {"input": "\"())(((\"", "output": "[3]", "fn_name": "solve"}, {"input": "\")()(\"", "output": "[2]", "fn_name": "solve"}, {"input": "\"((()\"", "output": "[1]", "fn_name": "solve"}, {"input": "\"(((\"", "output": "[-1]", "fn_name": "solve"}] | 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\nLet w be a string consisting of ... | [{"type": "stdin_stdout", "input": "abaccaba\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ab`cc`ba", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ab`ccaba", "output": "No\n"}, {"type": "stdin_stdout", "input": "`b`cc`ba", "output": "No\n"}, {"type": "stdin_stdout", "input": "ab`cc`b`", "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\nDLS and JLS are bored with a Mat... | [{"type": "stdin_stdout", "input": "7\n2\n1000000000 0\n2\n1000000000 0\n2\n1 0\n2\n1000000000 0\n2\n1 0\n2\n1 0\n2\n1000000000 0\n2\n1 0\n1\n999999999\n1\n99999999\n1\n1000000000\n1\n999999999\n3\n1000000000 999999999 999999998\n7\n2 3 5 7 10 11 12\n", "output": "4\n2\n2\n2\n1\n0\n10\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\nSam is an avid collector of numb... | [{"input": "[3, 2, 6, 2, 1, 3]", "output": "[[[3, 3], [2, 2], [6], [1]]]", "fn_name": "group"}, {"input": "[1, 100, 4, 2, 4]", "output": "[[[1], [100], [4, 4], [2]]]", "fn_name": "group"}, {"input": "[3, 2, 6, 2]", "output": "[[[3], [2, 2], [6]]]", "fn_name": "group"}, {"input": "[-1, 1, -1]", "output": "[[[-1, -1], [1... | 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\nOnce when Gerald studied in the ... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n99\n", "output": "1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, {"type": "stdin_stdout", "input": "geovcaxzjyhxbpnbkbsxfp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp has a string $s[1 \\dot... | [{"type": "stdin_stdout", "input": "6\n8\n20192020\n8\n22019020\n4\n2020\n5\n20002\n6\n729040\n6\n200200\n", "output": "\nYES\nYES\nYES\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "6\n8\n20192020\n8\n22019020\n4\n2020\n5\n20002\n6\n729040\n6\n200200\n", "output": "YES\nYES\nYES\nNO\nNO\nNO\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\nThere are $n$ startups. Startups... | [{"type": "stdin_stdout", "input": "50\n36 36 45 44 -1 -1 13 -1 36 -1 44 36 -1 -1 -1 35 -1 36 36 35 -1 -1 -1 14 36 36 22 36 13 -1 35 -1 35 36 -1 -1 13 13 45 36 14 -1 36 -1 -1 -1 22 36 -1 13\n", "output": "949472419\n"}, {"type": "stdin_stdout", "input": "50\n36 36 45 44 -1 -1 13 -1 36 -1 44 36 -1 -1 -1 35 -1 36 36 35 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Johnny has recently learn... | [{"type": "stdin_stdout", "input": "4000\n", "output": "341934157\n"}, {"type": "stdin_stdout", "input": "3000\n", "output": "949793998\n"}, {"type": "stdin_stdout", "input": "3555\n", "output": "810675957\n"}, {"type": "stdin_stdout", "input": "2999\n", "output": "634360769\n"}, {"type": "stdin_stdout", "input": "3789... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday is Wednesday, the third da... | [{"type": "stdin_stdout", "input": "30 of month\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "17 of month\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "10 of month\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "11 of month\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "12 o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N sightseeing spots on... | [{"type": "stdin_stdout", "input": "6\n-168 -101 -3258 1873 -20088 -2101", "output": "50438\n50438\n44258\n40310\n14598\n50572\n"}, {"type": "stdin_stdout", "input": "6\n-168 -101 -3258 1873 -20088 -1768", "output": "50438\n50438\n44258\n40310\n13932\n50572\n"}, {"type": "stdin_stdout", "input": "6\n-679 -3431 -3258 30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAndrewid the Android is a galaxy... | [{"type": "stdin_stdout", "input": "100\n15 86 17 88 19 90 21 92 23 94 25 96 27 98 29 0 31 2 33 4 35 6 37 8 39 10 41 12 43 14 45 16 47 18 49 20 51 22 53 24 55 26 57 28 59 30 61 32 63 34 65 36 67 38 69 40 71 42 73 44 75 46 77 48 79 50 81 52 83 54 85 56 87 58 89 60 91 62 93 64 95 66 97 68 99 70 1 72 3 74 5 76 7 78 9 80 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\nGerald is very particular to eig... | [{"type": "stdin_stdout", "input": "1000000 1000000\n1000000 999999\n1000000 999998\n999999 1000000\n999999 999998\n999998 1000000\n999998 999999\n999998 999998\n", "output": "respectable\n"}, {"type": "stdin_stdout", "input": "1000000 1000000\n1000000 999999\n1000000 999998\n999999 1000000\n999999 999998\n999998 10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider some square matrix A wi... | [{"type": "stdin_stdout", "input": "100\n", "output": "15"}, {"type": "stdin_stdout", "input": "010\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "001\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "011\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "61\n", "output": "11"}, {"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\nYou are given a binary matrix $A... | [{"type": "stdin_stdout", "input": "16\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "16\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFD0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\nFFC0\n", "output": "1\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\nMasha works in an advertising ag... | [{"type": "stdin_stdout", "input": "3\n4 3\n1 3 1 2\n4 2\n1 1 1 1\n2 1\n1 2\n", "output": "\n2\n6\n1\n"}, {"type": "stdin_stdout", "input": "3\n4 3\n1 3 1 2\n4 2\n1 1 1 1\n2 1\n1 2\n", "output": "2\n6\n1\n"}, {"type": "stdin_stdout", "input": "3\n4 3\n1 3 1 2\n4 2\n1 2 1 1\n2 1\n1 2\n", "output": "2\n3\n1\n"}, {"type":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 blinds are known to consist ... | [{"type": "stdin_stdout", "input": "100 17\n20 61 7 74 87 84 87 35 64 7 36 5 72 20 62 29 29 58 67 51 50 45 82 20 76 79 39 21 5 39 94 13 65 11 3 21 26 2 15 56 20 75 49 27 64 48 51 96 32 80 57 10 57 48 36 83 51 25 45 65 24 22 3 92 45 52 52 58 15 90 23 43 56 88 46 50 72 70 60 47 91 68 40 24 16 44 82 90 17 17 51 71 25 94 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\nTwilight Sparkle learnt that the... | [{"type": "stdin_stdout", "input": "10 10\n1 2\n3 1\n4 3\n1 5\n6 5\n7 4\n8 7\n9 5\n10 4\n6 10\n1 0 0 1 1 0 1 1 0 0\n", "output": "33\n8 7 4 10 6 5 9 5 9 5 1 3 1 3 1 2 1 2 1 5 6 5 6 10 6 10 4 10 4 7 8 7 8 \n"}, {"type": "stdin_stdout", "input": "10 10\n1 2\n3 1\n4 3\n1 5\n6 1\n7 4\n8 7\n9 5\n10 4\n6 10\n1 0 0 1 1 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\nWrite a program which reads a re... | [{"type": "stdin_stdout", "input": "-2 -1 0 10 -18", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 -1 0 11 -18", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 1 3 10 -18", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 0 3 10 -18", "output": "Yes\n"}, {"type": "stdin_stdout", "input":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's consider one interesting w... | [{"type": "stdin_stdout", "input": "dkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjij\ndddkikjjidkkidijjjjkkjjikjdikiidijjikikjijjiijdikkjjjiddjjijkkkjkiijijki... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 to write a function to t... | [{"input": "2\n[\"e|-----------------------------------------------------------------------------|\", \"B|---------------------------8-----------------------8-------------------------|\", \"G|-------------------------7-----------------------7---------------------------|\", \"D|----8-----8-----8----8/9-------7-7/5-0----... | 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\nPlease find the greatest common ... | [{"type": "stdin_stdout", "input": "010 90\n11 496", "output": "10\n1\n"}, {"type": "stdin_stdout", "input": "102 24\n101 116", "output": "6\n1\n"}, {"type": "stdin_stdout", "input": "110 103\n30 10", "output": "1\n10\n"}, {"type": "stdin_stdout", "input": "98 224\n28 84", "output": "14\n28\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\nIn the computer network of the B... | [{"type": "stdin_stdout", "input": "10\n2:7,4-2:5,8-1:3-1:6-1:2-2:10,9\n9:6,7,3,4,10,8,9,5,1\n9:2,1,7,6,9,4,8,10,5\n8:5,2,1,3,6,9,10,8-1:7\n1:8-8:9,10,2,6,3,1,7,4\n9:8,4,1,2,10,9,7,3,5\n9:1,3,6,2,9,10,5,8,4\n9:5,2,7,3,6,4,10,1,9\n9:3,7,6,8,10,5,1,2,4\n1:9-8:2,7,3,6,8,5,1,4\n", "output": "9\n1 2\n1 3\n1 4\n1 5\n1 6\n1 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\nZS the Coder and Chris the Baboo... | [{"type": "stdin_stdout", "input": "8 6 6\n0 0 0 0 0 0 0 0\n709812879 751993522 552838834 932579085 381597201 889756688\n77223016 35398130 932703875 852137134 124534767 472656085\n828677108 158247840 540181954 573979204 389860841 490718346\n666733838 404533406 50010075 311518758 460372535 69832342\n591244215 400838850 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasily exited from a store and n... | [{"type": "stdin_stdout", "input": "amhppqxei543.370.32o544.196nocwgxticn776.562nm212.195dcftrrg635.773n646.814.94vrfmjjsgoi405.114k821.983.12rb749.955.62jifmdlgs615.101hg42.083.41gdqififg908.729qrrgopyn684.451avcjul727.150s864.068bcd196.732.37jd349.984.25ghn379.763.11dw881.650.19eysthrm790.534.68gilg546.048qs648.876pd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecenlty Luba got a credit card ... | [{"type": "stdin_stdout", "input": "20 23036\n-1 1 -1 -1 -1 -1 1 -1 -1 0 0 1 1 0 -1 1 0 1 -1 -1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "20 23036\n-1 1 -1 -1 -1 -1 1 -1 -2 0 0 1 1 0 -1 1 0 1 -1 -1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "20 23036\n-1 1 -1 -1 -1 -1 1 -1 -2 0 0 1 1 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\nThis is the easy version of the ... | [{"type": "stdin_stdout", "input": "5 7\n#....#.\n.#.#...\n#....#.\n#....##\n#.#....\n4 1 1 1 0 3 1\n", "output": "\n3\n"}, {"type": "stdin_stdout", "input": "3 10\n#..###..##\n...#..###.\n.###..##..\n1 1 1 3 1 1 2 2 2 1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "3 6\n..#..#\n......\n#####.\n1 1 2 1 1 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\nGiven a non-negative integer, re... | [{"input": "8675309", "output": "[[8, 6, 7, 5, 3, 0, 9]]", "fn_name": "digitize"}, {"input": "1230", "output": "[[1, 2, 3, 0]]", "fn_name": "digitize"}, {"input": "123", "output": "[[1, 2, 3]]", "fn_name": "digitize"}, {"input": "1", "output": "[[1]]", "fn_name": "digitize"}, {"input": "0", "output": "[[0]]", "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\nGiven two arrays of integers `m`... | [{"input": "[-2398632, -9172846, -4728162]\n[-2398632, -9235623, -8235492]", "output": "[true]", "fn_name": "duplicate_elements"}, {"input": "[2398632, 9172846, 4728162]\n[2398632, 9235623, 8235492]", "output": "[true]", "fn_name": "duplicate_elements"}, {"input": "[-2, -4, -6, -8]\n[-2, -3, -5, -7]", "output": "[true]... | 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 a sequence $a$ consist... | [{"type": "stdin_stdout", "input": "5\n1000000000000000000 352839520853234088 175235832528365792 753467583475385837 895062156280564685\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n1000000000000000000 352839520853234088 175235832528365792 753467583475385837 895062156280564685\n", "output": "3\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\nYour task is to write a function... | [{"input": "\"111a 222c 444y 777u 999a 888p\"", "output": "[1459]", "fn_name": "do_math"}, {"input": "\"10a 90x 14b 78u 45a 7b 34y\"", "output": "[60]", "fn_name": "do_math"}, {"input": "\"24z6 1z23 y369 89z 900b\"", "output": "[1414]", "fn_name": "do_math"}, {"input": "\"24z6 1x23 y369 89a 900b\"", "output": "[1299]",... | 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\nConsider an analog clock whose h... | [{"type": "stdin_stdout", "input": "1000 1000 6 1\n", "output": "1997.69677296990135817456\n"}, {"type": "stdin_stdout", "input": "858 203 11 21\n", "output": "1031.72462874262234588940\n"}, {"type": "stdin_stdout", "input": "944 305 10 32\n", "output": "1142.87647693641628066086\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays $a$ and... | [{"type": "stdin_stdout", "input": "5\n-999999999 999999999 1252085585 999999998 -414067761\n-1011239935 -1000000000 -1000000000 -1397885361 1010000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n-999999999 999999999 1252085585 999999998 -421666581\n-1011239935 -1000000000 -1000000000 -1397885361 101000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDeoxyribonucleic acid (DNA) is a... | [{"input": "\"GTATCGATCGATCGATCGATTATATTTTCGACGAGATTTAAATATATATATATACGAGAGAATACAGATAGACAGATTA\"", "output": "[\"CATAGCTAGCTAGCTAGCTAATATAAAAGCTGCTCTAAATTTATATATATATATGCTCTCTTATGTCTATCTGTCTAAT\"]", "fn_name": "DNA_strand"}, {"input": "\"ATTGC\"", "output": "[\"TAACG\"]", "fn_name": "DNA_strand"}, {"input": "\"AAAA\"", "... | 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 daily train consists of N cars... | [{"type": "stdin_stdout", "input": "1 3\n100101110000001011000001111110010011110010010111000101\n001010000000101111100000000000000111101010101111111010\n011110011110000001010000101110001011111010001001111010", "output": "86\n"}, {"type": "stdin_stdout", "input": "1 3\n100101110000001111000001111110010011110010010111000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSerge came to the school dining ... | [{"type": "stdin_stdout", "input": "5 1\n8 4 8 7 3\n9\n5\n2 1 3\n1 5 1\n2 1 13\n2 1 7\n2 1 3\n", "output": "8\n8\n8\n8\n8\n"}, {"type": "stdin_stdout", "input": "5 1\n8 4 8 7 3\n13\n5\n2 1 3\n1 1 1\n2 1 8\n2 1 7\n2 1 3\n", "output": "8\n8\n7\n8\n8\n"}, {"type": "stdin_stdout", "input": "5 1\n8 1 8 7 3\n9\n5\n2 1 3\n1 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a square in the xy-plan... | [{"type": "stdin_stdout", "input": "67 -89 -90 -11\n", "output": "-168 -168 -11 -246\n"}, {"type": "stdin_stdout", "input": "-100 100 100 -100\n", "output": "300 100 100 300\n"}, {"type": "stdin_stdout", "input": "0 -100 -100 100\n", "output": "-300 0 -200 -200\n"}, {"type": "stdin_stdout", "input": "31 -41 -59 26\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 sequence a_1,a_2,... ,a_n is s... | [{"type": "stdin_stdout", "input": "6\n105 119 204 119 105 119", "output": "1\n"}, {"type": "stdin_stdout", "input": "6\n105 119 204 119 105 78", "output": "2\n"}, {"type": "stdin_stdout", "input": "6\n105 119 105 81 105 119", "output": "1\n"}, {"type": "stdin_stdout", "input": "6\n105 119 204 119 105 81", "output": "2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function that takes an i... | [{"input": "91415", "output": "[[24377, 12188, 6094]]", "fn_name": "solution"}, {"input": "2020", "output": "[[539, 269, 134]]", "fn_name": "solution"}, {"input": "1415", "output": "[[377, 188, 94]]", "fn_name": "solution"}, {"input": "300", "output": "[[80, 40, 19]]", "fn_name": "solution"}, {"input": "141", "output":... | 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\nThe Patisserie AtCoder sells cak... | [{"type": "stdin_stdout", "input": "1000 1000 1000 3000\n8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801 8864823801... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour favorite shop sells n Kinde... | [{"type": "stdin_stdout", "input": "4\n1 1 1\n1000000000 1000000000 1000000000\n1000000000 999999999 1\n1247516660 666666667 666666666\n", "output": "1\n1\n1000000000\n580849995\n"}, {"type": "stdin_stdout", "input": "4\n1 1 1\n1000000000 1000000000 1000000000\n1000000000 999999999 1\n999999999 666666667 666666666\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 probably know the 42 number ... | [{"input": "\"You're becoming a true freudian expert\"", "output": "[\"sex sex sex sex sex sex\"]", "fn_name": "to_freud"}, {"input": "\"This is a longer test\"", "output": "[\"sex sex sex sex sex\"]", "fn_name": "to_freud"}, {"input": "\"This is a test\"", "output": "[\"sex sex sex sex\"]", "fn_name": "to_freud"}, {"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\nRecall that the sequence $b$ is ... | [{"type": "stdin_stdout", "input": "10\n10\n-1 5 10 2 -8 -7 -6 5 -3 -1\n10\n2 2 1 4 5 6 12 3 9 10\n1\n6\n1\n-7\n11\n5 -4 1 2 3 -5 -7 -10 -2 1 12\n4\n-4 -5 -6 1\n7\n1 2 6 1 2 -6 -2\n5\n-1 -5 4 -2 -9\n1\n9\n3\n1 -1 1\n", "output": "7\n12\n6\n-7\n14\n-3\n4\n1\n9\n1\n"}, {"type": "stdin_stdout", "input": "10\n10\n-1 5 17 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\nLittle boy Petya loves stairs ve... | [{"type": "stdin_stdout", "input": "500 50\n72 474 467 241 442 437 336 234 410 120 438 164 405 177 142 114 27 20 445 235 46 176 88 488 242 391 28 414 145 92 206 334 152 343 367 254 100 243 155 348 148 450 461 483 97 34 471 69 416 362\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "500 50\n72 474 467 241 442 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\nHiking club \"Up the hill\" just... | [{"type": "stdin_stdout", "input": "700\n399\n", "output": "400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou've got a string $S$ consisti... | [{"type": "stdin_stdout", "input": "49 3\nabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "49 3\nbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7 -475391\nqohshra\n", "output": "Yes\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven three distinct integers $a... | [{"type": "stdin_stdout", "input": "69\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 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\nIn the good old days, the Intern... | [{"type": "stdin_stdout", "input": "2 5\npermit 192168?? ?12??34?\ndeny 19216899 012243?5\n19216711 11233340 HiIamACracker\n19216891 01234345 Hello\n19216899 01234345 HiIamAlsoACracker\n19216809 11200340 World\n00000000 99999999 TheEndOfTheWorld\n1 2\npermit 12345678 23456789\n19216891 01234345 Hello\n12345678 23456789... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 technologies develop, manufac... | [{"type": "stdin_stdout", "input": "bn\n100\ndf\nyb\nze\nml\nyr\nof\nnw\nfm\ndw\nlv\nzr\nhu\nzt\nlw\nld\nmo\nxz\ntp\nmr\nou\nme\npx\nvp\nes\nxi\nnr\nbx\nqc\ngm\njs\nkn\ntw\nrq\nkz\nuc\nvc\nqr\nab\nna\nro\nya\nqy\ngu\nvk\nqk\ngs\nyq\nop\nhw\nrj\neo\nlz\nbh\nkr\nkb\nma\nrd\nza\nuf\nhq\nmc\nmn\nti\nwn\nsh\nax\nsi\nnd\ntz\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp plays \"Game 23\". Init... | [{"type": "stdin_stdout", "input": "289777775 341477104\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "100000000 100000001\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "289777775 341477104\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "100000000 100000001\n", "output": "-1\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 year of 2012 is coming...\n\... | [{"type": "stdin_stdout", "input": "22\nCleo likes Snowy\nCleo likes Troll\nChapay likes Dracul\nSnowy likes Troll\nDracul likes Chapay\nDracul likes Snowy\nChapay likes Cleo\nSnowy likes Chapay\nDracul likes Troll\nAnka likes Hexadecimal\nSnowy likes Anka\nHexadecimal likes Cleo\nHexadecimal likes Troll\nDracul likes ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSpecial Agent Smart Beaver works... | [{"type": "stdin_stdout", "input": "1023456789??????????????????????????????????????ABCDIFGHIJ\n", "output": "362880000000000000000000000000000000000000000"}, {"type": "stdin_stdout", "input": "?GJ??\n", "output": "81000\n"}, {"type": "stdin_stdout", "input": "BA?C?\n", "output": "64800\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\nTakahashi throws N dice, each ha... | [{"type": "stdin_stdout", "input": "2000 3\n", "output": "337087647\n337087647\n337085647\n337085647\n337083647\n337083647\n337081647\n337081647\n337079647\n337079647\n337077647\n337077647\n337075647\n337075647\n337073647\n337073647\n337071647\n337071647\n337069647\n337069647\n337067647\n337067647\n337065647\n337065647... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAre you fond of collecting some ... | [{"type": "stdin_stdout", "input": "5\n7 4 1 1 2\n\n\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n1 1 1 1 1\n\n\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5\n13 1 1 1 -1", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n13 0 1 1 -1", "output": "NO\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\nGleb ordered pizza home. When th... | [{"type": "stdin_stdout", "input": "10 2\n11\n1 1 0\n2 2 3\n3 3 0\n6 4 0\n5 5 0\n6 6 0\n7 7 4\n8 8 7\n9 18 3\n10 10 100\n9 0 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10 2\n11\n1 1 0\n2 2 3\n3 3 0\n6 4 0\n5 5 0\n6 6 0\n7 7 8\n8 8 7\n9 18 3\n10 10 100\n9 0 1\n", "output": "2\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\nExample\n\nInput\n\nanagram\ngra... | [{"type": "stdin_stdout", "input": "anagram\ngrandmosher", "output": "4\n"}, {"type": "stdin_stdout", "input": "anbgram\ngrandmosher", "output": "3\n"}, {"type": "stdin_stdout", "input": "anbfram\ngrandmosher", "output": "2\n"}, {"type": "stdin_stdout", "input": "narfamb\nreoahmodsrg", "output": "1\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\nToday is Devu's birthday. For ce... | [{"type": "stdin_stdout", "input": "40\n37 15\n48 10\n16 5\n30 23\n32 20\n24 4\n46 19\n16 13\n1 1\n37 22\n44 29\n24 6\n27 10\n39 16\n28 13\n5 4\n31 22\n9 2\n30 26\n23 16\n16 12\n43 5\n29 1\n20 5\n40 12\n18 14\n22 15\n29 2\n3 2\n6 3\n45 28\n42 34\n43 32\n10 10\n12 8\n10 8\n4 1\n17 17\n16 7\n8 7\n", "output": "796297179\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sequence of non-negative integ... | [{"type": "stdin_stdout", "input": "5\n4\n1 3 7 15\n4\n1 2 4 8\n5\n1 2 3 4 5\n4\n11 13 15 1\n1\n0\n", "output": "0 0 0 0 \n0 1 3 7 \n0 1 0 3 2 \n0 2 0 14 \n0 \n"}, {"type": "stdin_stdout", "input": "5\n4\n4 3 7 20\n4\n1 2 4 5\n5\n1 0 3 4 5\n4\n11 16 15 1\n1\n0\n", "output": "0 4 0 3\n0 1 3 2\n0 1 0 3 2\n0 11 16 30\n0\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\nINTERCAL is the oldest of esoter... | [{"type": "stdin_stdout", "input": "aMCT]:0hDJ*Up5g_l:O&>>%gjQkZkb(mi&;\\7dL\"nWOGz/;,6h*@Q0R53MS2<}F~+Ms\\\"cF-lgF0>C&y7)72\\.T\"8*#VO=|^OtYs\n", "output": "122\n212\n240\n152\n112\n94\n80\n246\n244\n208\n254\n170\n156\n98\n198\n236\n196\n218\n106\n142\n232\n0\n216\n190\n144\n204\n180\n124\n132\n144\n50\n94\n32\n50\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\nIntroduction \n\nMr. Safety love... | [{"input": "\"waterheater\"", "output": "[\"92837432837\"]", "fn_name": "unlock"}, {"input": "\"birdhouse\"", "output": "[\"247346873\"]", "fn_name": "unlock"}, {"input": "\"toilet\"", "output": "[\"864538\"]", "fn_name": "unlock"}, {"input": "\"Nokia\"", "output": "[\"66542\"]", "fn_name": "unlock"}, {"input": "\"Valu... | 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\nBackground\nThere is a message t... | [{"input": "\"you've gotta dance like there's nobody watching, love like you'll never be hurt, sing like there's nobody listening, and live like it's heaven on earth.\"", "output": "[\"you've gotta dacne like teehr's nbdooy wachintg, love like ylo'ul neevr be hrut, sing like teehr's nbdooy leiinnstg, and live like it's... | 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 lives in a strange world. ... | [{"type": "stdin_stdout", "input": "103\n100\n68 38 41 54 37 11 35 26 43 97 70 3 13 11 64 83 3 95 17 16 4 13 22 27 64 20 95 38 40 87 6 17 95 67 31 24 85 33 98 24 89 101 66 38 42 5 95 18 95 13 103 85 72 73 68 93 22 59 48 59 72 46 5 41 54 32 48 69 3 76 2 26 102 44 39 58 55 85 40 16 81 78 92 63 25 97 83 2 54 16 20 63 19 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two positive integ... | [{"type": "stdin_stdout", "input": "1000000000000000000\n1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n1000000000100000000\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\nVova plays a computer game known... | [{"type": "stdin_stdout", "input": "15 100\n1 8 8\n2 200 101\n2 10 99\n1 9 9\n2 10 99\n2 200 101\n1 14 4\n2 194 195\n2 194 194\n2 990 290\n1 2 999992\n2 6 256\n2 7 256\n2 2 999988\n2 2 252\n", "output": "NO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "15 100\n1 8 8\n2 200 101\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 certain type of steel is grade... | [{"type": "stdin_stdout", "input": "3 \n127 1.5460478864469624 13440\n71 -1 8462\n1 -1 0", "output": "7\n10\n6\n"}, {"type": "stdin_stdout", "input": "3 \n127 1.5460478864469624 13440\n16 -1 14390\n1 -2 0", "output": "7\n8\n6\n"}, {"type": "stdin_stdout", "input": "3 \n127 2.9825462611697358 13440\n16 -2 14390\n1 -2 0"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAshish has an array $a$ of size ... | [{"type": "stdin_stdout", "input": "10 4\n91239 51189 50977 96098 56330 55725 6448 7351 60071 93359\n", "output": "50977\n"}, {"type": "stdin_stdout", "input": "10 4\n91239 51189 50977 96098 56330 55725 6448 7351 82063 93359\n", "output": "50977\n"}, {"type": "stdin_stdout", "input": "10 4\n30551 51189 50977 96098 5633... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBroken crypto generator\n\nJAG (... | [{"type": "stdin_stdout", "input": "A+A++A\nZ-Z--Z+-Z\n[ESRVEER]\nJ---?---J\n++++++++A+++Z-----------A+++Z\n[[++-+--?[--++-?++-+++L]][-+-----+-O]]++++---+L\n.", "output": "ABC\nZYXZ\nREEVRSE\nJAG\nICPC\nJAPAN\n"}, {"type": "stdin_stdout", "input": "A+A++A\nZ-ZZ--+-Z\n[ESRVEER]\nJ---?---J\n++++++++A+++Z-----------A+++Z\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have $n$ students under your... | [{"type": "stdin_stdout", "input": "4\n7\n4 2 4 1 4 3 4\n5\n2 1 5 4 3\n1\n1\n4\n1 1 1 3\n", "output": "3\n1\n0\n2\n"}, {"type": "stdin_stdout", "input": "4\n7\n4 2 4 1 4 3 4\n5\n2 1 5 1 3\n1\n1\n4\n1 1 1 3\n", "output": "3\n2\n0\n2\n"}, {"type": "stdin_stdout", "input": "4\n7\n4 2 4 1 4 3 4\n5\n2 1 2 1 3\n1\n1\n4\n1 1 ... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.