messages listlengths 1 1 | ground_truth stringlengths 156 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\nYou play a computer game. In this game, you lead a party of $m$ heroes, and you have to clear a dungeon with ... | [{"input": "2\n6\n2 3 11 14 1 8\n2\n3 2\n000 1\n5\n3 5 100 2 3\n2\n30 5\n90 1\n", "output": "-1\n-1\n"}, {"input": "2\n6\n1 3 11 14 1 10\n2\n3 2\n100 1\n5\n3 5 100 2 3\n2\n30 5\n11 1\n", "output": "5\n-1\n"}, {"input": "2\n6\n1 3 11 16 1 10\n2\n3 2\n100 1\n5\n3 5 100 2 3\n2\n30 5\n11 1\n", "output": "5\n-1\n"}, {"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\nIn this problem MEX of a certain array is the smallest positive integer not contained in this array.\n\nEvery... | [{"input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\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\nAs a New Year's gift, Dolphin received a string s of length 19.\nThe string s has the following format: `[fiv... | [{"input": "gaiku,atcoder,tasks", "output": "gaiku atcoder tasks\n"}, {"input": "abgde,fchihgf,edcba", "output": "abgde fchihgf edcba\n"}, {"input": "ha,pypnewyear,enjoy", "output": "ha pypnewyear enjoy\n"}, {"input": "gaiku,atcoeer,tasks", "output": "gaiku atcoeer tasks\n"}, {"input": "abcde,fghihcf,edgba", "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\nVanya is managed to enter his favourite site Codehorses. Vanya uses n distinct passwords for sites at all, ho... | [{"input": "20 5\nvSyC787KlIL8kZ2Uv5sw\nWKWOP\n7i8J3E8EByIq\nNW2VyGweL\nmyR2sRNu\nmXusPP0\nf4jgGxra\n4wHRzRhOCpEt\npPz9kybGb\nOtSpePCRoG5nkjZ2VxRy\nwHYsSttWbJkg\nKBOP9\nQfiOiFyHPPsw3GHo8J8\nxB8\nqCpehZEeEhdq\niOLjICK6\nQ91\nHmCsfMGTFKoFFnv238c\nJKjhg\ngkEUh\nKBOP9\n", "output": "3 11\n"}, {"input": "20 5\nvSyC787KlIL8k... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn Berland a bus travels along the main street of the capital. The street begins from the main square and loo... | [{"input": "6\n2 3 5 7 9 11\n11\n1 2 2 3 3 4 4 5 5 5 6\n", "output": " 18\n"}, {"input": "6\n2 3 5 7 11 13\n9\n1 2 2 3 3 4 5 5 6\n", "output": " 16\n"}, {"input": "4\n2 3 5 7\n9\n1 1 2 2 2 3 3 3 4\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMs. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine.\n\nFor exa... | [{"input": "700 300 200\n993 200 300\n244 200 500\n275 111 330\n275 010 385\n694 375 1747\n3 1 10010\n0 0 0", "output": "1 3\n100 495\n25 28\n21 55\n1 11\n163 297\n3336 2\n"}, {"input": "700 300 200\n500 283 300\n349 200 500\n275 110 330\n275 010 385\n1067 344 4002\n3 1 10001\n0 0 0", "output": "1 3\n56 100\n100 172\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\nThere are n TV shows you want to watch. Suppose the whole time is split into equal parts called \"minutes\". ... | [{"input": "10 798547896 459313948\n40312491 40315265\n40299842 40315264\n40296035 40315263\n40282844 40315262\n40304824 40315261\n40280414 40315260\n40299203 40315259\n40301967 40315258\n40276169 40315257\n40286575 40315256\n", "output": "236433977\n"}, {"input": "4 288243228 34715941\n996451829 999802844\n921286045 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven 2 strings, your job is to find out if there is a substring that appears in both strings. You will retur... | [{"input": "\"LoremipsumdolorsitametconsecteturadipiscingelitAeneannonaliquetligulautplaceratorciSuspendissepotentiMorbivolutpatauctoripsumegetaliquamPhasellusidmagnaelitNullamerostellustemporquismolestieaornarevitaediamNullaaliquamrisusnonviverrasagittisInlaoreetultricespretiumVestibulumegetnullatinciduntsempersemacru... | 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\nPrint the K-th element of the following sequence of length 32:\n\n\n1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2,... | [{"input": "16", "output": "14\n"}, {"input": "24", "output": "15\n"}, {"input": "32", "output": "51\n"}, {"input": "-22", "output": "2\n"}, {"input": "-27", "output": "1\n"}, {"input": "-13", "output": "1\n"}, {"input": "-20", "output": "5\n"}, {"input": "001", "output": "1\n"}, {"input": "32", "output": "51\n"}, {"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\nIn the spring of 2014, a student successfully passed the university and started living alone. The problem her... | [{"input": "3 1 -10\n-19\n-10\n-10", "output": "-27\n"}, {"input": "2 1 -10\n-19\n-10\n-10", "output": "-19\n"}, {"input": "3 1 -19\n-19\n-10\n-10", "output": "-39\n"}, {"input": "3 1 -19\n-19\n-10\n-18", "output": "-47\n"}, {"input": "2 1 -10\n-35\n-10\n-10", "output": "-19\n"}, {"input": "2 1 -10\n-35\n-3\n-10", "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\nThe name of one small but proud corporation consists of n lowercase English letters. The Corporation has deci... | [{"input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne e\n", "output": "lellelleel\n"}, {"input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne e\n", "output": "lellelleel\n"}, {"input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne f\n", "output": "lfllf... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVictor and Peter are playing hide-and-seek. Peter has hidden, and Victor is to find him. In the room where th... | [{"input": "-7366 1446\n-7727 -1428\n-2680 -3822 -5191 -5553\n-7304 -6313 -9229 1377\n", "output": "YES\n"}, {"input": "-4752 -3262\n-4582 6436\n-8997 -6490 -4630 1426\n-9865 -6697 -2371 -5622\n", "output": "YES"}, {"input": "-4752 -3262\n-4582 6436\n-8997 -6490 -4630 1426\n-9865 -3168 -2371 -5622\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\nYou have a card deck of $n$ cards, numbered from top to bottom, i. e. the top card has index $1$ and bottom c... | [{"input": "5 15\n1 2 3 4 5\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\n", "output": "5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "}, {"input": "5 15\n1 2 3 4 5\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5\n", "output": "5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "}, {"input": "5 15\n1 2 3 4 5\n5 5 5 5 5 5 5 5 2 5 5 5 5 5 5\n", "output": "5 1 1 1 1 1 1 1 3 2 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\nLimak is a little bear who loves to play. Today he is playing by destroying block towers. He built n towers i... | [{"input": "170\n1 2 1 2 1 1 1 1 2 3 2 1 1 2 2 1 2 1 2 1 1 2 3 3 2 1 1 1 1 1 1 1 1 2 1 2 3 3 2 1 2 2 1 2 3 2 1 1 2 3 2 1 2 1 1 1 2 3 3 2 1 2 1 2 1 1 1 2 1 2 1 1 2 2 1 1 2 1 2 2 1 2 1 2 2 1 2 1 2 3 2 1 1 2 3 4 4 3 2 1 2 1 2 1 2 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 2 1 1 2 3 2 1 2 2 1 2 1 1 1 2 2 1 2 1 2 3 2 1 2 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\nYou are given an integer $n$ from $1$ to $10^{18}$ without leading zeroes.\n\nIn one move you can swap any tw... | [{"input": "574196831896431419\n", "output": "33\n"}, {"input": "1000000000000000000\n", "output": "0\n"}, {"input": "213716413141380147\n", "output": "-1\n"}, {"input": "250070000011111111\n", "output": "16\n"}, {"input": "502727272727272727\n", "output": "18\n"}, {"input": "700777111111222222\n", "output": "30\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven a string $s$ of length $n$ and integer $k$ ($1 \\le k \\le n$). The string $s$ has a level $x$, if $x$ ... | [{"input": "92 5\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "output": "3\n"}, {"input": "92 5\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "output": "3\n"}, {"input": "92 6\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyy... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are the planning manager of an animation production company. What animation production companies produce ... | [{"input": "4\nakzakr 2 1 8\nfnmyi 5 2 3 4 6 9\ntsnukk 5 2 3 4 7 9\nyskwcnt 6 3 4 7 8 9 10\n4\nakzakr 1 2\nfnmyi 3 10 11 12\ntsnukk 2 1 8\nyskwcnt 2 1 8\n5\nknmmdk 2 13 19\nakmhmr 4 13 15 19 22\nmksyk 6 3 7 12 13 15 19\nskrkyk 3 1 4 8\ntmemm 3 1 17 24\n5\nknmmdk 5 5 6 16 18 26\nakmhmr 9 3 4 7 11 14 15 17 18 20\nmksyk 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRyouko is an extremely forgetful girl, she could even forget something that has just happened. So in order to... | [{"input": "100 100\n28 28 28 34 28 28 28 40 28 28 28 28 28 28 28 28 28 28 28 28 28 28 47 28 28 28 28 28 28 28 28 28 28 28 28 28 19 28 28 28 28 28 28 28 28 28 28 28 28 28 46 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 49 28 28 28 28 28 28 28 31 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are N pieces of source code. The characteristics of the i-th code is represented by M integers A_{i1}, ... | [{"input": "20 20 1\n-100 -100 -100 100 100 -100 100 100 100 -100 100 100 -100 100 100 -100 -100 -100 100 100\n-100 -100 100 -100 100 100 -100 100 100 100 -100 100 100 -100 100 -100 -100 -100 -100 100\n-100 -100 100 100 100 100 -100 100 -100 100 -100 100 100 100 100 100 100 -100 100 -100\n-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\nVasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and ... | [{"input": "999999 1000000\n", "output": "Equal\n"}, {"input": "1000000 999993\n", "output": "Masha\n"}, {"input": "999997 1000000\n", "output": "Dasha\n"}, {"input": "459973 1000000\n", "output": "Dasha\n"}, {"input": "1000001 999993\n", "output": "Masha\n"}, {"input": "1001001 999993\n", "output": "Masha\n"}, {"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\nThe flag of Berland is such rectangular field n × m that satisfies following conditions:\n\n Flag consists o... | [{"input": "15 28\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nG... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet's consider equation:x^2 + s(x)·x - n = 0, \n\nwhere x, n are positive integers, s(x) is the function, eq... | [{"input": "160000001600000000\n", "output": "400000000\n"}, {"input": "250000002500000000\n", "output": "500000000\n"}, {"input": "360000003600000000\n", "output": "600000000\n"}, {"input": "490000004900000000\n", "output": "700000000\n"}, {"input": "640000006400000000\n", "output": "800000000\n"}, {"input": "81000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are N boxes arranged in a circle. The i-th box contains A_i stones.\n\nDetermine whether it is possible... | [{"input": "5\n12 26 12 10 8", "output": "NO\n"}, {"input": "5\n6 11 12 10 8", "output": "NO\n"}, {"input": "5\n6 16 12 10 8", "output": "NO\n"}, {"input": "5\n6 26 12 10 8", "output": "NO\n"}, {"input": "5\n12 6 12 10 8", "output": "NO\n"}, {"input": "5\n12 2 12 10 8", "output": "NO\n"}, {"input": "5\n12 3 12 10 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\nThe $\\text{$gcdSum$}$ of a positive integer is the $gcd$ of that integer with its sum of digits. Formally, $... | [{"input": "3\n17\n110\n182\n", "output": "18\n110\n183\n"}, {"input": "3\n17\n110\n359\n", "output": "18\n110\n360\n"}, {"input": "3\n17\n100\n359\n", "output": "18\n102\n360\n"}, {"input": "3\n33\n100\n359\n", "output": "33\n102\n360\n"}, {"input": "3\n42\n101\n359\n", "output": "42\n102\n360\n"}, {"input": "3\n17\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\nAs shown in the following figure, there is a paper consisting of a grid structure where each cell is indicate... | [{"input": "2,5,3\n3,6,1\n3,4,2\n4,5,2\n3,6,3\n1,4,1", "output": "75\n5\n"}, {"input": "2,5,3\n1,6,3\n3,4,2\n4,5,2\n3,6,3\n2,4,1", "output": "73\n5\n"}, {"input": "2,5,3\n3,6,1\n2,4,2\n4,5,2\n3,6,3\n1,4,1", "output": "76\n5\n"}, {"input": "2,5,3\n3,6,1\n3,4,2\n5,5,2\n3,6,3\n1,4,1", "output": "72\n4\n"}, {"input": "2,5,... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMr. A wants to get to the destination on the Yamanote line.\n\nAfter getting on the train, Mr. A gets up for ... | [{"input": "196 2 133", "output": "133\n"}, {"input": "128 12 16", "output": "16\n"}, {"input": "134 22 13", "output": "13\n"}, {"input": "134 22 21", "output": "21\n"}, {"input": "50 40 68", "output": "128\n"}, {"input": "36 18 39", "output": "219\n"}, {"input": "128 22 23", "output": "23\n"}, {"input": "134 22 26", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMaxim wants to buy some games at the local game shop. There are $n$ games in the shop, the $i$-th game costs ... | [{"input": "6 4\n4 8 15 16 23 42\n1000 1000 1000 1000\n", "output": "4\n"}, {"input": "6 4\n4 8 15 16 23 42\n1000 1000 1000 1010\n", "output": "4\n"}, {"input": "6 4\n4 8 17 16 23 42\n1000 1000 1000 1010\n", "output": "4\n"}, {"input": "6 4\n4 8 15 16 23 42\n1000 1000 1000 1000\n", "output": "4\n"}, {"input": "5 1\n100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move l... | [{"input": "100 20 100 10202\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwhwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwww\n", "output": "100\n"}, {"input": "100 20 100 19121\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwhwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwww\n", "output": "100\n"}, {"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\nYou are given a weighted undirected graph. The vertices are enumerated from 1 to n. Your task is to find the ... | [{"input": "10 10\n1 5 12\n2 4 140\n2 10 149\n3 6 154\n3 7 17\n3 8 226\n3 10 132\n4 10 55\n5 8 33\n7 8 173\n", "output": "1 5 8 7 3 10\n"}, {"input": "10 10\n1 5 12\n2 4 140\n2 10 149\n3 6 154\n2 7 17\n3 8 226\n3 10 136\n4 10 55\n5 8 33\n7 8 173\n", "output": "1 5 8 7 2 10\n"}, {"input": "10 10\n1 5 12\n2 4 140\n2 10 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\nThe cake shop made a lot of roll cakes of various sizes. You have been tasked with arranging this cake in a b... | [{"input": "30 4 5 6\n8 5 5 5\n50 3 3 3 10 10\n49 3 3 3 10 10", "output": "OK\nNA\nOK\nNA\n"}, {"input": "30 3 5 6\n6 5 5 5\n50 3 3 3 13 10\n49 3 3 3 10 10", "output": "OK\nNA\nNA\nNA\n"}, {"input": "30 4 5 6\n30 5 5 5\n50 3 3 3 10 10\n49 3 3 3 4 10", "output": "OK\nOK\nOK\nOK\n"}, {"input": "53 4 5 6\n7 5 2 2\n73 3 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\n# Task\nGiven some sticks by an array `V` of positive integers, where V[i] represents the length of the stick... | [{"input": "[1, 2, 3, 10, 20, 30, 4]", "output": "[1]", "fn_name": "counting_triangles"}, {"input": "[2, 3, 7, 4]", "output": "[1]", "fn_name": "counting_triangles"}, {"input": "[5, 6, 7, 8]", "output": "[4]", "fn_name": "counting_triangles"}, {"input": "[2, 2, 2, 2]", "output": "[4]", "fn_name": "counting_triangles"},... | 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\nIlya the Lion wants to help all his friends with passing exams. They need to solve the following problem to p... | [{"input": "#..##...#.\n7\n5 9\n6 10\n1 7\n2 10\n2 5\n2 10\n3 4\n", "output": "2\n2\n3\n4\n2\n4\n0\n"}, {"input": "#..##...#.\n7\n5 9\n6 10\n1 7\n2 10\n3 5\n2 10\n3 4\n", "output": "2\n2\n3\n4\n1\n4\n0\n"}, {"input": "#..##...#/\n7\n5 9\n6 10\n1 7\n2 10\n3 5\n2 10\n3 4\n", "output": "2\n2\n3\n4\n1\n4\n0\n"}, {"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\nA set of four prime numbers arranged like (a, a + 2, a + 6, a + 8) is called a quadruplet prime number. Of th... | [{"input": "13\n14\n15\n16\n17\n18\n19\n20\n10010\n0", "output": "13\n13\n13\n13\n13\n13\n19\n19\n9439\n"}, {"input": "13\n14\n15\n16\n17\n36\n19\n20\n10000\n0", "output": "13\n13\n13\n13\n13\n19\n19\n19\n9439\n"}, {"input": "13\n14\n15\n16\n27\n36\n19\n20\n10000\n0", "output": "13\n13\n13\n13\n19\n19\n19\n19\n9439\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\nGiven a list of unique words. Find all pairs of distinct indices (i, j) in the given list so that the concate... | [{"input": "[\"abcd\", \"dcba\", \"lls\", \"s\", \"sssll\"]", "output": "[[[0, 1], [1, 0], [2, 4], [3, 2]]]", "fn_name": "palindrome_pairs"}, {"input": "[\"dog\", \"cow\", \"tap\", \"god\", \"pat\"]", "output": "[[[0, 3], [2, 4], [3, 0], [4, 2]]]", "fn_name": "palindrome_pairs"}, {"input": "[5777, \"dog\", \"god\", tru... | 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\nLet $n$ be a positive integer. Let $a, b, c$ be nonnegative integers such that $a + b + c = n$.\n\nAlice and ... | [{"input": "7\n2\n1 1 0\nRR\n2\n2 0 0\nSS\n2\n2 0 0\nRR\n3\n1 2 0\nRRR\n3\n2 1 0\nRRR\n1\n1 0 0\nP\n1\n1 0 0\nS\n", "output": "YES\nPR\nYES\nRR\nNO\nYES\nPPR\nNO\nNO\nYES\nR\n"}, {"input": "7\n2\n1 1 0\nRR\n2\n2 0 0\nSS\n2\n2 0 0\nRR\n3\n1 2 0\nRRR\n3\n2 1 0\nRRR\n1\n1 0 0\nP\n1\n1 0 0\nS\n", "output": "YES\nPR\nYES\nR... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIf I give you a date, can you tell me what day that date is? For example, december 8th, 2015 is a tuesday.\n\... | [{"input": "\"19000228\"", "output": "[\"Wednesday\"]", "fn_name": "day"}, {"input": "\"19000301\"", "output": "[\"Thursday\"]", "fn_name": "day"}, {"input": "\"20151208\"", "output": "[\"Tuesday\"]", "fn_name": "day"}, {"input": "\"20160301\"", "output": "[\"Tuesday\"]", "fn_name": "day"}, {"input": "\"20140728\"", "o... | 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\nSnuke loves \"paper cutting\": he cuts out characters from a newspaper headline and rearranges them to form a... | [{"input": "3\ncbaa\ndaacc\nacacac\n", "output": "aac\n"}, {"input": "3\ncacb\nccabe\n`cacbc", "output": "abcc\n"}, {"input": "3\ncaaa\ndaacc\nacacac", "output": "aac\n"}, {"input": "3\ncaca\ncca`d\nacacac", "output": "acc\n"}, {"input": "3\nacba\nda`cb\nacacbc", "output": "abc\n"}, {"input": "3\nbcac\ncc`be\nacacbc", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are the gym teacher in the school.\n\nThere are $n$ students in the row. And there are two rivalling stud... | [{"input": "22\n100 100 100 1\n100 100 1 100\n100 0 100 1\n100 0 1 100\n2 0 1 2\n2 100 1 2\n2 0 2 1\n2 100 2 1\n100 0 1 2\n100 98 1 2\n100 97 1 2\n100 0 2 1\n100 98 2 1\n100 97 2 1\n100 0 99 100\n100 98 99 100\n100 97 99 100\n100 0 100 99\n100 98 100 99\n100 97 100 99\n100 0 13 37\n100 0 66 11\n", "output": "99\n99\n99... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMake the 2D list by the sequential integers started by the ```head``` number.\n\nSee the example test cases f... | [{"input": "10000000000\n2\n2", "output": "[[[10000000000, 10000000001], [10000000002, 10000000003]]]", "fn_name": "make_2d_list"}, {"input": "2\n3\n4", "output": "[[[2, 3, 4, 5], [6, 7, 8, 9], [10, 11, 12, 13]]]", "fn_name": "make_2d_list"}, {"input": "5\n6\n1", "output": "[[[5], [6], [7], [8], [9], [10]]]", "fn_name"... | 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\nProfessor Abacus has just built a new computing engine for making numerical tables. It was designed to calcul... | [{"input": "2\n1.0\n4.0\n14.21446074361601\n16.0\n25.0\n1\n-30.5893962764\n6.055835197262627\n39.3853798058\n74.3727663177\n0\n42.56611822314588\n79.5420238202\n28.0282396675\n-30.3627807522\n-49.34987576252381\n-25.34819013612247\n7.58575761381\n0\n-21.42163030108298\n-47.94509062430888\n-23.354080083023813\n-2.110808... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWith your birthday coming up soon, your eccentric friend sent you a message to say \"happy birthday\":\n\n ... | [{"input": "\"happy birthday\"\n\"hhhappyyyy biirrrrrthddaaaayyyyyyy to youuuu\"", "output": "[7680]", "fn_name": "count_subsequences"}, {"input": "\"happy birthday\"\n\"hhaappyy bbiirrtthhddaayy\"", "output": "[2048]", "fn_name": "count_subsequences"}, {"input": "\"happy birthday\"\n\"appyh appy birth day\"", "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\n10^9 contestants, numbered 1 to 10^9, will compete in a competition. There will be two contests in this compe... | [{"input": "10\n457835016 1871204067\n456475528 529149798\n455108441 512701454\n455817105 523506955\n457368248 814532746\n455073228 459494089\n888688315 774276744\n457667152 974637457\n457293701 800549465\n456580262 636471526", "output": "1413369052"}, {"input": "10\n457835016 1799005777\n456475528 140431139\n455108441... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nXenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find s... | [{"input": "5\n2 2 3\n7 8\n6 3\n3 1 4\n1 1 1\n1\n1\n1000000000\n2 2 2\n0 2\n5 4\n6 7\n2 2 2\n1 2\n3 4\n6 7\n3 4 1\n3 2 1\n7 3 3 4\n12\n", "output": "14\n1999999996000000002\n24\n24\n122\n"}, {"input": "5\n2 2 3\n7 8\n6 3\n3 0 4\n1 1 1\n1\n1\n1000000000\n2 2 2\n0 2\n5 4\n6 7\n2 2 2\n1 2\n3 4\n6 7\n3 4 1\n3 2 1\n7 3 3 4\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nN people are waiting in a single line in front of the Takahashi Store. The cash on hand of the i-th person fr... | [{"input": "15\n4\n1\n4\n1\n3\n18\n4\n12\n5\n3\n6\n8\n15\n12\n9", "output": "43\n"}, {"input": "15\n4\n1\n4\n1\n3\n18\n4\n12\n5\n3\n3\n8\n15\n12\n9", "output": "42\n"}, {"input": "15\n4\n1\n4\n1\n3\n31\n4\n8\n5\n3\n6\n8\n15\n7\n9", "output": "46\n"}, {"input": "15\n3\n1\n1\n1\n5\n15\n2\n6\n5\n3\n5\n8\n9\n6\n12", "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\nYour program fails again. This time it gets \"Wrong answer on test 233\"\n\n.\n\nThis is the easier version o... | [{"input": "100 100\n82 51 81 14 37 17 78 123 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 75 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 16 3 55 37 85 46 22 159 52 98 41 21 84 63 17 62 91\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\nAmugae has a sentence consisting of $n$ words. He want to compress this sentence into one word. Amugae doesn'... | [{"input": "9\nL M5 M5D M5DAYBl0r6gmttCTR M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAc M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVgg0xe M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVhg0xe09re M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVhg0xe09re M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVhg0xe09re\n", "output": "LM5DAYBl0r6gmttCTRoKdM9EFrX2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are n incoming messages for Vasya. The i-th message is going to be received after t_{i} minutes. Each m... | [{"input": "108 576 610 844 573\n242 134 45 515 430 354 405 179 174 366 155 4 300 176 96 36 508 70 75 316 118 563 55 340 128 214 138 511 507 437 454 478 341 443 421 573 270 362 208 107 256 471 436 378 336 507 383 352 450 411 297 34 179 551 119 524 141 288 387 9 283 241 304 214 503 559 416 447 495 61 169 228 479 568 368... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a plan view consisting of 12 vertical and 12 horizontal squares showing the terrain. Each square is ... | [{"input": "111100001111\n111000001111\n110000001110\n100000001111\n000100010000\n010000111010\n000001111100\n100011111110\n010101111100\n111000111000\n111100010000\n000000100000\n\n110001111100\n110010001010\n010010000001\n010000000001\n010000000110\n010000111000\n010000000000\n010000010010\n010000000001\n010010000001... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFlatland is inhabited by pixels of three colors: red, green and blue. We know that if two pixels of different... | [{"input": "2147483630 2147483642 2147483610\n", "output": " 2147483630\n"}, {"input": "1944219055 454183506 1369298327\n", "output": " 1944219055\n"}, {"input": "772486757 1747374885 377299255\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\nMasa Kita, who entered the University of Tokyo, joined a circle called TSG (University of Tokyo Super Gamers)... | [{"input": "3\n......\n......\n......\n......\n......\n......\n......\n......\n.RGB..\nRGOP..\nRGBPB.\nRGBPP.\nGBRGYP\nGBRRYP\nBGGRBB\nBPRGYY\nGGPRRY\nBYPPRB\nYGGGPB\nGYYYPR\nYRBRBR\nYBRBRB\nBRBRBR\nBRBRBR\n......\n......\n......\n......\n......\n......\n......\n......\n.....-\n......\n..OO..\n..OO..", "output": "3\n18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nICP city has an express company whose trucks run from the crossing S to the crossing T. The president of the ... | [{"input": "3 3\n3 2\n1 2\n3 1\n1 3", "output": "2\n2\n1\n3"}, {"input": "4 1\n1 2\n2 1", "output": "1\n1\n1\n"}, {"input": "3 1\n1 2\n2 1", "output": "1\n1\n1\n"}, {"input": "4 1\n1 4\n4 1", "output": "1\n1\n1\n"}, {"input": "5 -1\n1 4\n4 11", "output": "0\n0\n"}, {"input": "11 -1\n1 4\n3 3", "output": "0\n0\n"}, {"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\nYou have to create a function that converts integer given as string into ASCII uppercase letters.\n\nAll ASCI... | [{"input": "\"84726982693273833278793270857832737832657889327984726982326765836983\"", "output": "[\"THERE IS NO FUN IN ANY OTHER CASES\"]", "fn_name": "convert"}, {"input": "\"32327332327679866932328380656769833232\"", "output": "[\" I LOVE SPACES \"]", "fn_name": "convert"}, {"input": "\"7332767375693285808069826... | 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\nA-Aun's breathing\n\nProblem Statement\n\nMaeda-san and Goto-san, who will both turn 70 years old in 2060, ar... | [{"input": "4\nA\nUn\nB\nUn", "output": "NO\n"}, {"input": "4\n@\nUn\nB\nUn", "output": "NO\n"}, {"input": "4\n@\nUn\nB\nnU", "output": "NO\n"}, {"input": "4\n@\nUn\nB\noU", "output": "NO\n"}, {"input": "4\n@\nUn\nA\noU", "output": "NO\n"}, {"input": "4\n@\nUn\nA\nUo", "output": "NO\n"}, {"input": "4\n@\nTn\nA\nUo", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCalculate the minimum number of characters you need to change in the string s, so that it contains at least k... | [{"input": "smaxpqplaqqbxuqxalqmbmmgubbpspxhawbxsuqhhegpmmpebqmqpbbeplwaepxmsahuepuhuhwxeqmmlgqubuaxehwuwasgxpqmugbmuawuhwqlswllssueglbxepbmwgs\n1\n", "output": "0\n"}, {"input": "smaxpqplaqqbxuqxalqmbmmgubbpspxhawbxsuqhhegpmmpebqmqpbbeplwaepxmsahuepuhuhwxeqmmlgqubuaxehwuwasgxpqmugbmuawuhwqlswllssueglbxepbmwgs\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\nPolycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at ... | [{"input": "70\n03:33\n23:36\n03:16\n18:18\n06:36\n06:58\n17:27\n04:07\n14:39\n15:53\n17:09\n05:16\n20:28\n09:34\n02:41\n14:18\n20:00\n04:14\n00:25\n20:18\n16:34\n10:13\n21:45\n11:08\n16:19\n20:50\n03:08\n05:06\n02:08\n02:51\n15:16\n11:02\n18:13\n18:35\n00:04\n08:50\n06:12\n20:16\n12:05\n04:01\n08:38\n03:57\n22:44\n04:... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given two integers $l$ and $r$, $l\\le r$. Find the largest possible value of $a mod b$ over all pair... | [{"input": "4\n1 1\n117772020 1000000000\n13 102\n1 1716228987\n", "output": "0\n499999999\n50\n858114493\n"}, {"input": "4\n1 1\n117772020 1010000000\n16 102\n2 1716228987\n", "output": "0\n504999999\n50\n858114493\n"}, {"input": "4\n1 1\n117772020 1000000000\n13 139\n1 1137810732\n", "output": "0\n499999999\n69\n5689... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRelative B man came to A child's house. He is 3 years old and loves singing. He is singing the song \"Kobutan... | [{"input": "5\napple\nyellow\ngeorgia\ngnik\nemail\n7\napple\nyellow\ngeorgia\nking\nemail\nwink\nlucky\n0", "output": "NG\nOK\n"}, {"input": "5\napple\nyellow\ngeorgia\ngnik\nemail\n7\napple\nzellow\ngeorgia\nking\nemail\nwink\nlucky\n0", "output": "NG\nNG\n"}, {"input": "5\napple\nyellow\ngeorgia\ngnik\nemail\n7\napp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an array a of length 2n. Consider a partition of array a into two subsequences p and q of lengt... | [{"input": "16\n433598100 998244362 998244362 393272824 998244362 998244362 998244362 998244362 998244362 79531025 1605828054 998244362 998244362 998244362 998244362 998244362 998244363 998244363 998244363 998244363 998244363 998244363 998244363 260228230 1941226836 998244363 1240344627 998244363 998244363 998244363 99... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are n cups of different sizes and three trays (bon festivals) A, B, and C, and these cups are placed on... | [{"input": "3 10\n0\n1 1\n2 2 3\n4 13\n1 1 2\n1 3\n1 4\n1 5\n2 1 2\n0\n0\n3 6\n0\n1 1\n2 2 3\n0 0", "output": "9\n-1\n0\n-1\n"}, {"input": "3 10\n0\n1 1\n2 2 3\n4 20\n2 1 2\n1 3\n1 4\n1 5\n2 1 2\n0\n0\n3 3\n0\n1 1\n2 2 3\n0 0", "output": "9\n3\n0\n-1\n"}, {"input": "3 10\n0\n1 1\n2 2 3\n4 7\n2 1 2\n1 2\n1 4\n1 5\n2 1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nToday you are going to lead a group of elven archers to defend the castle that is attacked by an army of angr... | [{"input": "100 100 1000\n814 165 709 628 263 653 940 749 331 437 129 547 575 73 480 429 396 688 489 312 425 946 444 228 547 512 477 849 53 241 643 416 141 502 449 58 686 111 171 844 113 790 79 107 399 846 945 427 361 68 295 630 260 939 679 458 485 738 202 141 166 940 5 73 108 351 245 998 640 772 604 123 389 758 491 34... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne of Arkady's friends works at a huge radio telescope. A few decades ago the telescope has sent a signal $s... | [{"input": "01\nzbrronwaofovklkopelo\n", "output": "19\n"}, {"input": "01\nzbrronwaofovklkopelo\n", "output": "19\n"}, {"input": "01\nzbrronwaofovklkopeln\n", "output": "19\n"}, {"input": "01\nzbrrnnwaofovklkopeln\n", "output": "19\n"}, {"input": "01\nzbrrnnwaofovklkopelo\n", "output": "19\n"}, {"input": "01\nzbrrnnwbo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nТри брата договорились о встрече. Пронумеруем братьев следующим образом: пусть старший брат имеет номер 1, ср... | [{"input": "3 1\n", "output": "2\n"}, {"input": "2 1\n", "output": "3\n"}, {"input": "2 3\n", "output": "1\n"}, {"input": "1 2\n", "output": "3\n"}, {"input": "1 3\n", "output": "2\n"}, {"input": "3 2\n", "output": "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\nAn expression is formed by taking the digits 1 to 9 in numerical order and then inserting into each gap betwe... | [{"input": "160", "output": "[null]", "fn_name": "operator_insertor"}, {"input": "100", "output": "[3]", "fn_name": "operator_insertor"}, {"input": "766", "output": "[4]", "fn_name": "operator_insertor"}, {"input": "389", "output": "[2]", "fn_name": "operator_insertor"}, {"input": "11", "output": "[5]", "fn_name": "ope... | 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\nThere are two small spaceship, surrounded by two groups of enemy larger spaceships. The space is a two-dimens... | [{"input": "50 60\n445 303 -861 -583 436 -125 312 -700 -829 -865 -276 -25 -725 -286 528 -221 757 720 -572 514 -514 359 294 -992 -838 103 611 776 830 143 -247 182 -241 -627 299 -824 635 -571 -660 924 511 -876 160 569 -570 827 75 558 708 46\n899 974 750 -138 -439 -904 -113 -761 -150 -92 -279 489 323 -649 -759 667 -600 -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\nAsk a small girl - \"How old are you?\". She always says strange things... Lets help her!\n\n\nFor correct an... | [{"input": "\"2 years old\"", "output": "[2]", "fn_name": "get_age"}, {"input": "\"3 years old\"", "output": "[3]", "fn_name": "get_age"}, {"input": "\"4 years old\"", "output": "[4]", "fn_name": "get_age"}, {"input": "\"5 years old\"", "output": "[5]", "fn_name": "get_age"}, {"input": "\"6 years old\"", "output": "[6]... | 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\nAmr loves Chemistry, and specially doing experiments. He is preparing for a new interesting experiment.\n\nAm... | [{"input": "20\n1 2 3 4 6 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 100000\n", "output": "113\n"}, {"input": "20\n1 2 3 4 6 8 16 32 64 128 256 512 1024 2048 3647 8192 16384 32768 65536 100000\n", "output": "124\n"}, {"input": "20\n1 2 3 4 6 8 16 32 8 128 256 512 1024 2048 3647 13320 16384 32768 65536... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nProblem B Parallel Lines\n\nGiven an even number of distinct planar points, consider coupling all of the poin... | [{"input": "4\n-1 -1\n1 1\n-1 4\n0 5", "output": "1\n"}, {"input": "4\n-2 -1\n1 1\n-1 4\n0 5", "output": "0\n"}, {"input": "4\n-1 0\n1 1\n-1 2\n2 2", "output": "0\n"}, {"input": "4\n0 -1\n1 1\n-1 2\n2 3", "output": "0\n"}, {"input": "4\n-1 0\n1 1\n-1 2\n1 2", "output": "1\n"}, {"input": "4\n0 -1\n1 1\n-1 2\n2 5", "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\nWe have N integers. The i-th number is A_i.\n\\{A_i\\} is said to be pairwise coprime when GCD(A_i,A_j)=1 hol... | [{"input": "3\n6 10 15\n", "output": "setwise coprime\n"}, {"input": "3\n17 10 15", "output": "setwise coprime\n"}, {"input": "3\n26 10 15", "output": "setwise coprime\n"}, {"input": "3\n7 10 31", "output": "pairwise coprime\n"}, {"input": "3\n3 4 5\n", "output": "pairwise coprime\n"}, {"input": "3\n7 19 4", "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\nLet's define the sum of two permutations p and q of numbers 0, 1, ..., (n - 1) as permutation [Image], where ... | [{"input": "84\n83 4 68 34 24 2 48 38 22 51 5 62 31 67 66 53 49 70 9 71 46 41 30 8 50 17 28 79 15 80 32 43 14 74 29 42 81 60 56 65 23 0 77 76 58 78 1 11 37 27 75 35 18 73 54 20 57 33 36 6 61 69 64 55 39 10 3 45 13 26 59 82 21 25 63 52 16 44 47 72 19 12 7 40\n63 41 80 52 36 45 17 69 22 66 37 21 46 44 64 9 48 74 58 81 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\nPolycarp loves geometric progressions very much. Since he was only three years old, he loves only the progres... | [{"input": "18 10\n10000000 100000000 1000000000 -10000000 -100000000 -1000000000 -10000000 -100000000 -1000000000 -10000000 -100000000 -1000000000 10000000 100000000 1000000000 10000000 100000000 1000000000\n", "output": "20\n"}, {"input": "18 10\n10000000 100000000 1000000000 -10000000 -100000000 -1000000000 -1000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are three sticks with integer lengths $l_1, l_2$ and $l_3$.\n\nYou are asked to break exactly one of th... | [{"input": "68\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\n1 1 2\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\nRick wants a faster way to get the product of the largest pair in an array. Your task is to create a performa... | [{"input": "[39, 135, 47, 275, 37, 108, 265, 457, 2, 133, 316, 330, 153, 253, 321, 411]", "output": "[187827]", "fn_name": "max_product"}, {"input": "[354, 463, 165, 62, 472, 53, 347, 293, 252, 378, 420, 398, 255, 89]", "output": "[218536]", "fn_name": "max_product"}, {"input": "[114, 424, 53, 272, 128, 215, 25, 329, 2... | 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\nThere are some candies that need to be distributed to some children as fairly as possible (i.e. the variance ... | [{"input": "-5\n-5", "output": "[[]]", "fn_name": "distribute"}, {"input": "10\n-5", "output": "[[]]", "fn_name": "distribute"}, {"input": "15\n-5", "output": "[[]]", "fn_name": "distribute"}, {"input": "-5\n0", "output": "[[]]", "fn_name": "distribute"}, {"input": "10\n0", "output": "[[]]", "fn_name": "distribute"}, {... | 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\nOn the great island of Baltia, there live N people, numbered from 1 to N. There are exactly M pairs of people... | [{"input": "20 57\n13 14\n12 20\n18 3\n17 20\n15 9\n18 13\n12 19\n2 4\n9 2\n12 11\n14 1\n16 11\n11 14\n16 4\n16 15\n11 19\n15 4\n10 15\n12 5\n9 3\n10 2\n10 4\n20 19\n14 7\n19 2\n5 8\n6 14\n4 17\n2 17\n17 9\n13 9\n19 9\n18 8\n12 16\n18 5\n7 1\n8 3\n11 20\n6 13\n20 5\n13 8\n17 19\n7 6\n9 11\n18 9\n13 1\n12 14\n7 3\n10 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\nYou might have heard about the next game in Lara Croft series coming out this year. You also might have watch... | [{"input": "636553724 546535019 115079316355948443\n", "output": "425992073 546535018\n"}, {"input": "548492800 434105920 179638683192075937\n", "output": "134679777 434105920\n"}, {"input": "595261150 794915864 332353903994901365\n", "output": "177161677 794915848\n"}, {"input": "636553724 546535019 115079316355948443... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTyndex is again well ahead of the rivals! The reaction to the release of Zoozle Chrome browser was the releas... | [{"input": "20 10\niwbiucrjoj\nqvjewvdrgwgc\newwqyhtdzakryafqaacimthycyasyb\ncuoscayekvbsqokyfdmjnojkjennf\nhkuv\njtdgbespjdtbc\ngeulitsrlqihoujvwuobnfospq\nzphnlqxacchxhyeehnpfwdjnwvj\nxicsaoyfgtdbwqfrdgaiyn\natgshewfkuxaipizcdev\nvp\nyblkfmqsj\nyevxolvycyrrooosberqzrabefdckg\nrytykrlgttc\nafphunqbtydppxotf\nnkfoatpik... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nReturn a new array consisting of elements which are multiple of their own index in input array (length > 1).\... | [{"input": "[-56, -85, 72, -26, -14, 76, -27, 72, 35, -21, -67, 87, 0, 21, 59, 27, -92, 68]", "output": "[[-85, 72, 0, 68]]", "fn_name": "multiple_of_index"}, {"input": "[28, 38, -44, -99, -13, -54, 77, -51]", "output": "[[38, -44, -99]]", "fn_name": "multiple_of_index"}, {"input": "[-1, -49, -1, 67, 8, -60, 39, 35]", ... | 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\nLet's play a game using a robot on a rectangular board covered with a square mesh (Figure D-1). The robot is ... | [{"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"}, {"input": "8 3\n0 0 0 0 -1 0 0 1\n2 3 0 1 4 0 0 1\n3 3 0 0 0 -1 0 8\n9 9 1 9\n4 4\n3 3 4 0\n1 1 4 4\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya was late for the lesson too. The teacher gave him an additional task. For some array a Petya should fin... | [{"input": "20\n20 34 51 40 70 64 14 30 24 20 6 1 70 28 38 43 9 60 31 69\n", "output": "2047\n"}, {"input": "20\n20 34 51 40 70 64 14 30 24 20 6 1 70 28 38 43 9 60 31 69\n", "output": "2047\n"}, {"input": "18\n22 41 40 8 36 48 23 5 58 12 26 44 53 49 3 56 58 57\n", "output": "127\n"}, {"input": "18\n22 41 40 8 36 48 23 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet's call a number k-good if it contains all digits not exceeding k (0, ..., k). You've got a number k and a... | [{"input": "10 6\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n", "output": "10\n"}, {"input": "10 6\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n", "output": "10\n"}, {"input": "10 6\n2416023\n1234560\n1234560\n1234560\n1234560\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nZhinü was a child of the Emperor, but he was weaving the machine even if he opened it at the request of his f... | [{"input": "5\n0 4 0 2 9 3 4 8 2 -1\n3 8 -1 0 0 3 1 2 17 54\n1 2 1 2 41 2 17 21 11 0\n-2 2 14 24 0 21 1 14 20 4\n7 6 30 0 10 1 22 -2 8 -1", "output": "NG\nNG\nNG\nOK\nNG\n"}, {"input": "5\n0 4 -1 2 7 3 4 8 2 -1\n3 5 -1 0 0 3 0 6 8 62\n1 4 1 0 76 4 17 2 11 0\n-2 2 14 24 -1 27 0 14 28 3\n7 -1 30 0 0 1 37 -2 0 -1", "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\nGiven an array of arguments, representing system call arguments keys and values, join it into a single, space... | [{"input": "[[\"foo\"], \"bar\", [\"baz\", \"qux\"], [\"xyzzy\", \"a\"], \"a\", [\"a\"], [\"a\", \"plugh\"]]", "output": "[\"foo bar --baz qux --xyzzy a a a -a plugh\"]", "fn_name": "args_to_string"}, {"input": "[[\"---\"], \"---\", [\"---\", \"---\"], [\"-----\", \"-\"], \"-\", [\"-\"], [\"-\", \"-----\"]]", "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\nOnce N boys and M girls attended a party. You are given a matrix A of N rows and M columns where Aij is 1 if ... | [{"input": "2\n4 3\n101\n111\n111\n011\n2 -1\n10\n01", "output": "12\n0\n"}, {"input": "2\n4 3\n101\n101\n111\n011\n2 0\n10\n01", "output": "10\n0\n"}, {"input": "2\n4 3\n101\n101\n110\n000\n-1 1\n10\n01", "output": "4\n0\n"}, {"input": "2\n4 3\n100\n101\n110\n000\n-1 1\n10\n01", "output": "3\n0\n"}, {"input": "2\n4 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\nAtaru Oafoot of Aizu Gakuen University High School decided to play with a slot machine.\n\nWhen you insert a ... | [{"input": "3 2 30 3 41 226\n9 0 18 4 20 118\n5 5 12 0 15 203\n13 4 19 2 22 197\n7 4 24 4 17 209\n0 0 0 0 0 0", "output": "172\n795\n410\n1199\n617\n"}, {"input": "3 2 30 3 41 226\n9 0 36 4 20 118\n5 5 12 0 18 203\n13 4 19 2 22 197\n1 4 42 4 17 209\n0 0 0 0 0 0", "output": "172\n921\n419\n1199\n173\n"}, {"input": "3 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\nGiven two non-negative decimal integers $a$ and $b$, calculate their AND (logical conjunction), OR (logical d... | [{"input": "-136 -1", "output": "11111111111111111111111101111000\n11111111111111111111111111111111\n00000000000000000000000010000111\n"}, {"input": "-104 -3", "output": "11111111111111111111111110011000\n11111111111111111111111111111101\n00000000000000000000000001100101\n"}, {"input": "-104 -5", "output": "11111111111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCreate a function that takes a string as a parameter and does the following, in this order:\n\n1. replaces ev... | [{"input": "\"Hello World\"", "output": "[\"Ifmmp xpsmE\"]", "fn_name": "changer"}, {"input": "\"sponge1\"", "output": "[\"tqpOhf1\"]", "fn_name": "changer"}, {"input": "\"Cat30\"", "output": "[\"dbU30\"]", "fn_name": "changer"}, {"input": "\"Alice\"", "output": "[\"bmjdf\"]", "fn_name": "changer"}, {"input": "\"dogs\"... | 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\nSanta Claus has n candies, he dreams to give them as gifts to children.\n\nWhat is the maximal number of chil... | [{"input": "1000\n", "output": "44\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 54 \n"}, {"input": "990\n", "output": "44\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 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are going to the beach with the idea to build the greatest sand castle ever in your head! The beach is no... | [{"input": "1000000000000000000 1000000000000000000\n", "output": "1414213562\n"}, {"input": "1000000000000000000 1000000000000000000\n", "output": "1414213562\n"}, {"input": "999999997351043581 1000000000000000000\n", "output": "1414213561\n"}, {"input": "999999997351043581 1000000000000000000\n", "output": "141421356... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAfter battling Shikamaru, Tayuya decided that her flute is too predictable, and replaced it with a guitar. Th... | [{"input": "58260522 32004256 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 488012525 1035611341 800305059 992325267 138720156\n", "output": "837678839\n"}, {"input": "58260522 32004256 2436426 24979445 12477970 11891566\n10\n582107247 906728404 411434947 673536177 411497300 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLittle Petya likes permutations a lot. Recently his mom has presented him permutation q_1, q_2, ..., q_{n} of... | [{"input": "55 28\n25 13 15 37 5 7 42 9 50 8 14 21 3 30 29 38 1 51 52 20 16 27 6 41 48 4 49 32 2 44 55 10 33 34 54 23 40 26 12 31 39 28 43 46 53 19 22 35 36 47 24 17 11 45 18\n17 29 13 26 5 23 6 10 8 32 53 39 2 11 3 21 52 55 46 20 12 47 36 51 1 38 22 42 15 14 40 28 33 34 48 49 4 16 41 37 24 7 43 30 54 44 50 25 27 9 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\nYou are given an array $a_1, a_2, \\dots , a_n$ and two integers $m$ and $k$.\n\nYou can choose some subarray... | [{"input": "44 2 531595322\n926215961 -385821837 -278841122 -422772006 -509196878 -81824369 -101501043 -33095577 -520514931 402836017 48602657 881104200 -110528684 52550046 -208588735 -814534121 -548420443 410430115 -636402169 -848516069 -70639158 775203498 -679440929 -427359667 33598904 656872639 -225600926 57010433 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou've got an n × m matrix. The matrix consists of integers. In one move, you can apply a single transformati... | [{"input": "10 10\n20 53 6 97 74 12 92 48 13 97\n157 47 32 75 21 69 75 95 54 1\n97 36 1 41 87 1 23 39 44 27\n97 73 1 1 26 6 3 48 69 5\n70 93 42 35 5 12 22 33 29 13\n96 8 13 69 40 91 5 19 16 33\n61 92 54 82 60 24 63 64 59 65\n76 44 60 37 29 16 50 74 59 59\n77 58 95 30 52 25 34 2 49 92\n37 65 12 77 68 33 30 39 16 85\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\nVasya is developing his own programming language VPL (Vasya Programming Language). Right now he is busy makin... | [{"input": "21\n try \n try \n try \n try \n try \n try \n try \n try \n try \n try \n throw( qtSMze) \ncatch(LY,\"x3 j\")\ncatch(hgSAFgbMGx,\"moByu\")\ncatch(LmydVQgv,\"hbZl\")\ncatch(oK,\"B6OZx qy\")\ncatch(rrtnRQB,\"7VFkQMv\")\ncatch(CASqQXaz,\"d9oci1Kx\")\ncatch(CTCzsdD,\"u\")\ncatch(xqqMxbE... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya has started watching football games. He has learned that for some fouls the players receive yellow card... | [{"input": "KASFLS\nASJBGGDLJFDDFHHTHJH\n42\n2 a 68 y\n4 h 64 r\n5 a 24 y\n6 h 20 r\n2 a 16 r\n9 a 96 y\n10 h 36 r\n12 a 44 y\n13 h 69 r\n16 a 62 r\n18 a 99 r\n20 h 12 r\n21 a 68 y\n25 h 40 y\n26 h 54 r\n28 h 91 r\n29 a 36 r\n33 a 91 y\n36 h 93 r\n37 h 60 r\n38 a 82 r\n41 a 85 y\n42 a 62 r\n46 a 22 r\n48 a 88 r\n49 a 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\nPetya and Vasya are brothers. Today is a special day for them as their parents left them home alone and commi... | [{"input": "150 10 140\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 2 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\n# Task\n\nGiven an array of roots of a polynomial equation, you should reconstruct this equation.\n\n___\n\n#... | [{"input": "[1, 2, 3, 4, 5]", "output": "[\"x^5 - 15x^4 + 85x^3 - 225x^2 + 274x - 120 = 0\"]", "fn_name": "polynomialize"}, {"input": "[0, -2, -3]", "output": "[\"x^3 + 5x^2 + 6x = 0\"]", "fn_name": "polynomialize"}, {"input": "[0, 2, 3]", "output": "[\"x^3 - 5x^2 + 6x = 0\"]", "fn_name": "polynomialize"}, {"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\nThe Rebel fleet is on the run. It consists of m ships currently gathered around a single planet. Just a few s... | [{"input": "30\n(89+76)/87\n(81+78)/18\n(60+97)/32\n(41+14)/48\n(55+65)/27\n(29+15)/95\n(64+13)/96\n(78+30)/75\n(43+6)/60\n(69+34)/48\n(62+2)/97\n(85+42)/3\n(4+97)/42\n(1+18)/39\n(46+55)/76\n(22+59)/24\n(62+81)/98\n(64+8)/51\n(9+59)/48\n(47+2)/80\n(33+74)/76\n(61+83)/44\n(86+4)/51\n(65+41)/49\n(53+36)/45\n(6+19)/15\n(5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTaro is an elementary school student who has just learned multiplication. Somehow, he likes multiplication, s... | [{"input": "2\n999999\n1000100", "output": "12\n2\n"}, {"input": "2\n999999\n1010100", "output": "12\n3\n"}, {"input": "2\n999999\n1010110", "output": "12\n5\n"}, {"input": "2\n999999\n1101100", "output": "12\n4\n"}, {"input": "2\n114494\n1101001", "output": "11\n5\n"}, {"input": "2\n114494\n1111001", "output": "11\n7\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a string S consisting of lowercase English letters. Another string T is initially empty. Determ... | [{"input": "resaremaerd", "output": "NO\n"}, {"input": "ersaremaerd", "output": "NO\n"}, {"input": "ersaremadrd", "output": "NO\n"}, {"input": "ersarfmadrd", "output": "NO\n"}, {"input": "errarfmadrd", "output": "NO\n"}, {"input": "errarfmadrc", "output": "NO\n"}, {"input": "arrerfmadrc", "output": "NO\n"}, {"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\nOne day Vasya was on a physics practical, performing the task on measuring the capacitance. He followed the t... | [{"input": "100\n4204 4719 4688 3104 4012 4927 4696 4614 4826 4792 3891 4672 4914 4740 4968 3879 4424 4755 3856 3837 4965 4939 4030 4941 4504 4668 4908 4608 3660 4822 4846 3945 4539 4819 4895 3746 4324 4233 4135 4956 4983 4546 4673 4617 3533 4851 4868 4838 4998 4769 4899 4578 3841 4974 4627 4990 4524 4939 4469 4233 443... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.