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\nStudents of Winter Informatics S... | [{"type": "stdin_stdout", "input": "5\n8 14\n7 2\n7 1\n2 3\n6 2\n3 4\n6 8\n4 5\n2 4\n7 8\n3 6\n5 6\n5 3\n8 4\n4 1\n9 10\n6 5\n6 9\n5 8\n3 5\n3 2\n9 1\n4 9\n6 2\n9 8\n9 7\n8 14\n3 7\n8 4\n7 6\n1 7\n6 1\n5 2\n4 1\n1 3\n4 5\n5 1\n5 7\n7 2\n2 1\n4 2\n9 13\n8 7\n8 2\n8 4\n9 4\n3 4\n9 3\n1 9\n5 8\n9 7\n3 5\n6 2\n4 5\n4 6\n8 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWinters are just damn freezing c... | [{"type": "stdin_stdout", "input": "10\n5 eeleGlOFWbcnIPPtnll\n55-55-55\n00-00-00\n98-65-32\n76-43-10\n98-76-54\n2 DMBiqRyQJkFvHPJNJp\n28-97-50\n87-64-10\n4 bAfmtnKHohIX\n61-58-93\n77-77-77\n53-17-51\n96-43-10\n3 cDX\n22-22-22\n77-77-77\n63-30-64\n1 HCeHJ\n44-44-44\n6 HgSpfAolwoaBQ\n96-93-53\n98-53-10\n33-33-33\n66-66-... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 string s of length n (1 β€ n β€ ... | [{"type": "stdin_stdout", "input": "11\na\nba\nab\nbac\nihfcbadeg\nz\naa\nca\nacb\nxyz\nddcba\n", "output": "YES\nYES\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "11\na\nba\nab\ncac\nihfcbadeg\nz\nab\nca\nbca\nxyz\nddcba\n", "output": "YES\nYES\nYES\nNO\nYES\nNO\nYES\nNO\nNO\nNO\nNO\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\nHamming distance between strings... | [{"type": "stdin_stdout", "input": "5728 5729 5750\n5631 5768\n9163\n", "output": "10321\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 coordinate line has n segments... | [{"type": "stdin_stdout", "input": "55\n3 4\n6 8\n9 10\n3 9\n9 9\n2 5\n4 8\n3 8\n8 10\n1 1\n4 9\n10 10\n6 6\n8 8\n1 8\n5 5\n4 5\n5 9\n2 2\n3 10\n4 6\n3 6\n1 6\n1 7\n6 10\n2 6\n3 7\n2 4\n4 4\n5 10\n1 4\n2 9\n1 3\n7 9\n7 8\n1 9\n1 10\n2 8\n8 9\n6 7\n1 2\n6 9\n7 7\n4 7\n3 3\n2 7\n4 10\n7 10\n2 3\n2 10\n5 7\n3 5\n5 8\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\n \n HAI \n I HAS A T... | [{"type": "stdin_stdout", "input": "9\n0\n0\n0\n0\n0\n0\n0\n0\n0\n", "output": "0.000000\n"}, {"type": "stdin_stdout", "input": "9\n1\n0\n0\n0\n0\n1\n1\n1\n1\n", "output": "1.000000\n"}, {"type": "stdin_stdout", "input": "9\n0\n0\n0\n0\n0\n0\n0\n0\n1\n", "output": "0.111111\n"}, {"type": "stdin_stdout", "input": "9\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 rush of modern life, peop... | [{"type": "stdin_stdout", "input": "20 20\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n"}, {"type": "stdin_stdout", "input": "20 20\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Chris is very keen on his... | [{"type": "stdin_stdout", "input": "10\n1 100000 199999 299998 399997 499996 599995 699994 799993 899992\n", "output": "10\n1000000 900001 800002 700003 600004 500005 400006 300007 200008 100009 "}, {"type": "stdin_stdout", "input": "10\n1 100000 149136 299998 399997 499996 599995 699994 799993 899992\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\nAndrew, Fedor and Alex are inven... | [{"type": "stdin_stdout", "input": "5 6\nabas\ndsfdf\nabacaba\ndartsidius\nkolobok\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "5 6\nabas\ndsfdf\nabacaba\ndartsidius\nkobolok\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "5 6\nabas\ndsfdf\nabacaba\ndadtsirius\nkolobok\n", "output": "Seco... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUser ainta has a permutation p1,... | [{"type": "stdin_stdout", "input": "15\n6 1 2 7 9 13 14 8 4 5 3 12 10 15 11\n000100100100100\n000010010010010\n000001001001001\n100000100100100\n010000010010010\n001000001001001\n100100000100100\n010010000010010\n001001000001001\n100100100000100\n010010010000010\n001001001000001\n100100100100000\n010010010010000\n00100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnya loves to fold and stick. To... | [{"type": "stdin_stdout", "input": "25 16 13326087796\n157576937 627434432 942652043 706432863 631136945 714549755 465703470 663358517 695561723 249240606 833566455 396564536 758483017 253748999 978210764 530023233 193812243 317718202 184788435 892848108 150420430 330992298 780787784 196460118 674015883\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Ancient Berland there were n ... | [{"type": "stdin_stdout", "input": "4 4 4\n1 2\n2 3\n3 4\n1 3\n1 2 3\n1 3 4\n1 2 4\n1 3 2\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4 4 2\n1 2\n2 3\n3 4\n1 3\n1 2 3\n1 3 4\n", "output": "4\n1 3 2 3 4\n"}, {"type": "stdin_stdout", "input": "4 4 1\n1 2\n2 3\n3 4\n1 3\n1 3 4\n", "output": "3\n1 2 3 4\n"}, ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n sharks who grow flow... | [{"type": "stdin_stdout", "input": "20 636133251\n999999936 999999937\n999999937 999999938\n999999936 1505993613\n999999937 999999938\n999999936 710191351\n817684461 999999938\n999999936 999999937\n999999937 1039935639\n999999936 999999937\n999999937 999999938\n999999936 392813179\n999999937 999999938\n999999936 999999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 planet Mars a year lasts ... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "285714 285715"}, {"type": "stdin_stdout", "input": "677212\n", "output": "193488 193490\n"}, {"type": "stdin_stdout", "input": "435344\n", "output": "124384 124384\n"}, {"type": "stdin_stdout", "input": "390668\n", "output": "111618 111620\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\nYou are given a positive decimal... | [{"type": "stdin_stdout", "input": "2206815224318443962208128404511577750057653265995300414539703580103256087275661997018352502651118684\n", "output": "2.206815224318443962208128404511577750057653265995300414539703580103256087275661997018352502651118684E99\n"}, {"type": "stdin_stdout", "input": "11366003383538245834519... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nZS the Coder is playing a game. ... | [{"type": "stdin_stdout", "input": "7816\n", "output": "2\n17\n46\n97\n176\n289\n442\n641\n892\n1201\n1574\n2017\n2536\n3137\n3826\n4609\n5492\n6481\n7582\n8801\n10144\n11617\n13226\n14977\n16876\n18929\n21142\n23521\n26072\n28801\n31714\n34817\n38116\n41617\n45326\n49249\n53392\n57761\n62362\n67201\n72284\n77617\n8320... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n\n\nInput\n\nThe input contains ... | [{"type": "stdin_stdout", "input": "011\n", "output": "274\n"}, {"type": "stdin_stdout", "input": "010\n", "output": "265\n"}, {"type": "stdin_stdout", "input": "19\n", "output": "454\n"}, {"type": "stdin_stdout", "input": "20\n", "output": "483\n"}, {"type": "stdin_stdout", "input": "13\n", "output": "346\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\nArpa is researching the Mexican ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1400000000\n", "output": "600000000\n"}, {"type": "stdin_stdout", "input": "1100000000 1000000000 1400000000\n", "output": "700000000\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou all know that the Library of... | [{"type": "stdin_stdout", "input": "10 10\n8 1 1 6 10 2 2 9 7\n6 2 7 1 9 5 10\n1 5\n7 3 6 9 6 3 7 6\n10 3 9 10 3 6 7 10 6 9 6\n10 4 4 9 8 2 10 3 6 2 9\n8 4 8 6 4 6 4 8 6\n2 7 5\n6 8 6 2 1 9 8\n3 10 2 10\n", "output": "Yes\n3\n1 2 5 \n"}, {"type": "stdin_stdout", "input": "10 10\n8 1 1 6 10 2 2 9 7\n6 2 7 1 9 5 10\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\nVasya writes his own library for... | [{"type": "stdin_stdout", "input": "20\nVBox hykl\nVBox enwv\nenwv.pack(hykl)\nVBox dlepf\ndlepf.pack(hykl)\nenwv.set_border(30)\nWidget mjrrik(54,21)\nhykl.set_border(2)\ndlepf.set_border(22)\nenwv.set_border(3)\nenwv.pack(dlepf)\ndlepf.pack(mjrrik)\nhykl.set_spacing(96)\nenwv.set_border(32)\ndlepf.set_border(72)\nWid... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima is a beginner programmer. D... | [{"type": "stdin_stdout", "input": "12 12\n10\n11\n5\n3\n11\n2\n8\n6\n4\n4\n12\n1\n", "output": "9\n6\n3\n2\n6\n7\n12\n8\n10\n10\n11\n1\n"}, {"type": "stdin_stdout", "input": "12 12\n9\n11\n5\n3\n11\n2\n8\n4\n4\n4\n12\n1\n", "output": "5\n6\n3\n2\n6\n7\n12\n10\n10\n10\n11\n1\n"}, {"type": "stdin_stdout", "input": "12 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\nLittle girl Tanya is learning ho... | [{"type": "stdin_stdout", "input": "1000000000 0\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1559848638 5\n", "output": "1559848633\n"}, {"type": "stdin_stdout", "input": "1100000000 0\n", "output": "1100000000\n"}, {"type": "stdin_stdout", "input": "1086932676 10\n", "output": "108693264\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\nFor a vector \\vec{v} = (x, y), ... | [{"type": "stdin_stdout", "input": "9\n1000000 0\n0 -999999\n600000 600000\n600000 600000\n600000 600000\n-600000 -600000\n600000 600000\n600000 600000\n-700000 710000\n", "output": "-1 -1 -1 -1 1 -1 -1 1 -1 \n"}, {"type": "stdin_stdout", "input": "9\n1000000 0\n0 -999999\n600000 600000\n600000 600000\n600000 600000\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\nToday Oz is playing a new game. ... | [{"type": "stdin_stdout", "input": "1\n6\n291 292 295 297 298 299\n\nSAMPLE", "output": "4\n"}, {"type": "stdin_stdout", "input": "1\n6\n291 292 295 297 158 299\n\nSAMPLE", "output": "5\n"}, {"type": "stdin_stdout", "input": "1\n6\n559 292 295 297 158 299\n\nSAMPLE", "output": "6\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\nProfessor Hatim is researching t... | [{"type": "stdin_stdout", "input": "2\n3 3\n1 3\n2 3\n1 3\n4 2\n1 2\n3 4\n\nSAMPLE", "output": "No suspicious lizards found!\nNo suspicious lizards found!\n"}, {"type": "stdin_stdout", "input": "2\n3 3\n1 2\n2 3\n1 3\n4 2\n1 2\n3 4\n\nSAMPLE", "output": "Suspicious lizards found!\nNo suspicious lizards found!\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a street by the name of... | [{"type": "stdin_stdout", "input": "85\n16\n26 706 353\n465 364 754\n744 391 582\n268 741 93\n593 587 575\n998 442 171\n985 965 590\n332 483 101\n791 157 40\n581 717 93\n59 60 724\n609 882 587\n903 287 931\n950 421 469\n879 21 630\n131 214 832\n5\n656 194 278\n290 480 714\n700 316 303\n483 977 1\n333 200 435\n11\n25 80... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nXenny had N cubes. Each cube had... | [{"type": "stdin_stdout", "input": "10 7\nf a b d g a\nc g e f a g\nf c c a c c\nd e e b f e\nf f g g e g\ne c e b d c\nf e d g b b\nf c g f f e\nc c a c d d\nd c a d f d\nfcfdfeffcd", "output": "861144\n"}, {"type": "stdin_stdout", "input": "10 7\nf a b d g a\nc g e g a g\nf c c a c c\nd e e b f e\nf f g g e g\ne c 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\nWe have N dice arranged in a lin... | [{"type": "stdin_stdout", "input": "10 4\n17 13 13 12 15 20 10 13 17 11", "output": "32.000000000000"}, {"type": "stdin_stdout", "input": "10 4\n17 21 13 12 15 20 10 13 17 11", "output": "33.5000000000\n"}, {"type": "stdin_stdout", "input": "10 4\n15 21 13 12 15 20 10 13 17 11", "output": "32.5000000000\n"}, {"type": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is going to set a 3-ch... | [{"type": "stdin_stdout", "input": "-109", "output": "-1295029\n"}, {"type": "stdin_stdout", "input": "-61", "output": "-226981\n"}, {"type": "stdin_stdout", "input": "-57", "output": "-185193\n"}, {"type": "stdin_stdout", "input": "-68", "output": "-314432\n"}, {"type": "stdin_stdout", "input": "-95", "output": "-8573... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn integer X is called a Harshad... | [{"type": "stdin_stdout", "input": "112", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "224", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "133", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "162", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "190", "output": "Yes\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFennec and Snuke are playing a b... | [{"type": "stdin_stdout", "input": "7\n3 6\n2 2\n3 1\n7 4\n5 7\n1 4", "output": "Fennec\n"}, {"type": "stdin_stdout", "input": "7\n3 6\n2 2\n3 1\n7 4\n4 7\n1 4", "output": "Fennec\n"}, {"type": "stdin_stdout", "input": "7\n3 6\n1 2\n3 2\n7 4\n5 7\n1 4", "output": "Fennec\n"}, {"type": "stdin_stdout", "input": "7\n3 6\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke has decided to play a game... | [{"type": "stdin_stdout", "input": "15\n0 -4 1 8 0 1 -1 -25 49 -3 -35 -2 -8 2 -9", "output": "13\n"}, {"type": "stdin_stdout", "input": "15\n1 2 9 -1 0 12 1 -1 1 11 -2 4 13 4 3", "output": "11\n"}, {"type": "stdin_stdout", "input": "15\n1 1 9 -1 0 12 1 -1 0 11 -1 2 13 2 3", "output": "9\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\nCreate a program that outputs th... | [{"type": "stdin_stdout", "input": "6\n5\n-1\n2\n0\n0", "output": "105.971422738\n-3.12310562562\n"}, {"type": "stdin_stdout", "input": "6\n5\n14\n4\n0\n0", "output": "105.971422738\n421.743216952\n"}, {"type": "stdin_stdout", "input": "6\n5\n14\n3\n0\n0", "output": "105.971422738\n409.241646964\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA project is underway to build a... | [{"type": "stdin_stdout", "input": "20 12\n1 11\n7 0\n13 1", "output": "132.000000\n"}, {"type": "stdin_stdout", "input": "29 16\n1 11\n7 0\n23 1", "output": "176.000000\n"}, {"type": "stdin_stdout", "input": "6 19\n-1 -1\n16 2\n4 0", "output": "19.000000\n"}, {"type": "stdin_stdout", "input": "29 11\n1 6\n12 1\n10 1",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOnce upon a time, there was a tr... | [{"type": "stdin_stdout", "input": "3 4 3 1 4\n3 1 2\n1 2 10\n2 3 30\n3 4 20\n2 4 4 2 1\n3 1\n2 3 3\n1 1 3\n4 1 2\n4 2 5\n2 4 3 4 1\n5 5\n1 2 10\n2 3 10\n3 4 10\n1 2 0 1 1\n0\n8 5 10 1 5\n2 13 1 8 4 5 6 3\n1 2 5\n3 3 4\n3 4 7\n4 5 3\n1 3 25\n2 4 23\n3 5 22\n1 4 45\n2 5 51\n1 5 99\n0 0 0 0 0", "output": "30.0000000000\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 an undirected weighted gra... | [{"type": "stdin_stdout", "input": "6 5\n1 2 3\n1 3 5\n1 2 6\n2 4 7\n3 4 6\n4 6\n1 2 10\n1 3 100\n1 4 105\n3 3 20\n2 4 70\n3 4 40\n2 1\n1 1 1\n3 0\n3 1\n1 2 1\n6 3\n1 0 2\n2 3 5\n1 3 6\n5 10\n1 2 110\n2 3 138\n1 1 130\n1 5 223\n4 3 110\n2 4 98\n2 9 130\n3 2 120\n3 5 110\n4 5 15\n5 10\n1 2 9384\n1 3 887\n1 5 2778\n1 5 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\nAt University A, there were many... | [{"type": "stdin_stdout", "input": "15\n2***9*2*6*1199*\n9\n0 1 2 3 4 6 7 8 9", "output": "478297"}, {"type": "stdin_stdout", "input": "5\n5**75\n-1\n-1 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n5**75\n-2\n-1 2", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n5**65\n-2\n-1 2", "output": "0\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nGhosts line up in a s... | [{"type": "stdin_stdout", "input": "5 5\nRLRLL\n9 5 1 3 10\n1 3 5\n2 4 16\n4 2 16\n1 5 2\n3 5 10", "output": "8\n"}, {"type": "stdin_stdout", "input": "5 5\nRLRLL\n9 5 1 3 10\n1 3 5\n2 4 16\n4 2 16\n1 2 2\n3 5 10", "output": "8\n"}, {"type": "stdin_stdout", "input": "5 5\nRLRLL\n9 5 1 3 10\n1 3 5\n2 4 16\n4 2 16\n2 2 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a given polygon g, computes ... | [{"type": "stdin_stdout", "input": "4\n-1 -2\n-1 0\n-1 14\n-5 2", "output": "32.0\n"}, {"type": "stdin_stdout", "input": "4\n-1 -2\n-1 0\n-1 17\n-5 2", "output": "38.0\n"}, {"type": "stdin_stdout", "input": "4\n0 -1\n10 -3\n71 0\n0 11", "output": "502.0\n"}, {"type": "stdin_stdout", "input": "4\n0 -4\n-1 0\n-1 14\n-6 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads a se... | [{"type": "stdin_stdout", "input": "11\n1 2 3 4 5 6 7 16 18 10 11\n1\n2 6 9", "output": "1 2 7 16 18 3 4 5 6 10 11\n"}, {"type": "stdin_stdout", "input": "11\n2 2 1 4 6 16 7 10 32 10 1\n1\n4 6 9", "output": "2 2 1 4 7 10 32 6 16 10 1\n"}, {"type": "stdin_stdout", "input": "11\n2 2 1 4 6 9 10 10 48 10 1\n1\n4 6 9", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings s and ... | [{"type": "stdin_stdout", "input": "5 102\neyw*y\neywsnxcwslfyiqbbeoaawtmioksfdndptxxcwzfmrpcixjbzvicijofjrbcvzaedglifuoczgjlqylddnsvsjfmfsccxbdveqguyfk\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5 102\ndyw*y\neywsnxcwslfyiqbbeoaawtmioksfdndptxxcwzfmrpcixjbzvicijofjrbcvzaedglifuoczgjlqylddnsvsjfmfsccxbdv... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 playing a strange game w... | [{"type": "stdin_stdout", "input": "2\n6\n5 3 2 4 1 6\n1 2\n1 3\n1 4\n4 5\n4 6\n4\n1 3 4 5\n3\n3 5 2\n6\n5 3 2 4 1 6\n1 2\n1 3\n1 4\n4 5\n4 6\n3\n1 2 3\n3\n4 1 6\n", "output": "B 4\nA 4\nC -1\nB 2\nA 1\nC -1\n"}, {"type": "stdin_stdout", "input": "2\n6\n5 3 2 4 1 6\n1 2\n1 3\n1 4\n4 5\n4 6\n4\n1 3 4 5\n3\n3 5 2\n0\n5 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\nIvan unexpectedly saw a present ... | [{"type": "stdin_stdout", "input": "37\n52 52 66 149 149 130 47 47 26 110 185 -1 73 73 65 -1 -1 130 -1 -1 -1 94 97 190 -1 -1 49 49 54 -1 92 92 5 25 48 79 79\n", "output": "903952722\n"}, {"type": "stdin_stdout", "input": "37\n52 52 66 149 149 130 47 47 17 110 185 -1 73 73 65 -1 -1 130 -1 -1 -1 94 97 190 -1 -1 49 49 54 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nArkady invited Anna for a dinner... | [{"type": "stdin_stdout", "input": "100\n2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "54\n"}, {"type": "stdin_stdout", "input": "100\n1 2 2 2 2 2 2 2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a set of points x_... | [{"type": "stdin_stdout", "input": "100 13\n11 28 21 7 6 23 26 31 26 32 34 17 19 1 13 1 28 30 28 8 23 36 17 20 5 37 32 23 14 1 20 23 3 39 20 14 2 12 15 3 1 27 7 25 15 39 10 6 8 37 6 22 7 29 6 17 17 9 16 3 39 23 2 34 20 12 28 29 32 2 38 27 36 27 29 18 7 14 27 25 33 18 29 40 22 9 9 6 21 7 23 35 33 26 31 31 39 36 27 27\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers b and... | [{"type": "stdin_stdout", "input": "1\n417 201\n", "output": "YES\n3 3\n4 3\n5 3\n6 3\n7 3\n8 3\n9 3\n10 3\n11 3\n12 3\n13 3\n14 3\n15 3\n16 3\n17 3\n18 3\n19 3\n20 3\n21 3\n22 3\n23 3\n24 3\n25 3\n26 3\n27 3\n28 3\n29 3\n30 3\n31 3\n32 3\n33 3\n34 3\n35 3\n36 3\n37 3\n38 3\n39 3\n40 3\n41 3\n42 3\n43 3\n44 3\n45 3\n46... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHanh lives in a shared apartment... | [{"type": "stdin_stdout", "input": "10\n10 10\n8 9 2 10 3 8 10 9 1 10\n10 10\n3 10 3 13 12 14 3 3 4 4\n10 5\n7 13 10 14 5 12 5 5 7 11\n10 10\n12 13 3 6 12 9 6 6 5 7\n10 10\n4 10 15 13 13 15 9 8 8 14\n10 10\n2 3 8 5 9 7 11 12 7 9\n10 10\n12 15 11 10 1 8 10 3 4 2\n10 5\n8 11 7 14 7 9 5 2 8 9\n10 10\n4 9 9 9 10 4 1 12 13 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp is sad β New Year is co... | [{"type": "stdin_stdout", "input": "11\n1000000000 500000000 500000000\n1000000000 500000000 499999999\n1000000000 499999999 499999999\n500000000 1000000000 500000000\n500000000 1000000000 499999999\n499999999 1000000000 499999999\n500000000 500000000 1000000000\n500000000 499999999 1000000000\n499999999 499999999 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCatherine received an array of i... | [{"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 44 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 41 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 115 86 87 88 89 90 91 92 93 94 95 13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNastya just made a huge mistake ... | [{"type": "stdin_stdout", "input": "5\n7 20 3 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n", "output": "Yes\nNo\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "5\n7 20 0 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n", "output": "NO\nNO\nYES\nNO\nYES\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nShubham has an array a of size n... | [{"type": "stdin_stdout", "input": "4\n3 1\n16 11 12\n10 3\n13 12 9 1 9 8 4 19 16 19\n3 2\n3 2 6\n9 7\n11 14 1 6 3 12 3 20 16\n", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n3 1\n16 11 12\n10 3\n13 12 9 1 9 8 4 19 16 19\n3 2\n3 2 6\n9 7\n11 14 1 6 3 12 3 30 16\n", "output": "YES\nYES\nYES\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\nEvery year Santa Claus gives gif... | [{"type": "stdin_stdout", "input": "3\n\n5 2\n2 2\n1 2\n\n10 2\n2 2\n2 3\n\n7 4\n2 1\n2 3\n2 4\n2 10\n", "output": "YES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "3\n\n8 2\n2 2\n1 2\n\n10 2\n2 2\n2 3\n\n7 4\n2 1\n2 3\n2 4\n2 10\n", "output": "YES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "3\n\n5 2\n2 2\n1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a board represented as ... | [{"type": "stdin_stdout", "input": "9\n1 1 2\n0 -1\n2 1 2\n0 -1\n2 0 2\n0 1\n0 -1 1\n1 -1\n0 -1 1\n2 0\n0 -1 1\n1 0\n1 -1 -1\n1 -1\n3 -1 1\n0 0\n1 -1 0\n1 0\n", "output": "YES\nYES\nYES\nNO\nNO\nNO\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "9\n1 1 2\n0 -1\n2 1 2\n1 -1\n2 0 2\n0 1\n0 -1 1\n1 -1\n0 -1 1\n2 0\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "10111 20\n0\n1\n", "output": "? 1 5056\n? 1 2528\n? 1 3792\n? 1 4424\n? 1 4740\n? 1 4898\n? 1 4977\n? 1 5017\n? 1 5037\n? 1 5047\n? 1 5052\n? 1 5054\n? 1 5055\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 5056\n! 50... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe King of Flatland will organi... | [{"type": "stdin_stdout", "input": "847094637 -152905363 -1000000000 -1000000000\n", "output": "FIRST\n-152905363\n"}, {"type": "stdin_stdout", "input": "-1000000000 1000000000 1230987 17135570\n", "output": "FIRST\n-983588156\n"}, {"type": "stdin_stdout", "input": "547686188 61562151 -496372503 -115242932\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\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 given undirected weighte... | [{"type": "stdin_stdout", "input": "15 32\n15 9 8860\n12 4 9045\n12 12 8221\n9 6 8306\n11 14 9052\n13 14 8176\n14 5 8857\n6 8 8835\n3 9 8382\n10 14 8212\n13 13 9061\n2 14 8765\n4 13 9143\n13 13 8276\n13 11 8723\n7 10 8775\n8 15 8965\n15 5 8800\n4 5 9317\n5 13 9178\n1 7 9031\n4 10 9114\n10 4 8628\n9 1 8584\n5 7 8701\n6 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Ms Swan bought an orange... | [{"type": "stdin_stdout", "input": "30 30\n455 723 796 90 7 881 40 736 147 718 560 619 468 363 161 767 282 19 111 369 443 850 871 242 713 789 208 435 135 411\n", "output": "455 1 2 3 4 5 6 8 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 \n723 32 33 34 35 36 37 38 39 41 42 43 44 45 46 47 48 49 50 51 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\nSome large corporation where Pol... | [{"type": "stdin_stdout", "input": "40\n313 97063\n372 23668\n377 56079\n428 88458\n435 57330\n454 88869\n456 75553\n466 87607\n468 4542\n469 30243\n471 8958\n472 59745\n473 90985\n474 32247\n475 71576\n476 14016\n477 91574\n478 38345\n479 93280\n480 89902\n481 41828\n482 3233\n483 66725\n484 23523\n485 46772\n486 9568... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 know that Japan is the count... | [{"type": "stdin_stdout", "input": "1116434957\n", "output": "-O|OO-OO\n-O|-OOOO\n-O|OOOO-\nO-|OOOO-\nO-|OOO-O\nO-|OOOO-\n-O|O-OOO\nO-|O-OOO\nO-|O-OOO\nO-|O-OOO\n"}, {"type": "stdin_stdout", "input": "1603481361\n", "output": "O-|O-OOO\n-O|O-OOO\nO-|OOO-O\nO-|O-OOO\n-O|OOO-O\nO-|OOOO-\nO-|OOO-O\nO-|-OOOO\n-O|O-OOO\nO-|... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPiegirl got bored with binary, d... | [{"type": "stdin_stdout", "input": "1000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000\n11111111111111111111111111111111111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValery is a PE teacher at a scho... | [{"type": "stdin_stdout", "input": "112 1867 1261 1606\n0 7 17 43 67 70 87 112 129 141 148 162 179 180 189 202 211 220 231 247 250 277 308 311 327 376 400 406 409 417 418 444 480 512 514 515 518 547 572 575 578 587 612 617 654 684 701 742 757 761 788 821 825 835 841 843 850 858 869 872 881 936 939 969 970 971 997 1026 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sum of two perm... | [{"type": "stdin_stdout", "input": "84\n83 4 68 34 24 2 48 38 22 51 5 62 31 67 66 53 49 70 9 71 46 41 30 8 50 17 28 79 15 80 32 43 14 74 29 42 81 60 56 65 23 0 77 76 58 78 1 11 37 27 75 35 18 73 54 20 57 33 36 6 61 69 64 55 39 10 3 45 13 26 59 82 21 25 63 52 16 44 47 72 19 12 7 40\n63 41 80 52 36 45 17 69 22 66 37 21 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\nFord Prefect got a job as a web ... | [{"type": "stdin_stdout", "input": "10\ncdcddbacdb\naababacabc\n", "output": "8\n7 8\n"}, {"type": "stdin_stdout", "input": "10\ncdcddbacdc\naababacabc\n", "output": "7\n7 8\n"}, {"type": "stdin_stdout", "input": "10\ncdaddbccdc\naababacabc\n", "output": "6\n3 6\n"}, {"type": "stdin_stdout", "input": "10\ncdaddbccdc\na... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVanya is doing his maths homewor... | [{"type": "stdin_stdout", "input": "3+9+3+1+6+4+7+9+5+8+2+6+1+4+4+5+1+7+5+4+6+4+3+1*9+7+7+4+5+2+3+2+6+5+5+8+7+8+2+3*3+8+3+4+9+8*5+9+2+8+2+8+6+6+9+6+4+2+5+3+1+2+6+6+2+4+6+4+2+7+2+7+6+9+9+3+6+7+8+3+3+2+3+7+9+7+8+5+5+5*1+3+2+5+8+5*6+5+4*6+2+5+5+4+9+8+3+5+1+3+1+6+2+2+1+3+2+3+3+3+2+8+3+2+8+8+5+2+6+6+3+1+1+5+5*1+5+7+5+8+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\nYou are given a sequence of n in... | [{"type": "stdin_stdout", "input": "20\n-16 -23 29 44 -40 -50 -41 34 -38 30 -12 28 -44 -49 15 50 -28 38 -2 0\n", "output": "113.87500000314321\n"}, {"type": "stdin_stdout", "input": "20\n-16 -23 29 44 -40 -50 -41 34 -38 30 -12 28 -44 -49 15 50 -28 38 -4 0\n", "output": "112.6250000000"}, {"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 circles. Find ... | [{"type": "stdin_stdout", "input": "368831644 125127030 959524552\n690900461 -368007601 1000000000\n", "output": "1877639096067727828.62500000000000000000"}, {"type": "stdin_stdout", "input": "808468733 166975547 650132512\n807140196 169714842 655993403\n", "output": "1327864139649690571.00000000000000000000"}, {"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\nOne day student Vasya was sittin... | [{"type": "stdin_stdout", "input": "15 84\n11 9\n3 11\n13 10\n2 12\n5 9\n1 7\n14 4\n14 2\n14 1\n11 8\n1 8\n14 10\n4 15\n10 5\n5 12\n13 11\n6 14\n5 7\n12 11\n9 1\n10 15\n2 6\n7 15\n14 9\n9 7\n11 14\n8 15\n12 7\n13 6\n2 9\n9 6\n15 3\n12 15\n6 15\n4 6\n4 1\n9 12\n10 7\n6 1\n11 10\n2 3\n5 2\n13 2\n13 3\n12 6\n4 3\n5 8\n12 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 recently fallen through... | [{"type": "stdin_stdout", "input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nhdgra 7\nakm 12\nrakm 5\na 15\n3\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "11\nfghdgrakmnq\n8\nfgh 4\ngh 3\nh 10\nhdg 6\nargdh 7\nakm 12\nrakm 5\na 15\n3\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "11\nfghdgr... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDue to the increase in the numbe... | [{"type": "stdin_stdout", "input": "37 80 100\n31\n901706521 USB\n555265160 PS/2\n547038505 PS/2\n644436873 PS/2\n105558073 USB\n915082057 PS/2\n913113815 USB\n953413471 PS/2\n252912707 PS/2\n830344497 USB\n781593007 USB\n610659875 PS/2\n177755858 PS/2\n496444729 PS/2\n617569418 USB\n304908147 PS/2\n188649950 PS/2\n705... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnton likes to listen to fairy t... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1100000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 999999999999999999\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are an experienced Codeforce... | [{"type": "stdin_stdout", "input": "5\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n99999997 999999998 999999998 999999999\n99999996 999999997 999999997 999999999\n162133301 999999998 999999998 999999999\n", "output": "899999999100000001\n449999999550000002\n899999999100000001\n449999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJohn has just bought a new car a... | [{"type": "stdin_stdout", "input": "4\n1 2\n2 3\n3 4\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n1 3\n3 4\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n2 3\n2 4\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "4\n1 4\n2 3\n3 4\n", "output": "24\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have n distinct points on a ... | [{"type": "stdin_stdout", "input": "23\n-1 1\n-1 2\n-2 4\n-7 -8\n-3 3\n-9 -14\n-5 3\n-6 2\n-7 11\n-4 4\n-8 5\n1 1\n-1 -1\n-1 -2\n-2 -4\n-7 8\n-3 -3\n-9 14\n-5 -3\n-6 -2\n-7 -11\n-4 -4\n-8 -5\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4\n-1000000000 -1000000000\n1000000000 1000000000\n-1000000000 1000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 likes arithmetic progre... | [{"type": "stdin_stdout", "input": "4\n1 1000000000 1000000000 1000000000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1000000000 1010000000 1000000000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n0 1000000000 1010000000 1000000000\n", "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\nStatement: Sourav and his friend... | [{"type": "stdin_stdout", "input": "3\n13 1\n12 0\n18 3\n\nSAMPLE", "output": "184\n170\n248\n"}, {"type": "stdin_stdout", "input": "3\n10 1\n17 0\n15 4\n\nEMPMAS", "output": "148\n230\n214\n"}, {"type": "stdin_stdout", "input": "3\n13 1\n14 0\n18 3\n\nSAMPLE", "output": "184\n194\n248\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMahabir loves matrix and likes t... | [{"type": "stdin_stdout", "input": "3 3\n1 8 5 \n7 14 12 \n4 1 15 \n90\n180\n450\n\nSAMPLE", "output": "4 7 1 \n1 14 8 \n15 12 5 \n\n15 1 4 \n12 14 7 \n5 8 1 \n\n4 7 1 \n1 14 8 \n15 12 5 \n\n"}, {"type": "stdin_stdout", "input": "3 3\n1 8 4 \n7 14 12 \n4 1 15 \n90\n180\n450\n\nSAMPLE", "output": "4 7 1 \n1 14 8 \n15 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\nShil got an array of N integers ... | [{"type": "stdin_stdout", "input": "10000\n9384 887 2778 6916 7794 8336 5387 493 6650 1422 2363 28 8691 60 7764 3927 541 3427 9173 5737 5212 5369 2568 6430 5783 1531 2863 5124 4068 3136 3930 9803 4023 3059 3070 8168 1394 8457 5012 8043 6230 7374 4422 4920 3785 8538 6869 4325 8316 4371 6414 3527 6092 8981 9957 1874 6863... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Hound and his brother the Mo... | [{"type": "stdin_stdout", "input": "25\n01100000 00000010\n00101011 00110111\n00101100 00000011 \n01000101 10001010\n01010110 10100101\n01000001 11001100\n00101101 11011010\n00101010 10101010\n01010111 10001001\n11011111 10001011\n01110011 00011000\n00110000 10001110\n00001110 01010100\n11010010 11010001\n10111100 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\nXsquare loves to play with strin... | [{"type": "stdin_stdout", "input": "2\nphackerekarthj\njhakckerearthp\nhello\nbuy\n\n\nSAMPLE", "output": "Yes\nNo\n"}, {"type": "stdin_stdout", "input": "2\nphackerekarthj\njiakckerearthp\nhello\nbuy\n\n\nSAMPLE", "output": "Yes\nNo\n"}, {"type": "stdin_stdout", "input": "2\nphackerekarthj\njiakckerearthp\noellh\nbuy\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a positive integer N. C... | [{"type": "stdin_stdout", "input": "1336021909504", "output": "7\n"}, {"type": "stdin_stdout", "input": "1130063570614", "output": "4\n"}, {"type": "stdin_stdout", "input": "1051373943064", "output": "5\n"}, {"type": "stdin_stdout", "input": "1387260696878", "output": "5\n"}, {"type": "stdin_stdout", "input": "10116303... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 participating in a ... | [{"type": "stdin_stdout", "input": "-1 -102", "output": "No\n"}, {"type": "stdin_stdout", "input": "-2 -102", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 -2", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-4 -10", "output": "No\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N gems. The value of t... | [{"type": "stdin_stdout", "input": "4\n13 21 11 26\n-1 30 11 10", "output": "30\n"}, {"type": "stdin_stdout", "input": "4\n13 21 11 26\n-1 19 11 10", "output": "32\n"}, {"type": "stdin_stdout", "input": "4\n13 21 11 26\n-1 15 13 10", "output": "36\n"}, {"type": "stdin_stdout", "input": "4\n13 21 11 19\n-1 30 6 10", "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\nThree people, A, B and C, are tr... | [{"type": "stdin_stdout", "input": "-1 000 -1 15", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 100 -1 15", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 100 -1 12", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 100 -1 13", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings s and ... | [{"type": "stdin_stdout", "input": "8\ncoding\nfestiual", "output": "festiual\n"}, {"type": "stdin_stdout", "input": "8\ngnicoc\nfisteual", "output": "fisteual\n"}, {"type": "stdin_stdout", "input": "8\ngoicdm\neisteual", "output": "eisteual\n"}, {"type": "stdin_stdout", "input": "8\nmdciog\nlauetsie", "output": "lauet... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe will call a string that can b... | [{"type": "stdin_stdout", "input": "akasakaakasakasaka`kas", "output": "14\n"}, {"type": "stdin_stdout", "input": "akasakaakasakasakb`kas", "output": "14\n"}, {"type": "stdin_stdout", "input": "akasakaakasakasakaakas", "output": "14"}, {"type": "stdin_stdout", "input": "akakasaakasakasakaakas", "output": "4\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\nYou have an integer variable x. ... | [{"type": "stdin_stdout", "input": "7\nIIDDIDD", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\nDIDDIID", "output": "0\n"}, {"type": "stdin_stdout", "input": "7\nIIIDDDD", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\nDIIDDID", "output": "1\n"}, {"type": "stdin_stdout", "input": "7\nDIIDIDD", "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\nMr. Takahashi has a string s con... | [{"type": "stdin_stdout", "input": "codefestival\n101", "output": "aaaafeaaiaal\n"}, {"type": "stdin_stdout", "input": "cdoeffstival\n101", "output": "aaaaffaaiaal\n"}, {"type": "stdin_stdout", "input": "cdoeffstival\n111", "output": "aaaaafativam\n"}, {"type": "stdin_stdout", "input": "lavitsffeodc\n111", "output": "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\n<image>\n\n\nYou know the merry-... | [{"type": "stdin_stdout", "input": "0 3 1 1 0 -1 -1 2\n1 1 5 3 -1 3 0 -1", "output": "1 4 1 2 1 2 1 4\n1 2 1 4 1 4 1 2\n"}, {"type": "stdin_stdout", "input": "0 2 0 1 0 -1 -1 2\n1 1 5 3 -1 3 0 -1", "output": "1 2 1 2 1 4 1 4\n1 2 1 4 1 4 1 2\n"}, {"type": "stdin_stdout", "input": "0 2 1 1 0 -1 -1 2\n1 1 5 3 -1 0 0 -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\nIn Square Town, where many peopl... | [{"type": "stdin_stdout", "input": "3\n1\n0 -1 0 1 1 1 1 -1\n2\n0 0 0 1 1 1 1 0\n100 100 100 200 200 200 200 100\n2\n0 0 0 100 100 100 100 0\n10 10 10 11 20 20 20 10\n2\n1\n30 40 40 50 40 20 20 10\n1\n30 40 40 50 40 20 20 10\n0", "output": "1\n2\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "3\n1\n-1 0 -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\nIn the advanced algorithm class,... | [{"type": "stdin_stdout", "input": "3\n1 2 5\n11 3 6\n12 5 9\n3\n1 11 3\n13 11 14\n4 8 6\n0", "output": "5\n11\n"}, {"type": "stdin_stdout", "input": "3\n2 1 3\n4 2 11\n7 0 4\n3\n1 4 12\n14 10 18\n4 8 10\n0", "output": "2\n10\n"}, {"type": "stdin_stdout", "input": "3\n1 2 10\n11 3 6\n12 9 15\n3\n1 11 3\n13 11 9\n7 8 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\n<image>\n\nThe International Clo... | [{"type": "stdin_stdout", "input": "3\n1000\n342\n-1\n5\n-1\n2\n18\n11\n932\n5\n420\n1100\n0\n200\n685\n8\n353\n143\n402\n274\n283\n31\n402\n523\n0", "output": "342\n10\n435\n309\n"}, {"type": "stdin_stdout", "input": "3\n1000\n342\n0\n5\n2\n2\n11\n11\n932\n5\n148\n1000\n0\n200\n400\n8\n353\n242\n1097\n274\n283\n107\n4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nI started a part-time... | [{"type": "stdin_stdout", "input": "135 100 340 4 200\n1 1 4\n70 100 351 5 200\n0 1 3\n70 100 340 6 343\n1 1 3\n0 0 0 0 0", "output": "1035\n1000\n1190\n"}, {"type": "stdin_stdout", "input": "135 100 340 5 200\n1 1 4\n70 100 351 5 200\n0 1 3\n70 100 340 6 343\n1 1 3\n0 0 0 0 0", "output": "1135\n1000\n1190\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\nAlice wants to send an email to ... | [{"type": "stdin_stdout", "input": "5\n110\n100\n222220\n44033055505550666011011111090666077705550301110\n000555555550000330000444000080000200004440000", "output": ",\n.\nb\nhello, world!\nkeitai\n"}, {"type": "stdin_stdout", "input": "5\n40\n220\n222220\n44033055505550666011011111090666077705550301110\n000555555550000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a programmer on the deve... | [{"type": "stdin_stdout", "input": "6\nW 0 2\nW 0 2\nD 0\nW 2 1\nR 3\nR 2\n1\nR 1000000000\n0", "output": "-1\n-1\n\n-1\n\n"}, {"type": "stdin_stdout", "input": "6\nW 0 3\nW 0 2\nD 0\nW 2 1\nR 4\nR 1\n1\nR 1000000000\n0", "output": "-1\n-1\n\n-1\n\n"}, {"type": "stdin_stdout", "input": "6\nW 0 2\nW 0 2\nD 0\nW 3 1\nR 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\nExample\n\nInput\n\n8\n-10 0\n-1... | [{"type": "stdin_stdout", "input": "8\n-18 1\n-10 2\n-10 8\n-27 -1\n11 0\n22 -5\n4 -8\n5 0", "output": "137\n"}, {"type": "stdin_stdout", "input": "8\n-18 1\n-10 2\n-10 8\n-27 -1\n11 0\n22 -7\n4 -8\n5 0", "output": "144\n"}, {"type": "stdin_stdout", "input": "8\n-18 1\n-10 2\n-10 8\n-7 -1\n11 0\n22 -14\n4 -8\n5 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\nI: Ravage\n\nSanta Claus was cau... | [{"type": "stdin_stdout", "input": "4\n-1 2\n3 2\n-1 4\n-1 15", "output": "3\n"}, {"type": "stdin_stdout", "input": "4\n-4 2\n0 10\n3 7\n-2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "4\n-4 2\n0 10\n3 2\n-2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "4\n-4 2\n0 10\n3 2\n-4 2", "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\nWrite a program which prints the... | [{"type": "stdin_stdout", "input": "1 -2\n3 2\n-2 0", "output": "0.53907943898209422325 -0.26437392711448356856 1.18845545916395465278"}, {"type": "stdin_stdout", "input": "0 3\n4 0\n0 0", "output": "1.00000000000000000000 1.00000000000000000000 1.00000000000000000000"}, {"type": "stdin_stdout", "input": "1 6\n-1 -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\nFor a given sequence $A = \\\\{a... | [{"type": "stdin_stdout", "input": "4\n-1 0 -1 3\n14\n0\n23\n2", "output": "3\n4\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n"}, {"type": "stdin_stdout", "input": "4\n5 0 1 0\n12\n3\n23\n-2", "output": "4\n4\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\n-2 1 0 20\n10\n7\n4\n-1", "output": "3\n3\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\nAs we all know, F.C. Barcelona i... | [{"type": "stdin_stdout", "input": "2\n28 3\n8 2", "output": "198073708\n86\n"}, {"type": "stdin_stdout", "input": "2\n28 3\n8 1", "output": "198073708\n1\n"}, {"type": "stdin_stdout", "input": "2\n28 3\n8 0", "output": "198073708\n0\n"}, {"type": "stdin_stdout", "input": "2\n16 3\n8 2", "output": "10761681\n86\n"}, {"... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.