messages
listlengths
1
1
ground_truth
stringlengths
156
726k
dataset
stringclasses
2 values
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an array $a$ of length $n$ consisting of integers. You can apply the following operation, consi...
[{"input": "5\n6\n1 6 1 1 4 4\n2\n1 2\n2\n1 1\n5\n4 5 4 5 4\n6\n2 3 2 1 3 1\n", "output": "\n0\n0\n2\n1\n0\n"}, {"input": "5\n6\n1 6 1 1 4 4\n2\n1 2\n2\n1 1\n5\n4 5 4 5 4\n6\n2 3 2 1 3 1\n", "output": "0\n0\n2\n1\n0\n"}, {"input": "5\n6\n2 6 1 1 4 4\n2\n1 2\n2\n1 1\n5\n4 5 4 5 4\n6\n2 3 2 1 3 1\n", "output": "0\n0\n2\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given n patterns p_1, p_2, ..., p_n and m strings s_1, s_2, ..., s_m. Each pattern p_i consists of k ...
[{"input": "10 10 4\n_a_c\n_aac\nb__a\n__cb\nab__\n__ab\n_c__\n____\n_bbd\nb_bc\nbcbc 8\nabac 8\ncadc 8\ncaac 8\ndaab 8\naccb 8\ncbcd 8\nabbd 8\nbdba 8\nbcac 8\n", "output": "YES\n8 9 10 7 6 5 4 3 2 1 \n"}, {"input": "10 10 4\n_a_c\n_aac\nb__a\n__cb\nab__\n__ab\n_c__\n____\n_bbd\nb_bc\nbcbc 8\nabac 8\ncadc 8\ncaac 8\nd...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a set of points on a straight line. Each point has a color assigned to it. For point a, its nei...
[{"input": "aaaaaaaaabbbbbaaaabaaaaaaaaaaaaaaaaabaaaaaabbbbbbbaaabbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "12\n"}, {"input": "bbbbbbbbbbbbbbbbbbbbbbddddddddddddddddaaaaaaaaaaaaaccccccccbbbbbbbaaaaaaaaaabbbbbbbbaaaaaaaaaacccccc\n", "output": "11\n"}, {"input": "bbbbbbbbbbbbbbbbbbbbbbbbbbdddddddddddd...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven is a positive integer N.\nWe will choose an integer K between 2 and N (inclusive), then we will repeat ...
[{"input": "1000000000000\n", "output": "266\n"}, {"input": "523968956449\n", "output": "385\n"}, {"input": "145329450841\n", "output": "289\n"}, {"input": "642507465600\n", "output": "12\n"}, {"input": "540024979445\n", "output": "12\n"}, {"input": "962623690081\n", "output": "96\n"}, {"input": "171518565905\n", "outp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDuring a New Year special offer the \"Sudislavl Bars\" offered n promo codes. Each promo code consists of exa...
[{"input": "58\n145410\n686144\n766870\n859775\n922809\n470967\n034349\n318920\n019664\n667953\n295078\n908733\n691385\n774622\n325695\n443254\n817406\n984471\n512092\n635832\n303546\n189826\n128551\n720334\n569318\n377719\n281502\n956352\n758447\n207280\n583935\n246631\n160045\n452683\n594100\n806017\n232727\n673001\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\nFor a given sequence $A = \\\\{a_0, a_1, ..., a_{n-1}\\\\}$ which is sorted by ascending order, find a specif...
[{"input": "4\n-1 0 1 4\n3\n-3\n4\n14", "output": "0\n1\n0\n"}, {"input": "4\n-1 0 1 4\n3\n-2\n4\n14", "output": "0\n1\n0\n"}, {"input": "4\n-1 0 1 4\n3\n-4\n4\n14", "output": "0\n1\n0\n"}, {"input": "4\n-1 0 1 4\n3\n-4\n0\n14", "output": "0\n1\n0\n"}, {"input": "4\n-1 0 1 4\n3\n-4\n1\n14", "output": "0\n1\n0\n"}, {"in...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSquirrel Liss is interested in sequences. She also has preferences of integers. She thinks n integers a1, a2,...
[{"input": "49\n10 34 58 72 126 166 176 180 198 200 208 228 238 248 302 332 340 344 350 354 380 406 418 428 438 442 482 532 536 544 546 554 596 626 642 682 684 704 714 792 804 820 862 880 906 946 954 966 970\n", "output": "49\n"}, {"input": "44\n1 5 37 97 107 147 185 187 195 241 249 295 311 323 341 345 363 391 425 431 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPolycarp knows that if the sum of the digits of a number is divisible by $3$, then the number itself is divis...
[{"input": "1000\n", "output": "1003\n"}, {"input": "1000\n", "output": "1003\n"}, {"input": "997\n", "output": "1003\n"}, {"input": "999\n", "output": "1003\n"}, {"input": "997\n", "output": "1003\n"}, {"input": "999\n", "output": "1003\n"}, {"input": "432\n", "output": "435\n"}, {"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\nTakahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookie...
[{"input": "-2 -101 -9", "output": "-203\n"}, {"input": "-1 -101 -1", "output": "-202\n"}, {"input": "-1 -5 -143", "output": "-148\n"}, {"input": "-2 -74 -4", "output": "-149\n"}, {"input": "-2 -82 -4", "output": "-165\n"}, {"input": "0 -101 -1", "output": "-201\n"}, {"input": "1 -2 -180", "output": "-182\n"}, {"input"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn the Kingdom of AtCoder, only banknotes are used as currency. There are 10^{100}+1 kinds of banknotes, with...
[{"input": "314159265358979323846264338327950288419716939937551058209749445923078164062862089986280348253421170\n", "output": "243\n"}, {"input": "476640020082194381531155118436783393866726953614433851622190777875571135215042541028243752681838573", "output": "259\n"}, {"input": "4024190595003667858693588822821631596741...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a...
[{"input": "5 3 1\n0 1 1 1 1\n1 5\n2 4\n1 3\n", "output": "8\n4\n3\n"}, {"input": "5 3 1\n0 1 1 1 1\n1 5\n2 4\n1 2\n", "output": "8\n4\n2\n"}, {"input": "5 3 0\n0 1 1 1 1\n1 5\n2 4\n1 2\n", "output": "7\n2\n1\n"}, {"input": "5 3 1\n0 1 2 1 1\n1 5\n2 4\n1 2\n", "output": "4\n2\n2\n"}, {"input": "5 3 1\n0 1 2 1 1\n1 5\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\nLet's denote a function $f(x)$ in such a way: we add $1$ to $x$, then, while there is at least one trailing z...
[{"input": "1000000000\n", "output": "91\n"}, {"input": "1000000000\n", "output": "91\n"}, {"input": "1472811722\n", "output": "57\n"}, {"input": "1660033091\n", "output": "63\n"}, {"input": "1100000000\n", "output": "90\n"}, {"input": "1516433257\n", "output": "55\n"}, {"input": "932415950\n", "output": "53\n"}, {"inp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nImplement the function which should return `true` if given object is a vowel (meaning `a, e, i, o, u`), and `...
[{"input": "\"lol\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"ou\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"z\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"\"", "output": "[false]", "fn_name": "is_vowel"}, {"input": "\"a\"", "output": "[true]", "fn_name": "is_vowel"}...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attach...
[{"input": "50\n159 880 1070 1139 1358 1608 1691 1841 2073 2171 2213 2597 2692 2759 2879 2931 3173 3217 3441 4201 4878 5106 5129 5253 5395 5647 5968 6019 6130 6276 6286 6330 6409 6728 7488 7713 7765 7828 7899 8064 8264 8457 8483 8685 8900 8946 8965 9133 9187 9638\n45\n57 159 1070 1139 1391 1608 1691 1841 2171 2213 2692...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nConsider the following process. You have a binary string (a string where each character is either 0 or 1) $w$...
[{"input": "3\n100110\n2\n01\n1\n111\n1\n", "output": "011001\n10\n111\n"}, {"input": "3\n100110\n2\n01\n1\n101\n1\n", "output": "011001\n10\n010\n"}, {"input": "3\n100110\n2\n01\n0\n101\n1\n", "output": "011001\n01\n010\n"}, {"input": "3\n111110\n1\n01\n0\n101\n1\n", "output": "111101\n01\n010\n"}, {"input": "3\n10010...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA number is called powerful if it is a power of two or a factorial. In other words, the number $m$ is powerfu...
[{"input": "100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151\n152\n153\n154\n155\n156\n157\n158\n159\n160\n161...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTheatre Square in the capital city of Berland has a rectangular shape with the size n Γ— m meters. On the occa...
[{"input": "1000000000 1000000000 1\n", "output": "1000000000000000000\n"}, {"input": "1000000000 987654321 1\n", "output": "987654321000000000\n"}, {"input": "1000000000 989104164 1\n", "output": "989104164000000000\n"}, {"input": "1000000000 980932347 1\n", "output": "980932347000000000\n"}, {"input": "1000000000 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\nYou're given an array $b$ of length $n$. Let's define another array $a$, also of length $n$, for which $a_i =...
[{"input": "2\n6\n4 3 0 1 2 0\n2\n2 5\n", "output": "YES\nNO\n"}, {"input": "2\n6\n0 3 0 1 2 0\n2\n2 5\n", "output": "YES\nNO\n"}, {"input": "2\n6\n4 3 0 1 2 0\n2\n4 5\n", "output": "YES\nNO\n"}, {"input": "2\n6\n4 3 0 1 2 0\n2\n4 3\n", "output": "YES\nNO\n"}, {"input": "2\n6\n4 3 0 1 2 0\n2\n4 6\n", "output": "YES\nNO...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nF: Tea Party\n\nYun decided to hold a tea party at the company.\n\nThe shop sells $ N $ sets of bread, each c...
[{"input": "5\n11 1 59 18 30", "output": "59\n"}, {"input": "5\n4 0 13 10 17", "output": "22\n"}, {"input": "5\n7 4 11 10 10", "output": "21\n"}, {"input": "5\n4 0 35 14 17", "output": "35\n"}, {"input": "5\n30 21 2 0 15", "output": "34\n"}, {"input": "5\n4 0 35 17 30", "output": "43\n"}, {"input": "5\n30 21 3 0 15", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOn the Planet AtCoder, there are four types of bases: A, C, G and T. A bonds with T, and C bonds with G.\nYou...
[{"input": "A\n", "output": "T\n"}, {"input": "G\n", "output": "C\n"}, {"input": "C\n", "output": "G\n"}, {"input": "T\n", "output": "A\n"}, {"input": "C", "output": "G\n"}, {"input": "T", "output": "A\n"}, {"input": "C", "output": "G\n"}, {"input": "T", "output": "A\n"}, {"input": "G", "output": "C"}, {"input": "A", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWhen Mr. Kay was browsing a certain SNS as usual, the problem that \"there are people who can solve IQ150 or ...
[{"input": "2286", "output": "3\n"}, {"input": "1020", "output": "2\n"}, {"input": "1809", "output": "1\n"}, {"input": "2465", "output": "0\n"}, {"input": "4598", "output": "2\n"}, {"input": "4112", "output": "2\n"}, {"input": "2725", "output": "0\n"}, {"input": "3645", "output": "1\n"}, {"input": "2071", "output": "0\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou've gotten an n Γ— m sheet of squared paper. Some of its squares are painted. Let's mark the set of all pai...
[{"input": "20 20\n.....######.........\n.....#....#.........\n.....#....#.........\n.....#....#.........\n.....############...\n.........##.....#...\n..........#.....#...\n..........#.....#...\n..........###...#...\n............#...#...\n............#...#...\n............#...#...\n............#...#...\n............###...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTakahashi has A cookies, and Aoki has B cookies.\nTakahashi will do the following action K times:\n - If Taka...
[{"input": "498881727339 49011419508 0000000100000", "output": "498881627339 49011419508\n"}, {"input": "498881727339 49011419508 0000001100000", "output": "498880627339 49011419508\n"}, {"input": "498881727339 50858735181 0000001100000", "output": "498880627339 50858735181\n"}, {"input": "498881727339 64133142411 0000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a program which prints $n$-th fibonacci number for a given integer $n$. The $n$-th fibonacci number is ...
[{"input": "44", "output": "1134903170\n"}, {"input": "44", "output": "1134903170\n"}, {"input": "41", "output": "267914296\n"}, {"input": "42", "output": "433494437\n"}, {"input": "43", "output": "701408733\n"}, {"input": "39", "output": "102334155\n"}, {"input": "40", "output": "165580141\n"}, {"input": "43", "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\n# Task\n You are given a decimal number `n` as a **string**. Transform it into an array of numbers (given as ...
[{"input": "\"1234567890.1234567890\"", "output": "[[\"1000000000\", \"200000000\", \"30000000\", \"4000000\", \"500000\", \"60000\", \"7000\", \"800\", \"90\", \".1\", \".02\", \".003\", \".0004\", \".00005\", \".000006\", \".0000007\", \".00000008\", \".000000009\"]]", "fn_name": "split_exp"}, {"input": "\"7970521.55...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEverlasting Sa-Ga, a new, hot and very popular role-playing game, is out on October 19, 2008. Fans have been ...
[{"input": "10 24\n30 20\n0 0", "output": "a\nb\n"}, {"input": "19 24\n30 20\n0 0", "output": "a\nb\n"}, {"input": "10 3\n11 106\n0 0", "output": "b\nb\n"}, {"input": "10 3\n11 150\n0 0", "output": "b\na\n"}, {"input": "10 15\n58 20\n0 0", "output": "a\na\n"}, {"input": "11 24\n30 20\n0 0", "output": "a\nb\n"}, {"input...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTanechka is shopping in the toy shop. There are exactly $n$ toys in the shop for sale, the cost of the $i$-th...
[{"input": "100000000000000 100000000000000\n", "output": "49999999999999\n"}, {"input": "100000000000000 100000000000000\n", "output": "49999999999999\n"}, {"input": "100000000010000 100000000000000\n", "output": "49999999999999\n"}, {"input": "105925489085800 100000000001000\n", "output": "50000000000499\n"}, {"input...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are N integers written on a blackboard. The i-th integer is A_i, and the greatest common divisor of the...
[{"input": "5\n7 2 10 12 2", "output": "Second\n"}, {"input": "5\n7 8 4 5 11", "output": "Second\n"}, {"input": "5\n7 2 8 8 8", "output": "Second\n"}, {"input": "4\n0 -1 1 22", "output": "Second\n"}, {"input": "4\n-1 0 1 22", "output": "Second\n"}, {"input": "5\n7 8 4 8 11", "output": "First\n"}, {"input": "5\n7 2 8 12...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this Kata, you will be given a number `n` (`n > 0`) and your task will be to return the smallest square nu...
[{"input": "290101", "output": "[429235524]", "fn_name": "solve"}, {"input": "88901", "output": "[5428900]", "fn_name": "solve"}, {"input": "10", "output": "[-1]", "fn_name": "solve"}, {"input": "11", "output": "[25]", "fn_name": "solve"}, {"input": "13", "output": "[36]", "fn_name": "solve"}, {"input": "17", "output":...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA game is played on a strip consisting of N cells consecutively numbered from 1 to N.\n\nAlice has her token ...
[{"input": "-1 -1 -1", "output": "Alice\n"}, {"input": "9 23 42", "output": "Borys\n"}, {"input": "9 23 18", "output": "Borys\n"}, {"input": "9 23 23", "output": "Alice\n"}, {"input": "9 44 23", "output": "Borys\n"}, {"input": "2 31 -1", "output": "Alice\n"}, {"input": "2 53 -1", "output": "Alice\n"}, {"input": "2 64 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou have an array a of length n. For every positive integer x you are going to perform the following operatio...
[{"input": "6\n3\n1000000100 0 -1000000000\n1\n6\n2\n-1000000000 1000000000\n2\n1000000000 -1000000000\n2\n1001000000 1000000000\n2\n-1000000000 -1000000000\n", "output": "31\n0\n0\n31\n20\n0\n"}, {"input": "6\n3\n1000000100 0 -1000000000\n1\n6\n2\n-1000000000 1000000000\n2\n1000000000 -1000000000\n2\n1001000000 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\nCaptain Flint and his crew keep heading to a savage shore of Byteland for several months already, drinking ru...
[{"input": "2\n11405\n58469\n", "output": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMonocarp has forgotten the password to his mobile phone. The password consists of $4$ digits from $0$ to $9$ ...
[{"input": "12\n8\n1 2 3 5 6 7 8 9\n6\n4 5 6 7 8 9\n7\n0 4 5 6 7 8 9\n7\n1 4 5 6 7 8 9\n8\n0 1 4 5 6 7 8 9\n7\n2 4 5 6 7 8 9\n8\n0 2 4 5 6 7 8 9\n8\n1 2 4 5 6 7 8 9\n7\n3 4 5 6 7 8 9\n8\n0 3 4 5 6 7 8 9\n8\n1 3 4 5 6 7 8 9\n8\n2 3 4 5 6 7 8 9\n", "output": "6\n36\n18\n18\n6\n18\n6\n6\n18\n6\n6\n6\n"}, {"input": "7\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\nThe Hedgehog recently remembered one of his favorite childhood activities, β€” solving puzzles, and got into it...
[{"input": "20 20\nABBBAAABABAAAAABBABB\nBABABBAABAABBAAABABB\nBABBBAABAABBABBBBABA\nBAAABBAAABABBABBAAAA\nABBAABAABBBBAAABBBAA\nBAAAAAAAABABBAAAAABB\nAAAAAAABABBBBBAABAAB\nABBBBABAABBAAAAABAAA\nBAAAAABBABAAAAABAAAB\nABABAABABBBABBAABBAA\nBAAABBBAAAABBBBBABAA\nAAABBABABAABBABAABAB\nABBABABABABAAABABABA\nBAABAAAAABBAABB...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNastya owns too many arrays now, so she wants to delete the least important of them. However, she discovered ...
[{"input": "13\n-2075 -32242 27034 -37618 -96962 145894 64846 29532 -71761 28908 -21222 -61370 46899\n", "output": "13\n"}, {"input": "13\n-2075 -32242 27034 -37618 -96962 82203 64846 48249 -71761 28908 -21222 -61370 46899\n", "output": "13\n"}, {"input": "13\n-2075 -32242 27034 -37618 -96962 82203 64846 48249 -71761 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\nproblem\n\nThere are $ N $ propositions, named $ 1, 2, \\ cdots, N $, respectively. Also, $ M $ information a...
[{"input": "211 0\n4 2\n0 3", "output": "1\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\n71\n72\n...
code_stdio