data_source
stringclasses
3 values
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nInitially Ildar has an empty array. He performs $n$ steps. On each step he takes a subset of integers already added to the array and appends the mex of this subset to the array. \n\nThe mex of an multiset of integers is t...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0 1 2 1\\\\n\\\", \\\"output\\\": \\\"-1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 0 1\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n...
{ "split": "train", "index": 6500, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGiven are a positive integer N and a string S of length N consisting of lowercase English letters.\nDetermine whether the string is a concatenation of two copies of some string.\nThat is, determine whether there is a stri...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\nabcabc\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\nabcadc\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"...
{ "split": "train", "index": 6501, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nIn this task you need to process a set of stock exchange orders and use them to create order book.\n\nAn order is an instruction of some participant to buy or sell stocks on stock exchange. The order number i has price p_...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 2\\\\nB 10 3\\\\nS 50 2\\\\nS 40 1\\\\nS 50 6\\\\nB 20 4\\\\nB 25 10\\\\n\\\", \\\"output\\\": \\\"S 50 8\\\\nS 40 1\\\\nB 25 10\\\\nB 20 4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1\\\\nB 75...
{ "split": "train", "index": 6502, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nWhen Petya went to school, he got interested in large numbers and what they were called in ancient times. For instance, he learned that the Russian word \"tma\" (which now means \"too much to be counted\") used to stand f...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"256\\\\n16777217\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2147483646\\\\n2147483647\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\...
{ "split": "train", "index": 6503, "reference": null, "knowledge_emb": [ 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, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nShaass has decided to hunt some birds. There are n horizontal electricity wires aligned parallel to each other. Wires are numbered 1 to n from top to bottom. On each wire there are some oskols sitting next to each other. ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n10 10 10 10 10\\\\n5\\\\n2 5\\\\n3 13\\\\n2 12\\\\n1 13\\\\n4 6\\\\n\\\", \\\"output\\\": \\\"0\\\\n12\\\\n5\\\\n0\\\\n16\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 4 1\\\\n1\\\\n2 2\...
{ "split": "train", "index": 6504, "reference": null, "knowledge_emb": [ 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, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGiven are strings S and T. Consider changing S to T by repeating the operation below. Find the minimum number of operations required to do so.\nOperation: Choose one character of S and replace it with a different characte...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"cupofcoffee\\\\ncupofhottea\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcde\\\\nbcdea\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\"...
{ "split": "train", "index": 6505, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nCaracal is fighting with a monster.\nThe health of the monster is H.\nCaracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens:\n - If the monster's...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000000000000\\\\n\...
{ "split": "train", "index": 6506, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAlice and Borys are playing tennis.\n\nA tennis match consists of games. In each game, one of the players is serving and the other one is receiving.\n\nPlayers serve in turns: after a game where Alice is serving follows a...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n99999 0\\\\n0 99999\\\\n\\\", \\\"output\\\": \\\"2\\\\n49999 50000 \\\\n2\\\\n49999 50000 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n99999 1\\\\n1 99999\\\\n\\\", \\\"output\\\": \\\"...
{ "split": "train", "index": 6507, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPolycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: \n\n * After the cutting each ribbon piece should have length a, b or c. \n * After the cutting th...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 19 15 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"918 102 1327 1733\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":...
{ "split": "train", "index": 6508, "reference": null, "knowledge_emb": [ 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere are $n$ bags with candies, initially the $i$-th bag contains $i$ candies. You want all the bags to contain an equal amount of candies in the end.\n\nTo achieve this, you will:\n\nChoose $m$ such that $1 \\le m \\le ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n2\\\\n3\\\\n\\\", \\\"output\\\": \\\"2\\\\n1 2 \\\\n3\\\\n1 2 3 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n100\\\\n2\\\\n3\\\\n4\\\\n5\\\\n6\\\\n7\\\\n8\\\\n9\\\\n10\\\\n11\\\\n12\\...
{ "split": "train", "index": 6509, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nproblem\n\nChairman K is a regular customer of the JOI pizza shop in the center of JOI city. For some reason, he decided to start a life-saving life this month. So he wanted to order the pizza with the highest calories pe...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n12 2\\\\n200\\\\n50\\\\n300\\\\n110\\\", \\\"output\\\": \\\"38\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n17 2\\\\n200\\\\n73\\\\n300\\\\n110\\\", \\\"output\\\": \\\"29\\\\n\\\"}, {\\...
{ "split": "train", "index": 6510, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou have an array $a_1, a_2, \\dots, a_n$ consisting of $n$ distinct integers. You are allowed to perform the following operation on it:\n\nChoose two elements from the array $a_i$ and $a_j$ ($i \\ne j$) such that $\\gcd(...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n4 20 1 25 30\\\\n\\\", \\\"output\\\": \\\"3\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n6 10 15\\\\n\\\", \\\"output\\\": \\\"4\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"...
{ "split": "train", "index": 6511, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA: Isono, let's do that! --Sendame -\n\nstory\n\nNakajima \"Isono ~, let's do that!\"\n\nIsono \"What is that, Nakajima\"\n\nNakajima \"Look, that's that. It's hard to explain because I have to express it in letters for s...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\ntameru\\\\ntameru\\\\nuremat\\\\ntameru\\\\nkougekida\\\\ntameru\\\", \\\"output\\\": \\\"Nakajima-kun\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\ntameru\\\\ntameru\\\\nuremat\\\\ntameru...
{ "split": "train", "index": 6512, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPolycarp is going to participate in the contest. It starts at $h_1:m_1$ and ends at $h_2:m_2$. It is guaranteed that the contest lasts an even number of minutes (i.e. $m_1 \\% 2 = m_2 \\% 2$, where $x \\% y$ is $x$ modulo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10:00\\\\n11:00\\\\n\\\", \\\"output\\\": \\\"10:30\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"11:10\\\\n11:12\\\\n\\\", \\\"output\\\": \\\"11:11\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\...
{ "split": "train", "index": 6513, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere are n problems prepared for the next Codeforces round. They are arranged in ascending order by their difficulty, and no two problems have the same difficulty. Moreover, there are m pairs of similar problems. Authors...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n1 4\\\\n5 2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n1 2\\\\n2 3\\\\n1 3\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout...
{ "split": "train", "index": 6514, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nTakahashi has N days of summer vacation.\nHis teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.\nHe cannot do multiple assignments on the same day, or hang out on a day he doe...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"41 2\\\\n5 6\\\\n\\\", \\\"output\\\": \\\"30\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 2\\\\n5 6\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":...
{ "split": "train", "index": 6515, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\n— This is not playing but duty as allies of justice, Nii-chan!\n\n— Not allies but justice itself, Onii-chan!\n\nWith hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters — Karen an...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 1\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2 2\\\\n\\\", \\\"output\\\": \\\"63\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3 5\\\\n...
{ "split": "train", "index": 6516, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nStepan likes to repeat vowel letters when he writes words. For example, instead of the word \"pobeda\" he can write \"pobeeeedaaaaa\".\n\nSergey does not like such behavior, so he wants to write a program to format the wo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\npobeeeedaaaaa\\\\n\\\", \\\"output\\\": \\\"pobeda\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"22\\\\niiiimpleeemeentatiioon\\\\n\\\", \\\"output\\\": \\\"implemeentatioon\\\\n\\\"}, {\\\"typ...
{ "split": "train", "index": 6517, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nHolidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is located in a town Pavlopolis. It's well known that universities provide students with dormitory f...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 399603090\\\\n\\\", \\\"output\\\": \\\"3628800\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"...
{ "split": "train", "index": 6518, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere is an infinite board of square tiles. Initially all tiles are white.\n\nVova has a red marker and a blue marker. Red marker can color $a$ tiles. Blue marker can color $b$ tiles. If some tile isn't white then you can...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 4\\\\n\\\", \\\"output\\\": \\\"12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 9\\\\n\\\", \\\"output\\\": \\\"14\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9 3\\\\n\\\",...
{ "split": "train", "index": 6519, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nCQXYM is counting permutations length of $2n$.\n\nA permutation is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2,3,1,5,4]$ is a permutation, but $[1,2,2]$ is not a permu...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1\\\\n2\\\\n9\\\\n91234\\\\n\\\", \\\"output\\\": \\\"1\\\\n12\\\\n830455698\\\\n890287984\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n100000\\\\n\\\", \\\"output\\\": \\\"553573229\\\\n...
{ "split": "train", "index": 6520, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 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, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n,...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2998\\\\n\\\", \\\"output\\\": \\\"1375\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"19\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"856\\\\n\\\"...
{ "split": "train", "index": 6521, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY decided to have a day off. But doing nothing the whole day turned out to be too boring, and he decided to play a game with pebbles. Initially, the Beaver has n pebbles. He arranges them in a eq...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"999996270\\\\n\\\", \\\"output\\\": \\\"1705144136\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"34\\\\n\\\", \\\"output\\\": \\\"52\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"...
{ "split": "train", "index": 6522, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere is an integer sequence A of length N whose values are unknown.\nGiven is an integer sequence B of length N-1 which is known to satisfy the following:\n B_i \\geq \\max(A_i, A_{i+1}) \nFind the maximum possible sum o...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 5\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\...
{ "split": "train", "index": 6523, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nTakahashi participated in a contest on AtCoder.\nThe contest had N problems.\nTakahashi made M submissions during the contest.\nThe i-th submission was made for the p_i-th problem and received the verdict S_i (AC or WA).\...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 5\\\\n1 WA\\\\n1 AC\\\\n2 WA\\\\n2 AC\\\\n2 WA\\\\n\\\", \\\"output\\\": \\\"2 2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100000 3\\\\n7777 AC\\\\n7777 AC\\\\n7777 AC\\\\n\\\", \\\"output\\\": ...
{ "split": "train", "index": 6524, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nLet S(n) denote the sum of the digits in the decimal notation of n.\nFor example, S(101) = 1 + 0 + 1 = 2.\nGiven an integer N, determine if S(N) divides N.\n\n-----Constraints-----\n - 1 \\leq N \\leq 10^9\n\n-----Input--...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"101\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"999999999\\\\...
{ "split": "train", "index": 6525, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou've got a rectangular parallelepiped with integer edge lengths. You know the areas of its three faces that have a common vertex. Your task is to find the sum of lengths of all 12 edges of this parallelepiped.\n\nInput\...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"615 18 1230\\\\n\\\", \\\"output\\\": \\\"856\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9 4 36\\\\n\\\", \\\"output\\\": \\\"56\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10000 1 100...
{ "split": "train", "index": 6526, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAlice and Bob are playing a game on a line with n cells. There are n cells labeled from 1 through n. For each i from 1 to n-1, cells i and i+1 are adjacent.\n\nAlice initially has a token on some cell on the line, and Bob...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2\\\\n1 1\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"50 75\\\\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 1 3 5 7 9 11 13 15 17 19 21 2...
{ "split": "train", "index": 6527, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAlice and Bob begin their day with a quick game. They first choose a starting number X_0 ≥ 3 and try to reach one million by the process described below. \n\nAlice goes first and then they take alternating turns. In the i...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"14\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20\\\\n\\\", \\\"output\\\": \\\"15\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8192\\\\n\\\", \...
{ "split": "train", "index": 6528, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPetya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.\...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3 2 2\\\\n\\\", \\\"output\\\": \\\"474774\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"69 84 25 24\\\\n\\\", \\\"output\\\": \\\"444444444444444444444444444444444444444444444747474747474747474747474747...
{ "split": "train", "index": 6529, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nWhat joy! Petya's parents went on a business trip for the whole year and the playful kid is left all by himself. Petya got absolutely happy. He jumped on the bed and threw pillows all day long, until... \n\nToday Petya op...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"41\\\\n2 1 7 7 4 2 4 4 9 3 10 0\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12\\\\n1 1 1 1 1 1 1 1 1 1 1 1\\\\n\\\", \\\"output\\\": \\\"12\\\\n\\\"}, {\\\"type\\\": ...
{ "split": "train", "index": 6530, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nValerian was captured by Shapur. The victory was such a great one that Shapur decided to carve a scene of Valerian's defeat on a mountain. So he had to find the best place to make his victory eternal!\n\nHe decided to vis...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 2 3\\\\n1 3 1\\\\n3 4 1\\\\n4 5 1\\\\n5 6 1\\\\n\\\", \\\"output\\\": \\\"10\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\...
{ "split": "train", "index": 6531, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA cricket team consists of 11 players and some are good at batting, others are good at bowling and some of them are good at both batting and bowling. The batting coach wants to select exactly K players having maximum poss...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2 3 4 5 6 7 8 9 10 11\\\\n3\\\\n2 5 1 2 4 1 6 5 2 2 1\\\\n6\\\", \\\"output\\\": \\\"1\\\\n6\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2 3 4 5 6 14 8 9 10 11\\\\n3\\\\n2 5 1 2 4 1 6 5 2...
{ "split": "train", "index": 6532, "reference": null, "knowledge_emb": [ 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, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nВася купил стол, у которого n ножек. Каждая ножка состоит из двух частей, которые соединяются друг с другом. Каждая часть может быть произвольной положительной длины, но гарантируется, что из всех 2n частей возможно соста...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 3 2 4 5 3\\\\n\\\", \\\"output\\\": \\\"1 5\\\\n2 4\\\\n3 3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 1 1 2 2 2\\\\n\\\", \\\"output\\\": \\\"1 2\\\\n1 2\\\\n1 2\\\\n\\\"}, {\\\"ty...
{ "split": "train", "index": 6533, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nWe have N cards. A number a_i is written on the i-th card.\n\nAlice and Bob will play a game using these cards. In this game, Alice and Bob alternately take one card. Alice goes first.\n\nThe game ends when all the cards ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 7 4\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4...
{ "split": "train", "index": 6534, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSergey attends lessons of the N-ish language. Each lesson he receives a hometask. This time the task is to translate some sentence to the N-ish language. Sentences of the N-ish language can be represented as strings consi...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"pninnihzipirpbdggrdglzdpbldtzihgbzdnrgznbpdanhnlag\\\\n4\\\\nli\\\\nqh\\\\nad\\\\nbp\\\\n\\\", \\\"output\\\": \\\"4\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"mbmxuuuuxuuuuhhooooxxxuxxxuxuuxuuuxxjvjvjj...
{ "split": "train", "index": 6535, "reference": null, "knowledge_emb": [ 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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSnuke received a positive integer N from Takahashi. A positive integer m is called a favorite number when the following condition is satisfied:\n\n* The quotient and remainder of N divided by m are equal, that is, \\lfloo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000010000000\\\", \\\"output\\\": \\\"2716922731275\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000011000000\\\", \\\"output\\\": \\\"3307289212967\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", ...
{ "split": "train", "index": 6536, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA shop sells N kinds of fruits, Fruit 1, \\ldots, N, at prices of p_1, \\ldots, p_N yen per item, respectively. (Yen is the currency of Japan.)\nHere, we will choose K kinds of fruits and buy one of each chosen kind. Find...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3\\\\n50 100 80 120 80\\\\n\\\", \\\"output\\\": \\\"210\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n1000\\\\n\\\", \\\"output\\\": \\\"1000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\",...
{ "split": "train", "index": 6537, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nEach year in the castle of Dwarven King there is a competition in growing mushrooms among the dwarves. The competition is one of the most prestigious ones, and the winner gets a wooden salad bowl. This year's event brough...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1 1 1\\\\n2 2\\\\n2 2\\\\n\\\", \\\"output\\\": \\\"1 3.98\\\\n2 3.98\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1 1 100\\\\n3 4\\\\n4 3\\\\n\\\", \\\"output\\\": \\\"1 4.00\\\\n2 4.00\\\\n\\\"...
{ "split": "train", "index": 6538, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nImagine that you have a twin brother or sister. Having another person that looks exactly like you seems very unusual. It's hard to say if having something of an alter ego is good or bad. And if you do have a twin, then yo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n5 5 4 3 5 1 2 5 1 1 3 5 4 4 1 1 1 1 5 4 4 5 1 5 5 1 2 1 3 1 5 1 3 3 3 2 2 2 1 1 5 1 3 4 1 1 3 2 5 2 2 5 5 4 4 1 3 4 3 3 4 5 3 3 3 1 2 1 4 2 4 4 1 5 1 3 5 5 5 5 3 4 4 3 1 2 5 2 3 5 4 2 4 5 3 2 4 2 4 3\\\\n\\\", \\\...
{ "split": "train", "index": 6539, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nServal is fighting with a monster.\nThe health of the monster is H.\nIn one attack, Serval can decrease the monster's health by A.\nThere is no other way to decrease the monster's health.\nServal wins when the monster's h...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 4\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 10000\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10000 1\\\...
{ "split": "train", "index": 6540, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou are given an array of n integer numbers a_0, a_1, ..., a_{n} - 1. Find the distance between two closest (nearest) minimums in it. It is guaranteed that in the array a minimum occurs at least two times.\n\n\n-----Input...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3 3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5 6 5\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9...
{ "split": "train", "index": 6541, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nProgrammer Vasya is studying a new programming language &K*. The &K* language resembles the languages of the C family in its syntax. However, it is more powerful, which is why the rules of the actual C-like languages are ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\ntypedef errtype** ucywcaykzh\\\\ntypeof &ucywcaykzh*********\\\\ntypedef &&&&&&void********* ucywcaykzh\\\\ntypeof &&&ucywcaykzh******\\\\ntypedef &errtype vfqmtssewklwhiukrz\\\\ntypeof &&vfqmtssewklwhiukrz********...
{ "split": "train", "index": 6542, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere are N cats. We number them from 1 through N.\n\nEach of the cats wears a hat. Cat i says: \"there are exactly a_i different colors among the N - 1 hats worn by the cats except me.\"\n\nDetermine whether there exists...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 1 3\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3 4 3 4 3\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\...
{ "split": "train", "index": 6543, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPolycarp must pay exactly $n$ burles at the checkout. He has coins of two nominal values: $1$ burle and $2$ burles. Polycarp likes both kinds of coins equally. So he doesn't want to pay with more coins of one type than wi...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1000\\\\n30\\\\n1\\\\n32\\\\n1000000000\\\\n5\\\\n\\\", \\\"output\\\": \\\"334 333\\\\n10 10\\\\n1 0\\\\n10 11\\\\n333333334 333333333\\\\n1 2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\...
{ "split": "train", "index": 6544, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nVasya likes taking part in Codeforces contests. When a round is over, Vasya follows all submissions in the system testing tab.\n\nThere are $n$ solutions, the $i$-th of them should be tested on $a_i$ tests, testing one so...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n49 100\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 2\\\\n32 100 33 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inp...
{ "split": "train", "index": 6545, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThe game of Berland poker is played with a deck of $n$ cards, $m$ of which are jokers. $k$ players play this game ($n$ is divisible by $k$).\n\nAt the beginning of the game, each player takes $\\frac{n}{k}$ cards from the...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n8 3 2\\\\n4 2 4\\\\n9 6 3\\\\n42 0 7\\\\n\\\", \\\"output\\\": \\\"3\\\\n0\\\\n1\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n48 20 4\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\...
{ "split": "train", "index": 6546, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGiven an array of integer $a_1, a_2, \\ldots, a_n$. In one operation you can make $a_i := a_i + 1$ if $i < n$ and $a_i \\leq a_{i + 1}$, or $i = n$ and $a_i \\leq a_1$.\n\nYou need to check whether the array $a_1, a_2, \\...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3\\\\n1 2 5\\\\n1 2 5\\\\n2\\\\n2 2\\\\n1 3\\\\n4\\\\n3 4 1 2\\\\n6 4 2 5\\\\n3\\\\n2 4 1\\\\n4 5 3\\\\n5\\\\n1 2 3 4 5\\\\n6 5 6 7 6\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nNO\\\\nNO\\\\nYES\\\\n\\\"}, {\\\"ty...
{ "split": "train", "index": 6547, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nOne day, Chef prepared D brand new dishes. He named the i-th dish by a string Si. After the cooking, he decided to categorize each of these D dishes as special or not.\n\nA dish Si is called special if it's name (i.e. the...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\naba\\\\nabac\\\\nabcd\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\naba\\\\nabac\\\\naacd\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nNO\\\\n\\\...
{ "split": "train", "index": 6548, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou are given an array $a$, consisting of $n$ integers.\n\nEach position $i$ ($1 \\le i \\le n$) of the array is either locked or unlocked. You can take the values on the unlocked positions, rearrange them in any order an...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3\\\\n1 3 2\\\\n0 0 0\\\\n4\\\\n2 -3 4 -1\\\\n1 1 1 1\\\\n7\\\\n-8 4 -2 -6 4 7 1\\\\n1 0 0 0 1 1 0\\\\n5\\\\n0 1 -4 6 3\\\\n0 0 0 1 1\\\\n6\\\\n-1 7 10 4 -8 -1\\\\n1 0 0 0 0 1\\\\n\\\", \\\"output\\\": \\\"3 2 1 \\\...
{ "split": "train", "index": 6549, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nIn a building where Polycarp lives there are equal number of flats on each floor. Unfortunately, Polycarp don't remember how many flats are on each floor, but he remembers that the flats are numbered from 1 from lower to ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 3\\\\n6 2\\\\n2 1\\\\n7 3\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 4\\\\n3 1\\\\n6 2\\\\n5 2\\\\n2 1\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\"...
{ "split": "train", "index": 6550, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 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, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA correct expression of the form a+b=c was written; a, b and c are non-negative integers without leading zeros. In this expression, the plus and equally signs were lost. The task is to restore the expression. In other wor...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12345168\\\\n\\\", \\\"output\\\": \\\"123+45=168\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"099\\\\n\\\", \\\"output\\\": \\\"0+9=9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \...
{ "split": "train", "index": 6551, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nMethodius received an email from his friend Polycarp. However, Polycarp's keyboard is broken, so pressing a key on it once may cause the corresponding symbol to appear more than once (if you press a key on a regular keybo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\nhello\\\\nhello\\\\nhello\\\\nhelloo\\\\nhello\\\\nhlllloo\\\\nhello\\\\nhelo\\\\n\\\", \\\"output\\\": \\\"YES\\\\nYES\\\\nNO\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\naa\\\\nb...
{ "split": "train", "index": 6552, "reference": null, "knowledge_emb": [ 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, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSunuke received a d-dimensional hypercube with a side length of l1 × ... × ld as a birthday present. Sunuke placed this rectangular parallelepiped so that the range of the i-th coordinate was 0 or more and li or less, and...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n12\\\\n34\\\\n56\\\\n17\\\\n90\\\\n123\\\", \\\"output\\\": \\\"925726166\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n6\\\\n3\\\\n3\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \...
{ "split": "train", "index": 6553, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAs you have noticed, there are lovely girls in Arpa’s land.\n\nPeople in Arpa's land are numbered from 1 to n. Everyone has exactly one crush, i-th person's crush is person with the number crush_{i}. [Image] \n\nSomeday A...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2 3 1 4\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n4 4 4 4\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"...
{ "split": "train", "index": 6554, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAnatoly lives in the university dorm as many other students do. As you know, cockroaches are also living there together with students. Cockroaches might be of two colors: black and red. There are n cockroaches living in A...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nrbbrr\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nbbbbb\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\...
{ "split": "train", "index": 6555, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nBad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! \n\nAside from loving sweet things, thieves from this area are known to be very greedy. So after a thief takes hi...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n\\\", \\\"output\\\": \\\"54\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"o...
{ "split": "train", "index": 6556, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou are given an array $a$ of length $n$. The array is called 3SUM-closed if for all distinct indices $i$, $j$, $k$, the sum $a_i + a_j + a_k$ is an element of the array. More formally, $a$ is 3SUM-closed if for all integ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3\\\\n-1 0 1\\\\n5\\\\n1 -2 -2 1 -3\\\\n6\\\\n0 0 0 0 0 0\\\\n4\\\\n-1 2 -3 4\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n4\\\\n-3...
{ "split": "train", "index": 6557, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSnuke has N integers. Among them, the smallest is A, and the largest is B. We are interested in the sum of those N integers. How many different possible sums there are?\n\nConstraints\n\n* 1 ≤ N,A,B ≤ 10^9\n* A and B are ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 5 3\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 7 7\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 4 8\\\", \\\"output...
{ "split": "train", "index": 6558, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 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, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nDr. Asimov, a robotics researcher, loves to research, but hates houseworks and his house were really dirty. So, he has developed a cleaning robot.\n\nAs shown in the following figure, his house has 9 rooms, where each roo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\nD A C\\\\n1\\\\nE B C\\\\n2\\\\nE A B\\\\n0\\\", \\\"output\\\": \\\"0.25000000\\\\n0.25000000\\\\n0.06250000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\nD A C\\\\n1\\\\nE B C\\\\n2\\\\n...
{ "split": "train", "index": 6559, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPolo, the Penguin, likes numbers. He says that the goodness of a number is itself multiplied by the number of digits in it's decimal representation. For example, the goodness of the integer 474 is 474*3 = 1422.\nHelp him ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n9 12\\\\n\\\\n\\\\n\\\", \\\"output\\\": \\\"75\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n9 16\\\", \\\"output\\\": \\\"191\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\...
{ "split": "train", "index": 6560, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere are $n$ people sitting in a circle, numbered from $1$ to $n$ in the order in which they are seated. That is, for all $i$ from $1$ to $n-1$, the people with id $i$ and $i+1$ are adjacent. People with id $n$ and $1$ a...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n\\\", \\\"output\\\": \\\"1 5 9 21\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"16\\\\n\\\", \\\"output\\\": \\\"1 10 28 64 136\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\...
{ "split": "train", "index": 6561, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nMr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer m and asks for the number of positive integers n, such that the factorial of n ends with exactly m zeroes. Are you...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"5\\\\n5 6 7 8 9 \\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n\\\", \\\"output\\\": \\\"0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\...
{ "split": "train", "index": 6562, "reference": null, "knowledge_emb": [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nIt is Borya's eleventh birthday, and he has got a great present: n cards with numbers. The i-th card has the number a_{i} written on it. Borya wants to put his cards in a row to get one greater number. For example, if Bor...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2\\\\n1 1\\\\n3\\\\n1 31 12\\\\n3\\\\n12345 67 84\\\\n9\\\\n1 2 3 4 5 6 7 8 9\\\\n\\\", \\\"output\\\": \\\"2\\\\n2\\\\n2\\\\n31680\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2\\\\n1 1\...
{ "split": "train", "index": 6563, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nRoma works in a company that sells TVs. Now he has to prepare a report for the last year.\n\nRoma has got a list of the company's incomes. The list is a sequence that consists of n integers. The total income of the compan...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n-1 -1 1\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n-1 -1 1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\...
{ "split": "train", "index": 6564, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGiven are 1-digit positive integers a and b. Consider these two strings: the concatenation of b copies of the digit a, and the concatenation of a copies of the digit b. Which of these is lexicographically smaller?\n\n----...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n\\\", \\\"output\\\": \\\"3333\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 7\\\\n\\\", \\\"output\\\": \\\"7777777\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\...
{ "split": "train", "index": 6565, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSnuke has N integers: 1,2,\\ldots,N. He will choose K of them and give those to Takahashi.\n\nHow many ways are there to choose K consecutive integers?\n\nConstraints\n\n* All values in input are integers.\n* 1 \\leq K \\...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 6\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 2\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 1\\\", \\\"output\\\"...
{ "split": "train", "index": 6566, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSasha grew up and went to first grade. To celebrate this event her mother bought her a multiplication table $M$ with $n$ rows and $n$ columns such that $M_{ij}=a_i \\cdot a_j$ where $a_1, \\dots, a_n$ is some sequence of ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n0 4 6 2 4\\\\n4 0 6 2 4\\\\n6 6 0 3 6\\\\n2 2 3 0 2\\\\n4 4 6 2 0\\\\n\\\", \\\"output\\\": \\\"2 2 3 1 2 \\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n0 99990000 99970002\\\\n99990000 0 99980...
{ "split": "train", "index": 6567, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nDevelopers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search. These patterns are most often used to check...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n?????\\\\n?????\\\\n\\\", \\\"output\\\": \\\"aaaaa\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n?\\\\na\\\\nb\\\\n\\\", \\\"output\\\": \\\"?\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in...
{ "split": "train", "index": 6568, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nFedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression:(1^{n} + 2^{n} + 3^{n} + 4^{n}) mod 5\n\nfor given value of n. Fedya managed to complete the task. Can you? Note that given num...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"124356983594583453458888889\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\...
{ "split": "train", "index": 6569, "reference": null, "knowledge_emb": [ 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, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nKuroni is very angry at the other setters for using him as a theme! As a punishment, he forced them to solve the following problem:\n\nYou have an array $a$ consisting of $n$ positive integers. An operation consists of ch...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n6 2 4\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n9 8 7 3 1\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":...
{ "split": "train", "index": 6570, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSonya decided to organize an exhibition of flowers. Since the girl likes only roses and lilies, she decided that only these two kinds of flowers should be in this exhibition.\n\nThere are $n$ flowers in a row in the exhib...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3\\\\n1 3\\\\n2 4\\\\n2 5\\\\n\\\", \\\"output\\\": \\\"01010\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 3\\\\n5 6\\\\n1 4\\\\n4 6\\\\n\\\", \\\"output\\\": \\\"010101\\\\n\\\"}, {\\\"type\\\":...
{ "split": "train", "index": 6571, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nLong ago, when Petya was a schoolboy, he was very much interested in the Petr# language grammar. During one lesson Petya got interested in the following question: how many different continuous substrings starting with the...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"yrbqsdlzrjprklpcaahhhfpkaohwwavwcsookezigzufcfvkmawptgdcdzkprxazchdaquvizhtmsfdpyrsjqtvjepssrqqhzsjpjfvihgojqfgbeudgmgjrgeqykytuswbahfw\\\\njqfgbeudgmgjr\\\\nojqfgbeudgmg\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"ty...
{ "split": "train", "index": 6572, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 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, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nIn Aizuwakamatsu City, there is a first city called \"Tokaichi\" on January 10th every year. This Tokaichi has a history of about 600 years and is the largest first city in the Aizu region. It is also well known that Okia...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1593 4311\\\\n4321 2155\\\\n1256 6421\\\\n5310 1455\\\\n2152 5421\\\\n1549 3386\\\\n4528 1578\\\\n1234 4321\\\\n3330 3109\\\\n2739 2199\\\\n0 0\\\", \\\"output\\\": \\\"C 7677\\\\nD 6439\\\\n\\\"}, {\\\"type\\\": \\\"stdi...
{ "split": "train", "index": 6573, "reference": null, "knowledge_emb": [ 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPatrick has just finished writing a message to his sweetheart Stacey when he noticed that the message didn't look fancy. Patrick was nervous while writing the message, so some of the letters there were lowercase and some ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"yysxwlyqboatikfnpxczmpijziiojbvadlfozjqldssffcxdegyxfrvohoxvgsrvlzjlkcuffoeisrpvagxtbkapkpzcafadzzjd\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"FSFlNEelYY\\\\n\\\", ...
{ "split": "train", "index": 6574, "reference": null, "knowledge_emb": [ 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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou like playing chess tournaments online.\n\nIn your last tournament you played $n$ games. For the sake of this problem, each chess game is either won or lost (no draws). When you lose a game you get $0$ points. When you...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n5 2\\\\nWLWLL\\\\n6 5\\\\nLLLWWL\\\\n7 1\\\\nLWLWLWL\\\\n15 5\\\\nWWWLLLWWWLLLWWW\\\\n40 7\\\\nLLWLWLWWWLWLLWLWWWLWLLWLLWLLLLWLLWWWLWWL\\\\n1 0\\\\nL\\\\n1 1\\\\nL\\\\n6 1\\\\nWLLWLW\\\\n\\\", \\\"output\\\": \\\"7\...
{ "split": "train", "index": 6575, "reference": null, "knowledge_emb": [ 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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nProgrammer Vasya is studying a new programming language &K*. The &K* language resembles the languages of the C family in its syntax. However, it is more powerful, which is why the rules of the actual C-like languages are ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\ntypedef &&&&void******* xqldryeid\\\\ntypeof &xqldryeid*\\\\ntypedef &void****** frgqt\\\\ntypeof &&frgqt*********\\\\ntypedef &void******* xqldryeid\\\\ntypeof xqldryeid*\\\\ntypedef errtype* xqldryeid\\\\ntypeof ...
{ "split": "train", "index": 6576, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAtCoDeer the deer found two rectangles lying on the table, each with height 1 and width W.\nIf we consider the surface of the desk as a two-dimensional plane, the first rectangle covers the vertical range of [0,1] and the...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 6\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1 3\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 10 1\\\\n...
{ "split": "train", "index": 6577, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAnother programming contest is over. You got hold of the contest's final results table. The table has the following data. For each team we are shown two numbers: the number of problems and the total penalty time. However,...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n50 50\\\\n5...
{ "split": "train", "index": 6578, "reference": null, "knowledge_emb": [ 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGiven a string consisting of only numbers from 0 to 9, consider the operation of creating a new string from that string according to the following rules. Read the given string one character at a time from the left end. Go...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n11\\\\n5\\\\n21\\\\n0\\\", \\\"output\\\": \\\"13112221\\\\n1113213211\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n18\\\\n5\\\\n21\\\\n0\\\", \\\"output\\\": \\\"311311222118\\\\n1113213...
{ "split": "train", "index": 6579, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGag\n\nSegtree has $ N $ of \"gags\", each with a value of $ V_i $.\n\nSegtree decided to publish all the gags in any order.\n\nHere, the \"joy\" you get when you publish the $ i $ th gag to the $ j $ th is expressed as $...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n114525\\\", \\\"output\\\": \\\"114524\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n105905\\\", \\\"output\\\": \\\"105904\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \...
{ "split": "train", "index": 6580, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYour task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently.\n\n\n\nInput\n\nA sequence of integers ai (1 ≤ ai ≤ 10...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n6\\\\n3\\\\n5\\\\n8\\\\n7\\\\n6\\\\n3\\\\n9\\\\n7\\\\n3\\\\n4\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n5\\\\n3\\\\n5\\\\n8\\\\n7\\\\n6\\\\n3\\\\n9\\\\n7\\\\...
{ "split": "train", "index": 6581, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPerhaps many have heard that the World Biathlon Championship has finished. Although our hero Valera was not present at this spectacular event himself and only watched it on TV, it excited him so much that he decided to en...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n-3441 37\\\\n227 62\\\\n-6761 20\\\\n7239 82\\\\n1163 95\\\\n-4736 97\\\\n3645 41\\\\n-2333 61\\\\n4556 47\\\\n-417 6\\\\n1\\\\n-3355 -98\\\\n\\\", \\\"output\\\": \\\"0\\\\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 \\\\n\\\"}...
{ "split": "train", "index": 6582, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSnuke is going to open a contest named \"AtCoder s Contest\".\nHere, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase E...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"AtCoder Beginner Contest\\\\n\\\", \\\"output\\\": \\\"ABC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"AtCoder Snuke Contest\\\\n\\\", \\\"output\\\": \\\"ASC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_std...
{ "split": "train", "index": 6583, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPermutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers not larger than n. We'll denote as n the length of permutation p1, p2, ..., pn.\n\nYour task is to find such permutat...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"29857 9843\\\\n\\\", \\\"output\\\": \\\"1 9844 2 9843 3 9842 4 9841 5 9840 6 9839 7 9838 8 9837 9 9836 10 9835 11 9834 12 9833 13 9832 14 9831 15 9830 16 9829 17 9828 18 9827 19 9826 20 9825 21 9824 22 9823 23 9822 24 98...
{ "split": "train", "index": 6584, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou are given an expression of the form $a{+}b$, where $a$ and $b$ are integers from $0$ to $9$. You have to evaluate it and print the result.\n\n\n-----Input-----\n\nThe first line contains one integer $t$ ($1 \\le t \\l...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n4+2\\\\n0+0\\\\n3+7\\\\n8+9\\\\n\\\", \\\"output\\\": \\\"6\\\\n0\\\\n10\\\\n17\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n0+0\\\\n0+1\\\\n0+2\\\\n0+3\\\\n0+4\\\\n0+5\\\\n0+6\\\\n0+7\...
{ "split": "train", "index": 6585, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAs we all know Barney's job is \"PLEASE\" and he has not much to do at work. That's why he started playing \"cups and key\". In this game there are three identical cups arranged in a line from left to right. Initially key...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n2\\\\n\\\", \\\"output\\\": \\\"1/2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 1 1\\\\n\\\", \\\"output\\\": \\\"0/1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\...
{ "split": "train", "index": 6586, "reference": null, "knowledge_emb": [ 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, 1, 1, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nNauuo is a girl who loves writing comments.\n\nOne day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes.\n\nIt's known that there were $x$ persons who would upvote, $y$ persons who...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 7 0\\\\n\\\", \\\"output\\\": \\\"-\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 0 1\\\\n\\\", \\\"output\\\": \\\"+\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 0\\\\n\\\", \\\"o...
{ "split": "train", "index": 6587, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThe construction of subway in Bertown is almost finished! The President of Berland will visit this city soon to look at the new subway himself.\n\nThere are n stations in the subway. It was built according to the Bertown ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 1 3\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 5 4 3 2\\\\n\\\", \\\"output\\\": \\\"17\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"...
{ "split": "train", "index": 6588, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThere is a game that uses numbers called \"Fizz Buzz\". In this game, multiple players count the numbers one by one, starting with 1, and each player says only one number after the previous player. At that time, you must ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 7\\\\n1\\\\n0\\\\nFizz\\\\n4\\\\nBuzz\\\\n6\\\\n7\\\\n3 5\\\\n1\\\\n2\\\\n3\\\\n4\\\\n5\\\\n0 0\\\", \\\"output\\\": \\\"3 4 5\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 7\\\\n1\\\\n0\\\\...
{ "split": "train", "index": 6589, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nChouti was doing a competitive programming competition. However, after having all the problems accepted, he got bored and decided to invent some small games.\n\nHe came up with the following game. The player has a positiv...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"out...
{ "split": "train", "index": 6590, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nIt is said that a legendary treasure left by Mr. Yao is sleeping somewhere in Hachioji long ago. The treasure map, which is said to show its whereabouts, has been handed down by Yao's n descendants, divided into several p...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 1\\\\n2 2 3\\\\n2 1 2\\\\n3 4 4 5\\\\n0\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 1\\\\n2 2 3\\\\n2 1 2\\\\n3 3 4 10\\\\n0\\\", \\\"output\\\": \\\"3\\\...
{ "split": "train", "index": 6591, "reference": null, "knowledge_emb": [ 0, 0, 1, 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, 0, 1, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou are given a sequence $b_1, b_2, \\ldots, b_n$. Find the lexicographically minimal permutation $a_1, a_2, \\ldots, a_{2n}$ such that $b_i = \\min(a_{2i-1}, a_{2i})$, or determine that it is impossible.\n\n\n-----Input-...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1\\\\n1\\\\n2\\\\n4 1\\\\n3\\\\n4 1 3\\\\n4\\\\n2 3 4 5\\\\n5\\\\n1 5 7 2 8\\\\n\\\", \\\"output\\\": \\\"1 2 \\\\n-1\\\\n4 5 1 2 3 6 \\\\n-1\\\\n1 3 5 6 7 9 2 4 8 10 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\",...
{ "split": "train", "index": 6592, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou're given a string of lower-case Latin letters. Your task is to find the length of its longest substring that can be met in the string at least twice. These occurrences can overlap (see sample test 2).\n\nInput\n\nThe ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ipsrjylhpkjvlzncfixipstwcicxqygqcfrawpzzvckoveyqhathglblhpkjvlzncfixipfajaqobtzvthmhgbuawoxoknirclxg\\\\n\\\", \\\"output\\\": \\\"15\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ttketfkefktfztezzkzfkkeet...
{ "split": "train", "index": 6593, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 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, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nSnuke has four cookies with deliciousness A, B, C, and D. He will choose one or more from those cookies and eat them. Is it possible that the sum of the deliciousness of the eaten cookies is equal to that of the remaining...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3 2 4\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2 4 8\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 ...
{ "split": "train", "index": 6594, "reference": null, "knowledge_emb": [ 0, 0, 0, 1, 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, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAs Will is stuck in the Upside Down, he can still communicate with his mom, Joyce, through the Christmas lights (he can turn them on and off with his mind). He can't directly tell his mom where he is, because the monster ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\")?(??((???????()?(?????????)??(????????((?)?????)????)??????(?????)?)?????)??????(??()??????)????????)?)()??????????????())????????(???)??)????????????????????(?????)??)???)??(???????????????)???)??)?\\\\n\\\", \\\"output...
{ "split": "train", "index": 6595, "reference": null, "knowledge_emb": [ 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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nIlya plays a card game by the following rules.\n\nA player has several cards. Each card contains two non-negative integers inscribed, one at the top of the card and one at the bottom. At the beginning of the round the pla...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n0 10000\\\\n1 0\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n2 9999\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inp...
{ "split": "train", "index": 6596, "reference": null, "knowledge_emb": [ 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, 0, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThe only difference between easy and hard versions is the length of the string.\n\nYou are given a string $s$ and a string $t$, both consisting only of lowercase Latin letters. It is guaranteed that $t$ can be obtained fr...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"bbaba\\\\nbb\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"baaba\\\\nab\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \...
{ "split": "train", "index": 6597, "reference": null, "knowledge_emb": [ 0, 0, 1, 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, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nCreate a program that outputs all leap years between the year a and year b.\n\nThe leap year conditions are as follows. However, 0 <a ≤ b <3,000. If there is no leap year in the given period, output \"NA\".\n\n* The year ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2001 2010\\\\n1393 2005\\\\n2001 2010\\\\n0 0\\\", \\\"output\\\": \\\"2004\\\\n2008\\\\n\\\\n1396\\\\n1404\\\\n1408\\\\n1412\\\\n1416\\\\n1420\\\\n1424\\\\n1428\\\\n1432\\\\n1436\\\\n1440\\\\n1444\\\\n1448\\\\n1452\\\\n1...
{ "split": "train", "index": 6598, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nRikhail Mubinchik believes that the current definition of prime numbers is obsolete as they are too complex and unpredictable. A palindromic number is another matter. It is aesthetically pleasing, and it has a number of r...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"238 9996\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9999 9999\\\\n\\\", \\\"output\\\": \\\"40\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"620...
{ "split": "train", "index": 6599, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...