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\nProblem\n\nFind the angle betwee... | [{"type": "stdin_stdout", "input": "20\n594", "output": "127.0000000000\n"}, {"type": "stdin_stdout", "input": "20\n704", "output": "182.0000000000\n"}, {"type": "stdin_stdout", "input": "20\n682", "output": "171.0000000000\n"}, {"type": "stdin_stdout", "input": "20\n253", "output": "316.5000000000\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\nYour task is to calculate the di... | [{"type": "stdin_stdout", "input": "3\n109 25 10\n-1 -3 -3", "output": "151.000000\n114.249726\n110.661278\n110.000000\n"}, {"type": "stdin_stdout", "input": "3\n109 25 10\n0 -3 -3", "output": "150.000000\n113.287246\n109.673356\n109.000000\n"}, {"type": "stdin_stdout", "input": "3\n109 25 10\n-1 -3 0", "output": "148.... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 electrical resistance is the... | [{"type": "stdin_stdout", "input": "3\n1 36\n2 16\n100 11111", "output": "1/1\n2/3\n10456/4100\n"}, {"type": "stdin_stdout", "input": "3\n1 20\n4 17\n100 10010", "output": "1/1\n13/4\n5501/5775\n"}, {"type": "stdin_stdout", "input": "3\n1 20\n4 17\n101 10010", "output": "1/1\n13/4\n1266/7041\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Chef's house there are N appl... | [{"type": "stdin_stdout", "input": "5 12\n1 4 4 2 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5 24\n1 4 4 2 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5 24\n1 7 4 2 -1", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5 24\n1 6 4 2 -1", "output": "-1\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\nAfter the war, the supersonic ro... | [{"type": "stdin_stdout", "input": "8 8\n53212775 61830464\n32047271 31958754\n46845363 47341547\n46097536 79640734\n25559819 90360169\n5442822 40309249\n57656501 31139219\n1191345 7784770\n61052639 71686018\n53542361 10165576\n61963163 25946318\n15498921 83261369\n97981085 40697107\n35269685 20583089\n50275077 3751318... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonocarp has decided to buy a ne... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 999999866000004473 999999822000007597\n", "output": "1000000063\n"}, {"type": "stdin_stdo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMasha has three sticks of length... | [{"type": "stdin_stdout", "input": "100 100 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "100 10 10\n", "output": "81\n"}, {"type": "stdin_stdout", "input": "100 100 99\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "14 21 76\n", "output": "42\n"}, {"type": "stdin_stdout", "input": "32 99 10\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKilani is playing a game with hi... | [{"type": "stdin_stdout", "input": "4 7 2\n13 1\n###....\n..1..#.\n.###.#.\n.....#2\n", "output": "18 1 \n"}, {"type": "stdin_stdout", "input": "4 7 2\n13 1\n....###\n.#..1..\n.#.###.\n2#.....\n", "output": "18 1 \n"}, {"type": "stdin_stdout", "input": "4 7 2\n13 1\n###....\n.#..1..\n.###.#.\n.....#2\n", "output": "18 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nServal soon said goodbye to Japa... | [{"type": "stdin_stdout", "input": "300\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 function f writt... | [{"type": "stdin_stdout", "input": "83\nadd\nfor 58\nend\nadd\nadd\nfor 36\nfor 84\nadd\nadd\nfor 86\nadd\nadd\nend\nend\nadd\nadd\nadd\nadd\nfor 23\nadd\nadd\nadd\nfor 70\nadd\nadd\nend\nfor 24\nfor 58\nend\nadd\nend\nend\nend\nfor 41\nfor 51\nend\nfor 22\nfor 39\nend\nfor 94\nfor 47\nadd\nfor 57\nend\nadd\nend\nfor 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a list of numbers from ... | [{"type": "stdin_stdout", "input": "2\n1000000000 1\n1000000000 500000000\n", "output": "2\n1000000000\n"}, {"type": "stdin_stdout", "input": "3\n3 1\n4 2\n69 6\n", "output": "2\n4\n12\n"}, {"type": "stdin_stdout", "input": "3\n3 1\n5 2\n69 6\n", "output": "2\n4\n12\n"}, {"type": "stdin_stdout", "input": "3\n3 1\n5 2\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 bracket sequen... | [{"type": "stdin_stdout", "input": "((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\n))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a consist... | [{"type": "stdin_stdout", "input": "5\n2\n0 3\n4\n2 0 13 1\n3\n3 3 3\n4\n5 10 5 4\n4\n2 1 1 2\n", "output": "YES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n2\n0 3\n4\n2 0 25 1\n3\n3 3 3\n4\n5 10 5 4\n4\n2 1 1 2\n", "output": "YES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n2\n0 3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nwHAT DO WE NEED cAPS LOCK FOR?\n... | [{"type": "stdin_stdout", "input": "cTKDZNWVYRTFPQLDAUUNSPKTDJTUPPFPRXRSINTVFVNNQNKXWUZUDHZBUSOKTABUEDQKUIVRTTVUREEOBJTSDKJKVEGFXVHXEYPE\n", "output": "Ctkdznwvyrtfpqldauunspktdjtuppfprxrsintvfvnnqnkxwuzudhzbusoktabuedqkuivrttvureeobjtsdkjkvegfxvhxeype\n"}, {"type": "stdin_stdout", "input": "KETAXTSWAAOBKUOKUQREHIOMVMM... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider the infinite sequence s... | [{"type": "stdin_stdout", "input": "9\n2\n3\n3\n12\n13\n6\n7\n11\n9\n", "output": "2\n3\n3\n13\n7\n12\n5\n11\n15\n"}, {"type": "stdin_stdout", "input": "9\n2\n3\n3\n12\n10\n6\n3\n22\n6\n", "output": "2\n3\n3\n13\n6\n12\n3\n18\n12\n"}, {"type": "stdin_stdout", "input": "9\n1\n5\n3\n4\n18\n6\n12\n8\n9\n", "output": "1\n8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 athletes in front of... | [{"type": "stdin_stdout", "input": "5\n5\n3 1 2 10 4\n6\n2 1 3 4 4 3\n4\n14 9 3 1\n2\n0 1000\n3\n110 150 200\n", "output": "1\n0\n2\n1000\n40\n"}, {"type": "stdin_stdout", "input": "5\n5\n3 1 2 10 4\n6\n2 1 3 4 4 3\n4\n14 9 3 1\n2\n0 1000\n3\n100 150 200\n", "output": "1\n0\n2\n1000\n50\n"}, {"type": "stdin_stdout", "i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n programmers that you... | [{"type": "stdin_stdout", "input": "3\n5 10\n13 11 2 14 1\n4 8\n2 4 2 1\n4 8\n1 3 3 7\n", "output": "3\n0\n1\n"}, {"type": "stdin_stdout", "input": "3\n5 10\n14 11 4 5 1\n4 11\n2 7 2 1\n4 8\n1 4 3 2\n", "output": "2\n0\n0\n"}, {"type": "stdin_stdout", "input": "3\n5 17\n7 11 2 9 5\n4 8\n2 1 2 3\n4 11\n1 3 3 11\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider the following process. ... | [{"type": "stdin_stdout", "input": "3\n100110\n2\n01\n1\n111\n1\n", "output": "011001\n10\n111\n"}, {"type": "stdin_stdout", "input": "3\n100110\n2\n01\n1\n101\n1\n", "output": "011001\n10\n010\n"}, {"type": "stdin_stdout", "input": "3\n100110\n2\n01\n0\n101\n1\n", "output": "011001\n01\n010\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\nOne drew a closed polyline on a ... | [{"type": "stdin_stdout", "input": "12\n4\n3 4 4 5\n4\n3 3 3 3\n\n4\n3 4 5 4\n4\n3 3 3 3\n\n4\n3 5 4 4\n4\n3 3 3 3\n\n4\n4 3 4 5\n4\n3 3 3 3\n\n4\n4 3 5 4\n4\n3 3 3 3\n\n4\n4 4 3 5\n4\n3 3 3 3\n\n4\n4 4 5 3\n4\n3 3 3 3\n\n4\n4 5 3 4\n4\n3 3 3 3\n\n4\n4 5 4 3\n4\n3 3 3 3\n\n4\n5 3 4 4\n4\n3 3 3 3\n\n4\n5 4 3 4\n4\n3 3 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call two strings a and b (... | [{"type": "stdin_stdout", "input": "1\n360 180\n11111111111110100101001110011110110000111011001100100001101001100000010110010101101100110011111110101011001101001111011000000101100100100100000101110010110110001010011100100111010000101110010011100101000110110100111010000010010010011010000001101111001011001101010111111100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDiamond Miner is a game that is ... | [{"type": "stdin_stdout", "input": "3\n2\n0 1\n1 0\n0 -1\n-2 0\n4\n1 0\n3 0\n-5 0\n6 0\n0 3\n0 1\n0 2\n0 4\n5\n3 0\n0 4\n0 -3\n4 0\n2 0\n1 0\n-3 0\n0 -10\n0 -2\n0 -10\n", "output": "\n3.650281539872885\n18.061819283610362\n32.052255376143336\n"}, {"type": "stdin_stdout", "input": "3\n2\n0 1\n1 0\n0 -1\n-2 0\n4\n1 0\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\nReforms have started in Berland ... | [{"type": "stdin_stdout", "input": "1000000 5000000\n", "output": "11514506860120\n"}, {"type": "stdin_stdout", "input": "4000000 5000000\n", "output": "21384022194564\n"}, {"type": "stdin_stdout", "input": "5000000 5000000\n", "output": "24674231279431\n"}, {"type": "stdin_stdout", "input": "3000000 5000000\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou know that the Martians use a... | [{"type": "stdin_stdout", "input": "11 1 199\n10 1 2 1 6 2 0 1 9 9 0 5 5 4 0 1 8 7 7 5 2 5 6 10 7 1 6 8 0 8 10 9 1 8 1 6 1 3 6 1 9 0 5 3 6 8 7 5 10 1 1 10 1 6 10 8 10 10 9 1 3 10 2 3 8 10 6 1 7 7 10 5 2 2 7 2 0 2 1 8 6 5 9 6 7 10 2 9 1 4 2 4 5 4 1 5 6 1 1 1 5 2 6 8 8 3 8 6 5 4 2 1 6 5 0 6 5 4 3 7 4 7 6 8 6 6 6 4 10 4 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\nRecently Bob invented a new game... | [{"type": "stdin_stdout", "input": "50\n45 39\n18 12\n13 6\n48 45\n46 36\n46 8\n40 36\n29 28\n2 18\n43 26\n25 14\n43 31\n13 30\n12 35\n38 42\n20 5\n7 35\n10 50\n27 13\n1 41\n24 21\n25 5\n7 31\n15 45\n32 25\n43 23\n4 50\n46 11\n40 14\n37 21\n50 2\n41 42\n43 30\n14 22\n36 48\n8 24\n49 20\n19 26\n32 10\n35 29\n1 6\n34 33\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle penguin Polo adores strin... | [{"type": "stdin_stdout", "input": "70054 25\n", "output": "abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 plays the sleuth with his ... | [{"type": "stdin_stdout", "input": "ARIWmwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiyjBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "ARIWmwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiykBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\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\nA Martian boy is named s — he ha... | [{"type": "stdin_stdout", "input": "mars\nsunvenusearthmarsjupitersaturnuranusneptune\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "mars\nsunvenusearthmarsjupitersatuqnuranusneptune\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "mars\nsunvenusearthmarsjupitersatuqnuranusnepttne\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\nGiven simple (without self-inter... | [{"type": "stdin_stdout", "input": "3 8\n-100000 -100000\n100000 100000\n1 0\n-100000 -100000 100000 -80000\n-100000 -100000 100000 -99000\n-100000 -100000 100000 -99990\n-100000 -100000 100000 -99999\n-100000 -100000 100000 -99999.99\n-100000 -100000 100000 100000\n-100000 -100000 100000 99999.99\n-100000 100000 10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValerian was captured by Shapur.... | [{"type": "stdin_stdout", "input": "15\n12 1 52\n6 2 10\n4 1 55\n11 7 20\n10 3 54\n13 9 44\n15 2 6\n14 5 55\n9 3 32\n2 1 32\n8 4 14\n6 5 24\n5 3 74\n7 6 157\n", "output": "1039\n"}, {"type": "stdin_stdout", "input": "15\n12 1 52\n3 2 10\n4 1 45\n11 7 20\n10 3 54\n13 9 44\n15 2 6\n14 5 55\n9 3 32\n2 1 32\n8 4 14\n6 5 24... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 \"Bulls and Cows\" game need... | [{"type": "stdin_stdout", "input": "10\n0132 0 1\n6801 0 1\n8749 1 1\n8036 0 0\n7384 0 2\n8594 0 1\n9307 1 0\n7390 0 1\n6127 1 1\n0381 0 1\n", "output": "Incorrect data\n"}, {"type": "stdin_stdout", "input": "10\n8795 0 3\n4971 1 1\n5032 0 1\n5479 0 3\n2501 0 1\n9052 1 1\n3649 0 1\n1927 1 0\n9173 0 1\n8014 0 2\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Artem got n stones on his... | [{"type": "stdin_stdout", "input": "1001000000\n", "output": "667333333\n"}, {"type": "stdin_stdout", "input": "1001100000\n", "output": "667400000\n"}, {"type": "stdin_stdout", "input": "1001001000\n", "output": "667334000\n"}, {"type": "stdin_stdout", "input": "1001001100\n", "output": "667334067\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\"The zombies are lurking outsid... | [{"type": "stdin_stdout", "input": "10 7\n.......\n.......\n.......\n.......\n.......\n.......\n.......\n.......\n...B...\nB.BB.B.\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "10 7\n.......\n.......\n.......\n.......\n.......\n.......\n.......\n...-...\n...B...\nB.BB.B.\n", "output": "3\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\nToday Sonya learned about long i... | [{"type": "stdin_stdout", "input": "10\n+ 870566619432760298\n+ 869797178280285214\n+ 609920823721618090\n+ 221159591436767023\n+ 730599542279836538\n? 101001100111001011\n? 001111010101010011\n? 100010100011101110\n? 100110010110001100\n? 110000011101110011\n", "output": "0\n0\n0\n0\n0\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\nFor given n, l and r find the nu... | [{"type": "stdin_stdout", "input": "2 5000000 10000000\n", "output": "25000005000000\n"}, {"type": "stdin_stdout", "input": "10000000 10000000 10000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2 1 10000000\n", "output": "99999990000000\n"}, {"type": "stdin_stdout", "input": "1 10000000 11000000\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given positive integer n... | [{"type": "stdin_stdout", "input": "10000000000 5000\n", "output": "640 1280 1920 2560 3200 3840 4480 5120 5760 6400 7040 7680 8320 8960 9600 10240 10880 11520 12160 12800 13440 14080 14720 15360 16000 16640 17280 17920 18560 19200 19840 20480 21120 21760 22400 23040 23680 24320 24960 25600 26240 26880 27520 28160 2880... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 small restaurant there are ... | [{"type": "stdin_stdout", "input": "30 10 10\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "20 4 3\n2 2 2 2 2 2 2 2 1 2 1 1 2 2 1 2 2 2 1 2\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "20 4 3\n2 2 1 2 2 2 2 2 1 2 1 1 2 2 1 2 2 2 1 2\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\nValery is very interested in mag... | [{"type": "stdin_stdout", "input": "150\n0 -2 1 -2 0 0 0 0 -2 0 -2 -1 0 0 2 0 1 -2 1 -1 0 0 0 2 -2 2 -1 0 0 -1 -2 0 2 0 1 0 -2 0 -2 -1 0 -2 -2 2 0 0 1 -2 -2 -1 -2 0 2 1 1 -1 1 0 -2 2 0 0 0 1 -1 0 -2 -1 0 -2 1 1 1 0 0 2 0 0 2 -1 0 0 2 0 2 0 -2 -1 1 -2 1 0 0 -2 -1 -1 0 0 2 -1 -1 -1 -1 -2 0 0 2 -1 -1 1 0 0 1 -1 0 0 -1 2 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery evening Vitalya sets n ala... | [{"type": "stdin_stdout", "input": "100 40 20\n148 120 37 65 188 182 199 131 97 174 157 113 62 63 193 8 72 152 138 5 90 48 133 83 197 118 123 2 181 151 53 115 78 177 144 33 196 19 85 104 77 34 173 198 136 44 3 22 86 200 23 129 68 176 29 58 121 56 79 15 159 183 171 60 141 54 158 106 30 17 116 105 190 59 36 46 169 142 16... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an integer x. Your task is... | [{"type": "stdin_stdout", "input": "1000002 1000002 1000003 1000000000000\n", "output": "999998\n"}, {"type": "stdin_stdout", "input": "693528 398514 1000003 1000000000000\n", "output": "999995\n"}, {"type": "stdin_stdout", "input": "812415 818711 820231 1594459797584\n", "output": "1943780\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\nIvan is a student at Berland Sta... | [{"type": "stdin_stdout", "input": "4 113 370\n01110100100010110100110000000011001111110000100111111001011001110111110111001011010110000110110010101010110001000\n01101001111110001010001100101100111100111001001001001101110101100110110110001110100010111011100011101110011110100\n0110011000100111101000001010110011110001111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMancala is a game famous in the ... | [{"type": "stdin_stdout", "input": "297857621 238127103 749085829 139033277 597985489 202617713 1366784327 117968155 278551059 297781685 330124279 338959601 682874531 259895291\n", "output": "5305874892\n"}, {"type": "stdin_stdout", "input": "297857621 238127103 749085829 139033277 597985489 202617713 982184715 1839327... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 dreams of one day owning a... | [{"type": "stdin_stdout", "input": "40 80\n38 45 18 59 53 44 49 27 46 63 42 61 26 39 29 7 52 79 11 73 24 69 55 43 20 32 37 25 57 19 1 54 4 22 36 16 71 15 65 12\n46 1 52 54 27 3 40 10 8 41 72 17 11 44 28 73 55 65 60 13 12 43 16 26 34 53 50 15 62 35 33 48 58 42 57 80 21 51 64 74\n22 29 4 18 69 36 31 68 77 61 37 6 70 59 7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEveryone knows that chotu likes ... | [{"type": "stdin_stdout", "input": "2\naba\nbaba\nxy\nzw\n\nSAMPLE", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\naba\nbaba\nxy\nzw\n\nELPMAS", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "2\naca\nbaab\nwy\nyw\n\nSQAMLE", "output": "NO\nYES\n"}, {"type": "stdin_stdout", "input": "2\naba\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\nHasan has finally finished his f... | [{"type": "stdin_stdout", "input": "3\n4 -1 -1\n1 -1 -1\n0 0 41\n\nCPJSNB", "output": "35.876894\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n4 -1 1\n-1 3 17\n\nMBSLPD", "output": "11.343146\n"}, {"type": "stdin_stdout", "input": "3\n3 -1 0\n1 -1 1\n-1 3 17\n\nMBSLPD", "output": "11.527864\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are some animals in a gard... | [{"type": "stdin_stdout", "input": "-1 101", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 001", "output": "No\n"}, {"type": "stdin_stdout", "input": "-1 100", "output": "No\n"}, {"type": "stdin_stdout", "input": "126 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "0 000", "output": "Yes\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a sequence of k numbers:... | [{"type": "stdin_stdout", "input": "7 3\n27 18 15 18 28 73 1000000000\n1000000010 1 13\n1000000000 2 10\n1000010000 2 12", "output": "615384622\n300000000\n678578214\n"}, {"type": "stdin_stdout", "input": "7 3\n27 18 15 18 28 73 1000000000\n1000000010 1 13\n1000000000 2 10\n1000010000 2 17", "output": "615384622\n30000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of l... | [{"type": "stdin_stdout", "input": "10\n356822 296174 484500 710640 610703 888250 259161 609120 592348 713644", "output": "963903348\n"}, {"type": "stdin_stdout", "input": "10\n356822 296174 484500 710640 231537 888250 259161 609120 592348 713644", "output": "669101188\n"}, {"type": "stdin_stdout", "input": "10\n356822... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a function f(x), which ... | [{"type": "stdin_stdout", "input": "4\n1 -1000000000 1000000000\n1 -1000000000 0000000000\n1 -1000000000 1000000000\n2", "output": "-1000000000 2000000000\n"}, {"type": "stdin_stdout", "input": "4\n1 -1000000000 1000000000\n1 -1000000000 1000000000\n1 -1473275407 1000000000\n2", "output": "-1000000000 3473275407\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\nTo make it difficult to withdraw... | [{"type": "stdin_stdout", "input": "182896", "output": "14\n"}, {"type": "stdin_stdout", "input": "135433", "output": "10\n"}, {"type": "stdin_stdout", "input": "58523", "output": "12\n"}, {"type": "stdin_stdout", "input": "40994", "output": "11\n"}, {"type": "stdin_stdout", "input": "33686", "output": "13\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given strings s and t, c... | [{"type": "stdin_stdout", "input": "ratcode\nsalta", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "ratcode\nsalt`", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "rdtcoae\nsalt`", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "eaoctdr\nsalt`", "output": "Yes\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N strings of lowercase... | [{"type": "stdin_stdout", "input": "8\nabrakatabra\nabadaba\nabracadabra\natcoder\ngrand\ncontest\nababa\na\n6\n3 abcdefghijklmnopqrstuvwxyz\n6 qwertyuiopasdfhgjklzxcvbnm\n8 poiuytrewqlkjhgfdsamnbvcxz\n2 qazwsxedcrfvtgbyhnujmikolp\n1 plokmijnuhbygvtfcrdxeszwaq\n4 mnbvcxzasdfghjklpoiuytrewq", "output": "4\n8\n2\n3\n4\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is data of up to 100 chara... | [{"type": "stdin_stdout", "input": "abcba\nsx\nabcddcba\nrstrd", "output": "2\n"}, {"type": "stdin_stdout", "input": "abcca\nsw\nabcddcba\nrstrd", "output": "1\n"}, {"type": "stdin_stdout", "input": "abcca\nxt\nadcbdcba\nrdsrt", "output": "0\n"}, {"type": "stdin_stdout", "input": "abcba\nsw\nabcddcba\nrstrd", "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 Aizuwakamatsu City, there is ... | [{"type": "stdin_stdout", "input": "1593 4311\n4321 2155\n1256 11201\n5310 1455\n2152 5421\n1928 3386\n4528 1578\n1234 4321\n3330 3109\n2739 2199\n0 0", "output": "C 12457\nD 6439\n"}, {"type": "stdin_stdout", "input": "1593 4311\n4321 2155\n1256 12219\n5310 1455\n2152 5421\n1549 3288\n4528 3719\n1234 4321\n3330 2166\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nThe JOI country has o... | [{"type": "stdin_stdout", "input": "5 11 3\n-8 2\n-4 2\n-4 2\n4 1\n4 1\n2\n3\n4", "output": "-15\n-15\n15\n"}, {"type": "stdin_stdout", "input": "5 13 3\n-8 2\n-4 2\n-2 2\n0 1\n4 1\n2\n3\n4", "output": "-17\n-15\n13\n"}, {"type": "stdin_stdout", "input": "5 5 3\n-10 1\n-4 2\n-2 2\n7 2\n10 1\n1\n3\n5", "output": "-7\n-7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. Frugal bought a new house. H... | [{"type": "stdin_stdout", "input": "4 3\n0 1 1 1\n1 1 1 1\n1 1 1 1\n8 5\n0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1\n1 1 0 0 1 1 1 1\n0 1 1 1 0 1 1 1\n8 8\n0 1 1 0 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 1 1 0 0 1 1 0\n0 1 1 0 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 1 1 0 0 1 1 0\n10 10\n1 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 positive integer may be expres... | [{"type": "stdin_stdout", "input": "24 3\n24 2\n2 1\n1 1\n4 2\n18 3\n17 1\n17 3\n17 4\n110 5\n1000 10\n1120 14\n0 0", "output": "2\n3\n1\n0\n0\n2\n1\n0\n1\n79\n200102899\n2079324314\n"}, {"type": "stdin_stdout", "input": "24 3\n24 2\n2 1\n1 1\n4 2\n33 3\n17 1\n17 3\n17 4\n100 5\n1000 10\n1120 14\n0 0", "output": "2\n3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEstimating the Flood Risk\n\nMr.... | [{"type": "stdin_stdout", "input": "20 5 2\n3 1 0\n6 2 -1", "output": "-781\n"}, {"type": "stdin_stdout", "input": "16 5 2\n2 2 3\n1 2 3", "output": "-397\n"}, {"type": "stdin_stdout", "input": "10 5 2\n1 1 10\n5 2 6", "output": "199\n"}, {"type": "stdin_stdout", "input": "16 5 2\n2 2 3\n1 2 4", "output": "-392\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\nPlayoff by all the teams\n\nThe ... | [{"type": "stdin_stdout", "input": "5\n3\n3 2\n4 1\n5 1\n3\n1\n1 2\n3\n2\n1 2\n3 2\n5\n4\n4 1\n4 2\n5 1\n5 2\n9\n3\n4 1\n4 2\n5 1\n5\n4\n3 2\n4 1\n5 1\n5 2\n9\n11\n6 1\n6 4\n7 2\n7 3\n7 4\n8 2\n8 3\n8 4\n9 1\n9 3\n9 5\n9\n10\n6 1\n6 4\n7 2\n7 1\n7 4\n8 2\n8 3\n8 4\n9 1\n9 5\n5\n6\n4 3\n2 1\n5 1\n4 4\n1 3\n2 3\n9\n1\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nπ (spelled pi in English) is a m... | [{"type": "stdin_stdout", "input": "1.1386381399168386\n0.08430864816896695\n0.0", "output": "3/1\n16/5\n"}, {"type": "stdin_stdout", "input": "0.5656950408067312\n0.06616503278329884\n0.0", "output": "3/1\n16/5\n"}, {"type": "stdin_stdout", "input": "0.9300839575225542\n0.09342351193849237\n0.0", "output": "3/1\n16/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\nTraining is indispensable for ac... | [{"type": "stdin_stdout", "input": "10 22 1 0 4\n1 -1\n59 3", "output": "0.834647\n"}, {"type": "stdin_stdout", "input": "15 17 5 0 1\n1 1\n-1 3", "output": "0.875000\n"}, {"type": "stdin_stdout", "input": "15 22 3 0 1\n0 0\n-1 1", "output": "0.904762\n"}, {"type": "stdin_stdout", "input": "14 22 1 0 1\n0 1\n41 3", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem statement\n\nJota made a... | [{"type": "stdin_stdout", "input": "3\n3\n12 -1\n1 -1\n0 1", "output": "3\n-12 -1\n-1 -1\n0 1\n"}, {"type": "stdin_stdout", "input": "3\n3\n12 -1\n2 -1\n0 1", "output": "3\n-12 -1\n-2 -1\n0 1\n"}, {"type": "stdin_stdout", "input": "3\n3\n1 -1\n4 -1\n0 0", "output": "3\n-1 -1\n-4 -1\n0 0\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\nA complete binary tree is a bina... | [{"type": "stdin_stdout", "input": "5\n-3 -1 -1 1 -3", "output": "node 1: key = -3, left key = -1, right key = -1, \nnode 2: key = -1, parent key = -3, left key = 1, right key = -3, \nnode 3: key = -1, parent key = -3, \nnode 4: key = 1, parent key = -1, \nnode 5: key = -3, parent key = -1, \n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor $n$ dynamic arrays $A_i$ ($i... | [{"type": "stdin_stdout", "input": "3 13\n0 0 1\n0 0 3\n0 0 3\n0 2 -1\n0 0 4\n0 2 5\n1 0\n1 0\n1 2\n2 1\n1 0\n1 1\n1 2", "output": "1 3 3 4\n1 3 3 4\n-1 5\n1 3 3 4\n\n-1 5\n"}, {"type": "stdin_stdout", "input": "3 13\n0 0 1\n0 1 2\n0 0 3\n0 1 -1\n0 2 4\n0 0 5\n1 0\n1 1\n1 2\n2 2\n1 0\n1 1\n1 0", "output": "1 3 5\n2 -1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef has just finished the const... | [{"type": "stdin_stdout", "input": "3\n2 1\naa\nA`\n3 -1\naba\nbab\naab\n-1 1\naabb\nbaba\nbcaa\nbbaa", "output": "0\n0\n0\n"}, {"type": "stdin_stdout", "input": "3\n2 1\n`a\nA`\n3 -1\naba\nbab\naab\n-1 1\naabb\nbaba\nbcaa\nbbaa", "output": "0\n0\n0\n"}, {"type": "stdin_stdout", "input": "3\n2 1\na`\nA`\n3 -1\naba\nbab... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWelcome to Innopolis city. Throu... | [{"type": "stdin_stdout", "input": "100\n1777 339 1249 1644 785 810 228 549 1892 464 1067 639 65 1653 981 1858 863 1980 1174 427 1710 345 309 826 31 1898 255 661 1836 443 802 195 177 752 979 1842 1689 399 568 1906 129 1571 1263 696 911 810 1877 1932 1389 1128 112 619 184 434 22 1269 386 324 1635 1440 705 300 455 1635 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two binary strings... | [{"type": "stdin_stdout", "input": "91\n0010010000110001001011011011111001000110001000100111110010010001100110010111100111011111100\n1101110110000100110000100011010110111101100000011011100111111000110000001101101111100100101\n", "output": "43\n"}, {"type": "stdin_stdout", "input": "91\n001001000011000100101101101111100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is working on a strange m... | [{"type": "stdin_stdout", "input": "80\n24 192 896 1568 2907 4840 7475 9775 11109 29939 22475 45951 46552 36859 66787 106329 85211 94423 65627 147436 143259 128699 139277 167743 178063 192167 150133 162719 177103 160732 139859 157301 176681 199291 152867 182611 199632 199535 199905 199959\n", "output": "Yes\n1 24 39 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\nConsider the following problem: ... | [{"type": "stdin_stdout", "input": "1979049487\n", "output": "2000\n-1 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n numbers a_1, a_2... | [{"type": "stdin_stdout", "input": "43\n4182 3 6766 701408734 14930353 2585 39088170 1598 10947 988 28658 3524579 611 196419 378 22 14 267914297 90 17712 433494438 24157818 9227466 121394 832041 63245987 165580142 46369 2 514230 6 35 4 234 9 317812 145 102334156 75026 1346270 5702888 56 2178310\n", "output": "YES\n2 3 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a_{1}, a_... | [{"type": "stdin_stdout", "input": "87\n65 97 97 99 57 78 92 55 68 89 63 94 71 54 74 63 94 60 97 75 96 82 87 90 62 72 83 100 76 67 95 69 61 53 55 79 88 99 77 85 79 84 51 58 66 96 97 89 69 84 87 72 53 67 90 63 92 65 73 57 82 69 96 77 73 53 85 96 84 86 61 54 84 52 52 68 100 94 80 60 61 83 89 91 74 92 55\n", "output": "72... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a sequence of i... | [{"type": "stdin_stdout", "input": "4\n5\n1 3 4 5 5\n4\n1 1 3 4\n2\n2 2\n1\n1\n", "output": "1 3 4 5 2 \n-1\n2 1 \n1 \n"}, {"type": "stdin_stdout", "input": "4\n5\n2 3 4 5 5\n4\n1 1 3 4\n2\n2 2\n1\n1\n", "output": "2 3 4 5 1\n-1\n2 1\n1\n"}, {"type": "stdin_stdout", "input": "4\n5\n1 3 4 5 5\n4\n1 1 4 4\n2\n2 2\n1\n1\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou and your n - 1 friends have ... | [{"type": "stdin_stdout", "input": "4\n6 4 2\n3 9 2 3 8 4\n4 3 1\n1 13 60 4\n4 1 3\n1 0 2 1\n2 2 2\n1 2\n", "output": "8\n60\n1\n2\n"}, {"type": "stdin_stdout", "input": "4\n6 4 2\n2 7 4 5 8 7\n4 4 1\n8 13 111 4\n4 1 2\n1 2 2 1\n2 2 1\n2 3\n", "output": "7\n8\n1\n3\n"}, {"type": "stdin_stdout", "input": "4\n6 4 2\n2 7 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given three integers a ≤... | [{"type": "stdin_stdout", "input": "10\n3351 6383 6479\n7051 9793 9929\n1 1061 9572\n5401 5401 5865\n9777 9987 9987\n3393 7229 9665\n8014 8533 8665\n9549 9917 9998\n3336 6686 9962\n5351 8201 9241\n", "output": "208\n3239 6478 6478\n2223\n4964 9928 9928\n7\n1 1063 9567\n464\n5401 5401 5401\n210\n9987 9987 9987\n2608\n32... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMany years ago Berland was a sma... | [{"type": "stdin_stdout", "input": "4\n4 3\n6 1 2 1\n4 10\n11 9 11 18\n2 5\n4 3\n3 7\n9 4 11\n", "output": "3\n4\n0\n3\n"}, {"type": "stdin_stdout", "input": "4\n4 3\n10 1 2 1\n4 10\n11 7 11 9\n2 5\n4 3\n3 7\n9 2 9\n", "output": "4\n3\n0\n2\n"}, {"type": "stdin_stdout", "input": "4\n4 3\n10 1 3 1\n4 10\n11 7 11 9\n2 5\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a bracket sequence... | [{"type": "stdin_stdout", "input": "4\n2\n)(\n4\n()()\n8\n())()()(\n10\n)))((((())\n", "output": "1\n0\n1\n3\n"}, {"type": "stdin_stdout", "input": "4\n2\n)(\n4\n)()(\n8\n())()()(\n10\n)))((((())\n", "output": "1\n1\n1\n3\n"}, {"type": "stdin_stdout", "input": "4\n2\n)(\n4\n()()\n8\n())()()(\n10\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\nA lighthouse keeper Peter comman... | [{"type": "stdin_stdout", "input": "80\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "1776 1805 1832 1857 1880 1901 1920 1937 1953 1967 1980 1991 2001 2009 2016 2021 2025 2027 2028 2028 2028 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 championship is held in Berlan... | [{"type": "stdin_stdout", "input": "2\n4\n1 2 4 3\n5\n1 1 1 1 1\n", "output": "\n3\n2 3 4 \n5\n1 2 3 4 5 \n"}, {"type": "stdin_stdout", "input": "2\n4\n2 2 4 3\n5\n1 2 1 1 1\n", "output": "4\n1 2 3 4\n5\n1 2 3 4 5\n"}, {"type": "stdin_stdout", "input": "2\n4\n2 2 4 4\n5\n1 2 1 1 1\n", "output": "4\n1 2 3 4\n5\n1 2 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\nSolve the following coding problem using the programming language python:\n\nFarmer John has a farm that cons... | [{"type": "stdin_stdout", "input": "3\n3\n0 1 10\n2\n0 0000010000\n1\n0\n", "output": "-10\n0\n0\n"}, {"type": "stdin_stdout", "input": "3\n1\n0\n3\n0 2 15\n2\n0 1000000100\n", "output": "0\n-15\n0\n"}, {"type": "stdin_stdout", "input": "3\n3\n0 0 13\n2\n0 1000100000\n1\n0\n", "output": "-13\n0\n0\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're playing a game called Osu... | [{"type": "stdin_stdout", "input": "30\n0.684344 0.306242 0.147362 0.295294 0.755047 0.7509498461990495 0.785026 0.671988 0.329806 0.832998 0.106621 0.452498 0.125067 1.5040396977864123 0.869683 0.740625 0.449522 0.751800 0.272185 0.865612 0.40967842269133364 0.416162 0.339155 0.478441 0.401937 0.626148 0.305498 1.3778... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSometimes it is hard to prepare ... | [{"type": "stdin_stdout", "input": "rdtevvmiqmfgvafkdypxjthzhfsbavmhgkavkfonscaokdxoscenpxrc\nijbvueenzsmgkmkrskjspvfchwkqdglkxnrdtevvmiqmfgvafkdypxjthz\nkqdglkxnrdtevvmiqmfgvafkdypxjthzhfsbavmhgkavkfonscaokdxoscenpxrcivydtkrxjy\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "iefouqzxoyuieqdzalfktehtvdbvjmeu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's got a birthday coming up... | [{"type": "stdin_stdout", "input": "25 7\n67 18 36 85 64 22 32 66 17 64 66 65 119 36 16 52 19 70 38 51 17 32 85 16 64\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "25 7\n67 18 36 85 64 22 32 66 17 64 66 65 82 36 16 52 19 70 38 51 17 32 85 16 64\n", "output": "16"}, {"type": "stdin_stdout", "input": "25 7\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\nThumbelina has had an accident. ... | [{"type": "stdin_stdout", "input": "200 72 29\n201 145 169 163 32 126 131 71 26 130 2 61 110 17 179 114 79 30 192 91 141 70 101 119 185 66 72 76 164 144 106 162 122 146 119 181 184 61 131 131 140 152 60 65 183 154 32 33 108 77 29 102 67 5 125 26 126 104 20 89 183 21 126 195 198 24 123 173 135 164 141 32\n160 65 136 22 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja has an n × m rectangular ... | [{"type": "stdin_stdout", "input": "21 10 8\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 1 1 1 0 0 0 0 0\n0 0 0 1 1 0 0 0 0 0\n1 1 1 0 0 1 1 1 1 1\n0 0 0 1 1 0 0 0 0 0\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 0 1 1 0 0 0 0 0\n1 0 1 0 0 1 1 1 1 1\n0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn a certain meeting of a ruling... | [{"type": "stdin_stdout", "input": "9 37\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\nLittle Susie, thanks to her olde... | [{"type": "stdin_stdout", "input": "4\n-1 3 3 3\n6 -1 3 -1\n2 3 -1 3\n3 3 3 -1\n", "output": "0\n\n"}, {"type": "stdin_stdout", "input": "4\n-1 3 3 3\n6 -1 3 -1\n2 1 -1 3\n3 3 3 -1\n", "output": "0\n\n"}, {"type": "stdin_stdout", "input": "4\n-1 3 3 3\n6 -1 3 -1\n2 3 -1 2\n3 3 3 -1\n", "output": "0\n\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\nAndrew often reads articles in h... | [{"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "31\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\nfml\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\nLesha plays the recently publish... | [{"type": "stdin_stdout", "input": "1 1000000000 1000 1000 1000000000000000\n1000000000\n", "output": "1000000001000\n1000000000 \n"}, {"type": "stdin_stdout", "input": "1 1000001000 1000 1000 1000000000000000\n1000000000\n", "output": "1000001001000\n1000001000\n"}, {"type": "stdin_stdout", "input": "1 1000000000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA remote island chain contains n... | [{"type": "stdin_stdout", "input": "12\n0 1 2 3 4 5 6 7 8 9 10 11\n1 2 9 8 6 4 5 10 3 7 0 11\n1 2\n2 3\n3 4\n4 5\n4 6\n6 7\n3 8\n8 9\n9 10\n2 11\n11 12\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "12\n0 1 2 3 4 5 6 7 8 9 10 11\n1 2 9 8 6 4 5 10 3 7 0 11\n1 2\n2 3\n3 4\n4 5\n4 6\n6 7\n3 8\n8 9\n9 10\n8 11\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\nInternational Abbreviation Olymp... | [{"type": "stdin_stdout", "input": "9\nIAO'0\nIAO'00\nIAO'000\nIAO'0000\nIAO'00000\nIAO'000000\nIAO'0000000\nIAO'00000000\nIAO'000000000\n", "output": "1990\n2000\n3000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n"}, {"type": "stdin_stdout", "input": "5\nIAO'15\nIAO'2015\nIAO'1\nIAO'9\nIAO'0\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\nToday Pari and Arya are playing ... | [{"type": "stdin_stdout", "input": "61 531012\n698043 698043 698043 963349 698043 698043 698043 963349 698043 698043 698043 963349 698043 698043 698043 698043 966694 698043 698043 698043 698043 698043 698043 636247 698043 963349 698043 698043 698043 698043 697838 698043 963349 698043 698043 966694 698043 698043 698043 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is a beginner programme... | [{"type": "stdin_stdout", "input": "2 1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac\n1\n", "output": "Yes\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's workday lasts exactly... | [{"type": "stdin_stdout", "input": "100 89\n0011011110011111111010111101101100101111111111011011111111110111001111101111111101111011111011101110\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "100 19\n0011011110011111111010111101101100111111111111011011111111110111101111101111111101111011111011101100\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn one quiet day all of sudden M... | [{"type": "stdin_stdout", "input": "100000 180\n", "output": "2 1 100000\n"}, {"type": "stdin_stdout", "input": "100000 227\n", "output": "2 1 100000\n"}, {"type": "stdin_stdout", "input": "100010 227\n", "output": "2 1 100010\n"}, {"type": "stdin_stdout", "input": "100100 245\n", "output": "2 1 100100\n"}, {"type": "s... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of n inte... | [{"type": "stdin_stdout", "input": "100\n2 1 -2 -1 -2 0 -1 -2 1 2 0 1 0 -2 -1 -2 0 2 0 1 -2 -2 2 0 -2 2 -2 0 2 -1 2 0 -1 0 -2 2 -1 -1 -2 -1 0 -2 2 0 -2 -2 -2 -1 1 0 -2 -1 2 -1 -4 0 -1 1 1 2 -2 1 -2 1 2 2 -2 1 -2 0 -1 -1 -2 -2 1 0 -1 -1 2 0 2 0 -1 2 1 -1 2 0 2 1 1 1 -1 -1 1 -2 0 0 -2 0\n", "output": "2 78 92\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\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": "38304\n", "output": "2016\n"}, {"type": "stdin_stdout", "input": "89408\n", "output": "8128\n"}, {"type": "stdin_stdout", "input": "10080\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\nWelcome to another task about br... | [{"type": "stdin_stdout", "input": "100\nmntyyerijtaaditeyqvxstrwxoxglpaubigaggtrepaegniybvfmssawvhrgjjhwwkwuqhtyrimxvolcstyllbhlcursvgfafpts\nbsgmhsgavsbgtwiiqaigmtyjxihphxdlseeajfywugawigrjruttuykthfrvwagpcsxlxsopnarqcvetnbtvfrvlyymwoyelrlta\n", "output": "300\n100 10 1 100 3 1 100 21 1 100 16 1 100 66 1 100 11 1 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA bracket sequence is a string c... | [{"type": "stdin_stdout", "input": "10\n()()(\n)((\n)()(((()(\n(((()(\n)(()((\n))\n()()()()\n))()))((\n)\n))())(\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10\n()()(\n)((\n)()((((((\n(((()(\n)(()((\n))\n()()()()\n))()))((\n)\n))())(\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10\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\nAfter setting up the area and hi... | [{"type": "stdin_stdout", "input": "100000 344\n9489 61424 27955 42780 24866 60662 35985 72602 7178 66039 20165 80878 65110 53338 89723 12426 82120 81954 41970 39397 58255 82537 3650 28876 93078 72976 12227 6751 83149 67385 30224 11174 57709 8346 76772 99593 37316 51065 36529 82364 8508 25414 90342 74569 42932 48144 50... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Dipu is a small kid and l... | [{"type": "stdin_stdout", "input": "11\n16 169\n36 255\n4 363\n27 441\n48 624\n120 1532\n111 21749\n122 1599\n226 1200\n484 484\n1086 1717", "output": "10\n10\n18\n16\n18\n29\n137\n28\n19\n1\n9\n"}, {"type": "stdin_stdout", "input": "11\n16 169\n36 255\n4 363\n27 441\n48 624\n120 1129\n111 21749\n122 1599\n226 1200\n48... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nView Russian Translation\n\nTom ... | [{"type": "stdin_stdout", "input": "1000\ntfumsrmyoadegxickhab\nddjztukvwtpmdumzuybz\nzmizvpyznukwuocziunj\ngntnlzscuzkpeawoarjm\nsfzpdgshrxwncpdzvfhg\nimqtoqrqxzkeiveqdmym\nuqiijkjaemxwwamypieq\ntadclmjjmtmnafooasgm\nnyvtmaymqmqfjajmeofu\ndnwwsbuqnoamyjoyzizs\nystwgabzcqvqbhhjvyik\nttojlqvkhbdnppfsnlah\necnxakfrbirmun... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.