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\nA dragon symbolizes wisdom, powe... | [{"type": "stdin_stdout", "input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n strings. Each st... | [{"type": "stdin_stdout", "input": "3\nqwerty\nqwerty\nqwerty\n", "output": "YES\nqwerty\nqwerty\nqwerty\n"}, {"type": "stdin_stdout", "input": "5\na\naba\nabacaba\nba\naba\n", "output": "YES\na\nba\naba\naba\nabacaba\n"}, {"type": "stdin_stdout", "input": "3\nababc\nabababc\nab\n", "output": "YES\nab\nababc\nabababc\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 array a of N integers a... | [{"type": "stdin_stdout", "input": "8\n0 2 -1 -10 1 -14 -8 14\n\nEBPMLS", "output": "3\n"}, {"type": "stdin_stdout", "input": "8\n2 2 -1 -12 2 -10 -8 19\n\nSAMPLE", "output": "4\n"}, {"type": "stdin_stdout", "input": "8\n0 2 0 -10 2 -14 -16 30\n\nELOMBS", "output": "3\n"}, {"type": "stdin_stdout", "input": "8\n2 2 -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\nMonk has a very good friend, Puc... | [{"type": "stdin_stdout", "input": "4\n4 6\n2 3\n10 1\n8 11\n\nSM@LPE", "output": "1\n1\n3\n2\n"}, {"type": "stdin_stdout", "input": "4\n4 11\n1 0\n18 1\n2 2\n\nSAMQLE", "output": "4\n1\n3\n0\n"}, {"type": "stdin_stdout", "input": "4\n2 7\n10 1\n10 1\n2 4\n\nSAMPLE", "output": "2\n3\n3\n2\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\nToday professor Ka has given a s... | [{"type": "stdin_stdout", "input": "20\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\nRoy is going to organize Finals ... | [{"type": "stdin_stdout", "input": "100\n891404 114455\n610316 163967\n749122 997845\n17602 103521\n603077 115726\n155081 68879\n868235 1394\n892190 750264\n81323 17700\n291930 507040\n546018 1106118\n467431 1617425\n708086 648973\n332779 291957\n220784 47794\n235797 953712\n1157318 880076\n493806 588204\n194761 314796... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUtkarsh is going to Cherrapunji ... | [{"type": "stdin_stdout", "input": "2\n12 1\n10 29\n\nELPMAS", "output": "2.5360\n"}, {"type": "stdin_stdout", "input": "2\n18 2\n10 33\n\nEPML@S", "output": "1.6506\n"}, {"type": "stdin_stdout", "input": "2\n9 1\n10 29\n\nELPMAS", "output": "1.9251\n"}, {"type": "stdin_stdout", "input": "2\n9 1\n10 50\n\nELPMAS", "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 will turn on the air conditi... | [{"type": "stdin_stdout", "input": "108", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "212", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "238", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-152", "output": "No\n"}, {"type": "stdin_stdout", "input": "-263", "output": "No\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\nThere is a circular pond with a ... | [{"type": "stdin_stdout", "input": "37 3\n-1 0 91", "output": "-54\n"}, {"type": "stdin_stdout", "input": "10 3\n-2 9 50", "output": "-31\n"}, {"type": "stdin_stdout", "input": "10 3\n-2 5 50", "output": "-35\n"}, {"type": "stdin_stdout", "input": "10 3\n0 1 110", "output": "-99\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\nN programmers are going to parti... | [{"type": "stdin_stdout", "input": "3\n1 0\n0 10\n7 2", "output": "12\n"}, {"type": "stdin_stdout", "input": "3\n1 0\n0 17\n7 2", "output": "19\n"}, {"type": "stdin_stdout", "input": "3\n1 1\n0 17\n7 2", "output": "20\n"}, {"type": "stdin_stdout", "input": "3\n1 0\n0 27\n7 2", "output": "29\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\nE869120 has A 1-yen coins and in... | [{"type": "stdin_stdout", "input": "2018\n113", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "2018\n111", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "2018\n101", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "2018\n100", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "2018\n110", "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\nWe have a grid with N rows and M... | [{"type": "stdin_stdout", "input": "1 13 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 13 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7 17 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 20 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 21 3", "output": "Yes\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJoisino has a bar of length N, w... | [{"type": "stdin_stdout", "input": "10 9\n1 2 3 4 5 6 7 8 9", "output": "100"}, {"type": "stdin_stdout", "input": "1000100000 0", "output": "853613798\n"}, {"type": "stdin_stdout", "input": "1000101000 0", "output": "175288378\n"}, {"type": "stdin_stdout", "input": "1000101001 0", "output": "639898453\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\nRng is baking cookies.\n\nInitia... | [{"type": "stdin_stdout", "input": "1000000000000 1000000100000", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000010000000 1000100100001", "output": "1000010000000\n"}, {"type": "stdin_stdout", "input": "1000110000000 1000100100001", "output": "1000102100111\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\n\"Fukusekiken\" is a popular ram... | [{"type": "stdin_stdout", "input": "5\n41\n27\n26", "output": "0\n28\n18\n23\n"}, {"type": "stdin_stdout", "input": "5\n24\n18\n13", "output": "0\n11\n15\n2\n"}, {"type": "stdin_stdout", "input": "5\n24\n27\n13", "output": "0\n11\n18\n2\n"}, {"type": "stdin_stdout", "input": "5\n29\n27\n26", "output": "0\n8\n18\n23\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 was a powerful school wher... | [{"type": "stdin_stdout", "input": "3\n156 120\n100 50\n80 100", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n156 120\n100 50\n80 000", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n156 159\n100 50\n80 000", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n156 22\n100 50\n152 000", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nYou decide to invite ... | [{"type": "stdin_stdout", "input": "6\n5\n1 2\n1 3\n3 4\n2 3\n4 5\n10\n5\n2 3\n3 4\n4 3\n5 6\n1 6\n0\n0", "output": "3\n2\n"}, {"type": "stdin_stdout", "input": "6\n5\n1 2\n1 3\n3 4\n2 3\n4 5\n6\n5\n2 3\n3 4\n4 5\n5 6\n2 6\n0\n0", "output": "3\n0\n"}, {"type": "stdin_stdout", "input": "6\n5\n1 2\n1 3\n3 4\n2 3\n4 5\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\nI came to the summer festival wi... | [{"type": "stdin_stdout", "input": ".......#######......................#######..............\n.......#.....#......................#..-..#..............\n.......#.|...#......................#.|.|.#..............\n.......#.....#......................#..-..#..............\n.......#.|...#......................#.|...#........ | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe surveyor starship Hakodate-m... | [{"type": "stdin_stdout", "input": "100\n160\n50\n20\n150323\n0", "output": "99\n160\n47\n20\n150303\n"}, {"type": "stdin_stdout", "input": "100\n31\n37\n104\n151200\n0", "output": "99\n31\n37\n99\n151200\n"}, {"type": "stdin_stdout", "input": "100\n84\n50\n20\n151200\n0", "output": "99\n84\n47\n20\n151200\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\nThere is a tree that has n nodes... | [{"type": "stdin_stdout", "input": "2 2 0\n2 2 -1\n1\n2\n4 3 2\n1 2 1\n1 3 2\n1 4 4\n2\n3\n4\n0 0 0", "output": "Case 1: 0\nCase 2: 3\n"}, {"type": "stdin_stdout", "input": "2 2 0\n1 2 1\n1\n2\n4 3 2\n1 2 1\n1 3 2\n1 4 3\n2\n3\n4\n0 0 0", "output": "Case 1: 0\nCase 2: 3\n"}, {"type": "stdin_stdout", "input": "2 2 1\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nGaccho loses motivati... | [{"type": "stdin_stdout", "input": "6 10\n-1 1\n1 2\n1 3\n2 3\n1 3", "output": "5\n"}, {"type": "stdin_stdout", "input": "6 4\n1 0\n1 2\n1 -1\n0 3\n-1 3", "output": "5\n"}, {"type": "stdin_stdout", "input": "6 6\n0 1\n2 2\n1 2\n-1 3\n1 3", "output": "5\n"}, {"type": "stdin_stdout", "input": "6 10\n0 1\n1 2\n1 3\n2 3\n1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads an d... | [{"type": "stdin_stdout", "input": "4\n1 2 1 4\n2 -1 4\n0 -1\n4 1 0", "output": "1 0\n2 -1\n3 -1\n4 1\n"}, {"type": "stdin_stdout", "input": "4\n1 2 1 4\n2 0 4\n0 -1\n4 -1 0", "output": "1 0\n2 -1\n3 -1\n4 1\n"}, {"type": "stdin_stdout", "input": "4\n1 2 1 4\n3 0 4\n0 -1\n4 -1 0", "output": "1 0\n2 -1\n3 -1\n4 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\nWrite a program which reads the ... | [{"type": "stdin_stdout", "input": "-2 2 -3 -1 461 1\n3 0 4 0 13 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 2 -3 -1 461 1\n3 0 4 0 13 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 2 -3 -1 461 1\n3 0 6 0 13 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 2 -3 -1 461 2\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\nRecently, you bought a brand new... | [{"type": "stdin_stdout", "input": "7 1000000000\n1 10001 10011 20011 20021 40021 40031\n", "output": "999999969\n"}, {"type": "stdin_stdout", "input": "7 1000000000\n3 10001 10011 20011 20021 40021 40031\n", "output": "999999969\n"}, {"type": "stdin_stdout", "input": "7 1000000000\n1 10001 10011 20011 33966 40021 4003... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIs there anything better than go... | [{"type": "stdin_stdout", "input": "wwwbbwbbbwbwbwwbwwbbbwbwbwwbbbwbwwwbwwbwbbbbwwbwwwwwbwwwwwwwwbbwwwwbbbbbwbwbbwwbbbbbwbwbbwbwwwbbwwbbbwwwbbwwbwwbbbbwwbwbbwbwwbbwbwbwbbwwbwwwbwbwbbbwwwwwwbwwbbbwwbwwbwbwwwbbwwwwwwwwwbwwbwbbbwbwwwwbwwbbwbbwbwwbwwbwwbbwbbwwwwbwwwbwwwbwbwwwbbwwbbwwbwbwwwwwwbwbwwwwbbwwwbwbwwwbbwwwwwbwwbwb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSomeone give a strange birthday ... | [{"type": "stdin_stdout", "input": "33 2\n3 13\n17 3\n2 6\n5 33\n4 18\n1 2\n31 5\n4 19\n3 16\n1 3\n9 2\n10 3\n5 1\n5 28\n21 4\n7 2\n1 4\n5 24\n30 5\n14 3\n3 11\n27 5\n8 2\n22 4\n12 3\n20 4\n26 5\n4 23\n32 5\n25 5\n15 3\n29 5\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "25 2\n1 2\n1 3\n1 4\n2 5\n2 6\n2 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\nPetya loves lucky numbers. We al... | [{"type": "stdin_stdout", "input": "1334146180889758954\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "123456789123456789\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "999999999999994744\n", "output": "YES\n"}, {"type... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVivek initially has an empty arr... | [{"type": "stdin_stdout", "input": "100000\n", "output": "534174612\n"}, {"type": "stdin_stdout", "input": "30238\n", "output": "750441533\n"}, {"type": "stdin_stdout", "input": "47539\n", "output": "442384963\n"}, {"type": "stdin_stdout", "input": "78088\n", "output": "185311544\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\nAnd now the numerous qualifying ... | [{"type": "stdin_stdout", "input": "8 5\n2 2 91\n5 1 97\n5 1 36\n5 4 19\n2 5 50\n4 2 1\n1 4 9\n3 2 32\n", "output": "91\n104\n40\n21\n60\n7\n19\n39\n"}, {"type": "stdin_stdout", "input": "8 5\n2 2 91\n5 1 97\n5 1 36\n5 4 19\n2 5 50\n4 2 1\n1 4 9\n3 4 32\n", "output": "91 104 40 21 60 7 19 35"}, {"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 is a country with n citize... | [{"type": "stdin_stdout", "input": "10\n7 9 4 4 7 6 3 7 9 10\n10\n1 4 2\n1 10 5\n1 5 3\n1 5 2\n1 2 9\n1 2 9\n1 2 10\n1 5 7\n1 6 10\n1 10 9\n", "output": "7 10 4 2 7 10 3 7 9 9\n"}, {"type": "stdin_stdout", "input": "10\n7 9 4 4 7 6 3 7 9 8\n10\n1 3 2\n1 10 5\n1 5 3\n1 5 2\n1 2 9\n1 2 9\n1 2 10\n1 5 7\n1 6 10\n1 10 9\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe final match of the Berland F... | [{"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n2000000\n", "output": "2000 2000\n"}, {"type": "stdin_stdout", "input": "1000\n1000\n1000\n1000\n1999999\n", "output": "1999 1999\n"}, {"type": "stdin_stdout", "input": "1000\n1000\n1000\n1001\n2000000\n", "output": "1000 1999\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\nYou are playing a game where you... | [{"type": "stdin_stdout", "input": "28\n8 4\n8 7 6 3\n8 5\n8 7 6 3 1\n8 5\n8 7 6 3 2\n8 6\n8 7 6 3 2 1\n8 4\n8 7 6 4\n8 5\n8 7 6 4 1\n8 5\n8 7 6 4 2\n8 6\n8 7 6 4 2 1\n8 5\n8 7 6 4 3\n8 6\n8 7 6 4 3 1\n8 6\n8 7 6 4 3 2\n8 7\n8 7 6 4 3 2 1\n8 4\n8 7 6 5\n8 5\n8 7 6 5 1\n8 5\n8 7 6 5 2\n8 6\n8 7 6 5 2 1\n8 5\n8 7 6 5 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\nYou are given a binary string of... | [{"type": "stdin_stdout", "input": "3\n8 10\n01011011\n7 6\n0111100\n7 11\n0111100\n", "output": "00011111\n0011011\n0001111\n"}, {"type": "stdin_stdout", "input": "3\n8 10\n01011011\n7 6\n0111100\n7 15\n1111100\n", "output": "00011111\n0011011\n0011111\n"}, {"type": "stdin_stdout", "input": "3\n8 10\n01011011\n7 9\n01... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAsterix, Obelix and their tempor... | [{"type": "stdin_stdout", "input": "btbdpnzdenxueteteytvkwnegodyhmdwhmrmbftrifytzudumzlacwytsuzefqfpjesdblxhpcsidgksisjdmhyxmmugrjmtfcgxmcgpmvbxbyszdugvmoyjeeqsywcvuqskcjotyhvdijyslgfvyujxthngnonasgnbzzygyikhfelirdfsvuicbiazfdeqecbtbdpnzdenxueteteytvkwnegodyhmdwhmrmbftrifytzudumzlacwytsuzefqfpjesdblxhpcsidgksisjdmhyxmm... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 spring is coming and it mean... | [{"type": "stdin_stdout", "input": "24 24\n25 69 103 18 40 8 78 14 14 10 27 61 75 140 10 69 80 71 102 8 91 14 15 10\nswtcofrcpeys{ydwkrg\nszyd\ndyzsyep\nrcpeyszydwkrgfj\nfgrkwdyzsyfp\ndwyz\nsmzginydyrtua\nj\nk\ntzwsw\ngfj\nmsplnqossy\ninydyrtuatzw\ninxdy\nlpsmzginydyrtuatzwswtcofrcpeyszy\nyssoqnlpsm\npeyszyd\nysosqnlps... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWu got hungry after an intense t... | [{"type": "stdin_stdout", "input": "1\n100 31\n10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 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\nYou are given an array of intege... | [{"type": "stdin_stdout", "input": "4\n5\n-1 -1 -4 -1 -5\n6\n-4 -4 -3 1 2 -1\n6\n0 -1 -1 -1 -1 -1\n6\n-12 -7 -10 -3 -2 1\n", "output": "-20\n96\n0\n2520\n"}, {"type": "stdin_stdout", "input": "4\n5\n-1 -1 -4 -1 -5\n6\n-4 -4 -3 1 2 -1\n6\n0 -1 -1 -1 -1 -1\n6\n-9 -7 -10 -3 -2 1\n", "output": "-20\n96\n0\n1890\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 are a paparazzi working in M... | [{"type": "stdin_stdout", "input": "500 10\n69 477 122\n73 186 235\n341 101 145\n372 77 497\n390 117 440\n494 471 37\n522 300 498\n682 149 379\n821 486 359\n855 157 386\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "500 10\n69 477 122\n73 186 235\n341 101 145\n372 77 497\n404 117 440\n494 471 37\n522 300 498\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "3\n3\n.X.\nXXX\n.X.\n6\nXX.XXX\nXXXXXX\nXXX.XX\nXXXXXX\nXX.X.X\nXXXXXX\n5\nXXX.X\n.X..X\nXXX.X\n..X..\n..X..\n", "output": "\n.X.\nXOX\n.X.\nXX.XXO\nXOXXOX\nOXX.XX\nXOOXXO\nXX.X.X\nOXXOXX\nXOX.X\n.X..X\nXXO.O\n..X..\n..X..\n"}, {"type": "stdin_stdout", "input": "3\n3\n.X.\nXXX\n.X.\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the 2022 year, Mike found two... | [{"type": "stdin_stdout", "input": "5\n1\n0\n3\n011\n3\n110\n6\n111000\n6\n001011\n", "output": "\n1\n110\n100\n101101\n101110\n"}, {"type": "stdin_stdout", "input": "5\n1\n0\n3\n011\n3\n110\n6\n111100\n6\n001011\n", "output": "1\n110\n100\n101001\n101110\n"}, {"type": "stdin_stdout", "input": "5\n1\n0\n3\n011\n3\n111\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves football very much, ... | [{"type": "stdin_stdout", "input": "100\n2382 7572 9578 1364 2325 2929 7670 5574 2836 2440 6553 1751 929 8785 6894 9373 9308 7338 6380 9541 9951 6785 13181 9942 5087 7544 6582 7139 8458 7424 9759 8199 9464 8817 7625 6200 4955 9373 9500 3062 849 4210 9337 5466 2190 8150 4971 3145 869 5675 1975 161 1998 378 5229 9000 895... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nWilliam is a huge fan... | [{"type": "stdin_stdout", "input": "10\n4\n1\n1\n1\n1\n4\n1\n1\n1\n2\n4\n1\n1\n1\n1\n4\n1\n1\n2\n2\n4\n1\n1\n2\n3\n4\n1\n1\n1\n1\n4\n1\n2\n1\n2\n4\n1\n2\n1\n1\n4\n1\n2\n3\n1\n4\n1\n2\n3\n1\n", "output": "1\n1.1\n1.1.1\n1.1.1.1\n1\n1.1\n1.1.1\n1.1.2\n1\n1.1\n1.1.1\n1.1.1.1\n1\n1.1\n1.2\n2\n1\n1.1\n1.2\n1.3\n1\n1.1\n1.1.... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIlya plays a card game by the fo... | [{"type": "stdin_stdout", "input": "100\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 0\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo celebrate the second ABBYY Cu... | [{"type": "stdin_stdout", "input": "13\n78\n11 1\n10 6\n6 2\n10 1\n11 6\n11 3\n5 3\n8 1\n12 11\n4 2\n10 3\n13 8\n9 8\n11 7\n7 5\n11 2\n7 1\n4 1\n11 10\n8 3\n13 11\n9 6\n13 9\n12 7\n12 8\n12 9\n10 2\n5 2\n12 10\n9 2\n9 7\n3 2\n7 4\n11 4\n13 1\n10 5\n11 5\n8 5\n10 4\n8 2\n10 9\n4 3\n9 5\n13 12\n13 5\n7 2\n12 4\n9 1\n10 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 playin... | [{"type": "stdin_stdout", "input": "6 6\n1 2 2 3 3 3\n1 2\n2 2\n1 3\n2 4\n4 6\n1 6\n", "output": "1\n0\n2\n1\n1\n3\n"}, {"type": "stdin_stdout", "input": "6 6\n1 2 2 3 3 3\n1 2\n2 2\n1 3\n2 4\n4 6\n1 3\n", "output": "1\n0\n2\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6 6\n1 2 2 3 2 3\n1 2\n2 2\n1 3\n2 4\n4 6\n1 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\nPolycarpus just has been out of ... | [{"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\nEmuskald is a well-known illusio... | [{"type": "stdin_stdout", "input": "15\n999999986 268435456\n999999987 67108864\n999999988 16777216\n999999989 4194304\n999999990 1048576\n999999991 262144\n999999992 65536\n999999993 16384\n999999994 4096\n999999995 1024\n999999996 256\n999999997 64\n999999998 16\n999999999 4\n1000000000 1\n", "output": "1000000001\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA system of n vessels with water... | [{"type": "stdin_stdout", "input": "5 1000000000 4\n1000000000 1000000000 1000000000 1000000000 294967296\n-1 -1 0 0 0\n1 2\n2 3\n3 4\n4 0\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5 1000000000 4\n1000000000 1000000000 1000000000 1000000000 409977952\n-1 -1 0 0 0\n1 2\n2 3\n3 4\n4 0\n", "output": "NO\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub is so happy about inventin... | [{"type": "stdin_stdout", "input": "20\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n", "output": "927799753\n"}, {"type": "stdin_stdout", "input": "10\n4 10 -1 1 6 8 9 2 -1 -1\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n3 10 -1 1 6 8 9 2 -1 -1\n", "output": "6\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFox Ciel studies number theory.\... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "866215044\n"}, {"type": "stdin_stdout", "input": "1059916422\n", "output": "691290739\n"}, {"type": "stdin_stdout", "input": "1000001000\n", "output": "214567917\n"}, {"type": "stdin_stdout", "input": "1001707390\n", "output": "183716036\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 mysterious langu... | [{"type": "stdin_stdout", "input": "-111\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-165\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-137\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-116\n", "output": "INTERCAL\n"}, {"type": "stdin_stdout", "input": "-14\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nParmida is a clever girl and she... | [{"type": "stdin_stdout", "input": "24\n1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4\n", "output": "114\n"}, {"type": "stdin_stdout", "input": "24\n1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 1 4\n", "output": "114\n"}, {"type": "stdin_stdout", "input": "24\n1 2 3 4 1 2 3 2 1 2 3 4 1 2 3 4 1 2 3 4 1 2 1 4\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImagine that you are in a buildi... | [{"type": "stdin_stdout", "input": "5000 2314 1234 5000\n", "output": "546628648\n"}, {"type": "stdin_stdout", "input": "4988 3629 4106 4488\n", "output": "349016655\n"}, {"type": "stdin_stdout", "input": "5000 1031 4782 5000\n", "output": "981271392\n"}, {"type": "stdin_stdout", "input": "5000 4998 5000 5000\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\nMany years have passed, and n fr... | [{"type": "stdin_stdout", "input": "10\n489 685\n857 870\n736 221\n687 697\n166 360\n265 200\n738 519\n393 760\n66 176\n798 160\n", "output": "3231747\n"}, {"type": "stdin_stdout", "input": "10\n864 874\n534 702\n73 363\n856 895\n827 72\n435 468\n888 921\n814 703\n648 715\n384 781\n", "output": "4909752\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\nLet's define the permutation of ... | [{"type": "stdin_stdout", "input": "50 20365011074\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49\n"}, {"type": "stdin_stdout", "input": "50 5608642004\n", "output": "1 2 4 3 5 6 8 7 9 10 11 13 12 15 14 17 16 18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKefa decided to celebrate his fi... | [{"type": "stdin_stdout", "input": "15 2\n1 0 1 0 1 0 0 0 0 0 0 0 0 1 0\n1 2\n1 3\n2 4\n2 5\n3 6\n1 7\n4 8\n4 9\n5 10\n5 11\n6 12\n6 13\n12 14\n7 15\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "15 2\n1 0 1 0 1 0 0 0 0 0 0 0 0 1 0\n1 2\n1 3\n2 4\n2 5\n3 6\n3 7\n4 8\n4 9\n5 10\n5 11\n6 12\n6 13\n7 14\n11 15\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\nWhen Xellos was doing a practice... | [{"type": "stdin_stdout", "input": "15\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "15\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1001 1000 1000 1000 1000\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "15\n1000 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\nThere are n problems prepared fo... | [{"type": "stdin_stdout", "input": "100000 10\n99562 484\n1099 99684\n593 99867\n99529 175\n99738 616\n99523 766\n99503 121\n99784 158\n199 99199\n15 99849\n", "output": "98100\n"}, {"type": "stdin_stdout", "input": "100000 10\n99562 484\n1099 99684\n593 99867\n99529 175\n99738 616\n99523 766\n42925 121\n99784 158\n199... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEfim just received his grade for... | [{"type": "stdin_stdout", "input": "320 142\n2704701300865535.432223312233434114130011113220102420131323010344144201124303144444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447444444444444444444444444444444615444444482101673308979557675074444444444444446... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Alyona is in a shop ... | [{"type": "stdin_stdout", "input": "999999999 1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1714658473 1000000000 999999990 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "999999999 1000000000 1000000100 1000000000\n", "output": "10000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSince the giant heads have appea... | [{"type": "stdin_stdout", "input": "100 50\n2 62 -62\n2 19 -19\n2 38 -38\n2 -84 84\n2 -16 16\n2 67 -67\n2 41 -41\n2 -32 32\n2 32 -32\n2 -62 62\n2 89 -89\n2 -84 84\n2 96 -96\n2 -11 11\n2 59 -59\n2 -13 13\n2 -70 70\n2 -3 3\n2 -41 41\n2 -74 74\n2 47 -47\n2 87 -87\n2 17 -17\n2 20 -20\n2 -14 14\n2 -67 67\n2 -95 95\n2 -15 15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn atom of element X can exist i... | [{"type": "stdin_stdout", "input": "50 64\n257 258 350 375 1014 1017 1051 1097 1169 1177 1223 1836 1942 1983 2111 2131 2341 2418 2593 2902 2948 3157 3243 3523 3566 4079 4499 4754 5060 5624 6279 6976 7011 7071 7278 7366 7408 7466 7526 7837 7934 8532 8577 8680 9221 9271 9327 9411 9590 9794\n", "output": "0.918918918919"}... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nYou have one chip and... | [{"type": "stdin_stdout", "input": "-105\n", "output": "red\n"}, {"type": "stdin_stdout", "input": "-108\n", "output": "red\n"}, {"type": "stdin_stdout", "input": "-117\n", "output": "red\n"}, {"type": "stdin_stdout", "input": "-121\n", "output": "red\n"}, {"type": "stdin_stdout", "input": "-157\n", "output": "red\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a far away kingdom lived the ... | [{"type": "stdin_stdout", "input": "7002108534951820589946967018226114921984364117669853212254634761258884835434844673935047882480101006606512119541798298905598015607366335061012709906661245805358900665571472645463994925687210711492820804158354236327017974683658305043146543214454877759341394.202118562635032813887482826... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIkshu and his machine gun\n\nTo ... | [{"type": "stdin_stdout", "input": "5020\n50952 27934 26386 45282 37261 21958 53523 7620 51404 18144 13722 50860 20764 22350 59525 43411 44184 17513 34709 57358 8380 1048 25498 49181 56055 5073 14827 41631 52664 56188 38519 1974 31615 18060 56035 12106 49806 58549 44763 43223 54360 53789 39273 5893 32358 16773 34761 57... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRahul likes to play with mathema... | [{"type": "stdin_stdout", "input": "12\n1 3\n4 6\n7 9\n2 3\n5 6\n8 9\n5 5\n46 46\n89 89\n96 96\n94 94\n79 97", "output": "No Number\nNo Number\nNo Number\nNo Number\nNo Number\nNo Number\n9\n92\n177\n192\n188\nNo Number\n"}, {"type": "stdin_stdout", "input": "3\n1 2\n11 0\n3 4\n\nSAMPLE", "output": "No Number\nNo Numbe... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEveryone has got to know that HE... | [{"type": "stdin_stdout", "input": "2\n4 1\n20 1\n\nMR@PLF", "output": "8991\n89999999999999999991\n"}, {"type": "stdin_stdout", "input": "2\n3 1\n20 1\n\nMR@PLF", "output": "891\n89999999999999999991\n"}, {"type": "stdin_stdout", "input": "2\n7 1\n16 2\n\nE@QMLS", "output": "8999991\n9899999999999901\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\nYou have a string S of length N.... | [{"type": "stdin_stdout", "input": "8 8\n3 7 2\n1 4 7\n3 8 3\n2 2 4\n4 5 1", "output": "11222221\n77772221\n77333333\n74333333\n74311333\n74311333\n74311333\n74311333\n"}, {"type": "stdin_stdout", "input": "8 8\n3 7 2\n1 4 3\n3 8 3\n2 2 4\n4 5 1", "output": "11222221\n33332221\n33333333\n34333333\n34311333\n34311333\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\nYou start with the number 0 and ... | [{"type": "stdin_stdout", "input": "5\n11 1 4 4 8\n11 1 2 2 8\n32 10 8 5 4\n29384293847243 454353412 332423423 1011333844 1\n900000000000000000 332423423 454353412 1637794384 987654321", "output": "21\n19\n26\n3821859835\n27283812973\n"}, {"type": "stdin_stdout", "input": "5\n13 1 4 4 8\n15 1 2 2 8\n32 10 8 5 4\n293842... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sequence of N integer... | [{"type": "stdin_stdout", "input": "3\n200 200 200", "output": "66.66666666666667"}, {"type": "stdin_stdout", "input": "3\n283 200 200", "output": "73.8903394256\n"}, {"type": "stdin_stdout", "input": "3\n114 143 200", "output": "48.1581046350\n"}, {"type": "stdin_stdout", "input": "3\n200 200 197", "output": "66.32996... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 two buttons, one of si... | [{"type": "stdin_stdout", "input": "-134 -12", "output": "-25\n"}, {"type": "stdin_stdout", "input": "-134 -8", "output": "-17\n"}, {"type": "stdin_stdout", "input": "-13 -10", "output": "-21\n"}, {"type": "stdin_stdout", "input": "100 100", "output": "200\n"}, {"type": "stdin_stdout", "input": "111 111", "output": "22... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer N. Amon... | [{"type": "stdin_stdout", "input": "100", "output": "543"}, {"type": "stdin_stdout", "input": "72", "output": "227\n"}, {"type": "stdin_stdout", "input": "59", "output": "148\n"}, {"type": "stdin_stdout", "input": "52", "output": "123\n"}, {"type": "stdin_stdout", "input": "67", "output": "170\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 found a record of a tree w... | [{"type": "stdin_stdout", "input": "15\n9 10\n9 15\n15 4\n4 13\n13 2\n13 11\n2 14\n13 6\n11 1\n2 12\n12 3\n12 7\n2 5\n14 8\n1154 890 2365 883 2930 2076 1590 1104 1726 1791 1091 1226 151 1000 1657", "output": "5\n6\n86\n104\n739\n85\n10\n148\n4\n37\n87\n28\n156\n8\n"}, {"type": "stdin_stdout", "input": "15\n9 10\n9 15\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 is playing a puzzle game. ... | [{"type": "stdin_stdout", "input": "5 5 7\n1 -1 2 4\n2 3 4 4\n3 5 5 4\n5 5 2 4\n0 4 5 1\n2 2 1 1\n0 10 4 1", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5 5 7\n1 -1 2 4\n1 3 4 4\n3 5 5 4\n5 5 2 4\n0 4 5 1\n2 2 1 1\n0 10 4 1", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5 5 7\n-1 -1 2 4\n2 3 4 5\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\nSnuke has a calculator. It has a... | [{"type": "stdin_stdout", "input": "-10 -23", "output": "15\n"}, {"type": "stdin_stdout", "input": "110 -1", "output": "110\n"}, {"type": "stdin_stdout", "input": "-10 -63", "output": "55\n"}, {"type": "stdin_stdout", "input": "273 -1", "output": "273\n"}, {"type": "stdin_stdout", "input": "141 -1", "output": "141\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\nWe have a rectangular parallelep... | [{"type": "stdin_stdout", "input": "19 9 5", "output": "45\n"}, {"type": "stdin_stdout", "input": "11 5 5", "output": "25\n"}, {"type": "stdin_stdout", "input": "-1 2 10", "output": "0\n"}, {"type": "stdin_stdout", "input": "19 5 5", "output": "25\n"}, {"type": "stdin_stdout", "input": "5 5 5", "output": "25\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakayuki and Kazuyuki are good t... | [{"type": "stdin_stdout", "input": "6 6\n2 4\n6 2\n0 0 0 0 1 0\n0 1 1 0 0 0\n0 1 0 0 0 0\n0 0 0 1 0 0\n0 0 0 0 0 1\n0 0 0 0 0 0\n3 3\n1 1\n3 3\n0 0 0\n0 1 0\n0 0 0\n0 0", "output": "3\nNA\n"}, {"type": "stdin_stdout", "input": "6 6\n2 4\n6 2\n0 0 0 0 1 0\n0 1 0 0 1 0\n0 1 0 0 0 0\n0 1 0 1 1 0\n0 0 0 0 0 1\n0 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\nLet's play a game using a robot ... | [{"type": "stdin_stdout", "input": "8 3\n0 0 -1 1 0 0 0 1\n2 3 1 2 3 0 0 1\n3 3 0 0 0 1 -1 4\n11 9 2 9\n4 4\n3 3 4 0\n1 2 4 4\n0 1 1 0\n0 2 4 4\n16 7 2 1\n2 8\n2 1\n4 1\n0 4\n1 3\n1 0\n2 1\n0 6\n1 4\n1 9 3 1\n0 0", "output": "13\n11\n5\n"}, {"type": "stdin_stdout", "input": "8 3\n0 0 0 0 -1 0 0 1\n2 3 0 1 4 0 0 1\n3 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\nNumbers of black and white point... | [{"type": "stdin_stdout", "input": "3 3\n100 700\n200 200\n600 600\n500 100\n605 300\n800 578\n3 3\n100 300\n400 600\n400 100\n600 400\n500 900\n300 300\n3 4\n300 300\n935 300\n400 600\n100 100\n200 900\n500 900\n158 110\n1 2\n300 300\n100 100\n500 500\n1 1\n100 100\n200 100\n2 2\n0 0\n500 700\n1000 1400\n1500 2100\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSquare Route\n\nSquare root\n\nE... | [{"type": "stdin_stdout", "input": "3 3\n2\n1\n2\n-1\n3\n1\n1 2\n22\n11\n10\n0 0", "output": "7\n0\n"}, {"type": "stdin_stdout", "input": "3 3\n1\n1\n2\n1\n1\n1\n1 2\n10\n10\n23\n0 0", "output": "11\n1\n"}, {"type": "stdin_stdout", "input": "3 3\n1\n1\n1\n2\n3\n1\n1 2\n10\n10\n10\n0 0", "output": "6\n2\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAll space-time unified dimension... | [{"type": "stdin_stdout", "input": "12\n0\n-1\n7\n0\n2\n-1\n-1\n3\n-10\n-2\n1\n0", "output": "1\n"}, {"type": "stdin_stdout", "input": "12\n0\n-1\n7\n0\n2\n0\n-1\n3\n-10\n-2\n1\n0", "output": "1\n"}, {"type": "stdin_stdout", "input": "12\n0\n-1\n7\n0\n2\n0\n-2\n3\n-10\n-2\n1\n0", "output": "1\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\nA robot, a wall, and a goal are ... | [{"type": "stdin_stdout", "input": "5 11\n\n.#g..#\n.###.#\ns....#\n\n{T{~C^}>}", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 11\n\n.#g..#\n.###.#\ns....#\n\n{T{~C^}>}", "output": "-1\n"}, {"type": "stdin_stdout", "input": "8 11\n\n.#g..#\n.###.#\ns....#\n\n{T{~C^}>}", "output": "-1\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nA mysterious $ X $ [c... | [{"type": "stdin_stdout", "input": "109 30 5\n0\norioan\nnobiro\nuifimd", "output": "109\n"}, {"type": "stdin_stdout", "input": "112 30 9\n0\norioan\nniboro\ntieimd", "output": "112\n"}, {"type": "stdin_stdout", "input": "84 122 10\n0\noobrjn\nonciro\nudfimi", "output": "84\n"}, {"type": "stdin_stdout", "input": "17 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\nFind the edit distance between g... | [{"type": "stdin_stdout", "input": "icpc\nipcc", "output": "2\n"}, {"type": "stdin_stdout", "input": "icpb\ncbio", "output": "4\n"}, {"type": "stdin_stdout", "input": "cpci\nipcc", "output": "2\n"}, {"type": "stdin_stdout", "input": "cpci\nccpi", "output": "2\n"}, {"type": "stdin_stdout", "input": "icpc\nccpi", "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\nFind the union of two sets $A = ... | [{"type": "stdin_stdout", "input": "3\n2 4 15\n2\n11 64", "output": "2\n4\n11\n15\n64\n"}, {"type": "stdin_stdout", "input": "3\n-1 5 10\n2\n3 16", "output": "-1\n3\n5\n10\n16\n"}, {"type": "stdin_stdout", "input": "3\n-1 4 10\n2\n3 16", "output": "-1\n3\n4\n10\n16\n"}, {"type": "stdin_stdout", "input": "3\n-1 4 10\n2\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef has a special affection for... | [{"type": "stdin_stdout", "input": "1\n57 0 -2", "output": "000000000000000000000000000000000000000000000000000000000\n"}, {"type": "stdin_stdout", "input": "1\n51 2 0", "output": "000000000000000000000000000000000000000000000000000\n"}, {"type": "stdin_stdout", "input": "1\n51 2 1", "output": "000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNatasha is planning an expeditio... | [{"type": "stdin_stdout", "input": "4 100\n84 99 66 69 86 94 89 96 98 93 93 82 87 93 91 100 69 99 93 81 99 84 75 100 86 88 98 100 84 96 44 70 94 91 85 78 86 79 45 88 91 78 98 94 81 87 93 72 96 88 96 97 96 62 86 72 94 84 80 98 88 90 93 73 73 98 78 50 91 96 97 82 85 90 87 41 97 82 97 77 100 100 92 83 98 81 70 81 74 78 84... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call some positive integer... | [{"type": "stdin_stdout", "input": "4\n1 1000\n1024 1024\n65536 65536\n999999 1000001\n", "output": " 1000\n 1\n 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\nStudent Andrey has been skipping... | [{"type": "stdin_stdout", "input": "8 8\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "8 8\n.#.#.#.#\n.#.#.#.#\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n.#.#.#.#\n#.#.#.#.\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently, Olya received a magica... | [{"type": "stdin_stdout", "input": "19\n1 2\n2 1\n2 2\n2 3\n2 4\n2 5\n2 6\n1 1000000000000000000\n1000000000 1000000000000000000\n64 64\n64 3\n4 4\n2 100\n3 6\n3 7\n4 10000\n4 100000\n4 71\n4 70\n", "output": "NO\nYES 1\nYES ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNot long ago Billy came across s... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "111111074060178115\n"}, {"type": "stdin_stdout", "input": "987572\n", "output": "107019643962508968\n"}, {"type": "stdin_stdout", "input": "983242\n", "output": "105618162572849728\n"}, {"type": "stdin_stdout", "input": "600000\n", "output": "23999973325791164\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 decided to teach programmin... | [{"type": "stdin_stdout", "input": "20\n43 48 38 34 23 18 8 22 12 7 47 1 13 20 3 15 49 6 10 26\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "20\n43 48 38 34 41 18 8 22 12 7 47 1 13 20 3 15 49 6 10 26\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "20\n43 48 38 34 23 18 8 22 12 7 47 1 17 20 3 15 49 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\nLinear Kingdom has exactly one t... | [{"type": "stdin_stdout", "input": "100\n0 1\n0 0\n0 0\n1 0\n0 0\n0 1\n0 1\n1 1\n0 0\n0 0\n1 1\n0 0\n1 1\n0 1\n1 1\n0 1\n1 1\n1 0\n1 0\n0 0\n1 0\n0 0\n1 0\n0 0\n0 1\n1 1\n1 1\n0 1\n0 0\n1 0\n1 1\n0 1\n1 0\n1 1\n0 1\n1 1\n1 0\n0 0\n0 0\n0 1\n0 0\n-1 1\n1 1\n0 0\n1 1\n1 1\n0 0\n0 1\n1 0\n0 1\n0 0\n0 1\n0 1\n1 1\n1 1\n1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNote that this is the first prob... | [{"type": "stdin_stdout", "input": "60\n26 6\n59 30\n31 12\n31 3\n38 23\n59 29\n53 9\n38 56\n53 54\n29 21\n17 55\n59 38\n26 16\n24 59\n24 25\n17 35\n24 41\n30 15\n31 27\n8 44\n26 5\n26 48\n8 32\n53 17\n3 34\n3 51\n30 28\n47 10\n53 60\n36 42\n24 53\n59 22\n53 40\n26 52\n36 4\n59 8\n29 37\n36 20\n17 47\n53 18\n3 50\n30 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\nThere are two types of burgers i... | [{"type": "stdin_stdout", "input": "7\n2 1 1\n1 1\n100 101 100\n101 100\n2 101 110\n000 111\n010 3 1\n101 100\n010 77 14\n110 99\n010 001 3\n100 99\n362 51 11\n011 165\n", "output": "1\n5050\n111\n403\n550\n397\n2376\n"}, {"type": "stdin_stdout", "input": "7\n2 1 2\n1 1\n100 100 000\n101 110\n2 101 000\n011 110\n010 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 only difference between easy... | [{"type": "stdin_stdout", "input": "4\n5 2 2\n1 2 1 2 2\n9 3 3\n3 3 3 2 2 4 1 1 1\n4 18 4\n10 8 6 4\n16 10 8\n3 1 7 1 5 4 2 6 7 6 5 8 9 8 11 3\n", "output": "1\n1\n4\n6\n"}, {"type": "stdin_stdout", "input": "4\n5 2 4\n1 2 1 2 1\n9 3 3\n3 3 3 2 2 4 1 1 1\n4 18 4\n10 8 6 4\n16 10 8\n3 1 4 2 5 4 2 6 5 6 5 10 9 8 9 3\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call two strings s and t a... | [{"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 4\n2 4\n2 2\n2 9\n2 7\n1 5\n", "output": "Yes\nYes\nYes\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 4\n2 4\n2 2\n2 9\n5 7\n1 5\n", "output": "Yes\nYes\nYes\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 4\n2 4\n2 2\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYoung boy Artem tries to paint a... | [{"type": "stdin_stdout", "input": "19\n15 73\n16 92\n22 97\n13 64\n49 127\n79 79\n66 13\n49 48\n173 75\n64 77\n27 95\n27 156\n29 53\n48 10\n265 151\n26 37\n13 2\n44 13\n85 70\n", "output": "WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of leng... | [{"type": "stdin_stdout", "input": "6\n4\n4\n2\n26\n2\n10\n", "output": "3 1 2 4\n3 1 2 4\n1 2\n11 16 7 12 17 3 13 18 4 19 8 20 1 14 21 5 22 9 23 2 15 24 6 25 10 26\n1 2\n7 3 4 8 1 5 9 2 6 10\n"}, {"type": "stdin_stdout", "input": "6\n2\n2\n2\n16\n3\n21\n", "output": "1 2\n1 2\n1 2\n9 5 10 3 11 6 12 1 13 7 14 2 15 4 8 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s consist... | [{"type": "stdin_stdout", "input": "15\n-\n--\n+\n+-\n-\n+\n-\n+\n-\n-+\n-+\n-+\n-+\n-+\n-+\n", "output": "2\n5\n1\n2\n2\n1\n2\n1\n2\n3\n3\n3\n3\n3\n3\n"}, {"type": "stdin_stdout", "input": "15\n-\n--\n+\n+-\n-\n+\n-\n+\n-\n-+\n-+\n-+\n-+\n+-\n-+\n", "output": "2\n5\n1\n2\n2\n1\n2\n1\n2\n3\n3\n3\n3\n2\n3\n"}, {"type": ... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.