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 palindrome is a word, phrase, ... | [{"input": "\"ACCDDCCA\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "\"1551\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "-4505", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "22.22", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "12... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nComprised of a team of five incr... | [{"input": "\"///$%&$553791r357%??@$%u?$%@7993111@$%t$h3% 3$l$311i3%@?&c3h%&t&&?%11e%$?@11957r79%&m$$a55n1!111%%\"", "output": "[\"RUTH LICHTERMAN!\"]", "fn_name": "rad_ladies"}, {"input": "\"%&$557f953//1/$@%r%935$$a@3111$@???%n???5 $%157b%///$i%55&31@l?%&$$a%@$s5757!$$%%%%53\"", "output": "[\"FRAN BILAS!\"]", "fn_nam... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLuntik has decided to try singin... | [{"type": "stdin_stdout", "input": "4\n2 4 1\n4 2 0\n10 4 5\n1 1 2\n", "output": "1\n0\n1\n1\n"}, {"type": "stdin_stdout", "input": "4\n2 2 0\n4 2 0\n10 4 5\n1 1 2\n", "output": "0\n0\n1\n1\n"}, {"type": "stdin_stdout", "input": "4\n2 4 0\n4 2 0\n10 4 5\n1 1 2\n", "output": "0\n0\n1\n1\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\n###Instructions\n\nA time period... | [{"input": "[[\"12:00\", \"10:01\"], [\"06:31\", \"14:23\"], [\"03:02\", \"07:58\"], [\"08:13\", \"10:05\"], [\"18:37\", \"04:22\"], [\"12:58\", \"14:28\"], [\"01:51\", \"14:40\"], [\"04:27\", \"01:00\"], [\"22:56\", \"23:33\"], [\"19:23\", \"07:00\"], [\"02:13\", \"16:14\"], [\"10:40\", \"02:36\"], [\"11:49\", \"00:10... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlicia has an array, $a_1, a_2, ... | [{"type": "stdin_stdout", "input": "35\n15 13 -25 -7 -18 -16 4 -15 2 -23 0 -3 -26 -27 -24 -27 -22 1 -52 -19 -16 -15 -29 -43 -18 -27 -11 -20 -2 -11 -20 -30 -1 -13 -46\n", "output": "15 28 3 21 10 12 32 17 34 11 34 31 8 7 10 7 12 35 -17 16 19 20 6 -8 17 8 24 15 33 24 15 5 34 22 -11 "}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet p (i) be the i-th prime numb... | [{"type": "stdin_stdout", "input": "2\n219\n0", "output": "5\n136114\n"}, {"type": "stdin_stdout", "input": "2\n279\n0", "output": "5\n231208\n"}, {"type": "stdin_stdout", "input": "2\n195\n0", "output": "5\n105540\n"}, {"type": "stdin_stdout", "input": "2\n199\n0", "output": "5\n110364\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are 32 letters in the Poli... | [{"input": "\"W\\u00f3\\u0142 go pyta: 'Panie chrz\\u0105szczu,Po co pan tak brz\\u0119czy w g\\u0105szczu?'\"", "output": "[\"Wol go pyta: 'Panie chrzaszczu,Po co pan tak brzeczy w gaszczu?'\"]", "fn_name": "correct_polish_letters"}, {"input": "\"Za\\u017c\\u00f3\\u0142\\u0107 g\\u0119\\u015bl\\u0105 ja\\u017a\\u0144\... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA bracketed sequence is called c... | [{"type": "stdin_stdout", "input": "101\n(())))))()))()())(()))((())))((())(()()()(()()((()()((()((())))((()))()(())(()(())((()))(()))()(((()(\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "100\n)()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(\n", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDaniel has a string s, consistin... | [{"type": "stdin_stdout", "input": "2 7\nab\n1 w\n2 w\n1 c\n2 .\n2 .\n1 .\n2 b\n", "output": "0\n0\n0\n0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "2 7\nab\n1 w\n2 w\n1 c\n2 .\n2 .\n1 .\n2 b\n", "output": "0\n0\n0\n0\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "2 7\nab\n2 w\n2 w\n1 c\n2 .\n2 .\n1 .\n2 b\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\nYakko, Wakko and Dot, world-famo... | [{"type": "stdin_stdout", "input": "-16 2\n", "output": "5/6\n"}, {"type": "stdin_stdout", "input": "-16 3\n", "output": "2/3\n"}, {"type": "stdin_stdout", "input": "-12 2\n", "output": "5/6\n"}, {"type": "stdin_stdout", "input": "3 -12\n", "output": "2/3\n"}, {"type": "stdin_stdout", "input": "-12 3\n", "output": "2/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 purpose of this kata is to w... | [{"input": "1400\n35\n10000", "output": "[20]", "fn_name": "duty_free"}, {"input": "12\n50\n1000", "output": "[166]", "fn_name": "duty_free"}, {"input": "24\n35\n3000", "output": "[357]", "fn_name": "duty_free"}, {"input": "700\n26\n7000", "output": "[38]", "fn_name": "duty_free"}, {"input": "17\n10\n500", "output": "[... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGreg has an array a = a_1, a_2, ... | [{"type": "stdin_stdout", "input": "4 3 6\n2 2 3 4\n1 2 2\n2 3 2\n3 4 4\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n", "output": "10 22 31 20\n"}, {"type": "stdin_stdout", "input": "4 3 6\n2 2 3 4\n1 2 2\n3 3 2\n3 4 4\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n", "output": "10 10 31 20\n"}, {"type": "stdin_stdout", "input": "4 3 6\n2 2 3 4\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string $s$ consi... | [{"type": "stdin_stdout", "input": "26 1\nabcdefghijklmnopqrstuvwxyz\n", "output": "bcdefghijklmnopqrstuvwxyz\n"}, {"type": "stdin_stdout", "input": "26 1\nabcdefghijklmnopqrsuuvwxyz\n", "output": "bcdefghijklmnopqrsuuvwxyz\n"}, {"type": "stdin_stdout", "input": "26 2\nabcdefghijklmnopqrstuvwxyz\n", "output": "cdefghij... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positi... | [{"type": "stdin_stdout", "input": "100 10000000\n300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter finding and moving to the ... | [{"type": "stdin_stdout", "input": "10\n1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000001\n1000000000 999999999\n", "output": "999999999\n"}, {"type": "stdin_stdout", "input": "10\n1 10 100 1000 10000 100000 1000000 11000000 100000000 1000000001\n1000000000 999999999\n", "output": "999999999\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 and your n - 1 friends have ... | [{"type": "stdin_stdout", "input": "4\n6 4 2\n3 9 2 3 8 4\n4 3 1\n1 13 60 4\n4 1 3\n1 0 2 1\n2 2 2\n1 2\n", "output": "8\n60\n1\n2\n"}, {"type": "stdin_stdout", "input": "4\n6 4 2\n2 7 4 5 8 7\n4 4 1\n8 13 111 4\n4 1 2\n1 2 2 1\n2 2 1\n2 3\n", "output": "7\n8\n1\n3\n"}, {"type": "stdin_stdout", "input": "4\n6 4 2\n2 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\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "1337\n", "output": "520628749\n"}, {"type": "stdin_stdout", "input": "1000\n", "output": "756980810\n"}, {"type": "stdin_stdout", "input": "3000\n", "output": "596853783\n"}, {"type": "stdin_stdout", "input": "4500\n", "output": "299551211\n"}, {"type": "stdin_stdout", "input": "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\nIn the world of Latin Alphabets,... | [{"type": "stdin_stdout", "input": "10000\nmrbbmoswthlzegrlsoygzcjaenksbbdtecgljyvcbpjxizzsksmdhnrsnteptajetyewidaxiekcabocistqjkohfqypiydmgoqrqrdisjyrzykgvkggyqmqvyhhwzzxhyalielptfgqvgypjtsbaieljbanvksvnnjajcdinjtknhwfclefcvalsarpxcnfivyayqeslwpgxnevbksldcrfdddlxqirbdcatiiwxyssnmvwgtikarylhejqzrtbztzstpbdfefttscpeivrb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 winter in Berland lasts n da... | [{"type": "stdin_stdout", "input": "100 50\n-7 -3 9 2 16 -19 0 -10 3 -11 17 7 -7 -10 -14 -14 -7 -15 -15 -8 8 -18 -17 -5 -19 -15 -14 0 8 -3 -19 -13 -3 11 -3 -16 16 -16 -12 -2 -17 7 -16 -14 -10 0 -10 -18 -16 -11 -2 -12 -15 -8 -1 -11 -3 -17 -14 -6 -9 -15 -14 -11 -20 -20 -4 -20 -14 -2 0 -2 -20 17 -17 2 0 1 2 6 -5 -13 -16 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 number `1035` is the smalles... | [{"input": "10000\n7", "output": "[1]", "fn_name": "search_permMult"}, {"input": "10000\n4", "output": "[2]", "fn_name": "search_permMult"}, {"input": "10000\n3", "output": "[2]", "fn_name": "search_permMult"}, {"input": "5000\n7", "output": "[0]", "fn_name": "search_permMult"}, {"input": "8000\n4", "output": "[1]", "f... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\nA newspaper is published... | [{"input": "\"abc\"\n\"abcabc\"", "output": "[2]", "fn_name": "buy_newspaper"}, {"input": "\"abc\"\n\"abccba\"", "output": "[4]", "fn_name": "buy_newspaper"}, {"input": "\"abc\"\n\"aaaaaa\"", "output": "[6]", "fn_name": "buy_newspaper"}, {"input": "\"abc\"\n\"bcac\"", "output": "[2]", "fn_name": "buy_newspaper"}, {"inp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi went to an all-you-can... | [{"type": "stdin_stdout", "input": "20\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\n", "output": "1950\n"}, {"type": "stdin_stdout", "input": "20\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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\nEasy and hard versions are actua... | [{"type": "stdin_stdout", "input": "4\n4 18\n2 1 9 2\n3 2 4 1\n4 1 1 2\n3 20\n2 1 8 1\n3 1 7 2\n5 50\n1 3 100 1\n1 5 10 2\n2 3 123 2\n5 4 55 1\n2 000\n1 2 409 2\n", "output": "0\n0\n11\n18\n"}, {"type": "stdin_stdout", "input": "4\n4 18\n2 1 18 2\n3 2 4 1\n4 1 2 2\n3 20\n2 1 2 1\n3 1 8 2\n5 50\n1 3 100 1\n1 5 10 2\n2 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\nLet f(n) be the number of triple... | [{"type": "stdin_stdout", "input": "743", "output": "0\n0\n0\n0\n0\n1\n0\n0\n0\n0\n3\n0\n0\n0\n0\n0\n3\n3\n0\n0\n0\n0\n0\n1\n6\n0\n3\n0\n0\n0\n0\n0\n3\n3\n6\n0\n0\n3\n0\n0\n0\n0\n3\n3\n6\n0\n6\n0\n0\n0\n3\n0\n0\n1\n6\n0\n6\n6\n0\n0\n6\n0\n0\n0\n0\n3\n3\n3\n6\n0\n6\n3\n6\n0\n0\n0\n6\n0\n0\n0\n3\n3\n9\n0\n6\n3\n6\n0\n3\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou already know that Valery's f... | [{"type": "stdin_stdout", "input": "20 20 2\nbaaaaaaaaaaaaaaaaaaa\nbfffffffacfffffffffa\nbgggggggaccgggggggga\nbhhhhhhhaccchhhhhhha\nbiiiiiiiacccciiiiiia\nbjjjjjjjacccccjjjjja\nbkkkkkkkacccccckkkka\nblllllllacccccccllla\nbbbbbbbbSccccccccmma\nbddddddddddcccccccna\nbodddddddcccccccccca\nbppddddddddTaaaaaaaa\nbqqqddddddd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is the first who cam... | [{"type": "stdin_stdout", "input": "10000 10000 199999999\n", "output": "10000 10000 L\n"}, {"type": "stdin_stdout", "input": "10000 10000 200000000\n", "output": "10000 10000 R\n"}, {"type": "stdin_stdout", "input": "10000 10000 199999999\n", "output": "10000 10000 L\n"}, {"type": "stdin_stdout", "input": "10000 10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ points on a coordi... | [{"type": "stdin_stdout", "input": "5\n2 1 4 3 5\n2 2 2 3 4\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "5\n2 1 4 3 5\n0 2 2 3 4\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "5\n2 1 4 3 5\n2 2 2 3 4\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "3\n1 3 2\n-100 2 10\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "12 7\n1 2 \n4 2\n3 4\n7 12\n2 2\n9 9\n10 1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "12 7\n1 2 \n4 2\n3 4\n8 12\n2 2\n9 9\n10 1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "12 7\n1 2 \n4 2\n3 4\n7 7\n2 1\n11 2\n11 1", "output": "-1\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this kata, we want to discove... | [{"input": "664444309", "output": "[true]", "fn_name": "is_dd"}, {"input": "5023011", "output": "[false]", "fn_name": "is_dd"}, {"input": "9081231", "output": "[false]", "fn_name": "is_dd"}, {"input": "30313", "output": "[true]", "fn_name": "is_dd"}, {"input": "122", "output": "[true]", "fn_name": "is_dd"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are walking through a parkwa... | [{"type": "stdin_stdout", "input": "1\n100 7773\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nOne day, Taro, who li... | [{"type": "stdin_stdout", "input": "3 4 2\n1 -1 1 1\n0 1 1 -2\n0 0 -1 1\n0 0 0", "output": "4 1\n"}, {"type": "stdin_stdout", "input": "3 4 3\n1 0 1 1\n0 1 -1 -1\n1 0 1 1\n0 0 0", "output": "1 5\n"}, {"type": "stdin_stdout", "input": "3 4 3\n1 0 1 1\n0 1 1 -2\n0 0 -1 1\n0 0 0", "output": "1 5\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\nSlime has a sequence of positive... | [{"type": "stdin_stdout", "input": "5\n5 3\n1 5 2 6 1\n1 6\n6\n3 2\n1 2 3\n4 3\n3 1 2 3\n10 3\n1 2 3 4 5 6 7 8 9 10\n", "output": "no\nyes\nyes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "5\n5 3\n1 5 2 6 1\n1 6\n6\n3 2\n1 2 3\n4 3\n3 1 2 3\n10 3\n1 2 3 4 8 6 7 8 9 10\n", "output": "no\nyes\nyes\nno\nyes\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\nAizu is famous for its buckwheat... | [{"type": "stdin_stdout", "input": "500\n1000\n0", "output": "850\n1520\n"}, {"type": "stdin_stdout", "input": "500\n1100\n0", "output": "850\n1950\n"}, {"type": "stdin_stdout", "input": "500\n2200\n0", "output": "850\n3390"}, {"type": "stdin_stdout", "input": "500\n0000\n-12", "output": "850\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\nThe famous joke programming lang... | [{"type": "stdin_stdout", "input": "HQQQQQQQHQQQQHQHQQQHHQHHHQQHQQQQHHQHHQHHHHHHQQQQQQQQHHQQQQQHHQQQQHHHQQQQQQQQHQQQHQHQQQQQQHHHQHHQHQHHQQQQQHQQHQHQQQHQHQHHHHQQHQHQQQQQHQQQHQQQHQQHQHQQHQQQQQQ\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "HQQQQQQQHQQQQHQHQQQHHQHHHQQHQQQQHHQHHQHHHHHHQQQQQQQQHHQQQQQHHQQQQHHHQQ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReturn the Nth Even Number\n\nTh... | [{"input": "1298734", "output": "[2597466]", "fn_name": "nth_even"}, {"input": "100", "output": "[198]", "fn_name": "nth_even"}, {"input": "1", "output": "[0]", "fn_name": "nth_even"}, {"input": "2", "output": "[2]", "fn_name": "nth_even"}, {"input": "3", "output": "[4]", "fn_name": "nth_even"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis problem is same as the next... | [{"type": "stdin_stdout", "input": "10\n30518 30518 30518 30518 30518 30518 30518 30518 30518 30518\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "10\n30518 96518 74071 59971 50121 4862 43967 73607 19138 90754\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "10\n63649 14562 779 31060 84730 3390 1402... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 working as a night watch... | [{"type": "stdin_stdout", "input": "1 1 1\n0\n2 2 1\n1 1\n1 1\n3 2 1\n1 0 1\n0 1 -1\n3 3 1\n1 0 0\n0 1 0\n1 0 1\n4 4 2\n1 1 0 1\n0 0 0 1\n1 0 1 1\n1 0 0 0\n5 5 1\n1 1 1 0 1\n0 1 0 1 0\n1 0 1 0 1\n0 1 1 1 0\n1 0 1 0 0\n5 1 2\n0 0 0 0 0\n0 0 0 0 0\n0 0 1 0 0\n0 0 0 0 0\n0 0 0 0 1\n11 11 3\n0 0 0 0 0 0 0 0 0 0 0\n0 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\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\nYou are given two strings $s$ an... | [{"type": "stdin_stdout", "input": "5 102\neyw*y\neywsnxcwslfyiqbbeoaawtmioksfdndptxxcwzfmrpcixjbzvicijofjrbcvzaedglifuoczgjlqylddnsvsjfmfsccxbdveqguyfk\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5 102\neyw*y\neywsnxcwslfyiqbbeoaawtmioksfdndptxxcwzfmrpcixjbzvicijofjrbcvzaedglifuoczgjlqylddnsvsjfmfsccxbdv... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\nACM\n\n\nOut... | [{"type": "stdin_stdout", "input": "ABM", "output": "0\n"}, {"type": "stdin_stdout", "input": "BIB", "output": "2\n"}, {"type": "stdin_stdout", "input": "1MI", "output": "1\n"}, {"type": "stdin_stdout", "input": "MCA", "output": "0\n"}, {"type": "stdin_stdout", "input": "MAC", "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\nThe programming competition seas... | [{"type": "stdin_stdout", "input": "100\n56 22 13 79 28 73 16 55 34 0 97 19 22 36 22 80 30 19 36 92 9 38 24 10 61 43 19 12 18 34 21 36 1 17 0 97 72 37 74 70 51 34 33 87 27 33 45 97 38 56 2 32 88 92 64 51 74 94 86 98 57 62 83 3 87 61 9 65 57 13 64 10 50 35 7 75 41 3 70 66 6 55 69 42 91 75 14 22 68 93 2 53 22 98 45 2 78 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 penguin Polo loves his ho... | [{"type": "stdin_stdout", "input": "1000 8\n", "output": "339760446\n"}, {"type": "stdin_stdout", "input": "1000 1\n", "output": "760074701\n"}, {"type": "stdin_stdout", "input": "1000 2\n", "output": "675678679\n"}, {"type": "stdin_stdout", "input": "1000 3\n", "output": "330155123\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 you had helped George and ... | [{"type": "stdin_stdout", "input": "13 27 7\n1893\n370\n7320\n5753\n4418\n2146\n2702\n5013\n5959\n1929\n7611\n7013\n540\n3454\n4271\n2887\n4724\n3520\n2111\n5845\n1868\n7659\n3040\n3775\n6507\n4917\n7506\n2515\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "13 27 7\n1893\n370\n7320\n5753\n4418\n2146\n2702\n50... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNowadays the one-way traffic is ... | [{"type": "stdin_stdout", "input": "50\n30 34 48\n11 30 15\n11 5 179\n4 5 57\n43 4 21\n14 43 74\n14 19 52\n45 19 60\n45 28 52\n24 28 94\n24 26 2\n48 26 34\n48 13 53\n13 42 7\n42 37 23\n37 17 70\n17 7 29\n20 7 93\n33 20 21\n33 2 53\n21 2 83\n49 21 33\n46 49 28\n18 46 1\n36 18 99\n47 36 52\n47 29 41\n41 29 40\n31 41 45\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\nCatherine received an array of i... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 15 11 10 11 5 13 14 15 16 17 18 19 20 3 22 23 24 16 26 27 28 29 29 43 32 33 34 35 36 37 38 39 40 41 76 43 44 45 46 47 48 41 50 51 52 53 54 55 97 57 58 59 60 61 62 63 64 65 66 67 68 30 70 71 72 73 74 75 76 77 78 79 80 81 88 83 84 85 86 87 88 265 90 91 92 93 94 95 96... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya loves inequations. ... | [{"type": "stdin_stdout", "input": "45678 783917268558 931068\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\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 have the `radius` of a circl... | [{"input": "1000", "output": "[3141549]", "fn_name": "points"}, {"input": "99", "output": "[30757]", "fn_name": "points"}, {"input": "55", "output": "[9477]", "fn_name": "points"}, {"input": "33", "output": "[3409]", "fn_name": "points"}, {"input": "42", "output": "[5525]", "fn_name": "points"}, {"input": "15", "output... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two squares, one w... | [{"type": "stdin_stdout", "input": "-17 -91 -17 -27 -81 -27 -81 -91\n-48 -21 -12 -57 -48 -93 -84 -57\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "-17 -91 -17 -27 -81 -27 -81 -91\n-48 -21 -12 -57 -48 -93 -84 -57\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "-100 -100 -100 -99 -99 -99 -99 -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\nEvery great chef knows that luck... | [{"type": "stdin_stdout", "input": "5\n6\n21\n18\n2\n10", "output": "-1\n21\n14\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "5\n9\n2\n14\n2\n25", "output": "-1\n-1\n14\n-1\n21\n"}, {"type": "stdin_stdout", "input": "5\n40\n5\n35\n1\n15", "output": "28\n-1\n35\n-1\n7\n"}, {"type": "stdin_stdout", "input": "5\n40\n5\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nThere is a mysterious... | [{"type": "stdin_stdout", "input": "3\nF S T", "output": "T\n"}, {"type": "stdin_stdout", "input": "3\nF R T", "output": "T\n"}, {"type": "stdin_stdout", "input": "3\nG S T", "output": "T\n"}, {"type": "stdin_stdout", "input": "3\nG R T", "output": "T\n"}, {"type": "stdin_stdout", "input": "3\nH R T", "output": "T\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 integer $x$ and... | [{"type": "stdin_stdout", "input": "79 6\n2 2 4 3 5 1 2 2 1 5 5 3 2 1 3 4 2 1 2 1 2 2 3 1 6 6 6 3 1 3 6 3 4 5 1 2 2 3 1 5 3 4 1 3 1 3 1 1 5 2 3 3 2 2 3 1 3 5 5 1 1 3 3 4 3 1 5 4 1 4 4 1 3 1 2 1 1 1 1\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "10 5\n4 3 2 1 4 3 2 4 3 4\n", "output": "No\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\nGeorge decided to prepare a Code... | [{"type": "stdin_stdout", "input": "29 100\n20 32 41 67 72 155 331 382 399 412 465 644 484 511 515 529 690 637 679 715 733 763 826 843 862 903 276 979 989\n15 15 15 17 18 22 19 20 21 21 22 8 25 26 26 27 28 31 32 32 37 42 38 39 39 40 41 42 43 43 35 45 46 47 49 49 50 50 50 51 52 53 53 55 56 57 24 59 59 60 60 62 62 63 63 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 vacations n pupils decided to... | [{"type": "stdin_stdout", "input": "10010 1000000000 999999999 1000000000 1\n", "output": "1.0000000009999002\n"}, {"type": "stdin_stdout", "input": "10000 1000000000 999999999 1000000000 10000\n", "output": "1.000000000"}, {"type": "stdin_stdout", "input": "10010 1000000000 1 1000000000 10000\n", "output": "2.99999999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, consis... | [{"type": "stdin_stdout", "input": "xxxxxxxxxxfxxxxxxxxxxxxxxxxxxxxxxxxxxxrxtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxexxxxmxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxexxxxxxxxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuxxxx... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday is Chef's birthday. His mo... | [{"type": "stdin_stdout", "input": "2\n101\n010\n1111\n1010\n", "output": "Lucky Chef\n2\nUnlucky Chef\n"}, {"type": "stdin_stdout", "input": "2\n101\n011\n1111\n1010", "output": "Lucky Chef\n1\nUnlucky Chef\n"}, {"type": "stdin_stdout", "input": "2\n001\n111\n1111\n1010", "output": "Lucky Chef\n2\nUnlucky Chef\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\nSuppose you have two polynomials... | [{"type": "stdin_stdout", "input": "150\n", "output": "150\n1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 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 1 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\nTakahashi has a string S of leng... | [{"type": "stdin_stdout", "input": "10 2\nbbbabbbaaa", "output": "aaaaaaaaaa\n"}, {"type": "stdin_stdout", "input": "10 3\nbbaabbbaab", "output": "aaaaaaaabb\n"}, {"type": "stdin_stdout", "input": "10 2\nbaabbbaabb", "output": "aaaabbbaab\n"}, {"type": "stdin_stdout", "input": "10 2\nbaabbaaabb", "output": "aaaaaabbbb\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 plans to conduct a load... | [{"type": "stdin_stdout", "input": "100\n9997 9615 4045 2846 7656 2941 2233 9214 837 3312 5832 578 6146 8773 164 7303 3260 8684 1732 6608 9061 9224 7263 7279 1361 1823 8075 5946 2236 6529 6783 7494 510 1217 1135 8745 6517 141 8180 1948 6827 6091 2730 897 1254 705 1990 1806 1957 2571 8355 5542 5536 1527 886 2093 1532 48... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose you are living with two ... | [{"type": "stdin_stdout", "input": "7\n2 1\n2 2\n3 1\n3 2\n3 3\n5 5\n69 1337\n", "output": "\n1\n2\n1\n3\n2\n2\n65\n"}, {"type": "stdin_stdout", "input": "7\n2 1\n2 2\n3 1\n3 2\n3 3\n5 5\n69 1337\n", "output": "1\n2\n1\n3\n2\n2\n65\n"}, {"type": "stdin_stdout", "input": "7\n2 1\n2 2\n3 1\n3 2\n3 3\n5 5\n69 1154\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\nThere are N squares arranged in ... | [{"type": "stdin_stdout", "input": "9449\n43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 sequences $a_1... | [{"type": "stdin_stdout", "input": "1\n45094381 58629867 47778466\n33028864 48902149 69571701\n", "output": "46602292\n"}, {"type": "stdin_stdout", "input": "1\n45094381 58629867 47778466\n33028864 48902149 69571701\n", "output": "46602292\n"}, {"type": "stdin_stdout", "input": "3\n2 3 2\n3 3 1\n4 0 1\n2 3 0\n0 0 1\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\nDraw a frame which has a height ... | [{"type": "stdin_stdout", "input": "5 7\n2 1\n17 12\n0 0", "output": "#######\n#.....#\n#.....#\n#.....#\n#######\n\n#\n#\n\n############\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\n#..........#\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program to find the rema... | [{"type": "stdin_stdout", "input": "3 \n1 4\n111 1167\n12 36", "output": "1\n111\n12\n"}, {"type": "stdin_stdout", "input": "3 \n1 4\n111 1167\n20 36", "output": "1\n111\n20\n"}, {"type": "stdin_stdout", "input": "3 \n2 4\n111 1167\n20 65", "output": "2\n111\n20\n"}, {"type": "stdin_stdout", "input": "3\n1 2\n100 200\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 there be an array $b_1, b_2,... | [{"type": "stdin_stdout", "input": "30\n1\n0\n2\n0 0\n2\n0 1\n2\n1 0\n1\n1000000000\n2\n1000000000 1000000000\n2\n999999999 1000000000\n2\n1000000000 999999999\n5\n0 1 2 3 4\n5\n4 3 2 1 0\n5\n1 0 0 0 2\n1\n0\n5\n0 0 0 3 0\n1\n1\n1\n0\n1\n0\n1\n1\n2\n2 2\n5\n4 4 5 5 3\n4\n2 1 1 1\n5\n2 1 2 0 2\n1\n0\n1\n0\n4\n0 1 0 0\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\nLucy likes letters. She studied ... | [{"type": "stdin_stdout", "input": "100 1 92\nxwcbimztwcyuckyappbkrddnxgnxqvmobveinzvvnseqxooecwrrdeuwzfzxvfkvguqrsofbbnhfcscxggpxzmruycgqfmnnoovd\n", "output": "a\nb\nb\nb\nb\nb\nc\nc\nc\nc\nc\nc\nc\nd\nd\nd\nd\ne\ne\ne\ne\nf\nf\nf\nf\nf\ng\ng\ng\ng\ng\nh\ni\ni\nk\nk\nk\nm\nm\nm\nm\nn\nn\nn\nn\nn\nn\nn\no\no\no\no\no\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAcacius is studying strings theo... | [{"type": "stdin_stdout", "input": "6\n7\nabacaba\n7\n???????\n11\naba?abaaabc\n11\nabacaba?aba\n15\nrewq???f???fdsa\n11\ncbaaabacaba\n", "output": "yes\nabacaba\nyes\nabacaba\nyes\nabacabaaabc\nyes\nabacabazaba\nno\nyes\ncbaaabacaba\n"}, {"type": "stdin_stdout", "input": "6\n7\nabacaba\n7\n???????\n11\naba?abaaabc\n11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDue to the increase in the numbe... | [{"type": "stdin_stdout", "input": "37 80 100\n31\n901706521 USB\n555265160 PS/2\n547038505 PS/2\n644436873 PS/2\n105558073 USB\n915082057 PS/2\n913113815 USB\n953413471 PS/2\n252912707 PS/2\n830344497 USB\n781593007 USB\n610659875 PS/2\n177755858 PS/2\n496444729 PS/2\n617569418 USB\n304908147 PS/2\n188649950 PS/2\n705... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Red Kingdom is attacked by t... | [{"type": "stdin_stdout", "input": "10\n6 3 4 5\n2 3 2 3 1 3\n1 5 4 3\n10\n4 4 2 3\n0 10 14 5\n2 2 1 4\n8 5\n3 5 3 5\n9 2 10\n4 5 5 5\n2 10 2 2\n2 3 1 4\n1 10\n3 1 5 3\n11 8 7\n2 5 4 5\n8 8\n3 5 1 4\n5 2 10\n", "output": "0\n2\n3\n2\n5\n12\n5\n0\n0\n2\n"}, {"type": "stdin_stdout", "input": "10\n6 3 4 5\n2 3 2 3 1 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\nChef likes rectangles. Among all... | [{"type": "stdin_stdout", "input": "3\n1 10 2\n4 2 2\n1 9 -2", "output": "2\n1\n-2\n"}, {"type": "stdin_stdout", "input": "3\n2 14 2\n4 2 2\n1 9 -2", "output": "1\n1\n-2\n"}, {"type": "stdin_stdout", "input": "3\n2 18 2\n4 2 3\n1 4 -1", "output": "1\n2\n-1\n"}, {"type": "stdin_stdout", "input": "3\n2 2 1\n3 1 2\n1 5 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\nThere are just some things you c... | [{"input": "\"I don't know if this will work without watering it first.\"", "output": "[\"sludge\"]", "fn_name": "bucket_of"}, {"input": "\"you know what, i don't know what was in that Barth burger\"", "output": "[\"slime\"]", "fn_name": "bucket_of"}, {"input": "\"i'm just going to wash my hands of this\"", "output": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is an infinite sequence co... | [{"type": "stdin_stdout", "input": "30\n1 200000\n2 199999\n3 199998\n4 199997\n5 199996\n200001 399996\n200002 399997\n200003 399998\n200004 399999\n200005 400000\n400001 599998\n400002 599999\n400003 600000\n400004 599996\n400005 599995\n600001 800000\n600002 799999\n600003 799998\n600004 799997\n600005 799996\n60000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 garden consisting ent... | [{"type": "stdin_stdout", "input": "3 150\nGGGWGGGGWWGGGGGGGGGGGGGWGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGWGGGGGGGWGGGGGGGGGGGGGGGGGWGGGGGGGGGGGGGGGGGGW\nGGGGGGGGGGGGWGGGGGGGGGWGGGGGGGGGGGGWGGGGGWGGGGGGGWGGGGGGGWGGGGGWGGGGGGGGGGGGGGGGGGGGGGGGWGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nInput\n\nThe input co... | [{"type": "stdin_stdout", "input": "27 36\n", "output": "OUT\n"}, {"type": "stdin_stdout", "input": "0 45\n", "output": "OUT\n"}, {"type": "stdin_stdout", "input": "53 27\n", "output": "IN\n"}, {"type": "stdin_stdout", "input": "0 18\n", "output": "OUT\n"}, {"type": "stdin_stdout", "input": "51 1\n", "output": "OUT\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\nGildong has a square board consi... | [{"type": "stdin_stdout", "input": "5\n3\n000\n122\n101\n2\n57\n75\n4\n0123\n5469\n3401\n2340\n1\n9\n8\n42987101\n91120855\n77861569\n87599023\n92834718\n83917348\n19823743\n38947912\n", "output": "4 4 1 0 0 0 0 0 0 0\n0 0 0 0 0 1 0 1 0 0\n9 6 9 9 4 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n18 49 49 49 49 30 15 35 42 42\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\nWrite a program which reads an i... | [{"type": "stdin_stdout", "input": "35\n011", "output": "4\n348\n"}, {"type": "stdin_stdout", "input": "35\n010", "output": "4\n282\n"}, {"type": "stdin_stdout", "input": "35\n15", "output": "4\n592\n"}, {"type": "stdin_stdout", "input": "35\n26", "output": "4\n282\n"}, {"type": "stdin_stdout", "input": "35\n13", "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\nJamie is preparing a Codeforces ... | [{"type": "stdin_stdout", "input": "10 19228\n", "output": "Yes\n-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\nThe committee members of the Kit... | [{"type": "stdin_stdout", "input": "4\nA\nAMD\nCAT\nDOG\nZ XUW ZVX Z YZT.\n2\nZA\nAY\nZA.\n2\n@A\nBB\nCC.\n16\nA\nB\nC\nD\nE\nF\nG\nH\nI\nJ\nK\nL\nM\nN\nO\nONMLKJIHGFEDCBA\nA B C D E F G H I J K L M N O ABCDEFGHIJKLMNO.\n0", "output": "A DOG AMD A CAT.\nZA.\nBB.\nO N M L K J I H G F E D C B A ONMLKJIHGFEDCBA.\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA penguin Rocher has $n$ sticks.... | [{"type": "stdin_stdout", "input": "4\n1\n2\n3\n20\n", "output": "1\n1\n2\n10\n"}, {"type": "stdin_stdout", "input": "4\n1\n3\n3\n20\n", "output": "1\n2\n2\n10\n"}, {"type": "stdin_stdout", "input": "4\n3\n2\n12\n15\n", "output": "2\n1\n6\n8\n"}, {"type": "stdin_stdout", "input": "4\n1\n3\n1\n20\n", "output": "1\n2\n1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the longest substring in al... | [{"input": "\"asdfaaaabbbbcttavvfffffdf\"", "output": "[\"aaaabbbbctt\"]", "fn_name": "longest"}, {"input": "\"asdfbyfgiklag\"", "output": "[\"fgikl\"]", "fn_name": "longest"}, {"input": "\"abcdeapbcdef\"", "output": "[\"abcde\"]", "fn_name": "longest"}, {"input": "\"asd\"", "output": "[\"as\"]", "fn_name": "longest"},... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPak Chanek has a grid that has $... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "999999999000000000\n"}, {"type": "stdin_stdout", "input": "767928735 1000000000\n", "output": "767928734232071265\n"}, {"type": "stdin_stdout", "input": "1000000000 906523442\n", "output": "906523441000000000\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\nA brave princess in a poor count... | [{"type": "stdin_stdout", "input": "3 2 10\n1 2 13 6\n2 3 10 3\n3 2 10\n1 2 3 16\n2 3 9 7\n3 3 10\n1 3 17 6\n1 2 2 4\n2 3 9 19\n4 4 5\n1 3 13 5\n1 4 7 25\n2 3 8 2\n2 4 9 3\n0 0 0", "output": "6\n7\n4\n10\n"}, {"type": "stdin_stdout", "input": "3 2 10\n1 2 8 5\n2 3 10 0\n3 2 10\n1 2 3 8\n2 3 7 7\n3 3 10\n1 3 17 6\n1 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\nIvan unexpectedly saw a present ... | [{"type": "stdin_stdout", "input": "37\n52 52 66 149 149 130 47 47 26 110 185 -1 73 73 65 -1 -1 130 -1 -1 -1 94 97 190 -1 -1 49 49 54 -1 92 92 5 25 48 79 79\n", "output": "903952722\n"}, {"type": "stdin_stdout", "input": "37\n52 52 66 149 149 130 47 47 17 110 185 -1 73 73 65 -1 -1 130 -1 -1 -1 94 97 190 -1 -1 49 49 54 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDreamoon likes sequences very mu... | [{"type": "stdin_stdout", "input": "10\n1 1000000000\n2 999999999\n3 39238314\n2 14233839\n3 1308869\n6 99995\n13 14099\n8 474\n9 146\n10 2\n", "output": "1\n3\n5\n3\n5\n23\n209\n59\n89\n1\n"}, {"type": "stdin_stdout", "input": "10\n1 1000000000\n2 999999999\n3 99999998\n4 9999997\n5 999996\n6 99995\n7 9994\n12 993\n15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHamming distance between strings... | [{"type": "stdin_stdout", "input": "5728 5729 5750\n5631 5768\n9163\n", "output": "10321\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle girl Margarita is a big f... | [{"type": "stdin_stdout", "input": "10\n449347852 741090797\n541919355 938202256\n442458747 465872502\n463474612 789217678\n146477812 390217056\n302933612 477640295\n48191125 1417399529\n173202385 374432789\n78807265 428215825\n194590462 1318087870\n", "output": "-145871473\n198141451\n11706878\n626346145\n268347434\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 apples and P pieces of... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "200\n"}, {"type": "stdin_stdout", "input": "1052 1", "output": "1578\n"}, {"type": "stdin_stdout", "input": "1829 1", "output": "2744\n"}, {"type": "stdin_stdout", "input": "3156 1", "output": "4734\n"}, {"type": "stdin_stdout", "input": "1450 1", "output": "21... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 want to encode a given string... | [{"type": "stdin_stdout", "input": "aaabbcccdeeegfg", "output": "41\n"}, {"type": "stdin_stdout", "input": "aaadbcccbeedgfg", "output": "42\n"}, {"type": "stdin_stdout", "input": "gegdeebcccbeaaa", "output": "38\n"}, {"type": "stdin_stdout", "input": "aeaaacccbeedgeg", "output": "36\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\nMost football fans love it for t... | [{"input": "[\"A4R\", \"A2R\", \"A3R\", \"A6R\", \"A8R\", \"A10R\", \"A11R\"]", "output": "[[6, 11]]", "fn_name": "men_still_standing"}, {"input": "[\"A4Y\", \"A5R\", \"B5R\", \"A4Y\", \"B6Y\"]", "output": "[[9, 10]]", "fn_name": "men_still_standing"}, {"input": "[\"A4R\", \"A4R\", \"A4R\"]", "output": "[[10, 11]]", "f... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are three horses living in... | [{"type": "stdin_stdout", "input": "10 10\n4 8 4 10 2 10 8 10 4 6\n", "output": " 25\n"}, {"type": "stdin_stdout", "input": "10 10\n9 3 6 6 3 3 6 3 6 9\n", "output": " 25\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\nPetya organized a strange birthd... | [{"type": "stdin_stdout", "input": "6\n6 6\n2 3 1 5 6 6\n629717071 992393438 995305242 999968259 999970082 999971487\n6 6\n2 5 2 2 4 3\n756869732 979591024 993778447 1268827656 999873038 999943064\n6 6\n5 1 4 5 6 4\n733550952 979779220 979918868 983712198 991976436 995169050\n6 6\n4 2 2 3 2 4\n257971677 920812339 98100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem.\... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 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\nThis is a spin off of my first [... | [{"input": "\"1,2,3,4\"", "output": "[\"2 3\"]", "fn_name": "array"}, {"input": "\"1, 3\"", "output": "[null]", "fn_name": "array"}, {"input": "\"1,2,3\"", "output": "[\"2\"]", "fn_name": "array"}, {"input": "\"1\"", "output": "[null]", "fn_name": "array"}, {"input": "\"\"", "output": "[null]", "fn_name": "array"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nE: Jam\n\nproblem\n\nThere are N... | [{"type": "stdin_stdout", "input": "4 4 3\n3 12 1 6\n1 1 2 3\n10 1 9 5\n1 2 1\n2 3 1\n1 3 1\n1 4 1", "output": "20\n18\n13\n"}, {"type": "stdin_stdout", "input": "4 4 3\n3 12 1 6\n1 1 2 3\n10 1 9 5\n1 2 0\n2 3 1\n1 3 1\n1 4 1", "output": "22\n19\n15\n"}, {"type": "stdin_stdout", "input": "4 4 3\n3 12 1 6\n1 1 2 3\n10 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRemainder of Big Integers\n\nGiv... | [{"type": "stdin_stdout", "input": "10 16", "output": "10\n"}, {"type": "stdin_stdout", "input": "11 12", "output": "11\n"}, {"type": "stdin_stdout", "input": "12 47", "output": "12\n"}, {"type": "stdin_stdout", "input": "14 28", "output": "14\n"}, {"type": "stdin_stdout", "input": "18 11", "output": "7\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 triangle is called an equable ... | [{"input": "120\n109\n13", "output": "[false]", "fn_name": "equable_triangle"}, {"input": "17\n17\n30", "output": "[false]", "fn_name": "equable_triangle"}, {"input": "25\n25\n45", "output": "[false]", "fn_name": "equable_triangle"}, {"input": "13\n37\n30", "output": "[false]", "fn_name": "equable_triangle"}, {"input":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp has an array $a$ consis... | [{"type": "stdin_stdout", "input": "2\n1000000 1000000\n", "output": "1000000\n"}, {"type": "stdin_stdout", "input": "2\n1000010 1001000\n", "output": "1000010\n"}, {"type": "stdin_stdout", "input": "2\n1000110 1001000\n", "output": "1000110\n"}, {"type": "stdin_stdout", "input": "2\n1000110 1000000\n", "output": "1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday s kilometer long auto race... | [{"type": "stdin_stdout", "input": "9 81812\n8 31 410 547 18 22 77 449 5 491 8 10 382 746 21 61 523\n1 452 181\n1 724 113\n1 113 724\n1 226 362\n46 5 257 2 126 373 6 6 491 9 7 137 23 93 73 163 13 17 106 3 100 5 415 270 2 7 723 597 4 176 3 274 18 1 852 334 14 7 25 163 1 3 199 29 140 32 32 191 2 583 3 23 11 22 23 250 1 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 all know the Dirichlet princ... | [{"type": "stdin_stdout", "input": "10000 1 1000000000\n", "output": "Masha\n\n"}, {"type": "stdin_stdout", "input": "1010 1 1000000000\n", "output": "Masha\n\n"}, {"type": "stdin_stdout", "input": "2635 2 1000000000\n", "output": "Masha\n\n"}, {"type": "stdin_stdout", "input": "1 30 1000000000\n", "output": "Missing\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\nVasily the bear has a favorite r... | [{"type": "stdin_stdout", "input": "-1000000000 -1000000000\n", "output": "-2000000000 0 0 -2000000000\n"}, {"type": "stdin_stdout", "input": "-1000000000 -1000000000\n", "output": "-2000000000 0 0 -2000000000 "}, {"type": "stdin_stdout", "input": "-1000000000 -999999999\n", "output": "-1999999999 0 0 -1999999999\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\nBerland, 2016. The exchange rate... | [{"type": "stdin_stdout", "input": "4314752277691991627730686134692292422155753465948025897701703862445837045929984759093775762579123919\n", "output": "9314752277691991627730686134692292422155753465948025897701703862445837045929984759093775762579123914\n"}, {"type": "stdin_stdout", "input": "431475227769199162773068613... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.