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\nFirst-rate specialists graduate ... | [{"type": "stdin_stdout", "input": "prntaxhysjfcfmrjngdsitlguahtpnwgbaxptubgpwcfxqehrulbxfcjssgocqncscduvyvarvwxzvmjoatnqfsvsilubexmwugedtzavyamqjqtkxzuslielibjnvkpvyrbndehsqcaqzcrmomqqwskwcypgqoawxdutnxmeivnfpzwvxiyscbfnloqjhjacsfnkfmbhgzpujrqdbaemjsqphokkiplblbflvadcyykcqrdohfasstobwrobslaofbasylwiizrpozvhtwyxtzl\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\nMemory is now interested in the ... | [{"type": "stdin_stdout", "input": "100000 25000\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "167552 16353\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "113151 20996\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "141391 23890\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "1001... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVery soon there will be a parade... | [{"type": "stdin_stdout", "input": "10\n18 18\n71 471\n121 362\n467 107\n138 254\n13 337\n499 373\n337 387\n147 417\n76 417\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n18 30\n71 471\n121 362\n467 107\n170 127\n13 337\n499 373\n337 387\n147 417\n122 417\n", "output": "4"}, {"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\nIt's that time of the year, Feli... | [{"type": "stdin_stdout", "input": "100 2\n1 1\n1 2\n1 2\n1 1\n1 2\n1 1\n1 2\n1 1\n1 1\n1 1\n1 2\n1 1\n1 1\n1 1\n1 2\n1 1\n1 2\n1 1\n1 2\n1 2\n1 1\n1 1\n1 1\n1 2\n1 2\n1 2\n1 2\n1 1\n1 2\n1 1\n1 1\n1 2\n1 1\n1 1\n1 1\n1 2\n1 2\n1 1\n1 1\n1 1\n1 1\n1 2\n1 1\n1 2\n1 1\n1 2\n1 1\n1 2\n1 1\n1 2\n1 1\n1 2\n1 2\n1 2\n1 1\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThanks to your help, Heidi is co... | [{"type": "stdin_stdout", "input": "688094\n", "output": "abcdefghijklmnopqrssrqpomlkjihgfebbbccddeeffgghhiijjkkllmmnnooppqqrrss abcdefghijklmnopqrs\n"}, {"type": "stdin_stdout", "input": "912733\n", "output": "abcdefghijklmnopqrstsrqpnljigfedbccddeeffgghhiijjkkllmmnnooppqqrrsstt abcdefghijklmnopqrst\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\nYou are given two strings s and ... | [{"type": "stdin_stdout", "input": "ccaaa?bc?baccbccccbca?cccab??aacccbaac?bccacc?accccaccbcbbcbc\ncbaaacccc\n", "output": "ccaaaabcabaccbccccbcaacccabaaaacccbaacabccaccaaccccaccbcbbcbc\n"}, {"type": "stdin_stdout", "input": "ccaaa?bc?bbccbccccbca?cccab??aacccbaac?bccacc?accccaccbcbbcbc\ncbaaacccc\n", "output": "ccaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWherever the destination is, who... | [{"type": "stdin_stdout", "input": "20 50000 50000\n2 45955 55488\n1 19804 29337\n2 3767 90811\n2 24025 33558\n1 46985 56518\n2 21094 30627\n2 5787 15320\n1 4262 91306\n2 37231 46764\n1 18125 27658\n1 36532 12317\n1 31330 40863\n1 18992 28525\n1 29387 38920\n1 44654 54187\n2 45485 55018\n2 36850 46383\n1 44649 54182\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 the year of 30XX participants... | [{"type": "stdin_stdout", "input": "10 10 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n1 1 9 1\n7 1 4 1\n10 1 7 1\n2 1 7 1\n3 1 2 1\n5 1 2 1\n10 1 5 1\n6 1 9 1\n", "output": "3\n4\n4\n3\n3\n4\n3\n3\n4\n3\n"}, {"type": "stdin_stdout", "input": "10 18 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n1 1 9 1\n7 1 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\nYou have a set of n distinct pos... | [{"type": "stdin_stdout", "input": "26294 4\n2 3 5 6\n4 4 3 1 4 1 4 3 4 2 2 2 4 3 1 4 4 1 2 4 3 2 4 1 1 2 1 2 2 3 2 1 1 2 1 2 1 2 4 2 4 3 2 4 4 4 1 1 2 3 2 4 3 3 1 1 3 2 1 3 2 3 1 1 1 2 4 4 2 4 3 4 2 4 1 2 3 4 2 1 3 1 3 2 1 3 2 3 1 2 4 2 1 3 2 3 4 4 1 1 3 4 4 4 3 1 2 1 2 2 1 2 4 1 1 3 2 4 4 4 4 3 1 1 4 3 2 4 4 2 2 4 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHansa is throwing a birthday par... | [{"type": "stdin_stdout", "input": "20\n24 je6kbgm514608c5g336fl2jmi46fb5h2j250lhcinhhfl4i90ee9jg5g3f6ab263hinmhj5c4i8d0flee0fa55c61lf5mh130354ji6fja6g7f3085jd8fkik5lmjkec983f0j19iimfn969j03a43kifkfjk2g6mfac255kbj83d9gfffbk70i17g7knkllabamje3ih8n5badfa7hm6k5ibgj19b290ib6blbjn6d1224935775ki8i5kfbheg26a3a07kh4ahm07d6alid... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGazi is a very talented mathemat... | [{"type": "stdin_stdout", "input": "4\n4_1\n52_2\n63_124\n25141452_5575\n\nSAMPLE", "output": "4\n0 or 9\n2\n8\n"}, {"type": "stdin_stdout", "input": "4\n4_1\n52_2\n63_124\n25141452_5575\n\nS@MPLE", "output": "4\n0 or 9\n2\n8\n"}, {"type": "stdin_stdout", "input": "4\n4_1\n52_2\n63_124\n25141452_5575\n\nR@MPLE", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Shino is interested in th... | [{"type": "stdin_stdout", "input": "5 5\n1 13 3 21 5\n1\n2\n4\n2\n2\n\nELONAS", "output": "1\n2\n3\n2\n2\n"}, {"type": "stdin_stdout", "input": "5 5\n1 13 3 21 5\n1\n2\n4\n4\n2\n\nELONAS", "output": "1\n2\n3\n3\n2\n"}, {"type": "stdin_stdout", "input": "5 5\n1 3 0 10 4\n1\n2\n2\n5\n5\n\nSAMPLE", "output": "1\n2\n2\n1\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\nGandalf the Grey is in trouble a... | [{"type": "stdin_stdout", "input": "100\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are on a game show \"Who Wan... | [{"type": "stdin_stdout", "input": "444\n793\n255\n144\n906\n931\n102\n101\n301\n341\n340\n308\n524\n678\n587\n405\n718\n733\n466\n145\n13\n27\n717\n714\n899\n911\n121\n602\n864\n882\n876\n761\n886\n640\n697\n44\n29\n288\n938\n525\n331\n160\n940\n50\n445\n67\n65\n188\n735\n524\n600\n408\n836\n939\n949\n89\n967\n433\n92... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n1000000000000001 dogs suddenly a... | [{"type": "stdin_stdout", "input": "123456789", "output": "jjddja"}, {"type": "stdin_stdout", "input": "71095103", "output": "eynzga\n"}, {"type": "stdin_stdout", "input": "50389265", "output": "dffxhq\n"}, {"type": "stdin_stdout", "input": "56744729", "output": "dtdmwo\n"}, {"type": "stdin_stdout", "input": "61759127"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a bingo card with a 3\\t... | [{"type": "stdin_stdout", "input": "60 106 34\n92 41 43\n39 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "60 88 34\n92 41 43\n39 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "60 68 34\n92 41 43\n39 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 decided to write a book... | [{"type": "stdin_stdout", "input": "10\nyakutsl 17\nkyastul 49\nysjutak 102\ntvl`kty 0\ntakvysi 11\nxavksks 3\nkstujby 117\nybstlvk 116\nyauktsk 317\njrkutay 111", "output": "10\n7\n2\n5\n4\n6\n1\n9\n8\n3\n"}, {"type": "stdin_stdout", "input": "10\nyakussl 17\nkyastul 49\nysjutak 102\ntvl`kty 1\ntakvysi 11\nxavksks 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\nHow many hours do we have until ... | [{"type": "stdin_stdout", "input": "182", "output": "-134\n"}, {"type": "stdin_stdout", "input": "339", "output": "-291\n"}, {"type": "stdin_stdout", "input": "-117", "output": "165\n"}, {"type": "stdin_stdout", "input": "467", "output": "-419\n"}, {"type": "stdin_stdout", "input": "-155", "output": "203\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 word `internationalization` ... | [{"type": "stdin_stdout", "input": "intfrnationalization", "output": "i18n\n"}, {"type": "stdin_stdout", "input": "noitazilanoitanrftni", "output": "n18i\n"}, {"type": "stdin_stdout", "input": "ooitazilanoitanrftni", "output": "o18i\n"}, {"type": "stdin_stdout", "input": "onilazitanojianrftot", "output": "o18t\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\nAtCoDeer the deer recently bough... | [{"type": "stdin_stdout", "input": "11 12 -1", "output": "3\n"}, {"type": "stdin_stdout", "input": "11 20 -1", "output": "3\n"}, {"type": "stdin_stdout", "input": "5 -1 33", "output": "3\n"}, {"type": "stdin_stdout", "input": "5 -2 33", "output": "3\n"}, {"type": "stdin_stdout", "input": "3 17 -1", "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\nLet p (i) be the i-th prime numb... | [{"type": "stdin_stdout", "input": "2\n219\n0", "output": "5\n136114\n"}, {"type": "stdin_stdout", "input": "2\n279\n0", "output": "5\n231208\n"}, {"type": "stdin_stdout", "input": "2\n195\n0", "output": "5\n105540\n"}, {"type": "stdin_stdout", "input": "2\n199\n0", "output": "5\n110364\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\nConsider a tic-tac-toe on a 3x3 ... | [{"type": "stdin_stdout", "input": "bbw\nbww\n+b+\nbwb\nwbx\nwbw\n0", "output": "NA\nNA\n"}, {"type": "stdin_stdout", "input": "caw\nwbw\n+b+\nbwb\nwxb\nwbw\n0", "output": "NA\nNA\n"}, {"type": "stdin_stdout", "input": "bbw\nbww\n+b+\nbwb\nwbx\nwbv\n0", "output": "NA\nNA\n"}, {"type": "stdin_stdout", "input": "cbw\nbww... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOrdinary Jigsaw puzzles are solv... | [{"type": "stdin_stdout", "input": "6\nWwRR wwrg RRGb rGBG RGrb RrRg RGrg rgBB Wrgr\nRrGb WWGR rGgb Wbrg wgBb GgBg WbBG Wwwg WWGG\nRBbr Wrbr wGGG wggR WgGR WBWb WRgB wBgG WBgG\nwBrg rGgb WRrB WWbw wRRB RbbB WRrb wrbb WgrG\nWrwB WWww wRRB WGGb Wbbg WBgG WrbG Wrww RBgg\nWWgg RBrr Rggr RGBg Wbgr WGbg WBbr WGWB GGGg", "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\nEmergency Evacuation\n\nThe Japa... | [{"type": "stdin_stdout", "input": "0 1 3\n1 1\n-2 18\n0 4\n3 -1\n1 3\n0 1\n2 0", "output": "20\n"}, {"type": "stdin_stdout", "input": "0 1 3\n0 1\n-2 35\n0 3\n5 -1\n1 2\n0 1\n5 0", "output": "37\n"}, {"type": "stdin_stdout", "input": "0 3 3\n1 1\n-2 18\n0 3\n5 -1\n1 2\n0 1\n5 0", "output": "18\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\nAlmost Identical Programs\n\nThe... | [{"type": "stdin_stdout", "input": "print\"hello\";print133\nprint\"hello\";print123\nread\"B1input\";solve;output;\n;tuptuo;evlos;\"2B\"daer\nread\"C1\";solve;output\"C1ans\";\nread\"C2\";solve;output\"C2ans\";\n\"\"\"\"\"\"\"\"\n\"\"\"42\"\"#\"\"\nslow\"program\"\nfast\"code\"\n\"super\"fast\"program\"\n\"super\"fast... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 D: Legendary Sword\n\n* ... | [{"type": "stdin_stdout", "input": "10 10\nS . . . . . . . . .\n. . . . . . . . . .\n. . . . 1 . . . . .\n. . . . . . . . . .\n. . . . . . . . . .\n. . . . . . . 3 . .\n. . . . . . . . . .\n. . . . . 4 . . . .\n. . . . . . . . . .\n2 . . . . . . . . G\n10 10\nS . . . . . 3 . . .\n. . 3 . . . . . . .\n. . . . 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\nFizzBuzz is a game in which inte... | [{"type": "stdin_stdout", "input": "10010000000", "output": "990079BuzzFizz141999\n"}, {"type": "stdin_stdout", "input": "10010000001", "output": "90079BuzzFizz1419990\n"}, {"type": "stdin_stdout", "input": "10000000001", "output": "3FizzBuzz1418650796F\n"}, {"type": "stdin_stdout", "input": "10000001001", "output": "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\nProblem Statement\n\nYou want to... | [{"type": "stdin_stdout", "input": "5 4 10\n4 3 1\n6 4 3\n3 2 4\n2 2 1\n0 5 3\n1 2\n2 1\n3 4\n4 5\n3 3 1000\n1000 2 100\n1 7 100\n10 9 100\n1 2\n1 1\n3 2\n1 0 5\n25 25 2\n1 -1 25\n25 25 2\n5 5 100\n1 1 20\n1 1 20\n10 1 1\n10 1 1\n10 1 0\n1 2\n2 1\n3 4\n4 5\n5 3\n3 3 100\n70 17 10\n50 16 20\n90 10 10\n1 2\n2 2\n2 3\n0 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nB: Pivots\n\nproblem\n\nGiven a ... | [{"type": "stdin_stdout", "input": "5 2\n1 5 3 2 4\n5 3", "output": "2 4 5 1 3\n"}, {"type": "stdin_stdout", "input": "5 0\n1 5 3 2 4\n5 3", "output": "1 5 3 2 4\n"}, {"type": "stdin_stdout", "input": "5 2\n1 5 3 2 4\n3 2", "output": "4 3 1 5 2\n"}, {"type": "stdin_stdout", "input": "5 1\n1 5 3 2 4\n5 3", "output": "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\nRecently, chef Ciel often hears ... | [{"type": "stdin_stdout", "input": "6\nklin 18\nCiel's Drink 174\nThe curry 2nd edition 677505\necis omelet 85855\nunagi 1\n She firsu amd last letters can eb a space 253", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\nklin 18\nCiel's Drink 133\nThe curry 2nd edition 888888\necir omelet 85855\nunagi 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\nYou are given an array of intege... | [{"type": "stdin_stdout", "input": "6\n300000000 200000000 300000000 200000000 1000000000 300000000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "6\n300000000 200000000 173776099 200000000 1000000000 300000000\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "6\n300000000 200000000 173776099 200000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 plate and you want to... | [{"type": "stdin_stdout", "input": "100 100 20\n", "output": "4880\n"}, {"type": "stdin_stdout", "input": "100 100 25\n", "output": "5100\n"}, {"type": "stdin_stdout", "input": "100 100 16\n", "output": "4416\n"}, {"type": "stdin_stdout", "input": "110 100 25\n", "output": "5600\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\nMasha lives in a multi-storey bu... | [{"type": "stdin_stdout", "input": "1000 999 1000 1000 1000 1000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1000 999 1100 1000 1000 1000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "188 288 112 595 331 414\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "837 544 703 808 549 694\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s consist... | [{"type": "stdin_stdout", "input": "26\nlolthisiscoolfreehackforya\n", "output": "llthisiscoolfreehackforya\n"}, {"type": "stdin_stdout", "input": "26\nlolthisiscoolfrfehackforya\n", "output": "llthisiscoolfrfehackforya\n"}, {"type": "stdin_stdout", "input": "26\nayrofkcahefrfloocsisihtlol\n", "output": "arofkcahefrflo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 owns a small hotel in th... | [{"type": "stdin_stdout", "input": "AS\n2H 4C TH JH AD\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "4D\nAS AC AD AH 5H\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "KH\n3C QD 9S KS 8D\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "2S\n2D 3D 4D 5D 6D\n", "output": "YES\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\nTanya has n candies numbered fro... | [{"type": "stdin_stdout", "input": "105\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 5 5 5 6\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "105\n5 5 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe guessed some integer number x... | [{"type": "stdin_stdout", "input": "25\n2\n999389 999917\n2\n999307 999613\n2\n999529 999611\n2\n999221 999853\n2\n999683 999433\n2\n999907 999749\n2\n999653 999499\n2\n999769 999931\n2\n999809 999287\n2\n999233 999239\n2\n999553 999599\n2\n999371 999763\n2\n999491 999623\n2\n999961 999773\n2\n999671 999269\n2\n999883 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 uppercase Latin ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1999936805\n"}, {"type": "stdin_stdout", "input": "956817411 1000000000\n", "output": "1956733985\n"}, {"type": "stdin_stdout", "input": "839933539 1000000000\n", "output": "1839852485\n"}, {"type": "stdin_stdout", "input": "1000000000 956817411\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\nPetya loves lucky numbers. Every... | [{"type": "stdin_stdout", "input": "485 9554485\n7759121368632736852539182753173468028218114958118158732302477551670775608015153610483175626465946144780731573954182900412248382710280376491925985206156109890139333293746203940442347501294009600230166311978044218247083102712257326301109220002496805123344816427514286225153... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 chips arranged in a ... | [{"type": "stdin_stdout", "input": "101 2\nBWBWBWBWWWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBBWWBWBWBBBWBWBBBBBWBWWWBWWWBWWWBWBWBWWWBWBWB\n", "output": "BBBWBWWWWWWWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBBBBWWWWBBBBBBBBBBBBBBWWWWWWWWWWWWWWBWWWWWWWBBB\n"}, {"type": "stdin_stdout", "input": "101 2\nBWBWBWWWBWB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKuroni has n daughters. As gifts... | [{"type": "stdin_stdout", "input": "2\n3\n1 9 16\n18 6 1\n3\n1 12 4\n6 2 15\n", "output": "1 9 16\n1 6 18\n1 4 12\n2 6 15\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 6 16\n18 6 1\n3\n1 12 4\n6 2 15\n", "output": "1 6 16\n1 6 18\n1 4 12\n2 6 15\n"}, {"type": "stdin_stdout", "input": "2\n3\n1 6 16\n18 6 1\n3\n1 12 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\nDrazil likes heap very much. So ... | [{"type": "stdin_stdout", "input": "2\n3 1\n14 6 3 5 4 2 1\n3 2\n7 4 5 1 3 2 1\n", "output": "1\n1 1 1 1 1 1\n4\n1 1 1 1\n"}, {"type": "stdin_stdout", "input": "2\n3 1\n14 6 3 5 4 2 1\n3 2\n7 6 5 1 3 2 1\n", "output": "1\n1 1 1 1 1 1\n4\n1 1 1 1\n"}, {"type": "stdin_stdout", "input": "2\n3 1\n14 6 3 5 4 2 1\n3 2\n9 6 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\nLittle Petya very much likes gif... | [{"type": "stdin_stdout", "input": "100\n42 23 48 88 36 6 18 70 96 1 34 40 46 22 39 55 85 93 45 67 71 75 59 9 21 3 86 63 65 68 20 38 73 31 84 90 50 51 56 95 72 33 49 19 83 76 54 74 100 30 17 98 15 94 4 97 5 99 81 27 92 32 89 12 13 91 87 29 60 11 52 43 35 58 10 25 16 80 28 2 44 61 8 82 66 69 41 24 57 62 78 37 79 77 53 7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLord Omkar has permitted you to ... | [{"type": "stdin_stdout", "input": "80\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consist... | [{"type": "stdin_stdout", "input": "100\n74 88 64 8 9 27 63 64 79 97 92 38 26 1 4 4 2 64 53 62 24 82 76 40 48 58 40 59 3 56 35 37 0 30 93 71 14 97 49 37 96 59 56 55 70 88 77 99 51 55 71 25 10 31 26 50 61 18 35 55 49 33 86 25 65 74 89 99 5 27 2 9 67 29 76 68 66 22 68 59 63 16 62 25 35 57 63 35 41 68 86 22 91 67 61 3 92 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 bookshelf which can f... | [{"type": "stdin_stdout", "input": "5\n7\n0 0 1 0 1 0 1\n3\n1 0 0\n5\n1 1 0 0 1\n6\n1 0 0 0 0 1\n5\n1 1 0 1 1\n", "output": "2\n0\n2\n4\n1\n"}, {"type": "stdin_stdout", "input": "5\n7\n0 0 1 0 1 0 1\n3\n1 0 0\n5\n1 1 0 1 1\n6\n1 0 0 0 0 1\n5\n1 1 0 1 1\n", "output": "2\n0\n1\n4\n1\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 positive integ... | [{"type": "stdin_stdout", "input": "4 4\n1 25 121 169\n1 2 7 23\n", "output": "\n2 3 8 24\n"}, {"type": "stdin_stdout", "input": "4 4\n1 25 121 169\n1 1 7 23\n", "output": "2 2 8 24\n"}, {"type": "stdin_stdout", "input": "4 4\n1 25 121 169\n1 2 9 23\n", "output": "2 3 2 24\n"}, {"type": "stdin_stdout", "input": "4 4\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 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\n1 2\nLLLLUU\n3 -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\nSeiji Maki doesn't only like to ... | [{"type": "stdin_stdout", "input": "1\n264 695448956957126051\n", "output": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Berland capital is shaken wi... | [{"type": "stdin_stdout", "input": "99 3\n**.\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Elephant loves Furik and ... | [{"type": "stdin_stdout", "input": "147\nRJZCSVHLQANGDWUFVZEDLQBSCXBQVAHUKLQAULNYGEUADUECVWMQUTNQPEFRFYZHWQCOUDSFZMPYVXQMIYOGWCFVAJDBUHDXOPZCAZULLYLSJZITCSUQNCLNKUCVATCSJNHUWSBTUSZSMKNYRKS\nCZHMNCRNBKTJPDSEAZQRDEHZGWNLIHPPSMTANDLITUDTOGTLQGLXFJNXWTAPJRSYSBYJPKKBIQBSRQIGQTHDXZQFWHDVROCVFMMLNLEVSJJXQDUTTWGDLZHKJTPDIZASVX... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\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": " 8"}, {"type": "stdin_stdout", "input": "7 6\n1 2 1\n1 3 2\n2 4 3\n2 5 4\n3 5 6\n3 6 7\n0\n3 1 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\nThe circle line of the Berland s... | [{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Olympic Games in Bercouver a... | [{"type": "stdin_stdout", "input": "614 163 13\n613 -1796 18\n-749 679 12\n", "output": "-481.72161 -447.61301\n"}, {"type": "stdin_stdout", "input": "614 163 21\n613 -468 18\n-749 679 25\n", "output": "-214.30328 -350.95260\n"}, {"type": "stdin_stdout", "input": "614 163 13\n613 -1029 18\n-749 679 25\n", "output": "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\nBerland is going through tough t... | [{"type": "stdin_stdout", "input": "100\n-683 303 245 -975 345 -159 529 -752 -349 -318 -275 -62 -449 -601 -687 691 491 -261 -576 425 -468 -235 446 536 143 152 -402 -491 363 -842 676 360 -461 -170 727 53 10 823 665 716 110 450 -154 -265 -926 636 -577 99 -719 -786 373 -286 994 -756 644 -800 220 -771 860 610 -613 -51 -398... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChubby Yang is studying linear e... | [{"type": "stdin_stdout", "input": "8\n62 567 1749 1279 728 1267 1262 568\n77 827 717 1696 774 248 822 1266\n563 612 995 424 1643 68 338 1243\n1579 806 1254 468 184 2254 716 772\n1087 182 2051 772 605 1674 720 1349\n871 988 873 157 403 301 1519 1192\n1085 625 1395 1087 847 1360 679 594\n1278 1056 916 1313 472 840 53 12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, Anton has found a set.... | [{"type": "stdin_stdout", "input": "{a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this problem your goal is to ... | [{"type": "stdin_stdout", "input": "5\n1000000000 -1145904 0 5099626 9980471\n", "output": "4\n0 1\n1 2\n2 3\n3 4\n"}, {"type": "stdin_stdout", "input": "5\n1000000000 -1867820 0 5099626 9980471\n", "output": "4\n0 1\n1 2\n2 3\n3 4\n"}, {"type": "stdin_stdout", "input": "5\n1000000000 -1867820 0 7760746 9980471\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\nA large banner with word CODEFOR... | [{"type": "stdin_stdout", "input": "CODEFOGSIUZMZCMWAVQHNYFEKIEZQMAZOVEMDRMOEDBHAXPLBLDYYXCVTOOSJZVSQAKFXTBTZFWAYRZEMDEMVDJTDRXXAQBURCES\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "CODEFOGSIUZMZCMWAVQHNYFEKIEZQMAZOVEMDRMOEDBHAXPLBLDYYXCVTOOSJZVSQAKFXTBTZFWBYRZEMDEMVDJTDRXXAQBURCES\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\nConnected undirected weighted gr... | [{"type": "stdin_stdout", "input": "4 6\n1 2 999999001\n1 3 999999003\n1 4 999999009\n2 3 999999027\n2 4 999999243\n3 4 999999729\n", "output": "2999997013\n2999997013\n2999997013\n2999997037\n2999997247\n2999997733\n"}, {"type": "stdin_stdout", "input": "7 14\n2 4 25\n6 4 5\n5 6 3\n5 7 9\n6 1 17\n4 7 6\n5 4 25\n1 2 23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter a probationary period in t... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "3000000003000000001\n"}, {"type": "stdin_stdout", "input": "1147564610\n", "output": "3950713605816050131\n"}, {"type": "stdin_stdout", "input": "1000010000\n", "output": "3000060003300030001\n"}, {"type": "stdin_stdout", "input": "1065935402\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\nLimak and Radewoosh are going to... | [{"type": "stdin_stdout", "input": "50 1\n6 17 44 82 94 127 134 156 187 211 212 252 256 292 294 303 352 355 379 380 398 409 424 434 480 524 584 594 631 714 745 756 777 778 789 793 799 821 841 849 859 878 879 895 925 932 944 952 958 990\n15 16 40 42 45 71 143 100 117 120 174 181 186 318 221 268 289 332 376 394 403 409 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\nThis is an interactive problem. ... | [{"type": "stdin_stdout", "input": "no\nyes\nno\nno\nno\n", "output": "2\n3\n5\n7\n11\n13\n17\n19\n23\n29\n31\n37\n41\n43\n47\n4\n9\n25\n49\nprime\n"}, {"type": "stdin_stdout", "input": "no\nyes\nno\nnn\nno\n", "output": "2\n3\n5\n7\n11\n13\n17\n19\n23\n29\n31\n37\n41\n43\n47\n4\n9\n25\n49\nprime\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\nLittle Mishka is a great travell... | [{"type": "stdin_stdout", "input": "76 24\n6814 3834 1131 6256 2598 850 7353 1702 5773 1699 35 5103 1368 2258 7891 7455 8546 7316 7428 8864 6536 5750 8455 2624 7326 2197 8239 3806 3016 7126 85 3249 1138 6783 9684 4417 7417 3660 6334 7324 9760 9755 7605 9891 3676 8784 8739 8266 3272 9250 5875 939 4130 6540 7813 6867 914... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA new airplane SuperPuperJet has... | [{"type": "stdin_stdout", "input": "1000000100000000000a\n", "output": "4000000399999999995\n"}, {"type": "stdin_stdout", "input": "1000000000000000100e\n", "output": "4000000000000000393\n"}, {"type": "stdin_stdout", "input": "1000001000000000100e\n", "output": "4000004000000000393\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 process of mammoth's genome ... | [{"type": "stdin_stdout", "input": "252\n???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????C????????????????????????????????????????????????????????????????\n", "output": "AAAAAAAAAAA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given N points on a plan... | [{"type": "stdin_stdout", "input": "30\n-7 -23\n-2 5\n13 8\n12 17\n15 -18\n20 6\n21 8\n-13 12\n-4 -20\n-11 -16\n-6 16\n1 -1\n5 -12\n13 -17\n11 10\n8 -9\n-13 3\n19 -13\n-19 -8\n-14 10\n10 3\n-16 -8\n-17 16\n-14 -15\n5 1\n-13 -14\n13 17\n-12 -8\n2 1\n18 5\n", "output": "279169\n"}, {"type": "stdin_stdout", "input": "30\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\nOn the way to school, Karen beca... | [{"type": "stdin_stdout", "input": "1 100\n396 314 350 362 287 349 266 289 297 305 235 226 256 385 302 304 253 192 298 238 360 366 163 340 247 395 318 260 252 281 178 188 252 379 212 187 354 232 225 159 290 335 387 234 383 215 356 182 323 280 195 209 263 215 322 262 334 157 189 214 195 386 220 209 177 193 368 174 270 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\nLeha like all kinds of strange t... | [{"type": "stdin_stdout", "input": "7\n-1 -1 2 7 28 3 -1\n1 0 6 3 1 0 -1\n", "output": "2 7 -1 -1 -1 3 28\n"}, {"type": "stdin_stdout", "input": "7\n-1 1 4 16 15 3 -1\n2 0 4 3 2 2 2\n", "output": "15 16 -1 -1 4 3 1\n"}, {"type": "stdin_stdout", "input": "7\n-1 1 4 16 15 3 -1\n2 0 4 3 1 2 2\n", "output": "4 16 -1 -1 15 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTop-model Izabella participates ... | [{"type": "stdin_stdout", "input": "1111111111101111111111111111111111111011111111111111111111111101111011111101111111111101111111111111\n", "output": "yes\n"}, {"type": "stdin_stdout", "input": "0110111111111111111111011111111110110111110111111111111111111111111111111111111110111111111111111111\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\nA group of university students w... | [{"type": "stdin_stdout", "input": "100 100 100\n", "output": "179"}, {"type": "stdin_stdout", "input": "100 0 100\n", "output": "179"}, {"type": "stdin_stdout", "input": "100 100 0\n", "output": "178"}, {"type": "stdin_stdout", "input": "0 100 100\n", "output": "179"}, {"type": "stdin_stdout", "input": "45 52 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\nIn Arcady's garden there grows a... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 unrest in the Galactic ... | [{"type": "stdin_stdout", "input": "6 6\n1 1 3 2 2 2\n1 0 0 1 0 0\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 6\n6 2 6 2 3 4\n0 1 0 0 0 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 6\n6 2 6 2 3 4\n0 1 0 1 0 1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6 6\n4 3 5 4 5 2\n0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are going to the beach with ... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1414213562\n"}, {"type": "stdin_stdout", "input": "999999997351043581 1000000000000000000\n", "output": "1414213561\n"}, {"type": "stdin_stdout", "input": "1036191544337895 1000000000000000000\n", "output": "45523434\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\nAbhinav and Manav both being one... | [{"type": "stdin_stdout", "input": "3\n-2 20\n-4 12\n1 -1\n\nDASPMK", "output": "1580\n1044\n8\n"}, {"type": "stdin_stdout", "input": "3\n-1 20\n-4 8\n2 -1\n\nDASPMK", "output": "1580\n20\n14\n"}, {"type": "stdin_stdout", "input": "3\n-1 20\n-4 8\n1 -1\n\nDASPKM", "output": "1580\n20\n8\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\nThe hero of this story is a todd... | [{"type": "stdin_stdout", "input": "680 478\n27436 32744 23403 9394 31389 21512 9460 3738 8344 4419 20737 2938 8741 12881 20986 23654 13084 30328 6555 23930 27450 21075 22183 7357 4469 24019 15067 22603 12685 25475 23841 10164 12260 29968 3079 21663 20367 10504 9327 9907 24237 26082 16520 9911 31991 24127 21245 7415 12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 three numbers. Is ... | [{"type": "stdin_stdout", "input": "200000000000000000000000000000000000000000000000000000000000000000000000000000\n100000000000000000000000000000000000000000000000000000000000000000000000000000\n300000000000000000000000000000000000000000000000000000000000000000000000000000", "output": "YES\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\nSee Russian Translation\n\nAfter... | [{"type": "stdin_stdout", "input": "1000\n95826533\n697966550\n727500248\n362956232\n865442540\n84081600\n851909520\n1233464854\n702072000\n659689540\n76854625\n182999070\n217414176\n425562800\n851385832\n809399625\n451207330\n552961750\n798208049\n907783680\n302185500\n147137087\n30605240\n944894200\n847649260\n720255... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRhezo is the new manager of Spec... | [{"type": "stdin_stdout", "input": "500 10\n500", "output": "616800443"}, {"type": "stdin_stdout", "input": "500 10\n393", "output": "616800443"}, {"type": "stdin_stdout", "input": "500 10\n437", "output": "616800443"}, {"type": "stdin_stdout", "input": "500 10\n495", "output": "616800443"}, {"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 are given a rectangular grid... | [{"type": "stdin_stdout", "input": "11 15 0\n2 1\n5 2\n\nTAMQME", "output": "961249\n"}, {"type": "stdin_stdout", "input": "11 8 0\n2 1\n5 2\n\nTAMQME", "output": "19448\n"}, {"type": "stdin_stdout", "input": "3 3 2\n2 2\n3 2\n\nSAMPLE", "output": "1 3 2\n"}, {"type": "stdin_stdout", "input": "3 3 2\n2 2\n3 2\n\nSAMOLE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 N is a multiple of 9 ... | [{"type": "stdin_stdout", "input": "43165772851244846603292934806287404438359408161025207810958396401279994362320741051019", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "54657569343041921475636299350747138782938284453807770660744571129118363583648327949663", "output": "No\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\nWe have N+1 integers: 10^{100}, ... | [{"type": "stdin_stdout", "input": "223214 200001", "output": "534704743\n"}, {"type": "stdin_stdout", "input": "402106 200001", "output": "533363909\n"}, {"type": "stdin_stdout", "input": "141421 60408", "output": "832536804\n"}, {"type": "stdin_stdout", "input": "107814 81103", "output": "472847449\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\nThere are N people numbered 1 to... | [{"type": "stdin_stdout", "input": "3\n2\n2 1\n3 -1\n2\n3 1\n2 -1\n2\n1 1\n2 0", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n2\n2 1\n3 0\n2\n3 1\n1 0\n2\n1 1\n2 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n2\n2 0\n3 0\n2\n3 1\n1 0\n2\n1 1\n2 -1", "output": "1\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\nLet us define the oddness of a p... | [{"type": "stdin_stdout", "input": "47 22", "output": "733787098\n"}, {"type": "stdin_stdout", "input": "39 16", "output": "497121432\n"}, {"type": "stdin_stdout", "input": "44 16", "output": "171958174\n"}, {"type": "stdin_stdout", "input": "44 26", "output": "218927913\n"}, {"type": "stdin_stdout", "input": "20 26", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi received otoshidama (N... | [{"type": "stdin_stdout", "input": "3\n100000010 JPY\n101.54312519525404 BTC\n0.7484698184790549 BTC", "output": "138870816.105\n"}, {"type": "stdin_stdout", "input": "3\n100000010 JPY\n100.90596986559768 BTC\n0.7484698184790549 BTC", "output": "138628697.08\n"}, {"type": "stdin_stdout", "input": "3\n100000010 JPY\n102... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nC... | [{"type": "stdin_stdout", "input": "96", "output": "19167 611331466 31895 1422867846 44611 3124420608 70037 5791569642 82693 8939361380 108103 13048788822 120707 17609823524 145889 26810459198 183773 36056078828 196199 45900952250 233951 60592607148 258997 70284792882 271373 80366299832 296147 98867787510 333847 123834... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 three integers, A,... | [{"type": "stdin_stdout", "input": "-123 100 100", "output": "-123\n"}, {"type": "stdin_stdout", "input": "-157 100 100", "output": "-157\n"}, {"type": "stdin_stdout", "input": "-100 100 100", "output": "-100"}, {"type": "stdin_stdout", "input": "-25 100 100", "output": "-25\n"}, {"type": "stdin_stdout", "input": "-19 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi loves sorting.\n\nHe h... | [{"type": "stdin_stdout", "input": "10\n2 10 5 7 2 8 4 9 16 1", "output": "7\n"}, {"type": "stdin_stdout", "input": "10\n4 10 5 7 2 -1 4 9 8 1", "output": "8\n"}, {"type": "stdin_stdout", "input": "10\n2 10 5 2 3 6 4 9 8 1", "output": "6\n"}, {"type": "stdin_stdout", "input": "10\n2 10 5 7 2 6 4 9 8 1", "output": "8\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\nTakahashi is drawing a segment o... | [{"type": "stdin_stdout", "input": "124 -2 -1 -1", "output": "125\n"}, {"type": "stdin_stdout", "input": "241 -2 -1 -1", "output": "242\n"}, {"type": "stdin_stdout", "input": "121 -1 -1 0", "output": "122\n"}, {"type": "stdin_stdout", "input": "116 1 -2 -1", "output": "118\n"}, {"type": "stdin_stdout", "input": "209 -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\nSnuke is having another barbeque... | [{"type": "stdin_stdout", "input": "3\n11 3\n2 2\n0 2", "output": "12951\n"}, {"type": "stdin_stdout", "input": "3\n12 2\n2 3\n2 0", "output": "11783\n"}, {"type": "stdin_stdout", "input": "3\n12 2\n2 3\n1 0", "output": "11753\n"}, {"type": "stdin_stdout", "input": "3\n3 1\n0 4\n7 9", "output": "262332\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\nThere are trains with 26 cars or... | [{"type": "stdin_stdout", "input": "4\na->f->c->b->d\nb<-c<-a<-d<-e\nb->a->c<-a->c->d<-c<-a<-b->a->c->d->e<-d\na->e<-a<-d->a->e<-a<-d<-c->d->a<-d<-c<-b->c->d<-c", "output": "afcbd\nedacb\nbacde\nbcdae\n"}, {"type": "stdin_stdout", "input": "4\n`->f->c->b->d\nb<-c<-a<-d<-e\nb->a->c<-a->c->d<-c<-a<-b->a->c->d->e<-d\na->e... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 32-bit real type with... | [{"type": "stdin_stdout", "input": "8\n00101110\n66920828\n00000080\n00000040\n000000c0\n00100110\n45306216\n07f00009", "output": "8226.125\n13444112.3125\n1.0\n0.5\n1.5\n8194.125\n9068740.171875\n1040384.0703125\n"}, {"type": "stdin_stdout", "input": "8\n00100100\n45780507\n00000080\n00000040\n0c000000\n00000101\n1533... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nPlay by arranging whi... | [{"type": "stdin_stdout", "input": "8\n1\n0\n0\n0\n1\n0\n0\n0\n4\n1\n-1\n0\n1\n1\n1\n1\n1\n0", "output": "8\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "8\n1\n1\n0\n1\n0\n0\n0\n1\n4\n1\n0\n0\n1\n1\n0\n1\n1\n0", "output": "0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "8\n1\n1\n1\n1\n0\n-1\n0\n1\n3\n1\n0\n1\n1\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\nMr. Dango's family has extremely... | [{"type": "stdin_stdout", "input": "3\n1 2 2 3\n0 1 2 2\n1 2 0 3\n7\n1 2 0 1\n0 2 3 1\n0 0 3 1\n2 1 1 2\n5 3 4 2\n4 3 6 0\n4 -1 5 1\n0", "output": "1\n1\n"}, {"type": "stdin_stdout", "input": "3\n1 1 2 3\n0 1 2 2\n1 2 0 3\n7\n1 2 2 1\n0 2 3 2\n0 1 3 -1\n2 1 1 2\n5 3 4 2\n4 3 6 2\n4 2 5 1\n0", "output": "1\n2\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\nWe have an analog clock whose th... | [{"type": "stdin_stdout", "input": "12 0 0 0\n12 11 59 59\n12 1 56 0\n12 1 56 3\n12 1 56 34\n12 3 9 43\n12 3 10 14\n12 2 17 58\n12 7 18 0\n10 7 23 0\n12 7 23 31\n2 0 38 19\n2 0 39 0\n2 0 39 30\n2 1 6 14\n2 1 20 1\n2 1 20 31\n3 2 19 0\n3 2 59 30\n4 0 28 48\n5 1 5 37\n5 1 10 10\n5 1 7 41\n11 0 36 0\n0 0 0 0", "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\nProblem\n\nGiven the string S, w... | [{"type": "stdin_stdout", "input": "0ig3hd12fz99", "output": "10\n"}, {"type": "stdin_stdout", "input": "0hg3hd12fz99", "output": "11\n"}, {"type": "stdin_stdout", "input": "0hg3hd13fz99", "output": "12\n"}, {"type": "stdin_stdout", "input": "0hf3hd12fz99", "output": "11\n"}, {"type": "stdin_stdout", "input": "99zf21dh... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nACM countries have rivers that f... | [{"type": "stdin_stdout", "input": "1 1 100\n50 200 20 40 0\n1\n2 4 101\n7 4 2 4 1\n19 5 1 4 0\n5\n3\n10\n1\n1 2 3\n2 1 1 1 0\n1\n3\n1 2 6\n5 16 1 1 1\n2\n3\n0 0 0", "output": "110.0000000000\n111.1500000000\n5.3333333333\n64.3333333333\n"}, {"type": "stdin_stdout", "input": "1 1 110\n50 200 20 40 0\n1\n2 4 101\n7 4 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nDimension exists from... | [{"type": "stdin_stdout", "input": "3 1 2 3\n0 -1 10\n1 3", "output": "10\n"}, {"type": "stdin_stdout", "input": "3 1 2 3\n1 0 11\n2 3", "output": "11\n"}, {"type": "stdin_stdout", "input": "3 1 2 3\n1 0 13\n2 3", "output": "13\n"}, {"type": "stdin_stdout", "input": "3 2 2 3\n0 0 14\n2 3", "output": "14\n"}, {"type": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA direced graph is strongly conn... | [{"type": "stdin_stdout", "input": "9 6\n1 1\n1 0\n1 4\n2 4\n4 3\n4 2\n4\n1 1\n-1 3\n2 -1\n3 4", "output": "1\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "5 6\n0 1\n1 0\n1 0\n2 4\n4 1\n3 2\n4\n0 1\n-1 0\n2 0\n3 4", "output": "1\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "9 6\n0 1\n1 0\n1 2\n2 4\n4 3\n4 2\n4\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\nPavel made a photo of his favour... | [{"type": "stdin_stdout", "input": "2\n240945287 28477772 1496174734 106174079\n", "output": "97526692469552229\n"}, {"type": "stdin_stdout", "input": "2\n240945287 28477772 1496174734 174902664\n", "output": "96930557139611326\n"}, {"type": "stdin_stdout", "input": "2\n240945287 45763153 1496174734 174902664\n", "outp... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.