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\nHeidi the Cow is aghast: cracks ... | [{"type": "stdin_stdout", "input": "350000 180000\n", "output": "708073\n"}, {"type": "stdin_stdout", "input": "400000 140000\n", "output": "956370\n"}, {"type": "stdin_stdout", "input": "350000 140000\n", "output": "453366\n"}, {"type": "stdin_stdout", "input": "450000 160000\n", "output": "926957\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\nOn the way to Rio de Janeiro Ost... | [{"type": "stdin_stdout", "input": "100 33\nG..................................................................................................T\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 20\n.....G.#.#..................#.........##....#...................#.#..........#...#.#.T..#.......#...\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\nCan you imagine our life if we r... | [{"type": "stdin_stdout", "input": "1000000000\n1000000000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000000000\n1000010000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1000000000\n1001010000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "999999999\n999999999\n", "output": "YES\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHave you ever tasted Martian foo... | [{"type": "stdin_stdout", "input": "2\n4 3 1\n4 2 2\n", "output": "0.9230769231\n0.6666666667\n"}, {"type": "stdin_stdout", "input": "2\n4 3 1\n5 2 2\n", "output": "0.9230769231\n0.6521739130\n"}, {"type": "stdin_stdout", "input": "2\n8 3 1\n4 2 2\n", "output": "2.4489795918\n0.6666666667\n"}, {"type": "stdin_stdout", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe main city magazine offers it... | [{"type": "stdin_stdout", "input": "2\nWjrWBWqKIeSndDHeiVmfChQNsoUiRQHVplnIWkwBtxAJhOdTigAAzKtbNEqcgvbWHOopfCNgWHfwXyzSCfNqGMLnmlIdKQonLsmGSJlPBcYfHNJJDGlKNnOGtrWUhaTWuilHWMUlFEzbJYbeAWvgnSOOOPLxX-eJEKRsKqSnMjrPbFDprCqgbTfwAnPjFapVKiTjCcWEzhahwPRHScfcLnUixnxckQJzuHzshyBFKPwVGzHeJWniiRKynDFQdaazmTZtDGnFVTmTUZCRCpUHFmUHA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp has a checkered sheet o... | [{"type": "stdin_stdout", "input": "20 10\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWBWBBWW\nWWBWWBWWWW\nWWWWBWWWWW\nWWWWBWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\nWWWWWWWWWW\n", "output": "29\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\nPerhaps many have heard that the... | [{"type": "stdin_stdout", "input": "15\n17 5\n-19 5\n-8 3\n27 2\n45 3\n36 2\n-32 2\n49 1\n-3 2\n-41 2\n-35 1\n-46 1\n-29 1\n33 1\n0 1\n50\n24 -4\n41 3\n37 3\n9 2\n38 -4\n-30 2\n-41 -5\n-9 -5\n-33 3\n0 2\n-20 -3\n-49 -4\n34 1\n-38 -2\n17 -1\n-33 3\n-17 4\n16 3\n-49 2\n-3 -4\n-9 2\n35 3\n37 -5\n0 0\n-46 -5\n48 1\n-22 -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\nAnn and Borya have n piles with ... | [{"type": "stdin_stdout", "input": "100\n444272562 25 25 0 49 73291074 64 100 638092144 756033694 0 700405846 16 25 25 100 36 25 269573395 288578186 366853675 36 81 49 4 0 25 49 9 64 0 4 36 36 49 0 64 64 532899768 1 64 9 549673690 25 64 4 817183855 25 146555318 36 495564252 100 49 9 36 100 49 100 4 100 9 64 9 432227412... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYes, that's another problem with... | [{"type": "stdin_stdout", "input": "60\n799032\n1880\n489633\n167604\n641858\n521214\n951107\n121088\n952294\n514428\n890184\n883033\n317778\n456130\n373364\n404297\n757369\n815335\n317046\n148887\n834163\n990592\n721319\n402371\n458279\n570263\n887791\n365893\n433095\n463049\n457336\n669570\n803506\n178817\n214599\n21... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvar the Boneless is a great lea... | [{"type": "stdin_stdout", "input": "100 55\n1 2 4 4 3 5 5 2 3 1 2 2 1 2 4 5 0 5 4 2 5 4 5 3 3 5 4 4 4 5 5 2 3 3 4 4 3 4 5 5 5 5 3 5 1 2 4 3 4 5 3 3 2 0 4 5 3 4 4 1 9 1 5 2 0 1 4 0 3 3 1 4 2 5 4 5 3 2 5 5 2 3 2 3 2 2 3 4 4 4 1 4 2 4 5 3 1 3 3 1\n5 2 1 4 3 4 3 1 4 4 1 2 0 2 1 5 5 4 5 4 2 5 2 1 5 1 4 0 1 5 4 5 1 4 4 2 5 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\nThe king of ghosts is really dis... | [{"type": "stdin_stdout", "input": "7 3\n1 -1 0 2 4 -1 4\n\nELPLAS", "output": "1 1\n1 1\n1 1\n2 1\n4 1\n-1 2\n4 2\n"}, {"type": "stdin_stdout", "input": "7 1\n2 -1 1 0 4 -1 2\n\nELPMAS", "output": "2 1\n2 1\n2 1\n2 1\n4 1\n-1 2\n2 2\n"}, {"type": "stdin_stdout", "input": "7 5\n-1 3 1 3 0 2 3\n\nS@MPLE", "output": "-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\nAs the Formula One Grand Prix wa... | [{"type": "stdin_stdout", "input": "50\n83\n2 1 2 3 7 0 5 3 4 1 3 3 5 0 5 0 4 6 1 7 3 6 5 0 9 7 2 2 7 9 2 4 4 3 3 4 5 8 5 4 7 4 8 0 3 1 3 7 6 4 0 9 9 1 1 3 7 7 4 3 1 5 5 2 8 1 3 8 1 3 9 5 2 7 3 1 8 0 4 8 2 5 2 \n10\n9 8 8 9 8 5 6 3 6 1 \n37\n6 8 9 2 3 2 3 7 4 5 9 8 8 0 5 6 4 2 4 8 5 8 7 0 2 0 2 6 5 4 7 9 8 6 1 6 9 \n3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 triple of numbers is said to b... | [{"type": "stdin_stdout", "input": "1 -2 -2", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "0 -2 -2", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "18 3 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 1 17", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "18 4 -1", "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\nSnuke's mother gave Snuke an und... | [{"type": "stdin_stdout", "input": "10 9 16\n7 6 0\n4 7 1\n9 7 0\n2 9 0\n2 3 0\n4 1 0\n10 0 0\n9 1 -1\n3 0 0", "output": "No\n"}, {"type": "stdin_stdout", "input": "10 9 16\n7 6 0\n4 7 1\n9 7 0\n2 9 0\n2 3 0\n4 1 0\n10 0 0\n6 1 -1\n3 0 0", "output": "No\n"}, {"type": "stdin_stdout", "input": "10 9 16\n7 6 0\n4 7 1\n9 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\nYou are given a string S of leng... | [{"type": "stdin_stdout", "input": "10 1\nC?BB", "output": "c?BB\n"}, {"type": "stdin_stdout", "input": "10 1\nC?BA", "output": "c?BA\n"}, {"type": "stdin_stdout", "input": "-1 1\nBC@E", "output": "bC@E\n"}, {"type": "stdin_stdout", "input": "-1 2\nBB@E", "output": "Bb@E\n"}, {"type": "stdin_stdout", "input": "4 1\nCAB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a grid with N rows and ... | [{"type": "stdin_stdout", "input": "4 3\n-1 0 71\n81 0 102\n14 92 0\n1 2 2 1\n2 1 2 3\n2 2 1 3\n1 1 2 2", "output": "551\n"}, {"type": "stdin_stdout", "input": "4 3\n-1 0 71\n81 0 102\n14 92 0\n1 2 2 1\n2 1 2 3\n2 2 1 3\n1 1 3 2", "output": "449\n"}, {"type": "stdin_stdout", "input": "4 3\n0 0 71\n81 0 102\n14 92 0\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N integers written on ... | [{"type": "stdin_stdout", "input": "5\n1 18 1 14 0", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n2 18 0 14 0", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n4 3 -1 16 4", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n2 3 -1 16 4", "output": "YES\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSummer vacation ended at last an... | [{"type": "stdin_stdout", "input": "5 5 5\n3\n2\n11\n16\n18", "output": "5\n"}, {"type": "stdin_stdout", "input": "5 5 5\n3\n2\n11\n29\n18", "output": "5\n"}, {"type": "stdin_stdout", "input": "5 4 5\n3\n2\n11\n29\n18", "output": "5\n"}, {"type": "stdin_stdout", "input": "5 4 5\n3\n2\n11\n29\n30", "output": "5\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\nThe new PIN is hard to remember.... | [{"type": "stdin_stdout", "input": "Thereare100yenonthetable.Iam17yearsold.\n.mp6taemohogdluohsI", "output": "123\n"}, {"type": "stdin_stdout", "input": "Thergarn100yeeontgesable-Iam17ye`rsolc.\nIshptkogdhomemt5q`.", "output": "122\n"}, {"type": "stdin_stdout", "input": "Thereare100yenonthetable.Iam17ye`rsold.\n.mp6tae... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJapan achieved the second straig... | [{"type": "stdin_stdout", "input": "6\nA 1 0 0 2 -1\nB 0 0 1 2 -1\nC 2 1 1 1 1\nD 2 0 -1 0 2\nE 2 0 0 0 0\nF 1 1 1 2 2\n4\nh 1 1 1\ng 0 2 2\nx -1 0 0\n` 0 2 2\n0", "output": "E\nD\nA\nB\nF\nC\nx\ng\n`\nh\n"}, {"type": "stdin_stdout", "input": "6\nA 1 0 0 2 -1\nB 0 0 1 1 0\nC 1 1 1 1 1\nD 1 1 0 0 2\nE 2 0 -1 0 0\nF 1 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\nproblem\n\nThe island where JOI ... | [{"type": "stdin_stdout", "input": "13 21 1 1\n1001 6000\n11\n4 2\n3 7\n2 4\n8 8\n8 4\n2 10\n3 4\n6 7\n7 10\n10 11\n5 9\n11 10\n3 6\n4 5\n1 6\n13 12\n6 7\n8 11\n6 13\n7 8\n2 12", "output": "1001\n"}, {"type": "stdin_stdout", "input": "13 21 1 1\n1010 10247\n7\n1 2\n3 7\n2 4\n5 8\n8 9\n2 5\n3 4\n4 7\n9 10\n10 11\n9 9\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are a number of ways to sh... | [{"type": "stdin_stdout", "input": "1 -2\n3 1\n3 1\n10 1\n1 10\n10 0\n8 -1\n0 0", "output": "1\n1\n10\n10\n8\n"}, {"type": "stdin_stdout", "input": "1 -2\n3 1\n3 1\n10 1\n4 10\n10 0\n8 -1\n0 0", "output": "1\n1\n7\n10\n8\n"}, {"type": "stdin_stdout", "input": "5 -1\n3 1\n1 1\n10 2\n1 10\n14 1\n11 0\n0 0", "output": "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\nFloating-Point Numbers\n\nIn thi... | [{"type": "stdin_stdout", "input": "1\n0000000000100000000000000000000000000000000000000000\n2\n0000000000000000000000000000000000000000000000000000\n2\n0000000000000000001000000000000000000000000000000000\n11\n0000000000000000000000000000000000000000000000000000\n7\n1101000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTraining is indispensable for ac... | [{"type": "stdin_stdout", "input": "3\n0\n0\n1000000010", "output": "1000000010\n0\n0\n"}, {"type": "stdin_stdout", "input": "3\n0\n0\n1000000000", "output": "1000000000\n0\n0"}, {"type": "stdin_stdout", "input": "4\n11\n5\n10\n10", "output": "5\n10\n10\n11\n"}, {"type": "stdin_stdout", "input": "4\n11\n5\n19\n10", "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\nProblem statement\n\nThere is an... | [{"type": "stdin_stdout", "input": "5\n00001\n4", "output": "11111\n"}, {"type": "stdin_stdout", "input": "5\n00000\n3", "output": "11100\n"}, {"type": "stdin_stdout", "input": "5\n00001\n1", "output": "10001\n"}, {"type": "stdin_stdout", "input": "5\n10001\n1", "output": "11001\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nGiven the squares of ... | [{"type": "stdin_stdout", "input": "3 5\n.....\n.#.#.\n.###.\n.#.#.\n.....", "output": "3\n"}, {"type": "stdin_stdout", "input": "3 1\n.....\n.#.#.\n.###.\n.#.#.\n.....", "output": "0\n"}, {"type": "stdin_stdout", "input": "2 5\n.....\n.#.#.\n.###.\n.#.#.\n.....", "output": "2\n"}, {"type": "stdin_stdout", "input": "4 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA binary heap which satisfies ma... | [{"type": "stdin_stdout", "input": "10\n-1 2 2 0 140 11 1 1 12 5", "output": " 140 12 11 1 5 2 1 -1 0 2\n"}, {"type": "stdin_stdout", "input": "10\n0 2 2 0 140 11 1 -1 12 5", "output": " 140 12 11 0 5 2 1 -1 0 2\n"}, {"type": "stdin_stdout", "input": "10\n1 -1 0 0 15 18 1 -1 -1 2", "output": " 18 15 1 0 2 0 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\nStack is a container of elements... | [{"type": "stdin_stdout", "input": "6 12\n1 0 0\n0 -1 1\n0 1 0\n0 0 4\n0 2 1\n1 1\n1 2\n1 0\n1 0", "output": "-1\n-1\n1\n4\n4\n4\n4\n"}, {"type": "stdin_stdout", "input": "6 12\n1 0 0\n0 0 1\n0 1 0\n0 0 4\n0 2 1\n1 1\n1 2\n1 0\n1 0", "output": "0\n0\n1\n4\n4\n4\n4\n"}, {"type": "stdin_stdout", "input": "6 12\n1 0 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\nThe king's birthday dinner was a... | [{"type": "stdin_stdout", "input": "100 100\n97 64 64 35 35 97 39 83 26 97 92 97 83 11 83 97 97 64 23 97 97 11 39 11 11 39 64 14 23 39 64 26 26 97 39 39 39 64 83 26 83 97 64 11 64 64 64 83 64 92 64 26 83 26 27 64 11 83 92 92 23 11 11 97 92 64 97 64 97 83 64 27 83 23 11 26 11 92 83 64 83 11 11 11 97 83 97 26 26 97 23 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\nFrom \"ftying rats\" to urban sa... | [{"type": "stdin_stdout", "input": "10\n9 16 19 23 7 14 21 15 14 6\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "10\n5 20 18 1 12 17 22 20 26 4\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "10\n9 16 19 23 7 14 21 15 1 6\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "10\n5 20 18 1 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\nThe legend of the foundation of ... | [{"type": "stdin_stdout", "input": "100\n404 523 -303 876 982 -275 498 287 255 491 -723 289 203 -796 -469 -299 -435 -869 58 577 55 600 153 -948 -11 726 129 797 -323 99 -934 -419 101 -307 -525 502 353 44 -905 371 -946 925 -538 614 -171 -867 -929 702 -429 720 94 -390 997 -803 451 379 57 -377 -545 -890 442 525 -975 -484 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp decided to relax on his... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 1000010000\n", "output": "2000020000\n"}, {"type": "stdin_stdout", "input": "500000000 250000000 750000000 1000000000\n", "output": "15000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 boxers, the weight o... | [{"type": "stdin_stdout", "input": "125\n8 85 125 177 140 158 2 152 67 102 9 61 29 188 102 193 112 194 15 7 133 134 145 7 89 193 130 149 134 51 13 194 191 149 73 106 151 85 42 53 163 134 127 7 51 61 178 105 117 197 35 21 122 164 133 165 135 12 192 60 54 187 173 75 74 195 85 62 166 195 131 109 191 196 61 44 61 20 95 147... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike and Ann are sitting in the ... | [{"type": "stdin_stdout", "input": "wfyjbwcuxjrvmunfbrhethdmepeampvjcypavwoolteucetnqntytdfstvunnfyvngydjcohnwgtfddcnvuewxcafwureiupfeljqydwtickfbokoytlxtuwmvmvflemfvcksszlwgcwtamzovectkzxuzdtvbujyfpvcruvzvgglozwktwawcbkkwkookmuhjlcyjvfrnzmgpglvnbrujtbvtwrsqbulusfwzulxnadaqbijfrsvteqqoirfaolhfbgorxdwigwxcydbfxhvhqzjqir... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHyakugoku has just retired from ... | [{"type": "stdin_stdout", "input": "0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 6 6 6 6 6 6 0 0 0\n1 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n", "output": "15.90475929388076714588\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\nSo the Beautiful Regional Contes... | [{"type": "stdin_stdout", "input": "5\n12\n5 4 4 3 2 2 1 1 1 1 1 1\n4\n4 3 2 0\n1\n1000000\n20\n20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 10 3 2 1\n32\n64 64 63 58 58 58 58 58 37 37 37 37 34 34 28 28 28 28 28 28 24 24 19 17 17 17 17 16 17 16 16 11\n", "output": "1 2 3\n0 0 0\n0 0 0\n1 2 7\n2 6 6\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\nLet's assume that we have a pair... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "999998\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "123455\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "998756\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "999879\n", "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\nYou are given an array a consist... | [{"type": "stdin_stdout", "input": "3\n5\n1 2 3 4 5\n5\n4 4 4 4 2\n6\n1 3 1 5 3 1\n", "output": "-1 -1 3 2 1 \n-1 4 4 4 2 \n-1 -1 1 1 1 1 \n"}, {"type": "stdin_stdout", "input": "3\n5\n4 4 4 4 2\n5\n1 2 3 4 5\n6\n1 3 1 5 3 1\n", "output": "-1 4 4 4 2 \n-1 -1 3 2 1 \n-1 -1 1 1 1 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\nAfter battling Shikamaru, Tayuya... | [{"type": "stdin_stdout", "input": "58260522 77914575 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 488012525 561127307 800305059 992325267 112738006\n", "output": "804109112\n"}, {"type": "stdin_stdout", "input": "58260522 77914575 2436426 24979445 61648772 23690081\n10\n582... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 cards numbered 1, β¦,... | [{"type": "stdin_stdout", "input": "3\n3\n150\n111\n3\n529\n159\n5\n18444\n11156\n", "output": "EQUAL\nEQUAL\nEQUAL\n"}, {"type": "stdin_stdout", "input": "3\n3\n777\n111\n3\n314\n159\n5\n09281\n09281\n", "output": "\nRED\nBLUE\nEQUAL\n"}, {"type": "stdin_stdout", "input": "3\n3\n777\n111\n3\n229\n159\n5\n16093\n11156\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 two positive integers a... | [{"type": "stdin_stdout", "input": "19\n45713448 35\n788943748 304424261\n237960356 1\n487449924 402839525\n467441822 2\n716573439 455654889\n385540845 22\n184 114\n793833426 27\n765976595 822587672\n154 56\n329515648 1\n825827348 3\n169809490 255930640\n146 87\n41033 104433410\n50 122\n52634639 1\n11839593 1\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe student council has a shared... | [{"type": "stdin_stdout", "input": "5\n3\nTMT\n3\nMTT\n6\nTMTMTT\n6\nTMTTTT\n6\nTTMMTT\n", "output": "\nYES\nNO\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "5\n3\nTMT\n3\nTMT\n6\nTMTMTT\n6\nTMTTTT\n6\nTTMMTT\n", "output": "YES\nYES\nYES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "5\n3\nTMT\n3\nMTT\n6\nTMT... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "3\n0?10\n???\n?10??1100\n", "output": "\n8\n6\n25\n"}, {"type": "stdin_stdout", "input": "3\n1?10\n???\n?10??1100\n", "output": "10\n6\n25\n"}, {"type": "stdin_stdout", "input": "3\n?010\n???\n?100?11?0\n", "output": "10\n6\n16\n"}, {"type": "stdin_stdout", "input": "3\n001?\n???\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\nVasya lives in a strange world. ... | [{"type": "stdin_stdout", "input": "103\n100\n68 38 41 54 37 11 35 26 43 97 70 3 13 11 64 83 3 95 17 16 4 13 22 27 64 20 95 38 40 87 6 17 95 67 31 24 85 33 98 24 89 101 66 38 42 5 95 18 95 13 103 85 72 73 68 93 22 59 48 59 72 46 5 41 54 32 48 69 3 76 2 26 102 44 39 58 55 85 40 16 81 78 92 63 25 97 83 2 54 16 20 63 19 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Little Elephant loves to pla... | [{"type": "stdin_stdout", "input": "100\n1 2\n2 1\n2 1\n1 2\n1 1\n1 2\n2 1\n1 1\n2 2\n2 1\n2 1\n1 1\n1 1\n2 1\n2 1\n2 1\n2 1\n2 1\n1 1\n2 1\n1 1\n1 1\n2 2\n1 2\n1 2\n1 2\n2 2\n1 2\n1 2\n2 1\n1 2\n2 1\n1 2\n2 2\n1 1\n2 1\n1 2\n2 1\n2 1\n1 2\n2 1\n2 1\n1 2\n2 1\n1 1\n1 2\n1 1\n1 1\n2 2\n2 2\n2 1\n2 1\n1 2\n2 2\n1 1\n2 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\nBob got a job as a system admini... | [{"type": "stdin_stdout", "input": "100 4283 65\n", "output": "65 1\n65 2\n65 3\n65 4\n65 5\n65 6\n65 7\n65 8\n65 9\n65 10\n65 11\n65 12\n65 13\n65 14\n65 15\n65 16\n65 17\n65 18\n65 19\n65 20\n65 21\n65 22\n65 23\n65 24\n65 25\n65 26\n65 27\n65 28\n65 29\n65 30\n65 31\n65 32\n65 33\n65 34\n65 35\n65 36\n65 37\n65 38\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 Vitaly loves different al... | [{"type": "stdin_stdout", "input": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n", "output": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"}, {"type": "stdin_stdout", "input": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, {"type": "stdin_stdout", "input": "xxxxxx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen Valera has got some free ti... | [{"type": "stdin_stdout", "input": "100 100\n75 92 18 7 81 67 7 92 100 65 57 32 50 131 85 31 80 91 84 63 39 52 92 81 1 98 24 12 84 48 17 86 51 72 48 95 81 50 12 66 19 79 49 89 34 1 193 75 20 33 96 27 42 23 133 71 93 1 85 19 66 14 13 13 20 39 36 33 42 61 56 64 23 91 37 99 40 74 13 18 98 85 74 39 62 84 46 74 50 23 38 11 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYaroslav has an array, consistin... | [{"type": "stdin_stdout", "input": "56\n-157 136 457 598 -138 -586 -338 752 -566 -718 -333 -965 309 -125 -938 -188 -390 17 -75 -902 -320 163 820 -970 -525 -329 81 488 -412 978 138 344 305 -358 -273 -967 253 -665 -245 187 602 252 -825 -511 828 764 -402 278 995 541 542 549 612 -536 527 -884 225 800 160 -409 -926 -795 -32... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 too much playing on paper,... | [{"type": "stdin_stdout", "input": "1 500\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\nCucumber boy is fan of Kyubeat, ... | [{"type": "stdin_stdout", "input": "4\n15168\n..7.\n.7..\n7...\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5\n..1.\n1111\n..1.\n..1.\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1\n.135\n1247\n3468\n5789\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "4\n7777\n..7.\n.7..\n7...\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\nDuring the break, we decided to ... | [{"type": "stdin_stdout", "input": "9 9\n10 10 10 01 10 11 11 01 10\n11 00 10 10 11 10 01 00 00\n10 00 11 01 00 01 01 11 10\n10 11 10 00 01 11 11 10 11\n01 11 11 01 11 00 10 00 01\n01 00 00 10 01 01 10 00 01\n11 10 11 10 01 00 00 11 00\n10 11 10 10 01 10 10 10 01\n10 10 10 10 11 11 01 00 11\n", "output": "11 11 11 11 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've got array a[1], a[2], ...... | [{"type": "stdin_stdout", "input": "100\n1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "120\n"}, {"type": "stdin_stdout", "input": "100\n1 0 0 0 0 0 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUncle Fyodor, Matroskin the Cat ... | [{"type": "stdin_stdout", "input": "scissors\nscissors\nscissors\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "scissors\nscissors\npaper\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "paper\nscissors\nscissors\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "scissors\npaper\nscissors\n", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAll cities of Lineland are locat... | [{"type": "stdin_stdout", "input": "50\n-50000 -49459 -48875 -48456 -48411 -48096 -47901 -47500 -47150 -46808 -46687 -46679 -46337 -45747 -45604 -45194 -44752 -44242 -44231 -44122 -43636 -43274 -42916 -42881 -42386 -42095 -41830 -41618 -41145 -40897 -40534 -40007 -39761 -39389 -39104 -38909 -38630 -38561 -38364 -38255 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, Duff has been practici... | [{"type": "stdin_stdout", "input": "100\n196 1681 196 0 61 93 196 196 196 196 196 0 0 96 18 1576 0 93 666463 18 93 1 1278 8939 93 196 196 1278 3 0 67416 869956 10 56489 196 745 39 783 196 8939 196 81 69634 4552 39 3 14 20 25 8 10 4 7302 0 19579 20 1140 15990 7302 0 19579 4142 11 1354 75252 93 311 1278 0 79475 10 75252 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 in the thicket ... | [{"type": "stdin_stdout", "input": "62 47 14 888621154\n202 268 300 401 422 660 782 822 1164 1300 1571 1670 1713 1807 2677 2700 2747 2873 2956 3068 3798 4159 4221 4232 4485 4507 4803 5071 5161 5161 5595 5600 5623 5846 5867 5949 6140 6560 6727 6781 6873 7159 7218 7232 7241 7333 7369 7415 7486 7506 7538 7681 7781 8074 87... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Berland will hold a Sc... | [{"type": "stdin_stdout", "input": "10 4\nigtVqPgoW 3 24\nuc 1 381\nOxmov[Av 4 727\nxyRAaAk 2 378\nvYCV 4 67\nuf 2 478\nDawOytiYiH 1 775\nRS 1 663\npLhTehhjA 2 38\nkYWfb 3 595\n", "output": "DawOytiYiH RS\nuf xyRAaAk\nkYWfb igtVqPgoW\nOxmov[Av vYCV\n"}, {"type": "stdin_stdout", "input": "10 4\nigtVqPgoW 3 24\nuc 1 381\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSasha lives in a big happy famil... | [{"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n1 2 3 4\n", "output": "4\n4\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n1 2 3 3\n", "output": "3\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "4 3\n1 2\n2 3\n3 4\n1 1 3 4\n", "output": "3\n4\n3\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\nVasily has a number a, which he ... | [{"type": "stdin_stdout", "input": "1 536870912\n", "output": "YES\n30\n1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 \n"}, {"type": "stdin_stdout", "input": "2 536870912\n", "output": "YES... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSanta Claus decided to disassemb... | [{"type": "stdin_stdout", "input": "dofbgdppdvmwjwtdyphhmqliydxyjfxoopxiscevowleccmhwybrxitvujkfliamvqinlrpytyaqdlbywccprukoisyaseibuqbfqjcabkieimsggsakpnqliwhehnemewhychqrfiuyaecoydnromrh\ndofbgdppdvmwjwtdyphhmqliydxyjfxoopxiscevowleccmhwybsxitvujkfliamvqinlrpytyaqdlbywccprukoisyaseibuqbfqjcabkieimsggsakpnqliwhehnemew... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBear Limak examines a social net... | [{"type": "stdin_stdout", "input": "20 80\n17 4\n10 1\n11 10\n17 7\n15 10\n14 15\n13 1\n18 13\n3 13\n12 7\n9 13\n10 12\n14 12\n18 11\n4 7\n10 13\n11 3\n19 8\n14 7\n10 17\n14 3\n7 11\n11 14\n19 5\n10 14\n15 17\n3 1\n9 10\n11 1\n4 1\n11 4\n9 1\n12 3\n13 7\n1 14\n11 12\n7 1\n9 12\n18 15\n17 3\n7 15\n4 10\n7 18\n7 9\n12 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nZane the wizard had never loved ... | [{"type": "stdin_stdout", "input": "100 1 100\n0 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 110 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\nTo stay woke and attentive durin... | [{"type": "stdin_stdout", "input": "3 2 4\n91 288\n92 97\n116 271\n92 192\n93 97\n95 138\n90 100\n", "output": "83\n5\n26\n6\n"}, {"type": "stdin_stdout", "input": "3 2 4\n91 510\n92 97\n66 271\n51 94\n93 97\n95 316\n100 111\n", "output": "4\n5\n177\n12\n"}, {"type": "stdin_stdout", "input": "3 2 4\n91 288\n92 97\n116 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 somehow found an array cons... | [{"type": "stdin_stdout", "input": "4\n1000000000 1000000000 1000000000 99999999\n", "output": "First\n"}, {"type": "stdin_stdout", "input": "4\n1000000000 1000000001 1000000000 99999999\n", "output": "First\n"}, {"type": "stdin_stdout", "input": "4\n1000000000 1000000001 1000000000 80256192\n", "output": "First\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 an array a. Some e... | [{"type": "stdin_stdout", "input": "4\n1 5 2 5\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "4\n1 5 2 1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "4\n1 7 2 1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "2\n-1 1100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n1 3 2 1\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEhab is interested in the bitwis... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "20140978692096\n"}, {"type": "stdin_stdout", "input": "1000100000000\n", "output": "20142429742080\n"}, {"type": "stdin_stdout", "input": "1000100000010\n", "output": "20142429742357\n"}, {"type": "stdin_stdout", "input": "1001100000010\n", "output": "201... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 size m wi... | [{"type": "stdin_stdout", "input": "6 35\n5 7 10 11 13 14 17 18 25 27 28 29 30 31 33 35 36 37 39 40 41 43 46 47 50 52 55 56 57 58 59 60 61 62 63\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "6 30\n3 8 13 16 18 19 21 22 24 25 26 28 29 31 33 42 44 46 49 50 51 53 54 57 58 59 60 61 62 63\n", "output": "10\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\nJoy and Rock decided to play a g... | [{"type": "stdin_stdout", "input": "50\n97615 11366\n129085 77040\n95395 90668\n94578 90360\n95339 55581\n87700 42042\n56227 28167\n59884 29641\n73283 42196\n97418 38777\n56720 48469\n63282 60569\n96985 12698\n149509 65772\n50106 7383\n70192 51557\n99640 4982\n55928 48029\n66498 33584\n63566 2727\n73526 37143\n57808 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\nJoy is a short and lazy guy, he ... | [{"type": "stdin_stdout", "input": "100\n41\n18467\n6334\n26500\n19169\n15724\n11478\n29358\n26962\n24464\n5705\n28145\n23281\n16827\n9961\n491\n2995\n11942\n4827\n5436\n32391\n14604\n3902\n153\n292\n12382\n17421\n18716\n19718\n19895\n5447\n21726\n14771\n11538\n1869\n19912\n25667\n26299\n17035\n9894\n28703\n23811\n3132... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBen believes a lot in tarot card... | [{"type": "stdin_stdout", "input": "2\n5\n1 -1 1 1 5\n6\n1 0 0 -1 -1 13\n\n\nLLPDAS", "output": "1 2\n1 2\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 0 -1 0 2\n6\n-1 -1 4 3 1 4\n\n\nEPMMAS", "output": "1 3\n2 5\n"}, {"type": "stdin_stdout", "input": "2\n5\n1 1 3 4 5\n6\n0 4 -1 3 1 10\n\n\nSAMPLE", "output": "2 5\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\nWe have a string S of length N c... | [{"type": "stdin_stdout", "input": "39\nBBBGBBBRBGBRBGBRBGGBRRRBBGRRBBGGBRGBRBR", "output": "1800\n"}, {"type": "stdin_stdout", "input": "39\nRBRBRRBGGBBRRGBBGRRBGGBRBGBRBGBRBBBGBBB", "output": "1796\n"}, {"type": "stdin_stdout", "input": "39\nRRRBGRBGGBBRRGBBRBRBGGBRBGBRBGBRBBBGBBB", "output": "1804\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\nAtCoder Mart sells 1000000 of ea... | [{"type": "stdin_stdout", "input": "386", "output": "0\n"}, {"type": "stdin_stdout", "input": "115", "output": "0\n"}, {"type": "stdin_stdout", "input": "173", "output": "0\n"}, {"type": "stdin_stdout", "input": "145", "output": "0\n"}, {"type": "stdin_stdout", "input": "192", "output": "0\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N squares in a row. Th... | [{"type": "stdin_stdout", "input": "11 16 10 1\n1 3 5 1 11 7 5 2 5 3 3 3 5 10 6 8", "output": "27\n"}, {"type": "stdin_stdout", "input": "11 16 10 1\n1 3 5 1 11 7 5 2 5 3 3 3 5 10 6 7", "output": "26\n"}, {"type": "stdin_stdout", "input": "11 16 10 1\n1 3 5 1 11 7 5 2 5 3 3 3 5 11 6 7", "output": "27\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 is a tree with N vertices,... | [{"type": "stdin_stdout", "input": "10\n7 9\n1 2\n6 5\n8 1\n3 10\n6 5\n2 10\n9 6\n2 6", "output": "5"}, {"type": "stdin_stdout", "input": "10\n7 9\n1 2\n10 4\n8 2\n3 7\n6 5\n2 10\n9 6\n2 6", "output": "8"}, {"type": "stdin_stdout", "input": "10\n7 9\n1 2\n10 4\n8 2\n3 7\n6 5\n3 10\n9 6\n2 6", "output": "8"}, {"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 height of the student was me... | [{"type": "stdin_stdout", "input": "21\n182.52038838661136\n173.59035199874677\n159.1654152748587\n178.37721834424076\n171.14400777912027\n182.81130283538022\n174.6786970584368\n172.29285424816956\n164.63708333553282\n170.35024430895632\n176.98250427300766\n170.33088547272038\n163.32499378168183\n173.12553016807985\n17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nThere are the followi... | [{"type": "stdin_stdout", "input": "12\n3\n2\n1\n1\n1\n3\n2\n1\n2\n1\n1\n5\n2\n3\n2\n1\n2\n2\n5\n0\n0\n3\n2\n-1\n0\n0", "output": "8\n2\n1\n2\n"}, {"type": "stdin_stdout", "input": "12\n3\n2\n1\n1\n1\n3\n2\n2\n2\n2\n1\n5\n2\n3\n2\n1\n2\n2\n5\n1\n0\n3\n2\n-1\n0\n0", "output": "3\n2\n1\n2\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are a student of University ... | [{"type": "stdin_stdout", "input": "5\n13:57 59\n12:02 15\n12:91 21\n17:53 2\n16:09 14\n0", "output": "lunch 66\ndinner no guest\nmidnight no guest\n"}, {"type": "stdin_stdout", "input": "5\n13:57 67\n12:03 15\n12:19 21\n08:52 2\n16:09 14\n0", "output": "lunch 33\ndinner no guest\nmidnight no guest\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\nExample\n\nInput\n\n3\nNNN\nNNN\... | [{"type": "stdin_stdout", "input": "3\nNNN\nNNO\nNNN", "output": "Taro\n"}, {"type": "stdin_stdout", "input": "3\nNMN\nNNO\nNNN", "output": "Taro\n"}, {"type": "stdin_stdout", "input": "3\nNMN\nNNP\nNNN", "output": "Taro\n"}, {"type": "stdin_stdout", "input": "3\nMMN\nNNO\nNNN", "output": "Taro\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\nDice Stamp\n\nDice stamp\n\nAt a... | [{"type": "stdin_stdout", "input": "1\n0 0\n1 2 3 4 5 6\nRRRRBBBBLLLLFFFF\n2\n0 0\n1 1 1 1 1 1\nRRR\n2 2\n100 100 100 100 100 101\nFFF\n1\n1010 -1000\n1 2 3 4 5 6\nLFRB\n4\n-3 -4\n1 2 3 4 5 6\nBBBBBBBB\n4 -3\n11 12 13 14 15 16\nLLLLLLLL\n3 4\n21 22 23 24 25 26\nFFFFFFFF\n-4 3\n31 32 33 34 35 36\nRRRRRRRR\n3\n-2 -2\n9 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\nD: Indecision-Indecision-\n\npro... | [{"type": "stdin_stdout", "input": "1 4\n4 0 6\n1 1 -1\n-1 -1 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "1 4\n4 0 6\n2 1 -1\n-1 -1 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "1 2\n4 0 6\n2 1 -1\n-1 -1 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "1 2\n4 0 6\n2 2 -1\n-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\nC: Shuttle Run\n\nStory\n\nUnive... | [{"type": "stdin_stdout", "input": "1 3\n0 125", "output": "125\n"}, {"type": "stdin_stdout", "input": "1 -2\n1 22", "output": "22\n"}, {"type": "stdin_stdout", "input": "32 4\n0 1", "output": "128\n"}, {"type": "stdin_stdout", "input": "2 50\n0 4", "output": "100\n"}, {"type": "stdin_stdout", "input": "1 -2\n1 26", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem statement\n\nModulo is v... | [{"type": "stdin_stdout", "input": "7\n1 3\n2 3\n3 4\n20 5\n4 6\n6 7", "output": "1100111\n"}, {"type": "stdin_stdout", "input": "7\n1 3\n2 1\n3 4\n20 5\n4 6\n6 7", "output": "1111111\n"}, {"type": "stdin_stdout", "input": "7\n1 3\n2 3\n3 4\n4 5\n4 6\n3 7", "output": "1101111\n"}, {"type": "stdin_stdout", "input": "7\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 manipulate... | [{"type": "stdin_stdout", "input": "2\n1 1\n0\n41\n1 2 3\n1 1\n1 1 1\n1 2", "output": "0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n1 2\n1 3\n0\n12\n0 3 1000\n0 2 1000\n0 1 1000\n1 1\n1 2\n1 3", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a rectangular grid of s... | [{"type": "stdin_stdout", "input": "10 10 524287\n1 2 4 8 16 32 64 128 256 512\n2 4 8 16 32 64 128 256 512 1024\n4 8 16 32 64 128 256 512 1024 2048\n8 16 32 64 128 256 512 1024 2048 4096\n16 32 64 128 256 512 1024 2048 4096 8192\n32 64 128 256 512 1024 2048 4096 8192 16384\n64 128 256 512 1024 2048 4096 8192 16384 3276... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya owns three big integers β ... | [{"type": "stdin_stdout", "input": "12212222221212222221221221222222121222222122\n28110439567417001223290131317494419039608149\n22222111112222222222221221222222121222222122\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "12212222221212222221221221222222121222222122\n55921027620815462813527065083325544968950004... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 undirected grap... | [{"type": "stdin_stdout", "input": "10 10\n3 4 5 10 10 9 5 4 7 8\n1 5 5\n10 3 18\n1 7 20\n7 8 20\n10 4 8\n10 2 17\n9 4 2\n7 5 16\n1 8 17\n7 10 18\n", "output": "67\n"}, {"type": "stdin_stdout", "input": "2 1\n100000000000 100000000000\n1 2 199999999999\n", "output": "199999999999\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 array a_1, a_2, ..... | [{"type": "stdin_stdout", "input": "101\n2 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 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 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "101\n2 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 rooted tree with... | [{"type": "stdin_stdout", "input": "8\n2 1\n-1 0\n1 1\n1 1\n1 1\n4 0\n5 1\n7 1\n", "output": "1 3 5 7 8\n"}, {"type": "stdin_stdout", "input": "8\n2 1\n-1 0\n1 1\n1 1\n1 1\n4 0\n5 1\n7 0\n", "output": "1 3 5\n"}, {"type": "stdin_stdout", "input": "8\n2 1\n-1 0\n1 0\n1 1\n2 1\n4 0\n5 1\n7 1\n", "output": "5 7 8\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\nThis problem is same as the next... | [{"type": "stdin_stdout", "input": "42\n-5391 -2932\n-5391 -2868\n-5391 1744\n-5391 2236\n-5391 4148\n-5391 5217\n-5391 6188\n-3584 -2932\n-3584 -2868\n-3584 1744\n-3584 2236\n-3584 4148\n-3584 5217\n-3584 6188\n-1657 -2932\n-1657 -2868\n-1657 1744\n-1657 2236\n-1657 4148\n-1657 5217\n-1657 6188\n3218 -2932\n3218 -2868... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMelody Pond was stolen from her ... | [{"type": "stdin_stdout", "input": "1219679533107\n", "output": "1 609839766552\n"}, {"type": "stdin_stdout", "input": "1044191868535\n", "output": "1 522095934266\n"}, {"type": "stdin_stdout", "input": "1041721920937\n", "output": "1 520860960467\n"}, {"type": "stdin_stdout", "input": "1025662663437\n", "output": "1 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\nYou are on the island which can ... | [{"type": "stdin_stdout", "input": "21 3 61 3\n18 3\n21 3\n11 3\n13 2\n5 2\n14 2\n10 3\n9 3\n12 1\n1 2\n7 2\n20 1\n16 3\n18 2\n9 1\n20 3\n17 3\n6 1\n4 2\n1 1\n3 1\n4 1\n6 3\n6 2\n2 1\n13 3\n5 3\n3 2\n13 1\n10 1\n11 1\n18 1\n11 2\n5 1\n19 2\n20 2\n16 1\n12 3\n2 2\n3 3\n19 3\n8 2\n15 3\n8 1\n14 1\n17 1\n21 1\n19 1\n21 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\nAlice became interested in perio... | [{"type": "stdin_stdout", "input": "98779\n163329605173223304180189399899081111990037\n", "output": "100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "21\n1 3218\n28 10924\n908802 141084\n82149 7374\n893257 19784\n3535315 802705\n2857 176\n691 227749\n1 3218\n28 10924\n436302 141084\n82149 9274\n893257 10248\n4004924 1003579\n2857 142\n114 209385\n1 1131\n28 10924\n1144405 141084\n132660 9274\n2346605 10248\n", "output": "3217\n108... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPhoenix has n coins with weights... | [{"type": "stdin_stdout", "input": "100\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\n30\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a function f(x) (x ... | [{"type": "stdin_stdout", "input": "100\n1\n2\n3\n4\n5\n4\n7\n8\n9\n10\n11\n12\n13\n17\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n17\n28\n29\n30\n31\n32\n31\n34\n35\n36\n27\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n29\n54\n100\n56\n57\n58\n59\n109\n61\n62\n63\n120\n65\n66\n67\n68\n69\n70\n71\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "15\n4 3 9 8 10 10 14 11 2 15 2 12 12 3 15\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "15\n4 3 9 8 10 10 14 7 2 15 2 12 12 3 15\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "15\n4 4 9 8 10 10 14 7 2 15 2 12 12 3 15\n", "output": "10\n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 found a rectangular tab... | [{"type": "stdin_stdout", "input": "5\n1 1 1\n2 2 3\n3 10 11\n100 100 7312\n1001000 1000010 1000000000000\n", "output": "1\n2\n14\n1174\n1000009998991\n"}, {"type": "stdin_stdout", "input": "5\n1 1 1\n2 2 2\n3 10 11\n100 100 7312\n1001000 1000010 1000000000000\n", "output": "1\n3\n14\n1174\n1000009998991\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 sequence (b_1, b_2, β¦, b_k) is... | [{"type": "stdin_stdout", "input": "6\n4\n-1 -2 -1 1\n7\n-3 2 -2 0 -4 7 1\n5\n0 5 -3 2 -5\n3\n2 0 1\n4\n-3 -1 2 0\n6\n-3 -2 -1 1 1 1\n", "output": "3\n5\n4\n2\n3\n4\n"}, {"type": "stdin_stdout", "input": "6\n4\n-1 -2 -1 1\n7\n-3 2 -2 0 -4 7 1\n5\n0 5 -3 1 -5\n3\n2 0 1\n4\n-3 -1 2 0\n6\n-3 -2 -2 1 1 1\n", "output": "3\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEach of you probably has your pe... | [{"type": "stdin_stdout", "input": "100\n11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100\n77183123282838... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.