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\nAn array of integers $p_1, p_2, ... | [{"type": "stdin_stdout", "input": "5\n-1 2 -3 -1\n", "output": "4 3 5 2 1 "}, {"type": "stdin_stdout", "input": "5\n3 -2 1 -3\n", "output": "2 5 3 4 1 "}, {"type": "stdin_stdout", "input": "5\n-4 1 2 -1\n", "output": "5 1 2 4 3 "}, {"type": "stdin_stdout", "input": "5\n1 1 -3 4\n", "output": "2 3 4 1 5 "}, {"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\nTakahashi is standing on a multi... | [{"type": "stdin_stdout", "input": "613921846801\n", "output": "613921846800\n"}, {"type": "stdin_stdout", "input": "550310490859\n", "output": "550310490858\n"}, {"type": "stdin_stdout", "input": "571704556531\n", "output": "571704556530\n"}, {"type": "stdin_stdout", "input": "472249589291\n", "output": "472249589290\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 have decided to pl... | [{"type": "stdin_stdout", "input": "1000000000\n156489182 145117627 698393191\n584283682 217785715 197930603\n", "output": "282676873 885890491\n"}, {"type": "stdin_stdout", "input": "931934723\n512340462 202375672 217218589\n24862054 655510760 251561909\n", "output": "235916499 739578188\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\nThis problem is given in two edi... | [{"type": "stdin_stdout", "input": "50\n-100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "50\naclojlojlojlojlojlojlojlojlojlojlojlojlojlojlojloj\nlojlojlojlojlojlojlojlojlojlojlojlojlojlojlojlojac\n", "output": "96\n2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 17 19 18 20 19 21 20 22 21 23 22 24 23 25 24 26 25 27 26 28 27 29 28 30 29 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\nIvan wants to play a game with y... | [{"type": "stdin_stdout", "input": "18\nd\nh\ndj\nxh\ndjs\njxh\ndjsh\nzjxh\ndjshf\nkzjxh\ndjshfk\nhkzjxh\ndjshfkj\nkhkzjxh\ndjshfkje\nskhkzjxh\ndjshfkjeh\ndskhkzjxh\ndjshfkjehd\nhdskhkzjxh\ndjshfkjehds\nehdskhkzjxh\ndjshfkjehdsk\njehdskhkzjxh\ndjshfkjehdskh\nkjehdskhkzjxh\ndjshfkjehdskhk\nfkjehdskhkzjxh\ndjshfkjehdskhk... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSalve, mi amice.\n\nEt tu quidem... | [{"type": "stdin_stdout", "input": "100 100 100 100 100\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "60 92 82 71 53\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "67 66 69 96 92\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "50 27 17 31 89\n", "output": "4\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\nThere is a house with $n$ flats ... | [{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 1 1 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "100\n0 0 1 0 1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "6\n10000100623 10000100623 10000100623 10000100623 10000100623 10000100623\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n99999999977 99999999977 99999999977 99999999977 99999999977\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "6\n100001623 100001623 100001623... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's house is an array consist... | [{"type": "stdin_stdout", "input": "187 64\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a positive integer N.\n... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "13969985\n"}, {"type": "stdin_stdout", "input": "877046\n", "output": "12137262\n"}, {"type": "stdin_stdout", "input": "999931\n", "output": "13968881\n"}, {"type": "stdin_stdout", "input": "999901\n", "output": "13968459\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a bracket sequence... | [{"type": "stdin_stdout", "input": "20\n(())(()((((()())()((\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "19\n)(()()()()))(()))))\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "17\n))((()(((()()))()\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "16\n((())()((()()(()\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\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "ziurxtzxixmsmewfuffsqdkpphssdcgybwtmzavkosqtmcntspzvftqybaldjllvgttblectspqinfdhhnpvkcbwjlqlquajueqsgymyekuswjctumsbnvvaiinxjlzcnyixfaykolkeogufvzvhnatqtelgjkqfvexghiznwubwihjkznkhepjzrnyzftmimqtlihpn\nzurzximmewfuffskppsdcybwmzavkosqtmctspvftybaljlgtltsqinfdhhpvkcwjlqlqymykusctumsbn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 are integers a,b,c and d.\... | [{"type": "stdin_stdout", "input": "-1000000000 1000000000 -1000000000 1000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "418379342 802780784 -790013317 -445130206\n", "output": "-186233282690604452\n"}, {"type": "stdin_stdout", "input": "-477104372 -381646699 -939378260 508013173\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\nVova had a pretty weird sleeping... | [{"type": "stdin_stdout", "input": "65 654 560 571\n83 511 615 263 171 146 241 511 582 216 352 632 506 538 536 217 627 213 324 579 172 241 363 584 450 144 447 536 241 523 162 21 437 291 191 111 567 502 170 570 231 493 169 360 107 114 322 160 574 611 460 558 616 361 284 58 41 345 450 560 543 520 105 416 38\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\nYou are given a problemset consi... | [{"type": "stdin_stdout", "input": "9\n4 6 9 12 100 150 200 400 800\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n1 2 5 11 12 24 25 26 27 28\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "10\n1 2 5 6 7 10 21 23 24 49\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "8\n2 4 6 23 60 120 20... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ consi... | [{"type": "stdin_stdout", "input": "4\n9999991 9999883 9999659 9999433\n", "output": "3 4\n"}, {"type": "stdin_stdout", "input": "3\n10000000 9999999 9999997\n", "output": "2 3\n"}, {"type": "stdin_stdout", "input": "3\n10000000 9999999 9999998\n", "output": "1 3\n"}, {"type": "stdin_stdout", "input": "2\n10000000 9999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 staircase with N step... | [{"type": "stdin_stdout", "input": "16090 15931\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\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\nProgrammers' kids solve this rid... | [{"type": "stdin_stdout", "input": "2000000000\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "143165576\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "1919020031\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "1795248373\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "1818960378\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\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "10\n", "output": "265\n"}, {"type": "stdin_stdout", "input": "11\n", "output": "274\n"}, {"type": "stdin_stdout", "input": "12\n", "output": "319\n"}, {"type": "stdin_stdout", "input": "13\n", "output": "346\n"}, {"type": "stdin_stdout", "input": "14\n", "output": "355\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\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "927\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "142\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "309\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "572\n", "output": "0\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDO YOU EXPECT ME TO FIND THIS OU... | [{"type": "stdin_stdout", "input": "10\n5 5 10 10 10 2 4 3 4 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n8 10 6 10 4 3 4 6 7 4\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "10\n5 6 4 8 11 4 10 4 8 4\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "8\n4 7 11 3 11 3 1 1\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\nPolycarp wants to buy exactly $n... | [{"type": "stdin_stdout", "input": "10\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n208790602 104395300\n", "output": "104395301\n104395301\n104395301\n104395301\n104395301\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\nWe have N switches with \"on\" a... | [{"type": "stdin_stdout", "input": "10 10\n10 6 7 4 3 9 2 8 5 10 1\n10 8 7 3 2 5 10 4 6 9 1\n10 7 4 2 5 10 8 3 9 6 1\n10 5 6 8 4 2 10 7 3 1 9\n10 9 10 7 4 6 1 8 2 5 3\n10 6 2 7 9 8 3 1 4 5 10\n10 1 8 4 10 7 6 5 2 3 9\n10 3 1 4 6 5 2 9 7 10 8\n10 4 3 9 2 5 10 7 6 8 1\n10 1 7 2 5 3 8 6 10 4 9\n1 1 1 1 1 1 1 1 1 1\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\nConsider an analog clock whose h... | [{"type": "stdin_stdout", "input": "1000 1000 6 1\n", "output": "1997.69677296990135817456\n"}, {"type": "stdin_stdout", "input": "858 203 11 21\n", "output": "1031.72462874262234588940\n"}, {"type": "stdin_stdout", "input": "944 305 10 32\n", "output": "1142.87647693641628066086\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer sequenc... | [{"type": "stdin_stdout", "input": "15 2\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\n", "output": "97\n"}, {"type": "stdin_stdout", "input": "10 7\n14 20 3 3 8 16 17 13 6 4\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "9 8\n10 8 8 15 1 2 13 8 6\n", "output": "27\n"}, {"type": "stdin_stdout", "input": "8 2\n2 6 11 14 10 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "50 50\n1 -9 8 -9 5 -4 -4 3 -2 -1 3 -8 -6 -6 2 -5 -1 -2 -5 10 2 0 10 10 5 -3 7 -1 -9 9 -10 4 7 0 -6 0 -1 4 8 0 -3 -8 10 10 6 6 -3 -5 -3 -8\n28 41\n28 49\n49 49\n6 38\n22 30\n50 50\n41 45\n30 32\n17 44\n24 25\n27 39\n17 39\n50 50\n10 14\n11 12\n18 28\n11 20\n36 42\n45 49\n29 36\n32 44\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 diverse if it... | [{"type": "stdin_stdout", "input": "69\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\nabc\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "50 50\n1 -9 8 -9 5 -4 -4 3 -2 -1 3 -8 -6 -6 2 -5 -1 -2 -5 10 2 0 10 10 5 -3 7 -1 -9 9 -10 4 7 0 -6 0 -1 4 8 0 -3 -8 10 10 6 6 -3 -5 -3 -8\n28 41\n28 49\n49 49\n6 38\n22 30\n50 50\n41 45\n30 32\n17 44\n24 25\n27 39\n17 39\n50 50\n10 14\n11 12\n18 28\n11 20\n36 42\n45 49\n29 36\n32 44\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between prob... | [{"type": "stdin_stdout", "input": "100\n2 3 4 6 7 8 9 12 13 14 15 16 17 19 20 21 24 25 27 28 31 32 34 40 42 43 45 46 47 49 54 55 58 59 60 61 62 63 68 71 74 75 80 81 82 85 86 87 88 89 91 92 95 96 98 99 100 97 94 93 90 84 83 79 78 77 76 73 72 70 69 67 66 65 64 57 56 53 52 51 50 48 44 41 39 38 37 36 35 33 30 29 26 23 22 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "12\n123654 1 2 3 4 5 6 7 8 9 10 11\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "15\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "11\n123654 1 2 3 4 5 6 7 8 9 10\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "8\n53 43 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\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "50 25\n199970 199997 199998 199988 199999 199981 200000 199990 199974 199985 199932 200000 199966 199999 199999 199951 199983 199975 199974 199996 199974 199992 199979 199995 199955 199989 199960 199975 199983 199990 199950 199952 199999 199999 199962 199939 199979 199977 199962 1999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi has many red balls and... | [{"type": "stdin_stdout", "input": "984159202374430527 552558592232591693 265756112319848958\n", "output": "718403090054581569\n"}, {"type": "stdin_stdout", "input": "994914121424164663 818665214162491101 129546857230076861\n", "output": "865367264194087802\n"}, {"type": "stdin_stdout", "input": "501719768609305159 370... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 guessed some integer number $... | [{"type": "stdin_stdout", "input": "25\n2\n999389 999917\n2\n999307 999613\n2\n999529 999611\n2\n999221 999853\n2\n999683 999433\n2\n999907 999749\n2\n999653 999499\n2\n999769 999931\n2\n999809 999287\n2\n999233 999239\n2\n999553 999599\n2\n999371 999763\n2\n999491 999623\n2\n999961 999773\n2\n999671 999269\n2\n999883 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 knows that if the sum o... | [{"type": "stdin_stdout", "input": "1000\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "997\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "999\n", "output": "1003\n"}, {"type": "stdin_stdout", "input": "432\n", "output": "435\n"}, {"type": "stdin_stdout", "input": "237\n", "output": "237\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\nPolycarp wrote on the board a st... | [{"type": "stdin_stdout", "input": "10\nvzsxyuyy\n3\n1 0 3\nwwvutuxsuxywut\n2\n0 0\nsuzvsvutvvstuz\n3\n3 1 0\nstyuwsutv\n4\n6 3 0 1\nzsustytvzsyw\n6\n0 9 5 7 7 5\nsvwxwwwyxuvszx\n1\n0\nxuyyvuztxwuuvsxwz\n5\n5 7 0 0 7\nuxuztuwsxz\n5\n4 2 2 0 10\nxystzstwtzwsz\n2\n1 0\nuuzss\n1\n0\n", "output": "yzx\nxx\nuvz\nuvyw\nztwtv... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n1000000000000001 dogs suddenly a... | [{"type": "stdin_stdout", "input": "1000000000000001\n", "output": "gbdpxgrzxjm\n"}, {"type": "stdin_stdout", "input": "530000050000000\n", "output": "csoypdctwnh\n"}, {"type": "stdin_stdout", "input": "95678123450002\n", "output": "qpdjiixlxb\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "cfdgsxl\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 text consisting ... | [{"type": "stdin_stdout", "input": "250\nf r s d b f f k d e k v m b t k k j t t a o m m s n d w l v g e k x d w k v a j h c a g x s d e t z z w q z d h n r i k b z k u s q l k c v o d o w w c y i a q v r i g i m l b x z h t a i j t h q u e v j o h w m o v k g r r x j a c m z z i s i r a p p i i l e i g m f f f y v k m... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 practicing his probl... | [{"type": "stdin_stdout", "input": "18 15\n18 2 13 1 18 3 2 18 18 20 9 2 20 20 4 20 9 12\n", "output": "204\n1 2 2 1 2 1 1 1 1 1 1 1 1 1 1\n"}, {"type": "stdin_stdout", "input": "16 15\n14 4 9 12 17 1 1 8 12 13 6 9 17 2 18 12\n", "output": "154\n1 1 1 1 1 2 1 1 1 1 1 1 1 1 1\n"}, {"type": "stdin_stdout", "input": "18 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\nKolya got an integer array $a_1,... | [{"type": "stdin_stdout", "input": "100\n-6 2 8 -9 -9 3 -3 -2 7 3 2 -2 -9 -7 -10 -9 10 4 5 -9 8 -5 7 -2 6 -2 4 4 -2 -5 6 4 8 -8 9 7 -4 2 -3 7 4 -10 -7 -4 8 2 10 -8 -3 -8 -5 -5 -10 -6 -8 -5 7 -1 7 -5 9 10 3 5 10 -7 -3 -7 1 -5 -8 5 1 -1 4 10 2 6 -4 9 3 10 -5 -10 -10 -2 1 9 10 1 10 2 8 -3 -3 -1 7 -5 8 -4\n", "output": "11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integers $n$ a... | [{"type": "stdin_stdout", "input": "5\n1 100\n2 2\n5 5\n2 1000000000\n1000000000 1000000000\n", "output": "0\n2\n10\n1000000000\n2000000000\n"}, {"type": "stdin_stdout", "input": "2\n12345 12345\n12345 12345\n", "output": "24690\n24690\n"}, {"type": "stdin_stdout", "input": "2\n12345 12345\n1 1\n", "output": "24690\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\nTakahashi loves the number 7 and... | [{"type": "stdin_stdout", "input": "999983\n", "output": "999982\n"}, {"type": "stdin_stdout", "input": "999863\n", "output": "999862\n"}, {"type": "stdin_stdout", "input": "999953\n", "output": "999952\n"}, {"type": "stdin_stdout", "input": "531441\n", "output": "531441\n"}, {"type": "stdin_stdout", "input": "823543\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 permutation $p_1... | [{"type": "stdin_stdout", "input": "100 50\n2 4 82 12 47 63 52 91 87 45 53 1 17 25 64 50 9 13 22 54 21 30 43 24 38 33 68 11 41 78 99 23 28 18 58 67 79 10 71 56 49 61 26 29 59 20 90 74 5 75 89 8 39 95 72 42 66 98 44 32 88 35 92 3 97 55 65 51 77 27 81 76 84 69 73 85 19 46 62 100 60 37 7 36 57 6 14 83 40 48 16 70 96 15 31... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "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\nPolycarp likes arithmetic progre... | [{"type": "stdin_stdout", "input": "4\n1 1000000000 1000000000 1000000000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10\n9 5 3 4 7 1 2 8 10 6\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10\n10 9 8 7 6 1 2 3 4 5\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "2\n1000000000 1\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\nYou are a coach at your local un... | [{"type": "stdin_stdout", "input": "100 4\n4741 3440 2421 1765 4810 1955 4346 1365 2697 3255 3337 386 1154 115 4951 2306 4058 279 4849 3962 1737 1147 362 4799 4796 3670 481 2913 435 1032 592 1187 4676 1295 2262 3757 2494 862 2134 1898 4159 530 3038 2610 4399 2707 1041 4337 3275 3569 4437 166 4730 3165 4022 3317 1763 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\nTakahashi is taking exams on N s... | [{"type": "stdin_stdout", "input": "100 100 100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi has decided to hold fa... | [{"type": "stdin_stdout", "input": "1000 993 1000\n176\n400\n733\n753\n822\n429\n929\n697\n176\n191\n80\n247\n40\n891\n773\n889\n453\n777\n451\n40\n120\n222\n697\n906\n441\n251\n324\n193\n970\n558\n824\n390\n824\n36\n209\n120\n849\n548\n393\n668\n561\n289\n560\n970\n575\n53\n154\n931\n750\n404\n478\n120\n542\n98\n551\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a binary matrix $a... | [{"type": "stdin_stdout", "input": "4 5\n0 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n", "output": "YES\n0000\n00000\n"}, {"type": "stdin_stdout", "input": "3 4\n0 0 0 1\n0 0 0 0\n1 1 1 1\n", "output": "YES\n010\n0000\n"}, {"type": "stdin_stdout", "input": "2 3\n0 1 0\n0 1 0\n", "output": "YES\n00\n101\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n-----Input-----\n\nThe only line... | [{"type": "stdin_stdout", "input": "4357087936\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3333333333\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "806975480\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "673902416\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "8800897... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 very experienced problem wri... | [{"type": "stdin_stdout", "input": "255+255+255+255+255+255+255+255+255+255\n", "output": "-42450\n"}, {"type": "stdin_stdout", "input": "101+200+195+231+107+222+146+254+160+209\n", "output": "-43175\n"}, {"type": "stdin_stdout", "input": "255-100-100-100-100-100-100-100-100-100\n", "output": "26355\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe king of Berland organizes a ... | [{"type": "stdin_stdout", "input": "69 42\n", "output": "YES\n1 2\n2 3\n3 4\n4 5\n5 6\n6 7\n7 8\n8 9\n9 10\n10 11\n11 12\n12 13\n13 14\n14 15\n15 16\n16 17\n17 18\n18 19\n19 20\n20 21\n21 22\n22 23\n23 24\n24 25\n25 26\n26 27\n27 28\n28 29\n29 30\n30 31\n31 32\n32 33\n33 34\n34 35\n35 36\n36 37\n37 38\n38 39\n39 40\n40... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "200 103 37\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 work as a system administrat... | [{"type": "stdin_stdout", "input": "200 10\n10000010101010110011110010100010010000001100101111011001010010001101001011111110011010111101000101011110101001001101101011010011100000100101000010110111000110000010101110110000110000100000101110111100\n", "output": "989\n"}, {"type": "stdin_stdout", "input": "100 5\n110111111... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi, who is a novice in co... | [{"type": "stdin_stdout", "input": "12 12 48311\n2997 79802 84238 34346 35199 2284 77696 46340 54797 36702 97764 42765 11582\n82923 47331 39508 81928 63775 90952 64439 99662 74546 15843 11552 23897 87476\n26261 21259 714 72469 92132 94958 69101 38760 4916 38769 60706 90149 70017\n35433 97674 53722 44881 95786 42614 799... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 programming competition site A... | [{"type": "stdin_stdout", "input": "10 10550000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n", "output": "1000\n"}, {"type": "stdin_stdout", "input": "10 100\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 1000000\n100 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\nTanya has $n$ candies numbered f... | [{"type": "stdin_stdout", "input": "105\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 5 5 5 6\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "9\n2 3 4 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 only difference between easy... | [{"type": "stdin_stdout", "input": "25 4 15\n172043124 384297369 650214870 426077944 587045971 576701397 865475689 261462255 763837593 285228401 629011531 611623799 456424430 820020943 166915939 903479811 384167579 561107351 177427070 14589838 994169358 683167027 193684940 439658261 237500762\n", "output": "9968015975\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLa Confiserie d'ABC sells cakes ... | [{"type": "stdin_stdout", "input": "100\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "11\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "40\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "15\n", "output": "Yes\n"}, {"type":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the Ancient Kingdom of Snuke,... | [{"type": "stdin_stdout", "input": "100\n10 12 512917373\n6 9 512917366\n66 44 512917421\n49 18 512917412\n57 96 512917426\n65 72 512917442\n62 59 512917440\n27 77 512917437\n31 13 512917395\n38 39 512917428\n15 72 512917430\n0 69 512917418\n22 22 512917395\n9 69 512917427\n37 96 512917428\n12 23 512917386\n100 90 5129... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi loves palindromes. Non... | [{"type": "stdin_stdout", "input": "cgayikejwockvntzlvpsfjtzlqfhoqoiahcodvinogbpuxhvohhcvhzmidloliztdhrntxqurzqjztjmwpylaknjncowkeuikhgc\n", "output": "30\n"}, {"type": "stdin_stdout", "input": "pgfqwbxjygkpqanpkicpaxfgeembvdgtllvtiyamxfpwtknorxxvonpntkwcffyjtvwlqgvvbzmmgfgkwezkemmxpagyihbkqidk\n", "output": "32\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\nHaving learned the multiplicatio... | [{"type": "stdin_stdout", "input": "10\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "81\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "12\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "15\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "16\n", "output": "Yes\n"}, {"type": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHaving learned the multiplicatio... | [{"type": "stdin_stdout", "input": "20 20\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5 10\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "1 11\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "20 1\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "11 3\n", "output": "-1\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\nThere are $n$ cities in Berland.... | [{"type": "stdin_stdout", "input": "16 20 100\n7 8\n6 5\n15 1\n7 2\n2 12\n1 7\n7 9\n13 15\n11 14\n3 10\n8 3\n2 14\n3 4\n1 5\n4 15\n10 12\n11 4\n4 8\n7 16\n14 13\n", "output": "8\n11111111011101101010\n11111111010111101010\n11111111001101111010\n11111111000111111010\n11111111011001101011\n11111111010011101011\n111111110... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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's family is building the Gr... | [{"type": "stdin_stdout", "input": "10\n1 9 7 6 2 4 7 8 1 3\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "2\n99999999 99999998\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "9\n2 5 1 9 6 5 7 3 1\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "7\n10 2 3 4 2 8 8\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 superhero fights with a monste... | [{"type": "stdin_stdout", "input": "1000000000000 10\n-6 5 -2 -2 -10 -7 -5 -9 -3 -4\n", "output": "232558139536\n"}, {"type": "stdin_stdout", "input": "1000000000000 10\n-2 -8 -3 10 4 -8 2 -1 -3 3\n", "output": "1666666666652\n"}, {"type": "stdin_stdout", "input": "1000000000000 10\n8 10 3 0 -4 3 -7 -6 3 -6\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\nTwo-gram is an ordered pair (i.e... | [{"type": "stdin_stdout", "input": "100\nURXCAIZFIBNJTPCZHBQIBCILLPXZCFGMKKZMNPLCYGAVJVIBMCZEBSJWPSCPQDYCTTKPOKIJRSKIZPDGCHVOUTMPNECYORSFZFNC\n", "output": "IB\n"}, {"type": "stdin_stdout", "input": "100\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\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 string S of an odd length is s... | [{"type": "stdin_stdout", "input": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "kszhkbpphykinkezplvfjaqmpmqajfvlpzeknikyhppbkhzskokszhkbpphykinkezplvfjaqmpmqajfvlpzeknikyhppbkhzsk\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\nCompute A \\times B, truncate it... | [{"type": "stdin_stdout", "input": "1000000000000000 9.99\n", "output": "9990000000000000\n"}, {"type": "stdin_stdout", "input": "776013196293085 2.60\n", "output": "2017634310362021\n"}, {"type": "stdin_stdout", "input": "776013196293085 8.11\n", "output": "6293467021936919\n"}, {"type": "stdin_stdout", "input": "9999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are two sisters Alice and ... | [{"type": "stdin_stdout", "input": "98\n710\n896\n635\n909\n528\n799\n184\n970\n731\n285\n481\n62\n829\n815\n204\n927\n48\n958\n858\n549\n722\n900\n290\n96\n414\n323\n488\n140\n494\n286\n783\n551\n896\n580\n724\n766\n841\n914\n200\n170\n384\n664\n14\n203\n582\n203\n678\n502\n677\n318\n189\n144\n97\n330\n169\n20\n492\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ cities and $m$ roa... | [{"type": "stdin_stdout", "input": "39 40 38\n4 8\n24 28\n16 17\n7 25\n4 29\n34 35\n16 24\n21 10\n23 36\n36 14\n28 16\n34 19\n15 21\n22 38\n22 37\n37 27\n28 33\n3 29\n32 22\n12 30\n9 15\n5 19\n23 27\n19 17\n25 17\n24 11\n39 10\n6 20\n16 6\n3 18\n34 21\n15 38\n11 19\n11 3\n32 4\n15 13\n16 11\n11 7\n33 7\n3 33\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\nIn Republic of Atcoder, there ar... | [{"type": "stdin_stdout", "input": "75634 912\n18125 601244640\n58230 951349939\n4017 753730550\n23636 124912128\n45120 23758881\n51811 316477853\n19326 139861106\n48018 406348942\n68864 391719264\n1850 712458521\n2796 385027567\n12731 564315721\n43367 828330253\n30104 102450015\n64351 340641907\n19781 414658282\n53502... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGolorps are mysterious creatures... | [{"type": "stdin_stdout", "input": "?(_*__*___*____*_____*______*_______*________*_________*__________*___________*____________):-__<___,___<____,____<_____,_____<______,______<_______,_______<________,________<_________,_________<__________,__________<___________,___________<____________.\n", "output": "false\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\nThere is a rectangular grid of s... | [{"type": "stdin_stdout", "input": "10 10 524287\n1 2 4 8 16 32 64 128 256 512\n2 4 8 16 32 64 128 256 512 1024\n4 8 16 32 64 128 256 512 1024 2048\n8 16 32 64 128 256 512 1024 2048 4096\n16 32 64 128 256 512 1024 2048 4096 8192\n32 64 128 256 512 1024 2048 4096 8192 16384\n64 128 256 512 1024 2048 4096 8192 16384 3276... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 $s$ of length $n$ can b... | [{"type": "stdin_stdout", "input": "100\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\n", "output": "fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi\n"}, {"type": "stdin_stdout", "input": "100\nooooooooooooooooo... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 + B is often used as an exampl... | [{"type": "stdin_stdout", "input": "723 350\n", "output": "1073\n"}, {"type": "stdin_stdout", "input": "923 488\n", "output": "1411\n"}, {"type": "stdin_stdout", "input": "953 553\n", "output": "1506\n"}, {"type": "stdin_stdout", "input": "441 915\n", "output": "1356\n"}, {"type": "stdin_stdout", "input": "740 519\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 this problem you will write a... | [{"type": "stdin_stdout", "input": "0-255-255-255-255+255+255+255+255+255\n", "output": "++++++++++++++++++++++++++++++++++++++++++++++++++.>\n+++++++++++++++++++++++++++++++++++++++++++++++++++++.>\n+++++++++++++++++++++++++++++++++++++++++++++++++++++.>\n"}, {"type": "stdin_stdout", "input": "255-255+255-255+255-255+... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "19\n1\n10\n100\n1000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n10000000000\n100000000000\n1000000000000\n10000000000000\n100000000000000\n1000000000000000\n10000000000000000\n100000000000000000\n1000000000000000000\n", "output": "1\n4\n1\n4\n9\n2\n6\n2\n6\n8\n1\n1\n9\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer N. Amon... | [{"type": "stdin_stdout", "input": "999999999\n", "output": "26484\n"}, {"type": "stdin_stdout", "input": "500000000\n", "output": "14384\n"}, {"type": "stdin_stdout", "input": "777757375\n", "output": "26423\n"}, {"type": "stdin_stdout", "input": "777777752\n", "output": "26483\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nN tiles are arranged in a row fr... | [{"type": "stdin_stdout", "input": "01010000100110111100010011111100001010101111001100001010101000100101100011110011111110100011000001111011010011100010010111011001011000010110011100111010111111010100010111100100110000100010010011101001001110000100110101011001100000010111101101100100010011110010110010101100100011001010... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an immigration officer i... | [{"type": "stdin_stdout", "input": "100\n768 125 109 300 471 697 999 760 529 42 373 15 59 387 75 823 850 330 756 661 700 610 99 156 367 481 720 588 477 65 513 600 569 531 970 97 456 223 963 625 823 612 421 633 774 529 190 835 245 263 861 456 893 293 762 270 955 457 65 941 787 700 617 813 550 70 807 217 683 935 732 320 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 2028 and after a continuous g... | [{"type": "stdin_stdout", "input": "802565984633806\n802252530129536\n544410837252078\n872045491508709\n274353138702170\n562308817245826\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "956131704220258\n897098524760050\n55734601880356\n155602009554546\n559895124828099\n830172607676349\n", "output": "22\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\nHow many integer sequences A_1,A... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "787616419\n"}, {"type": "stdin_stdout", "input": "260522\n", "output": "765255076\n"}, {"type": "stdin_stdout", "input": "914575\n", "output": "875983450\n"}, {"type": "stdin_stdout", "input": "436426\n", "output": "851976198\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the minimum prime number gr... | [{"type": "stdin_stdout", "input": "100000\n", "output": "100003\n"}, {"type": "stdin_stdout", "input": "99992\n", "output": "100003\n"}, {"type": "stdin_stdout", "input": "64993\n", "output": "64997\n"}, {"type": "stdin_stdout", "input": "90371\n", "output": "90371\n"}, {"type": "stdin_stdout", "input": "92227\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\nWe have a string S consisting of... | [{"type": "stdin_stdout", "input": "26\nYIHVXVZROUSFCUXIOGFIOUSIYDBTQLMECEEHARRBWUDXRITQZSTXNECYMODBOSODWDSWEFEXTVVPENGERSVLYSBDSJOKYSGTJQPEDQWMLFZANYYWWHRHPCOYXLEEBUPOBJMZVUTWCPXQEEHRPSUKCMIDRSBGHBRBAYXUGTZGFRSZTHEVFCFOOTPWYQMXJICOFMXDLCBINVZCPVWRKWDVGBDTDCWRNKPOXANOHOOCKXCSZBSHXXTGCKTSKBRZZTFAAQYFKZGNIZJJZSYTBOKKMTSH... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAuthors guessed an array $a$ con... | [{"type": "stdin_stdout", "input": "100\n3 3 2 2 3 2 3 2 2 2 2 3 3 2 2 2 2 2 3 3 3 2 3 3 3 2 2 2 3 3 2 3 2 2 3 2 3 2 2 2 3 2 3 3 3 2 3 3 3 2 2 3 3 3 3 3 2 3 2 2 2 3 3 3 2 3 3 3 3 2 2 3 2 3 2 3 2 3 3 2 3 2 3 3 3 2 2 2 2 3 2 2 3 2 3 2 3 3 2 2 3 2 3 3 2 2 2 2 3 2 3 2 2 2 3 3 2 3 3 3 3 2 2 3 2 3 3 2 3 3 3 2 3 2 3 2 2 3 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\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 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\nA sequence $a_1, a_2, \\dots, a_... | [{"type": "stdin_stdout", "input": "10\n2 10 9 1 10 4 7 8 5 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "6\n4 7 1 5 4 9\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "6\n1 7 7 7 7 7\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n1 1 1 1023\n", "output": "0\n"}, {"type": "stdin_stdou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a flower bed, there are N flo... | [{"type": "stdin_stdout", "input": "100\n0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100 0 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe busses in Berland are equipp... | [{"type": "stdin_stdout", "input": "102 1\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\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2 1000000000\n-1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ distinct points on... | [{"type": "stdin_stdout", "input": "3\n0 -536870912 536870912\n", "output": "3\n-536870912 0 536870912 \n"}, {"type": "stdin_stdout", "input": "2\n536870912 -536870912\n", "output": "2\n-536870912 536870912 \n"}, {"type": "stdin_stdout", "input": "6\n3 5 4 7 10 12\n", "output": "3\n3 4 5 \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\nTakahashi has a deposit of 100 y... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "3760\n"}, {"type": "stdin_stdout", "input": "822981260158260822\n", "output": "3740\n"}, {"type": "stdin_stdout", "input": "779547116602436626\n", "output": "3735\n"}, {"type": "stdin_stdout", "input": "578223540024980345\n", "output": "3705\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\nFind \\displaystyle{\\sum_{a=1}^... | [{"type": "stdin_stdout", "input": "200\n", "output": "10813692\n"}, {"type": "stdin_stdout", "input": "199\n", "output": "10611772\n"}, {"type": "stdin_stdout", "input": "198\n", "output": "10493367\n"}, {"type": "stdin_stdout", "input": "197\n", "output": "10290813\n"}, {"type": "stdin_stdout", "input": "196\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\nTak performed the following acti... | [{"type": "stdin_stdout", "input": "100\n3 3\n1 1\n5 5\n4 4\n1 1\n3 3\n3 3\n5 5\n2 2\n3 3\n2 2\n2 2\n3 3\n3 3\n5 5\n3 3\n1 1\n3 3\n4 4\n1 1\n4 4\n3 3\n3 3\n4 4\n6 6\n5 5\n2 2\n6 6\n3 3\n1 1\n6 6\n4 4\n3 3\n3 3\n6 6\n2 2\n5 5\n5 5\n1 1\n1 1\n5 5\n6 6\n6 6\n4 4\n6 6\n6 6\n5 5\n3 3\n2 2\n1 1\n1 1\n4 4\n6 6\n5 5\n3 3\n2 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\nGiven is an integer r.\nHow many... | [{"type": "stdin_stdout", "input": "100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "87\n", "output": "7569\n"}, {"type": "stdin_stdout", "input": "76\n", "output": "5776\n"}, {"type": "stdin_stdout", "input": "91\n", "output": "8281\n"}, {"type": "stdin_stdout", "input": "88\n", "output": "7744\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\nDetermine if an N-sided polygon ... | [{"type": "stdin_stdout", "input": "10\n100 100 100 100 100 100 100 100 100 100\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "10\n72 91 66 75 90 52 94 1 87 59\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "10\n11 11 11 11 99 11 11 11 11 11\n", "output": "No\n"}, {"type": "stdin_stdout", "input"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIf there is an integer not less ... | [{"type": "stdin_stdout", "input": "3 3\n1 7\n3 2\n1 7\n", "output": "702\n"}, {"type": "stdin_stdout", "input": "3 3\n3 1\n2 1\n1 4\n", "output": "411\n"}, {"type": "stdin_stdout", "input": "2 3\n2 0\n2 0\n2 0\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "3 2\n2 1\n2 3\n", "output": "-1\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given integers N and K. ... | [{"type": "stdin_stdout", "input": "200000 1\n", "output": "8000000000000000\n"}, {"type": "stdin_stdout", "input": "200000 2\n", "output": "2000000000000000\n"}, {"type": "stdin_stdout", "input": "200000 3\n", "output": "296287407496296\n"}, {"type": "stdin_stdout", "input": "100004 8\n", "output": "3906718787501\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an integer N, find the bas... | [{"type": "stdin_stdout", "input": "-1000000000\n", "output": "11000101101001010100101000000000\n"}, {"type": "stdin_stdout", "input": "-790013317\n", "output": "11010001001111101010111110001111\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1001100111011111101111000000000\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\nHearing that energy drinks incre... | [{"type": "stdin_stdout", "input": "1 100000\n1000000000 100000\n", "output": "100000000000000\n"}, {"type": "stdin_stdout", "input": "4 30\n6 18\n2 5\n3 10\n7 9\n", "output": "130\n"}, {"type": "stdin_stdout", "input": "2 5\n4 9\n2 4\n", "output": "12\n"}] | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.