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\nAlice and Bob got very bored dur... | [{"type": "stdin_stdout", "input": "30 1\n2 2 2 2 2 3 3 3 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2 1 1 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "19 3\n1 2 3 1 2 3 1 2 3 5 5 5 5 5 5 5 5 2 3\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "15 1\n2 5 5 1 2 1 5 2 1 5 2 1 5 1 5\n", "output": "5\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA one-dimensional Japanese cross... | [{"type": "stdin_stdout", "input": "10 1\n5 78 3 87 4 9 5 8 9 1235\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "4 1660\n1505 13 37 100\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1 10000\n10000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "5 10\n1 2 2 4 5\n", "output": "NO\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have unlimited number of coi... | [{"type": "stdin_stdout", "input": "1 1000000000\n", "output": "1000000000"}, {"type": "stdin_stdout", "input": "100000 1000000000\n", "output": "10000"}, {"type": "stdin_stdout", "input": "2 1000000000\n", "output": "500000000"}, {"type": "stdin_stdout", "input": "31859 629091638\n", "output": "19747"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA string is called palindrome if... | [{"type": "stdin_stdout", "input": "wrwrwfrrfrffrrwwwffffwrfrrwfrrfrwwfwfrwfwfwffwrrwfrrrwwwfrrrwfrrfwrwwrwrrrffffwrrrwrwfffwrffrwwwrwww\n", "output": "fffffffffffffffrrrrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrrrrrrrrrrrrrrrrrrfffffffffffffff\n"}, {"type": "stdin_stdout", "input": "zzzzazazazazazznnznznnznnzn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and B are preparing themselves... | [{"type": "stdin_stdout", "input": "...QK...\n........\n........\n........\n........\n........\n........\n...rk...\n", "output": "White\n"}, {"type": "stdin_stdout", "input": "rppppppr\n...k....\n........\n........\n........\n........\nK...Q...\n........\n", "output": "Black\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\nJumbo Takahashi will play golf o... | [{"type": "stdin_stdout", "input": "4\n9 9\n", "output": "5\n1 3\n4 2\n4 6\n6 8\n9 9\n"}, {"type": "stdin_stdout", "input": "137273866\n-75883 -100000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "896454475\n-75982 -100000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "162957408\n69008 -80583\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\nBad news came to Mike's village,... | [{"type": "stdin_stdout", "input": "1000000000000000\n", "output": "4949100894494448\n"}, {"type": "stdin_stdout", "input": "999999999999997\n", "output": "4949100894494440\n"}, {"type": "stdin_stdout", "input": "999999999999996\n", "output": "4949100894494432\n"}, {"type": "stdin_stdout", "input": "999999999999995\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two circles. Find ... | [{"type": "stdin_stdout", "input": "368831644 125127030 959524552\n690900461 -368007601 1000000000\n", "output": "1877639096067727828.75000000000000000000\n"}, {"type": "stdin_stdout", "input": "-11786939 388749051 844435993\n-11696460 388789113 844535886\n", "output": "2240182216213578196.25000000000000000000\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\nChouti was doing a competitive p... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "158260522\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "641009859\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "802593587\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "524125987\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\nBandits appeared in the city! On... | [{"type": "stdin_stdout", "input": "100\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\n0 0 63 70 92 75 4 96 52 33 86 57 53 85 91 62 23 0 28 37 41 69 26 64 7 100 41 19 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnalyzing the mistakes people ma... | [{"type": "stdin_stdout", "input": "250\niiffiehchidfgigdbcciahdehjjfacbbaaadagaibjjcehjcbjdhaadebaejiicgidbhajfbfejcdicgfbcchgbahfccbefdcddbjjhejigiafhdjbiiehadfficicbebeeegcebideijidbgdecffeaegjfjbbcfiabfbaiddbjgidebdiccfcgfbcbbfhaejaibeicghecchjbiaceaibfgibhgcfgifiedcbhhfadhccfdhejeggcah\njbadcfjffcfabbecfabgcafgfcg... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlthough Inzane successfully fou... | [{"type": "stdin_stdout", "input": "10\n-1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000\n10 3\n7 4\n2 6\n9 2\n5 10\n1 8\n7 8\n7 2\n10 6\n", "output": "-999999998"}, {"type": "stdin_stdout", "input": "10\n-2 -1000000000 -2 -1000000000 -2 -5 -3 -1 -2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe three friends, Kuro, Shiro, ... | [{"type": "stdin_stdout", "input": "1000 843\n", "output": "157\n"}, {"type": "stdin_stdout", "input": "1000 488\n", "output": "488\n"}, {"type": "stdin_stdout", "input": "543 110\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "924 576\n", "output": "348\n"}, {"type": "stdin_stdout", "input": "1000 972\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\nHongcow likes solving puzzles.\n... | [{"type": "stdin_stdout", "input": "1 500\n.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 points marked on... | [{"type": "stdin_stdout", "input": "1000000000 -1000000000\n1000000000 1000000000\n-1000000000 -1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "-422276230 -422225325\n-422276230 -544602611\n-282078856 -544602611\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "-636111887 -755135651\n-4114777... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn undirected graph is called k-... | [{"type": "stdin_stdout", "input": "7\n", "output": "YES\n18 63\n1 10\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n2 8\n2 9\n2 4\n2 5\n2 6\n2 7\n3 8\n3 9\n3 4\n3 5\n3 6\n3 7\n4 8\n4 9\n4 6\n4 7\n5 8\n5 9\n5 6\n5 7\n6 8\n6 9\n7 8\n7 9\n8 9\n10 11\n10 12\n10 13\n10 14\n10 15\n10 16\n11 17\n11 18\n11 13\n11 14\n11 15\n11 16\n12 17\n12 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings $s$ an... | [{"type": "stdin_stdout", "input": "11 3 66\nssszzzzsssz\nsss\n1 1\n1 2\n2 2\n1 3\n2 3\n3 3\n1 4\n2 4\n3 4\n4 4\n1 5\n2 5\n3 5\n4 5\n5 5\n1 6\n2 6\n3 6\n4 6\n5 6\n6 6\n1 7\n2 7\n3 7\n4 7\n5 7\n6 7\n7 7\n1 8\n2 8\n3 8\n4 8\n5 8\n6 8\n7 8\n8 8\n1 9\n2 9\n3 9\n4 9\n5 9\n6 9\n7 9\n8 9\n9 9\n1 10\n2 10\n3 10\n4 10\n5 10\n6 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nQuite recently a creative studen... | [{"type": "stdin_stdout", "input": "100 100 1\n", "output": "988185646\n"}, {"type": "stdin_stdout", "input": "100 50 50\n", "output": "661237556\n"}, {"type": "stdin_stdout", "input": "100 13 11\n", "output": "883875774\n"}, {"type": "stdin_stdout", "input": "90 100 30\n", "output": "697322870\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently Adaltik discovered japa... | [{"type": "stdin_stdout", "input": "100\nWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWB\n", "output": "50\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 "}, {"type": "stdin_stdout", "input": "100\nBWWWBWBWBBBBBWB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently Polycarp started to dev... | [{"type": "stdin_stdout", "input": "86 11 62\n(((())())(((()())())()()())(()())(()()())()())((()()())())(((())()())((())(()())())())\nDLDLRLRLRRR\n", "output": "(((())())(((()())())()()())(()())(()()())()())((()()())())((()())((())(()())())())\n"}, {"type": "stdin_stdout", "input": "100 57 80\n(((())(()))(()())())(((((... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA TV show called \"Guess a numbe... | [{"type": "stdin_stdout", "input": "8\n< -1000000000 Y\n< -1000000000 Y\n< -1000000000 Y\n< -1000000000 Y\n< -1000000000 Y\n< -1000000000 Y\n< -1000000000 Y\n< -1000000000 Y\n", "output": "-1998638045\n"}, {"type": "stdin_stdout", "input": "10\n>= 18 Y\n<= -32 N\n>= 85 N\n<= 98 Y\n<= -43 N\n<= -79 N\n>= 97 N\n< -38 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\nYou are given $a$ uppercase Lati... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "1999936805\n"}, {"type": "stdin_stdout", "input": "1000000000 956817411\n", "output": "1956733985\n"}, {"type": "stdin_stdout", "input": "1000000000 839933539\n", "output": "1839852485\n"}, {"type": "stdin_stdout", "input": "956817411 1000000000\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the army, it isn't easy to fo... | [{"type": "stdin_stdout", "input": "50 2\nYES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES\n", "output": "Ab Ac Ad Ae Af Ag Ah Ai Aj Ak Al Am An Ao Ap Aq Ar As At Au Av Aw A... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo little greedy bears have fou... | [{"type": "stdin_stdout", "input": "100000007 800000011\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "900000011 800000011\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "900000011 999900017\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "536870912 387420489\n", "output": "47\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 group of $n$ dancers rehearses... | [{"type": "stdin_stdout", "input": "20 53 67\n1 2 1 2 0 0 0 2 2 2 1 0 0 2 0 0 0 1 1 2\n", "output": "413\n"}, {"type": "stdin_stdout", "input": "20 53 32\n0 0 1 1 1 2 2 2 2 2 2 1 1 1 2 0 2 2 0 0\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "19 75 14\n2 2 2 2 0 2 1 0 0 0 0 1 1 1 2 0 2 0 1\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\nSolve the following coding problem using the programming language python:\n\nYou are given a cube of size k ×... | [{"type": "stdin_stdout", "input": "6\n", "output": "bbbbbb\nbwwwwb\nbwbbwb\nbwbbwb\nbwwwwb\nbbbbbb\n\nwwwwww\nwbbbbw\nwbwwbw\nwbwwbw\nwbbbbw\nwwwwww\n\nbbbbbb\nbwwwwb\nbwbbwb\nbwbbwb\nbwwwwb\nbbbbbb\n\nwwwwww\nwbbbbw\nwbwwbw\nwbwwbw\nwbbbbw\nwwwwww\n\nbbbbbb\nbwwwwb\nbwbbwb\nbwbbwb\nbwwwwb\nbbbbbb\n\nwwwwww\nwbbbbw\nw... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuff is in love with lovely numb... | [{"type": "stdin_stdout", "input": "817634153013\n", "output": "817634153013\n"}, {"type": "stdin_stdout", "input": "734337660466\n", "output": "734337660466\n"}, {"type": "stdin_stdout", "input": "808453785117\n", "output": "808453785117\n"}, {"type": "stdin_stdout", "input": "294809951965\n", "output": "294809951965\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBajtek, known for his unusual gi... | [{"type": "stdin_stdout", "input": "100\n57 81 176 211 251 311 346 404 469 506 563 587 682 717 757 817 852 910 975 1012 1069 1093 1188 1223 1263 1323 1358 1416 1481 1518 1575 1599 1694 1729 1769 1829 1864 1922 1987 2024 2081 2105 2200 2235 2275 2335 2370 2428 2493 2530 2587 2611 2706 2741 2781 2841 2876 2934 2999 3036 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integer is called a 2... | [{"type": "stdin_stdout", "input": "1088391168 1934917632\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "1088391167 1934917632\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "1088391169 1934917632\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "1088391168 1934917631\n", "output": "16\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEach evening after the dinner th... | [{"type": "stdin_stdout", "input": "1000000000 315152540\n", "output": "999948715"}, {"type": "stdin_stdout", "input": "1000000000 846040702\n", "output": "999939239"}, {"type": "stdin_stdout", "input": "999999994 108004280\n", "output": "999952921"}, {"type": "stdin_stdout", "input": "999999999 497659085\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\nImp likes his plush toy a lot.\n... | [{"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "779351061 773124120\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "453462237 167520068\n", "output": "Yes\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves computer games. Fina... | [{"type": "stdin_stdout", "input": "100 10000\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 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nНа тренировку по подготовке к со... | [{"type": "stdin_stdout", "input": "100 1019 35\n34 50 60 47 49 49 59 60 37 51 3 86 93 33 78 31 75 87 26 74 32 30 52 57 44 10 33 52 78 16 36 77 53 49 98 82 93 85 16 86 19 57 17 24 73 93 37 46 27 87 35 76 33 91 96 55 34 65 97 66 7 30 45 68 18 51 77 43 99 76 35 47 6 1 83 49 67 85 89 17 20 7 49 33 43 59 53 71 86 71 3 47 6... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan has number $b$. He is sorti... | [{"type": "stdin_stdout", "input": "10000000000\n", "output": "121"}, {"type": "stdin_stdout", "input": "9133684560\n", "output": "1920"}, {"type": "stdin_stdout", "input": "6983776800\n", "output": "2304"}, {"type": "stdin_stdout", "input": "5587021440\n", "output": "2048"}, {"type": "stdin_stdout", "input": "46558512... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a new version of the famous P... | [{"type": "stdin_stdout", "input": "100\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", "output": "100\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\nIn the evening, after the contes... | [{"type": "stdin_stdout", "input": "100\n4116 4116 4117 4117 4117 4117 4118 4119 4119 4119 4119 4120 4120 4120 4120 4121 4122 4123 4123 4123 4123 4124 4124 4124 4124 4125 4126 4126 4126 4126 4127 4127 4127 4127 4128 4128 4128 4128 4129 4129 4130 4130 4131 4132 4133 4133 4134 4134 4135 4135 4136 4137 4137 4137 4138 4139... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has n positive integers a_... | [{"type": "stdin_stdout", "input": "50\ng\nha\nhd\ndi\nac\nfdhhb\ng\nhgeag\nafafb\nb\nb\najjj\ncaiadi\nhciifa\nhb\ncaih\ncdbbi\ngjff\nbfe\neddci\ndijfie\nacjj\nef\ng\njdc\nahg\ne\nhbbh\ncdc\njifdc\ne\nffaehj\nhjhi\ng\neag\nfbbc\nchg\njhahfg\nbb\njd\njchh\nbefifj\nejac\ne\nh\njfhb\nedhe\nf\nag\nca\n", "output": "2673136... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere was an epidemic in Monstro... | [{"type": "stdin_stdout", "input": "22\n3 2 3 3 3 1 1 2 1 2 1 1 1 2 2 3 1 2 3 3 3 3\n5\n5 16 5 5 15\n", "output": "YES\n1 R\n4 R\n4 R\n4 R\n4 R\n4 R\n4 L\n3 L\n6 L\n5 L\n4 L\n5 L\n7 L\n6 L\n5 R\n5 R\n5 R\n"}, {"type": "stdin_stdout", "input": "10\n30518 196518 274071 359971 550121 204862 843967 173607 619138 690754\n3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Rebel fleet is afraid that t... | [{"type": "stdin_stdout", "input": "10 10\n8530 -3814\n-9330 -6035\n3951 -217\n-9276 8291\n636 -3118\n5024 -2403\n4601 7977\n-3620 -1428\n4954 -9632\n-9852 6553\n-3457 5430\n-8866 -7343\n1020 -5748\n5043 -3820\n-2832 1528\n-5058 -825\n2406 -3530\n9152 -7463\n-8547 7108\n2492 8953\n", "output": "Yes\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nПоликарп мечтает стать программи... | [{"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 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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has found a strange device... | [{"type": "stdin_stdout", "input": "9999 10000\n", "output": "5000\n"}, {"type": "stdin_stdout", "input": "9999 10000\n", "output": "5000\n"}, {"type": "stdin_stdout", "input": "9998 10000\n", "output": "4999\n"}, {"type": "stdin_stdout", "input": "9102 9103\n", "output": "4552\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nAs the name of the task implies,... | [{"type": "stdin_stdout", "input": "20\n20 22\n9 11\n32 36\n8 12\n14 16\n4 6\n28 30\n29 37\n15 18\n33 35\n27 31\n21 25\n2 7\n19 23\n10 39\n34 40\n5 13\n24 38\n17 26\n1 3\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "20\n11 13\n21 38\n29 33\n10 18\n4 9\n2 6\n26 28\n15 39\n12 17\n8 19\n27 36\n20 22\n14 16\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe get more and more news about ... | [{"type": "stdin_stdout", "input": "100\n70 111 5 73 69 22 79 62 101 99 249 88 75 31 27 49 7 36 37 62 61 77 75 38 203 61 81 43 98 224 114 48 98 8 67 46 80 83 81 64 15 72 95 39 79 93 79 140 27 65 67 44 294 170 89 97 73 48 18 53 31 49 47 13 88 70 5 46 256 81 26 9 89 38 43 28 219 30 10 71 96 95 241 96 98 96 82 29 219 85 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWell, the series which Stepan wa... | [{"type": "stdin_stdout", "input": "100 100\n????????????????????????????????????????????????????????????????????????????????????????????????????\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 34\n?NNNN??N???NNNN?NNN?N???N?N????NNNNNNN?N??N???NNNN???N?N?NN?NNNNN?NNN???N??NN??Y??NNN??N?NNN???NN?NN\n", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have an integer sequence A of... | [{"type": "stdin_stdout", "input": "199903 -42042635 15996643\n", "output": "1331394274247808\n"}, {"type": "stdin_stdout", "input": "199937 46898475 97994148\n", "output": "1332073730358274\n"}, {"type": "stdin_stdout", "input": "199903 2748118 -84690464\n", "output": "1331394274247808\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\nCodeforces user' handle color de... | [{"type": "stdin_stdout", "input": "9\nmwAz9lQ 1786 -1631\nnYgYFXZQfY -1849 -1775\nKU4jF -1773 -3376\nopR 3752 2931\nGl -1481 -1002\nR -1111 3778\n0i9B21DC 3650 289\nQ8L2dS0 358 -3305\ng -2662 3968\n", "output": "NO"}, {"type": "stdin_stdout", "input": "5\nzMSBcOUf -2883 -2238\nYN -3314 -1480\nfHpuccQn06 -1433 -589\naM... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 city of Saint Petersburg,... | [{"type": "stdin_stdout", "input": "1000010011100010111000001101000011001010011101011001101100000001011011000000101101101011101111011011\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\n", "output": "50\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's assume that we are given a... | [{"type": "stdin_stdout", "input": "8 20\n0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1\n0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0\n0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 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\nA restaurant received n orders f... | [{"type": "stdin_stdout", "input": "20\n22 77\n13 50\n55 64\n16 52\n67 96\n49 51\n59 95\n2 25\n69 91\n2 24\n4 46\n50 74\n45 63\n39 55\n31 33\n9 33\n6 72\n14 67\n56 98\n69 94\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "19\n24 63\n23 86\n5 89\n10 83\n31 92\n8 96\n21 63\n1 83\n2 100\n5 96\n18 98\n9 77\n11 91\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVova has taken his summer practi... | [{"type": "stdin_stdout", "input": "94 3\n4 2 1 6 1 1 1 5 1 3 3 3 6 1 6 6 3 5 3 1 4 1 3 6 4 5 3 4 6 5 5 2 1 5 4 5 6 5 2 2 6 5 4 6 1 3 5 1 2 5 5 2 1 3 4 5 6 4 3 1 4 4 1 5 4 4 2 2 2 4 4 3 6 2 6 1 5 6 1 3 5 5 1 3 5 3 5 2 6 1 3 6 1 5\n5 6 3 5 4 1 4 6 3 1 4 4 3 3 6 2 1 1 4 6 4 2 4 1 3 1 5 3 6 2 5 6 1 6 6 2 2 2 2 5 2 6 1 4 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n100 years have passed since the ... | [{"type": "stdin_stdout", "input": "68 -9959\n-3666\n-3501\n9169\n5724\n1478\n-643\n-3039\n-5537\n-4295\n-1856\n-6720\n6827\n-39\n-9509\n-7005\n1942\n-5173\n-4564\n2390\n4604\n-6098\n-9847\n-9708\n2382\n7421\n8716\n9718\n9895\n-4553\n-8275\n4771\n1538\n-8131\n9912\n-4334\n-3702\n7035\n-106\n-1298\n-6190\n1321\n332\n767... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob begin their day wi... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "998677\n"}, {"type": "stdin_stdout", "input": "959806\n", "output": "239958\n"}, {"type": "stdin_stdout", "input": "166320\n", "output": "110879\n"}, {"type": "stdin_stdout", "input": "221760\n", "output": "110880\n"}, {"type": "stdin_stdout", "input": "277200\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya will fancy any number as l... | [{"type": "stdin_stdout", "input": "1000000000 -1000\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "1000000000 1000\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "332639425 -399\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "12345678 -123\n", "output": "12\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\nAnia has a large integer $S$. It... | [{"type": "stdin_stdout", "input": "400 224\n34034718296316650556302576767095880542740697596682657060609028712014739414658241556774411582749368771597248873201583574900424227251655547840887764275893533353440635216728376201808545879398359535670372855472971530695051695650262058940466340529417646357776899296790403916961389... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOur bear's forest has a checkere... | [{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000 100 -100 1000000000000000000\n", "output": "969796608 969796608"}, {"type": "stdin_stdout", "input": "546978166 115293871 313560296 -33 54 215761558342792301\n", "output": "353006839 497349709"}, {"type": "stdin_stdout", "input": "907122235 107269653 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nZS the Coder loves to read the d... | [{"type": "stdin_stdout", "input": "EJMGJAXCHXYIKZSQKUGRCLSTWDLNCVZIGXGWILAVFBEIGOHWGVEPRJTHWEDQRPOVZUQOSRVTIHFFHJMCLOWGHCIGJBCAAVBJFMJEFTEGFXZFVRZOXAFOFVXRAIZEWIKILFLYDZVDADYWYWYJXAGDFGNZBQKKKTGWPINLCDBZVULROGAKEKXXTWNYKQBMLQMQRUYOWUTWMNTJVGUXENHXWMFWMSBKVNGXSNFFTRTTGEGBBHMFZTKNJQDYUQOXVDWTDHZCCQNYYIOFPMKYQIGEEYBCKBAY... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSome people leave the lights at ... | [{"type": "stdin_stdout", "input": "5 93\n00000000000000000000000000000000000000000000000000000000100000000000000000000000000000000001010\n00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\n000000100000000000000000000000000000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMedicine faculty of Berland Stat... | [{"type": "stdin_stdout", "input": "10\n7846 8354 1188 6898 8046 7561 8043 8588 8684 3699\n1 1 2 3 4 5 6 7 8 9\n", "output": "7846\n"}, {"type": "stdin_stdout", "input": "10\n1337 4359 5138 5246 7859 8111 1154 8455 3711 1737\n1 1 2 3 4 1 6 7 8 9\n", "output": "1337\n"}, {"type": "stdin_stdout", "input": "10\n6870 3547 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya lives in a round building,... | [{"type": "stdin_stdout", "input": "100 37 -100\n", "output": "37\n"}, {"type": "stdin_stdout", "input": "100 54 100\n", "output": "54\n"}, {"type": "stdin_stdout", "input": "100 1 -1\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "97 37 -92\n", "output": "42\n"}, {"type": "stdin_stdout", "input": "87 65 -76... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarpus develops an interesti... | [{"type": "stdin_stdout", "input": "20\n-1 32 37 -1 -1 -1 57 -1 -1 40 31 33 -1 -1 39 47 43 -1 35 32\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "19\n23 26 -1 -1 35 38 41 -1 -1 -1 53 -1 59 62 6 7 8 9 -1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "18\n21 19 -1 -1 -1 48 50 -1 54 -1 5 1 -1 -1 -1 37... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHigh school student Vasya got a ... | [{"type": "stdin_stdout", "input": "100 10\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 30\nbbaabaaabbbbbbbbbbaababababbbbbbaabaabbbbbbbbabbbbbabbbbabbbbbbbbaabbbbbbbbbabbbbbabbbbbbbbbaaaaabba\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\nAlice is the leader of the State... | [{"type": "stdin_stdout", "input": "100\n100 48 48 22 21 27 51 43 53 34 54 37 45 37 27 53 39 53 37 44 55 44 56 36 55 47 45 23 40 32 55 54 40 38 30 25 28 20 39 32 53 50 41 26 29 37 42 55 23 27 51 30 39 50 24 30 22 50 56 32 60 45 50 43 27 25 52 59 47 58 28 56 49 39 33 52 26 46 23 42 45 58 42 50 49 25 28 30 46 43 26 32 40... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n3R2 - Standby for Action\n\nOur ... | [{"type": "stdin_stdout", "input": "100000\n", "output": "12.090146129863\n"}, {"type": "stdin_stdout", "input": "99999\n", "output": "12.090136129863\n"}, {"type": "stdin_stdout", "input": "40862\n", "output": "11.195183715959\n"}, {"type": "stdin_stdout", "input": "71229\n", "output": "11.750878002343\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\nSanta Claus has n candies, he dr... | [{"type": "stdin_stdout", "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"}, {"type": "stdin_stdout", "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 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\nThe following problem is well-kn... | [{"type": "stdin_stdout", "input": "100000000\n100000000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "99999999\n100000000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "98765432\n23456789\n", "output": "23456789\n"}, {"type": "stdin_stdout", "input": "99812399\n93172892\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\nVictor tries to write his own te... | [{"type": "stdin_stdout", "input": "90\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n", "output": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n"}, {"type": "stdin_stdout", "input": "85\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ consecutive seat p... | [{"type": "stdin_stdout", "input": "64 59 2\n.*.***......****.*..**..**..****.*.*.*.**...**..***.***.*..*..*.\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "20 5 5\n.*.*.........*......\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "20 5 5\n.*.*.............*..\n", "output": "10\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMelody Pond was stolen from her ... | [{"type": "stdin_stdout", "input": "250877914575\n", "output": "1 125438957286\n"}, {"type": "stdin_stdout", "input": "540024979445\n", "output": "1 270012489721\n"}, {"type": "stdin_stdout", "input": "962623690081\n", "output": "1 481311845039\n"}, {"type": "stdin_stdout", "input": "426262703497\n", "output": "1 21313... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 quite a lot of ways to... | [{"type": "stdin_stdout", "input": "10\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000\n", "output": "1\n1\n"}, {"type": "stdin_stdout", "input": "10\n26 723 970 13 422 968 875 329 234 983\n", "output": "1\n4\n"}, {"type": "stdin_stdout", "input": "9\n665 646 152 829 190 64 555 536 321\n", "output": "1\n6\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\nVasya has his favourite number $... | [{"type": "stdin_stdout", "input": "246\n", "output": "246\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tuple of positive integers {x_... | [{"type": "stdin_stdout", "input": "100\n314 905 555 526 981 360 424 104 920 814 143 872 741 592 105 573 837 962 220 692 560 493 889 824 145 491 828 960 889 87 375 486 609 423 386 323 124 830 206 446 899 522 514 696 786 783 268 483 318 261 675 445 1000 896 812 277 131 264 860 514 701 678 792 394 324 244 483 357 69 931 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently Luba learned about a sp... | [{"type": "stdin_stdout", "input": "32640\n", "output": "32640\n"}, {"type": "stdin_stdout", "input": "97920\n", "output": "32640\n"}, {"type": "stdin_stdout", "input": "12096\n", "output": "2016\n"}, {"type": "stdin_stdout", "input": "38304\n", "output": "2016\n"}, {"type": "stdin_stdout", "input": "89408\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\nThere are n children in Jzzhu's ... | [{"type": "stdin_stdout", "input": "100 20\n21 19 61 70 54 97 98 14 61 72 25 94 24 56 55 25 12 80 76 11 35 17 80 26 11 94 52 47 84 61 10 2 74 25 10 21 2 79 55 50 30 75 10 64 44 5 60 96 52 16 74 41 20 77 20 44 8 86 74 36 49 61 99 13 54 64 19 99 50 43 12 73 48 48 83 55 72 73 63 81 30 27 95 9 97 82 24 3 89 90 33 14 47 88 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAllen has a LOT of money. He has... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "10000000\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "10000009\n"}, {"type": "stdin_stdout", "input": "163565555\n", "output": "1635659\n"}, {"type": "stdin_stdout", "input": "152541908\n", "output": "1525423\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\nPermutation p is an ordered set ... | [{"type": "stdin_stdout", "input": "1000 500\n", "output": "979041279\n"}, {"type": "stdin_stdout", "input": "1000 700\n", "output": "642759746\n"}, {"type": "stdin_stdout", "input": "1000 900\n", "output": "301804159\n"}, {"type": "stdin_stdout", "input": "1000 998\n", "output": "583666213\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\nArkady decided to buy roses for ... | [{"type": "stdin_stdout", "input": "30 15\n7926 577 5009 7237 4395 3239 8994 4429 8126 2925 139 320 4442 3397 1292 2800 9505 6043 5946 8058 4031 6871 4689 1977 73 440 5320 5290 4707 387\nOOWOWWORRWOWORWRRRRWORROOWWROW\n", "output": "91633\n"}, {"type": "stdin_stdout", "input": "20 5\n3747 219 7826 7713 6886 466 1136 70... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 continued fraction of height n... | [{"type": "stdin_stdout", "input": "633468529243155234 4\n90\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\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "742143496299253703 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\nWhen new students come to the Sp... | [{"type": "stdin_stdout", "input": "|||||||||||||||||||||||||||||||||||||||||||||||||||+|||||||||||||||||||||||||||||||||||||||||||||||||||=||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n", "output": "||||||||||||||||||||||||||||||||||||||||||||||||||+|||||||||||||... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet us define the oddness of a p... | [{"type": "stdin_stdout", "input": "49 1200\n", "output": "366641438\n"}, {"type": "stdin_stdout", "input": "50 1250\n", "output": "472467292\n"}, {"type": "stdin_stdout", "input": "38 716\n", "output": "810790165\n"}, {"type": "stdin_stdout", "input": "31 344\n", "output": "996412950\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke is introducing a robot arm... | [{"type": "stdin_stdout", "input": "1000\n-199608894 -95827813\n192129982 -290497057\n619193545 581985918\n-240647380 -782918271\n-20836366 993912949\n644932933 281088744\n776095873 -802895072\n-327192692 423250197\n821541354 184311001\n-687128964 -892770221\n119967014 206438789\n956160749 -88861874\n-800477414 9381499... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 interviewed Oleg an... | [{"type": "stdin_stdout", "input": "100\nggogogoooggogooggoggogggggogoogoggooooggooggoooggogoooggoggoogggoogoggogggoooggoggoggogggogoogggoooo\n", "output": "gg***oogg***oggoggoggggg******ggooooggooggooogg***ooggoggoogggo***ggogggoooggoggoggoggg***ogggoooo\n"}, {"type": "stdin_stdout", "input": "100\ngoogoggggogggoooggo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's introduce some definitions... | [{"type": "stdin_stdout", "input": "1000000000 1000000000000000000\n", "output": "997440007\n"}, {"type": "stdin_stdout", "input": "688829161 296569860304026304\n", "output": "388155331\n"}, {"type": "stdin_stdout", "input": "666010979 443570624148538441\n", "output": "886507301\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\nDuring the breaks between compet... | [{"type": "stdin_stdout", "input": "5 3 5 3 2 5 2 5 6 2 6 2 4 4 4 4 1 1 1 1 6 3 6 3\n", "output": "YES"}, {"type": "stdin_stdout", "input": "2 2 1 1 5 5 5 5 3 3 4 4 1 4 1 4 2 3 2 3 6 6 6 6\n", "output": "YES"}, {"type": "stdin_stdout", "input": "1 1 1 1 5 5 3 3 4 4 4 4 3 3 2 2 6 6 5 5 2 2 6 6\n", "output": "YES"}, {"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\nNot so long ago the Codecraft-17... | [{"type": "stdin_stdout", "input": "200 16031 15842\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "186 18666 18329\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "424 10906 10346\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "406 16527 16314\n", "output": "22\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\nWinnie-the-Pooh likes honey very... | [{"type": "stdin_stdout", "input": "100\n100\n100\n100\n", "output": "9900\n"}, {"type": "stdin_stdout", "input": "75\n54\n76\n66\n", "output": "3996\n"}, {"type": "stdin_stdout", "input": "73\n71\n69\n66\n", "output": "4755\n"}, {"type": "stdin_stdout", "input": "83\n58\n88\n16\n", "output": "1354\n"}, {"type": "stdin... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a given picture with si... | [{"type": "stdin_stdout", "input": "10 10\n..........\n..........\n....*.....\n....*.....\n.*******..\n....*.....\n....*.....\n..........\n....*.....\n..........\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10 10\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\nGiven three numbers $n, a, b$. Y... | [{"type": "stdin_stdout", "input": "6 1 1\n", "output": "YES\n010000\n101000\n010100\n001010\n000101\n000010\n"}, {"type": "stdin_stdout", "input": "5 1 1\n", "output": "YES\n01000\n10100\n01010\n00101\n00010\n"}, {"type": "stdin_stdout", "input": "5 1 2\n", "output": "YES\n00111\n00011\n10001\n11001\n11110\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\nThe finalists of the \"Russian C... | [{"type": "stdin_stdout", "input": "100 100\n100 100\n100\n", "output": "9900\n"}, {"type": "stdin_stdout", "input": "10 100\n100 100\n99\n", "output": "1000\n"}, {"type": "stdin_stdout", "input": "35 28\n35 60\n44\n", "output": "2065\n"}, {"type": "stdin_stdout", "input": "19 76\n91 91\n87\n", "output": "1729\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\nLet’s define a grid to be a set ... | [{"type": "stdin_stdout", "input": "ABCDEFGHIJKLMNOPQRSGTUVWXYZ\n", "output": "YXWVUTGHIJKLM\nZABCDEFSRQPON\n"}, {"type": "stdin_stdout", "input": "UTEDBZRVWLOFUASHCYIPXGJMKNQ\n", "output": "PIYCHSAUTEDBZ\nXGJMKNQFOLWVR\n"}, {"type": "stdin_stdout", "input": "ZWMFLTCQIAJEVUPODMSGXKHRNYB\n", "output": "HKXGSMFLTCQIA\nRN... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYear 2118. Androids are in mass ... | [{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "=\n"}, {"type": "stdin_stdout", "input": "1000000000 999999999\n", "output": "<\n"}, {"type": "stdin_stdout", "input": "987654321 123456987\n", "output": "<\n"}, {"type": "stdin_stdout", "input": "987654321 123456789\n", "output": "<\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\nVasya takes part in the orientee... | [{"type": "stdin_stdout", "input": "97 -13\n-17 -11 -20 -16 -11 -18 -17 -14 -19 -13 -11 -19 -15 -17 -11 -20 -10 -19 -10 -18 -11 -14 -11 -15 -13 -13 -11 -18 -18 -18 -11 -14 -20 -19 -10 -17 -18 -19 -17 -11 -11 -11 -20 -19 -16 -15 -18 -15 -15 -20 -19 -20 -16 -13 -17 -11 -13 -18 -10 -13 -10 -14 -12 -17 -20 -10 -11 -19 -19 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's consider equation:x^2 + s(... | [{"type": "stdin_stdout", "input": "160000001600000000\n", "output": "400000000\n"}, {"type": "stdin_stdout", "input": "250000002500000000\n", "output": "500000000\n"}, {"type": "stdin_stdout", "input": "360000003600000000\n", "output": "600000000\n"}, {"type": "stdin_stdout", "input": "490000004900000000\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\nGeorge woke up and saw the curre... | [{"type": "stdin_stdout", "input": "05:50\n05:44\n", "output": "00:06\n"}, {"type": "stdin_stdout", "input": "00:00\n01:00\n", "output": "23:00\n"}, {"type": "stdin_stdout", "input": "00:01\n00:00\n", "output": "00:01\n"}, {"type": "stdin_stdout", "input": "23:59\n23:59\n", "output": "00:00\n"}, {"type": "stdin_stdout"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given array $a_1, a_2, \... | [{"type": "stdin_stdout", "input": "101\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "69\n2 3 4 5 6 7 8 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn his free time, Chouti likes d... | [{"type": "stdin_stdout", "input": "1411 1081 1082\n", "output": "238077838\n"}, {"type": "stdin_stdout", "input": "1841 1185 1765\n", "output": "773828348\n"}, {"type": "stdin_stdout", "input": "2000 1234 1800\n", "output": "550745740\n"}, {"type": "stdin_stdout", "input": "2000 2000 1999\n", "output": "694730459\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA magic number is a number forme... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "144144144\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "141414141\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "114114144\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "11111111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima and Inna are doing so great... | [{"type": "stdin_stdout", "input": "1000000 99999 12345 23456 23 54\n", "output": "Poor Inna and pony!\n"}, {"type": "stdin_stdout", "input": "50000 100000 500 1000 500 2000\n", "output": "Poor Inna and pony!\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000 1000000 1000000\n", "output": "0\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nATMs of a well-known bank of a s... | [{"type": "stdin_stdout", "input": "58 5\n1 6 9 18 34 41 82 99 164 179 183 204 240 396 636 1224 2023 2856 4488 4705 5712 9180 9266 18360 18850 20270 23086 60810 190701 197064 211140 214200 222970 243240 263510 314442 425670 486480 708288 789888 1009800 1025349 1054040 1094580 1325184 1579776 1748076 2050698 2635100 289... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 tram in Berland goes along a... | [{"type": "stdin_stdout", "input": "600 443 587\n260 1000\n548 -1\n", "output": "144000\n"}, {"type": "stdin_stdout", "input": "1000 812 761\n230 1000\n696 -1\n", "output": "51000\n"}, {"type": "stdin_stdout", "input": "1000 394 798\n155 673\n954 -1\n", "output": "271560\n"}, {"type": "stdin_stdout", "input": "799 254 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's consider a table consistin... | [{"type": "stdin_stdout", "input": "100000 1000000000\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "100000 183783600\n", "output": "438\n"}, {"type": "stdin_stdout", "input": "100000 551350800\n", "output": "392\n"}, {"type": "stdin_stdout", "input": "100000 479001600\n", "output": "254\n"}, {"type": "stdin... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.