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\nThe Smart Beaver from ABBYY invented a new message encryption method and now wants to check its performance. Checking it manually is long and tiresome, so he decided to ask the ABBYY Cup contestants for help.\n\nA message... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20 15 17\\\\n4 9 14 11 15 16 15 4 0 10 7 12 10 1 8 6 7 14 1 13\\\\n6 3 14 8 8 11 16 4 5 9 2 13 6 14 15\\\\n\\\", \\\"output\\\": \\\"10 1 3 8 3 15 7 14 1 12 3 10 15 16 16 5 4 15 13 11 \\\"}, {\\\"type\\\": \\\"stdin_stdou... | {
"split": "train",
"index": 6000,
"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\nA very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through the catacombs.\n\nCatacombs consist of several rooms and bidirectional pa... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n0 0\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n0 1 0 1 3\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \... | {
"split": "train",
"index": 6001,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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\nOne of the oddest traditions of the town of Gameston may be that even the town mayor of the next term is chosen according to the result of a game. When the expiration of the term of the mayor approaches, at least three ca... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n3 3\\\\n3 50\\\\n10 29\\\\n57 32\\\\n50 2\\\\n50 50\\\\n0 0\\\", \\\"output\\\": \\\"1\\\\n0\\\\n1\\\\n5\\\\n31\\\\n1\\\\n13\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n3 3\\\\n4 50\... | {
"split": "train",
"index": 6002,
"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\nCompute A \\times B, truncate its fractional part, and print the result as an integer.\n\n-----Constraints-----\n - 0 \\leq A \\leq 10^{15}\n - 0 \\leq B < 10\n - A is an integer.\n - B is a number with two digits after t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"198 1.10\\\\n\\\", \\\"output\\\": \\\"217\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 0.01\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10000... | {
"split": "train",
"index": 6003,
"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 cities numbered 1 through N, and M bidirectional roads numbered 1 through M. Road i connects City A_i and City B_i.\n\nSnuke can perform the following operation zero or more times:\n\n* Choose two distinct cit... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n1 1\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 1\\\\n1 1\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 1\\\\n1... | {
"split": "train",
"index": 6004,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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\nDima's got a staircase that consists of n stairs. The first stair is at height a_1, the second one is at a_2, the last one is at a_{n} (1 β€ a_1 β€ a_2 β€ ... β€ a_{n}). \n\nDima decided to play with the staircase, so he is t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 2 3 6 6\\\\n4\\\\n1 1\\\\n3 1\\\\n1 1\\\\n4 3\\\\n\\\", \\\"output\\\": \\\"1\\\\n3\\\\n4\\\\n6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2 3\\\\n2\\\\n1 1\\\\n3 1\\\\n\\\", \\\"ou... | {
"split": "train",
"index": 6005,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
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\nYou are given an integer $x$ of $n$ digits $a_1, a_2, \\ldots, a_n$, which make up its decimal notation in order from left to right.\n\nAlso, you are given a positive integer $k < n$.\n\nLet's call integer $b_1, b_2, \\ld... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n353\\\\n\\\", \\\"output\\\": \\\"3\\\\n353\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 2\\\\n1234\\\\n\\\", \\\"output\\\": \\\"4\\\\n1313\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", ... | {
"split": "train",
"index": 6006,
"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,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a program which manipulates a sequence A = {a0, a1, . . . , an-1} with the following operations:\n\n* find(s, t): report the minimum element in as, as+1, . . . ,at.\n* update(i, x): change ai to x.\n\n\n\nNote that ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3\\\\n1 -1 0\\\\n0 0 5\\\\n1 0 0\\\", \\\"output\\\": \\\"2147483647\\\\n5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 5\\\\n0 0 1\\\\n0 1 2\\\\n0 2 3\\\\n1 0 2\\\\n1 1 4\\\", \\\"output\\\": \\... | {
"split": "train",
"index": 6007,
"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\nThe last stage of Football World Cup is played using the play-off system.\n\nThere are n teams left in this stage, they are enumerated from 1 to n. Several rounds are held, in each round the remaining teams are sorted in ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 1 2\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 2 6\\\\n\\\", \\\"output\\\": \\\"Final!\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 7 5\... | {
"split": "train",
"index": 6008,
"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\nDr .: Peter, I've finally done it.\n\nPeter: See you again? What kind of silly invention is this time?\n\nDr .: I finally came up with a revolutionary way to process mathematical formulas on a computer. Look at this table... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 2 12 - /\\\\n6 4 - 7 2 3 * + *\\\\n-1 -2 3 + +\\\", \\\"output\\\": \\\"-1.000000\\\\n26.000000\\\\n0.000000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 2 12 - /\\\\n9 4 - 7 2 3 * + *\\\\n-1 -... | {
"split": "train",
"index": 6009,
"reference": null,
"knowledge_emb": [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nShapur was an extremely gifted student. He was great at everything including Combinatorics, Algebra, Number Theory, Geometry, Calculus, etc. He was not only smart but extraordinarily fast! He could manage to sum 1018 numb... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0\\\\n0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"101000001101111101101111111000001110110010101101010\\\\n010011100111100001100000010001100101000000111011011\\\\n\\... | {
"split": "train",
"index": 6010,
"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\nproblem\n\nAt the JOI pasta shop, the recommended pasta for lunch and the set menu of freshly squeezed juice are popular. When ordering this set menu, choose one from each of the three pasta and two juices of the day. The... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"800\\\\n1126\\\\n900\\\\n198\\\\n330\\\", \\\"output\\\": \\\"948\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"800\\\\n1126\\\\n900\\\\n132\\\\n330\\\", \\\"output\\\": \\\"882\\\\n\\\"}, {\\\"type\\... | {
"split": "train",
"index": 6011,
"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\nLittle Artem found a grasshopper. He brought it to his house and constructed a jumping area for him.\n\nThe area looks like a strip of cells 1 Γ n. Each cell contains the direction for the next jump and the length of that... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n>>>>>>>>><\\\\n1 1 1 1 1 1 1 1 1 10\\\\n\\\", \\\"output\\\": \\\"FINITE\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n>><<\\\\n2 100 2 100\\\\n\\\", \\\"output\\\": \\\"INFINITE\\\"}, {\\\"ty... | {
"split": "train",
"index": 6012,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nHomer has two friends Alice and Bob. Both of them are string fans.\n\nOne day, Alice and Bob decide to play a game on a string $s = s_1 s_2 \\dots s_n$ of length $n$ consisting of lowercase English letters. They move in t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\na\\\\nbbbb\\\\naz\\\\n\\\", \\\"output\\\": \\\"b\\\\nazaz\\\\nby\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\\\nzzzzzzzzzzzzzzzzzzzzz... | {
"split": "train",
"index": 6013,
"reference": null,
"knowledge_emb": [
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,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya has got $n$ books, numbered from $1$ to $n$, arranged in a stack. The topmost book has number $a_1$, the next one β $a_2$, and so on. The book at the bottom of the stack has number $a_n$. All numbers are distinct.\n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2 3\\\\n2 1 3\\\\n\\\", \\\"output\\\": \\\"2 0 1 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3 1 4 2 5\\\\n4 5 1 3 2\\\\n\\\", \\\"output\\\": \\\"3 2 0 0 0 \\\\n\\\"}, {\\\"type\\\"... | {
"split": "train",
"index": 6014,
"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\nA very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through the catacombs.\n\nCatacombs consist of several rooms and bidirectional pa... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n0 0 0 0 0 0 1 4 4 0 2 2 4 1 7 1 11 0 8 4 12 12 3 0 3 2 2 4 3 9 1 5 4 6 9 14 6 2 4 18 7 7 19 11 20 13 17 16 0 34 2 6 12 27 9 4 29 22 4 20 20 17 17 20 37 53 17 3 3 15 1 46 11 24 31 6 12 6 11 18 13 1 5 0 19 10 24 41 ... | {
"split": "train",
"index": 6015,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
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\nYou are given an array $a$ of $n$ ($n \\geq 2$) positive integers and an integer $p$. Consider an undirected weighted graph of $n$ vertices numbered from $1$ to $n$ for which the edges between the vertices $i$ and $j$ ($i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2 5\\\\n10 10\\\\n2 5\\\\n3 3\\\\n4 5\\\\n5 2 4 9\\\\n8 8\\\\n5 3 3 6 10 100 9 15\\\\n\\\", \\\"output\\\": \\\"5\\\\n3\\\\n12\\\\n46\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n10 24386... | {
"split": "train",
"index": 6016,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is a rooted tree with N vertices numbered 1 to N.\nThe root is Vertex 1, and the i-th edge (1 \\leq i \\leq N - 1) connects Vertex a_i and b_i.\nEach of the vertices has a counter installed. Initially, the counters ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n1 2\\\\n2 3\\\\n2 4\\\\n2 10\\\\n1 100\\\\n3 1\\\\n\\\", \\\"output\\\": \\\"100 110 111 110\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 2\\\\n1 2\\\\n1 3\\\\n2 4\\\\n3 6\\\\n2 5\\\\n1 10\... | {
"split": "train",
"index": 6017,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWhen naming identifiers (variables and functions) in programming, compound words that concatenate words are used. However, if you concatenate them as they are, you will not be able to understand the word breaks, so in gen... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"get_user_name L\\\\ngetUserOame U\\\\nGetUserName D\\\\nEndOfInput X\\\", \\\"output\\\": \\\"getUserName\\\\nGetUserOame\\\\nget_user_name\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"get_user_name ... | {
"split": "train",
"index": 6018,
"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$ of $n$ integers, where $n$ is odd. You can make the following operation with it: Choose one of the elements of the array (for example $a_i$) and increase it by $1$ (that is, replace it with $a_... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n1 3 5\\\\n\\\", \\\"output\\\": \\\"5\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 5\\\\n1 2 1 1 1\\\\n\\\", \\\"output\\\": \\\"3\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7... | {
"split": "train",
"index": 6019,
"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,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou helped Dima to have a great weekend, but it's time to work. Naturally, Dima, as all other men who have girlfriends, does everything wrong.\n\nInna and Dima are now in one room. Inna tells Dima off for everything he do... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 2\\\\n3 2 1 6 5 4\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 5\\\\n1 3 5 7 9 9 4 1 8 5\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdou... | {
"split": "train",
"index": 6020,
"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\nThe Fair Nut lives in $n$ story house. $a_i$ people live on the $i$-th floor of the house. Every person uses elevator twice a day: to get from the floor where he/she lives to the ground (first) floor and to get from the f... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n0 2 1\\\\n\\\", \\\"output\\\": \\\"16\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 1\\\\n\\\", \\\"output\\\": \\\"4\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n1\\\... | {
"split": "train",
"index": 6021,
"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\nHaving learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.\nGiven are two integers A and B.\nIf Takahashi can calculate A \\times... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 5\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 10\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9 9\\\\n\\\"... | {
"split": "train",
"index": 6022,
"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\nThree years have passes and nothing changed. It is still raining in London, and Mr. Black has to close all the doors in his home in order to not be flooded. Once, however, Mr. Black became so nervous that he opened one do... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n0 0 1 0 0\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 0 0 1\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\... | {
"split": "train",
"index": 6023,
"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\nC: Prayer (Pray)\n\nSome twins are famous for praying before the contest.\n\nThere are four integers $ H, W, X, Y $, and it seems unlucky if $ H \\ times W $ and $ x + y $ are both odd numbers.\n\ninput\n\nFour integers $... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 5 2 4\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 9 1 4\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 13 1 4\\\", ... | {
"split": "train",
"index": 6024,
"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\nAfter seeing the \"ALL YOUR BASE ARE BELONG TO US\" meme for the first time, numbers X and Y realised that they have different bases, which complicated their relations.\n\nYou're given a number X represented in base b_{x}... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 2\\\\n1 0 1 1 1 1\\\\n2 10\\\\n4 7\\\\n\\\", \\\"output\\\": \\\"=\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n1 0 2\\\\n2 5\\\\n2 4\\\\n\\\", \\\"output\\\": \\\"<\\\\n\\\"}, {\\\"type\\\... | {
"split": "train",
"index": 6025,
"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\nX and A are integers between 0 and 9 (inclusive).\nIf X is less than A, print 0; if X is not less than A, print 10.\n\n-----Constraints-----\n - 0 \\leq X, A \\leq 9\n - All values in input are integers.\n\n-----Input----... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 5\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 5\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 6\\\\n\\\", ... | {
"split": "train",
"index": 6026,
"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\nPaul hates palindromes. He assumes that string s is tolerable if each its character is one of the first p letters of the English alphabet and s doesn't contain any palindrome contiguous substring of length 2 or more.\n\nP... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"302 4\\\\nabdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdc... | {
"split": "train",
"index": 6027,
"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\nPetya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.\n\... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000\\\\n\\\", \\\"output\\\": \\\"4444477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdo... | {
"split": "train",
"index": 6028,
"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\nPetya recieved a gift of a string s with length up to 10^5 characters for his birthday. He took two more empty strings t and u and decided to play a game. This game has two possible moves: Extract the first character of ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"cab\\\\n\\\", \\\"output\\\": \\\"abc\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"acdb\\\\n\\\", \\\"output\\\": \\\"abdc\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"a\\\\n\\\... | {
"split": "train",
"index": 6029,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
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\nZane the wizard is going to perform a magic show shuffling the cups.\n\nThere are n cups, numbered from 1 to n, placed along the x-axis on a table that has m holes on it. More precisely, cup i is on the table at the posit... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 3 4\\\\n3 4 6\\\\n1 2\\\\n2 5\\\\n5 7\\\\n7 1\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 1 2\\\\n2\\\\n1 2\\\\n2 4\\\\n\\\", \\\"output\\\": \\\"2\\\"}, {\\\"type\\\"... | {
"split": "train",
"index": 6030,
"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\nAyoub had an array $a$ of integers of size $n$ and this array had two interesting properties: All the integers in the array were between $l$ and $r$ (inclusive). The sum of all the elements was divisible by $3$. \n\nUn... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1 3\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 2\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9 9 99\\\\n... | {
"split": "train",
"index": 6031,
"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\nGiven an array $a_1, a_2, \\dots, a_n$, you need to handle a total of $q$ updates and queries of two types:\n\n$1$ $l$ $r$ β for each index $i$ with $l \\leq i \\leq r$, update the value of $a_i$ to the sum of the digits ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5 8\\\\n1 420 69 1434 2023\\\\n1 2 3\\\\n2 2\\\\n2 3\\\\n2 4\\\\n1 2 5\\\\n2 1\\\\n2 3\\\\n2 5\\\\n2 3\\\\n9999 1000\\\\n1 1 2\\\\n2 1\\\\n2 2\\\\n1 1\\\\n1\\\\n2 1\\\\n\\\", \\\"output\\\": \\\"6\\\\n15\\\\n1434\\\... | {
"split": "train",
"index": 6032,
"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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAfter celebrating the midcourse the students of one of the faculties of the Berland State University decided to conduct a vote for the best photo. They published the photos in the social network and agreed on the rules to... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 3 2 2 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\n100 200 300 200 100 300 300 100 200\\\\n\\\", \\\"output\\\": \\\"300\\\\n\\\"}, {\\\"type\\\": \\\"... | {
"split": "train",
"index": 6033,
"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\nVector Willman and Array Bolt are the two most famous athletes of Byteforces. They are going to compete in a race with a distance of L meters today.\n\n [Image] \n\nWillman and Bolt have exactly the same speed, so when th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 3 2\\\\n\\\", \\\"output\\\": \\\"3/10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 1 2\\\\n\\\", \\\"output\\\": \\\"3/7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 1... | {
"split": "train",
"index": 6034,
"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\nA biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.\nFind the total number of biscuits produced within T + 0... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 5 7\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 9\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20 20 19\\... | {
"split": "train",
"index": 6035,
"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\nΒ«PolygonΒ» is a system which allows to create programming tasks in a simple and professional way. When you add a test to the problem, the corresponding form asks you for the test index. As in most cases it is clear which i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n4 2 3 1\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1... | {
"split": "train",
"index": 6036,
"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\nYou are given a board of size $n \\times n$, where $n$ is odd (not divisible by $2$). Initially, each cell of the board contains one figure.\n\nIn one move, you can select exactly one figure presented in some cell and mov... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1\\\\n5\\\\n499993\\\\n\\\", \\\"output\\\": \\\"0\\\\n40\\\\n41664916690999888\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n499999\\\\n\\\", \\\"output\\\": \\\"41666416667000000\\\\n\\\... | {
"split": "train",
"index": 6037,
"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\nGiven an array a_1, a_2, ..., a_{n} of n integers, find the largest number in the array that is not a perfect square.\n\nA number x is said to be a perfect square if there exists an integer y such that x = y^2.\n\n\n-----... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n4 2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n1 2 4 8 16 32 64 576\\\\n\\\", \\\"output\\\": \\\"32\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"... | {
"split": "train",
"index": 6038,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWinters are just damn freezing cold in Nvodsk! That's why a group of n friends prefers to take a taxi, order a pizza and call girls. The phone numbers in the city consist of three pairs of digits (for example, 12-34-56). ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n5 eeleGlOFWbcnIPPtnll\\\\n55-55-55\\\\n00-00-00\\\\n98-65-32\\\\n76-43-10\\\\n98-76-54\\\\n2 DMBiqRyQJkFvHPJNJp\\\\n28-97-50\\\\n87-64-10\\\\n4 bAfmtnKHohIX\\\\n61-58-93\\\\n77-77-77\\\\n53-17-51\\\\n96-43-10\\\\n3... | {
"split": "train",
"index": 6039,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two integers $A$ and $B$, calculate the number of pairs $(a, b)$ such that $1 \\le a \\le A$, $1 \\le b \\le B$, and the equation $a \\cdot b + a + b = conc(a, b)$ is true; $conc(a, b)$ is the concatenation ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 11\\\\n4 2\\\\n191 31415926\\\\n\\\", \\\"output\\\": \\\"1\\\\n0\\\\n1337\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n8585 99\\\\n\\\", \\\"output\\\": \\\"17170\\\\n\\\"}, {\\\"type\... | {
"split": "train",
"index": 6040,
"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\nFor given two sequences $X$ and $Y$, a sequence $Z$ is a common subsequence of $X$ and $Y$ if $Z$ is a subsequence of both $X$ and $Y$. For example, if $X = \\\\{a,b,c,b,d,a,b\\\\}$ and $Y = \\\\{b,d,c,a,b,a\\\\}$, the se... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\nabcbdab\\\\nbdcaba\\\\nabc\\\\nabc\\\\nacb\\\\nbc\\\", \\\"output\\\": \\\"4\\\\n3\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\nabcbdab\\\\nbdcaba\\\\nabc\\\\nabc\\\\nbcb\\\\nbc\\\"... | {
"split": "train",
"index": 6041,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIvan has an array consisting of n elements. Each of the elements is an integer from 1 to n.\n\nRecently Ivan learned about permutations and their lexicographical order. Now he wants to change (replace) minimum number of e... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3 2 2 3\\\\n\\\", \\\"output\\\": \\\"2\\\\n1 2 4 3 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n4 5 6 3 2 1\\\\n\\\", \\\"output\\\": \\\"0\\\\n4 5 6 3 2 1 \\\\n\\\"}, {\\\"type\\\": \\... | {
"split": "train",
"index": 6042,
"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\nFor a given array $a$ consisting of $n$ integers and a given integer $m$ find if it is possible to reorder elements of the array $a$ in such a way that $\\sum_{i=1}^{n}{\\sum_{j=i}^{n}{\\frac{a_j}{j}}}$ equals $m$? It is ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3 8\\\\n2 5 1\\\\n4 4\\\\n0 1 2 3\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n2 2\\\\n2 4\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\... | {
"split": "train",
"index": 6043,
"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,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nApart from having lots of holidays throughout the year, residents of Berland also have whole lucky years. Year is considered lucky if it has no more than 1 non-zero digit in its number. So years 100, 40000, 5 are lucky an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"201\\\\n\\\", \\\"output\\\": \\\"99\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4000\\\\n\\\", \... | {
"split": "train",
"index": 6044,
"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 king's birthday dinner was attended by $k$ guests. The dinner was quite a success: every person has eaten several dishes (though the number of dishes was the same for every person) and every dish was served alongside ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n1 2 2 1 3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 3\\\\n1 3 3 1 3 5 5 5 5 100\\\\n\\\", \\\"output\\\": \\\"14\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdo... | {
"split": "train",
"index": 6045,
"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\nThe new \"Die Hard\" movie has just been released! There are n people at the cinema box office standing in a huge line. Each of them has a single 100, 50 or 25 ruble bill. A \"Die Hard\" ticket costs 25 rubles. Can the bo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n25 25 50 50\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n25 100\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 6046,
"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\nVasya, like many others, likes to participate in a variety of sweepstakes and lotteries. Now he collects wrappings from a famous chocolate bar \"Jupiter\". According to the sweepstake rules, each wrapping has an integer w... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15\\\\n50 12 36 11 38 28 4 11 29 34 22 46 43 2 29\\\\n7 8 10 17 23\\\\n\\\", \\\"output\\\": \\\"1 0 6 3 12\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n588141495 24894836 162095938 6109... | {
"split": "train",
"index": 6047,
"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\nIn this problem you will meet the simplified model of game King of Thieves.\n\nIn a new ZeptoLab game called \"King of Thieves\" your aim is to reach a chest with gold by controlling your character, avoiding traps and obs... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"16\\\\n.**.*..*.***.**.\\\\n\\\", \\\"output\\\": \\\"yes\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"11\\\\n.*.*...*.*.\\\\n\\\", \\\"output\\\": \\\"no\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in... | {
"split": "train",
"index": 6048,
"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\nFor god's sake, you're boxes with legs! It is literally your only purpose! Walking onto buttons! How can you not do the one thing you were designed for?\n\nOh, that's funny, is it? Oh it's funny? Because we've been at thi... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5\\\\n5 3 2 1 4\\\\n6\\\\n2 2 2 2 2 2\\\\n2\\\\n2 1\\\\n\\\", \\\"output\\\": \\\"YES\\\\nYES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n2\\\\n1 1\\\\n2\\\\n1 1000000000\\\\n2\\\... | {
"split": "train",
"index": 6049,
"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\nA has a string consisting of some number of lowercase English letters 'a'. He gives it to his friend B who appends some number of letters 'b' to the end of this string. Since both A and B like the characters 'a' and 'b', ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aaabccc\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"bbacc\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aabc\\... | {
"split": "train",
"index": 6050,
"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\nFor an array a of integers let's denote its maximal element as max(a), and minimal as min(a). We will call an array a of k integers interesting if max(a) - min(a) β₯ k. For example, array [1, 3, 4, 3] isn't interesting as ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n16\\\\n1 2 3 4 4 4 2 4 4 4 4 4 5 5 5 5\\\\n\\\", \\\"output\\\": \\\"YES\\\\n6 7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n8\\\\n1 2 2 2 4 4 4 5\\\\n\\\", \\\"output\\\": \\\"YES\\\\n4... | {
"split": "train",
"index": 6051,
"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,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only king stands on the standard chess board. You are given his position in format \"cd\", where c is the column from 'a' to 'h' and d is the row from '1' to '8'. Find the number of moves permitted for the king.\n\nCh... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"e4\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"a1\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"h8\\\\n\\\", \\\"... | {
"split": "train",
"index": 6052,
"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 a string S consisting of lowercase English letters. We will write down this string, starting a new line after every w letters. Print the string obtained by concatenating the letters at the beginnings of thes... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"lllll\\\\n2\\\", \\\"output\\\": \\\"lll\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcdefgh\\\\n4\\\", \\\"output\\\": \\\"ae\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"dnu... | {
"split": "train",
"index": 6053,
"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\nM-kun has the following three cards:\n\n* A red card with the integer A.\n* A green card with the integer B.\n* A blue card with the integer C.\n\n\n\nHe is a genius magician who can do the following operation at most K t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 4 4\\\\n3\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"37 2 2\\\\n9\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 2 5... | {
"split": "train",
"index": 6054,
"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,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nRead problems statements in Russian here \nThe Head Chef has been playing with Fibonacci numbers for long . He has learnt several tricks related to Fibonacci numbers . Now he wants to test his chefs in the skills . \n \nA... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3\\\\n4\\\\n5\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3\\\\n4\\\\n3\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\\n\\\"}, {\\\"type\\\": \\\"s... | {
"split": "train",
"index": 6055,
"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\nRead problems statements in Mandarin Chinese and Russian as well. \n\nYou had an array of integer numbers. You also had a beautiful operations called \"Copy-Paste\" which allowed you to copy any contiguous subsequence of ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n5\\\\n1 1 1 1 1\\\\n5\\\\n1 2 3 1 2\\\", \\\"output\\\": \\\"1\\\\n3\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n5\\\\n1 1 1 1 1\\\\n5\\\\n1 2 6 1 2\\\", \\\"output\\\": \\\"1\\\\n3\\\\n\\\"}... | {
"split": "train",
"index": 6056,
"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\nYou are given an array of n integer numbers. Let sum(l, r) be the sum of all numbers on positions from l to r non-inclusive (l-th element is counted, r-th element is not counted). For indices l and r holds 0 β€ l β€ r β€ n. ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n0 0 0 0 0 0 0 0 0 0\\\\n\\\", \\\"output\\\": \\\"0 0 0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n-6 -4 -7 0 7 9 8 3 8 7\\\\n\\\", \\\"output\\\": \\\"0 3 10\\\\n\\\"}, {\\\"type\\\"... | {
"split": "train",
"index": 6057,
"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,
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\nYou are given n rectangles. The corners of rectangles have integer coordinates and their edges are parallel to the Ox and Oy axes. The rectangles may touch each other, but they do not overlap (that is, there are no points... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n0 0 2 3\\\\n0 3 3 5\\\\n2 0 5 2\\\\n3 2 5 5\\\\n2 2 3 3\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0 0 2 3\\\\n0 3 3 5\\\\n2 0 5 2\\\\n3 2 5 5\\\\n\\\"... | {
"split": "train",
"index": 6058,
"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,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have N logs of lengths A_1,A_2,\\cdots A_N.\nWe can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n7 9\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 0\\\\n3 4 5\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \... | {
"split": "train",
"index": 6059,
"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,
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 $n$ positive integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 1000$). Find the maximum value of $i + j$ such that $a_i$ and $a_j$ are coprime,$^{\\dagger}$ or $-1$ if no such $i$, $j$ exist.\n\nFor exa... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n3\\\\n3 2 1\\\\n7\\\\n1 3 5 2 4 7 7\\\\n5\\\\n1 2 3 4 5\\\\n3\\\\n2 2 4\\\\n6\\\\n5 4 3 15 12 16\\\\n5\\\\n1 2 2 3 6\\\\n\\\", \\\"output\\\": \\\"6\\\\n12\\\\n9\\\\n-1\\\\n10\\\\n7\\\\n\\\"}, {\\\"type\\\": \\\"std... | {
"split": "train",
"index": 6060,
"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,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given n points on a plane. All points are different.\n\nFind the number of different groups of three points (A, B, C) such that point B is the middle of segment AC. \n\nThe groups of three points are considered un... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n-2 1\\\\n2 -2\\\\n-1 -2\\\\n0 0\\\\n2 -1\\\\n0 -2\\\\n2 2\\\\n0 2\\\\n-1 -1\\\\n1 -2\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"40\\\\n-8 24\\\\n2 -1\\\\n1 -1... | {
"split": "train",
"index": 6061,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
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,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a_1, a_2, ..., a_{k}, that their sum is equal to n and greatest common divisor is maximal.\n\nGreatest com... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 3\\\\n\\\", \\\"output\\\": \\\"1 2 3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 2\\\\n\\\", \\\"output\\\": \\\"2 6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3\\\\n\... | {
"split": "train",
"index": 6062,
"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,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nMahmoud and Ehab continue their adventures! As everybody in the evil land knows, Dr. Evil likes bipartite graphs, especially trees.\n\nA tree is a connected acyclic graph. A bipartite graph is a graph, whose vertices can ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2\\\\n1 3\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 2\\\\n2 3\\\\n3 4\\\\n4 5\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_st... | {
"split": "train",
"index": 6063,
"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,
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: A-Z Cat / A-Z Cat\n\nstory\n\nAizunyan is a second-year student who belongs to the programming contest club of Wakagamatsu High School, commonly known as the Prokon club. It's so cute. Aizu Nyan was asked by her friend... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"AOZUNYANPERIPERO\\\", \\\"output\\\": \\\"AZ\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"OREQIRMQEAYNUYOA\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \... | {
"split": "train",
"index": 6064,
"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\nRecently a dog was bought for Polycarp. The dog's name is Cormen. Now Polycarp has a lot of troubles. For example, Cormen likes going for a walk. \n\nEmpirically Polycarp learned that the dog needs at least k walks for an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 5\\\\n2 0 1\\\\n\\\", \\\"output\\\": \\\"4\\\\n2 3 2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n0 0 0\\\\n\\\", \\\"output\\\": \\\"1\\\\n0 1 0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout... | {
"split": "train",
"index": 6065,
"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\nThere are N participants in the CODE FESTIVAL 2016 Qualification contests. The participants are either students in Japan, students from overseas, or neither of these.\n\nOnly Japanese students or overseas students can pas... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12 5 0\\\\ncabbabaacaba\\\", \\\"output\\\": \\\"No\\\\nYes\\\\nNo\\\\nNo\\\\nYes\\\\nNo\\\\nYes\\\\nYes\\\\nNo\\\\nYes\\\\nNo\\\\nNo\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12 5 1\\\\ncacbabaac... | {
"split": "train",
"index": 6066,
"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\nLet's call a positive integer $n$ ordinary if in the decimal notation all its digits are the same. For example, $1$, $2$ and $99$ are ordinary numbers, but $719$ and $2021$ are not ordinary numbers.\n\nFor a given number ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1\\\\n2\\\\n3\\\\n4\\\\n5\\\\n100\\\\n\\\", \\\"output\\\": \\\"1\\\\n2\\\\n3\\\\n4\\\\n5\\\\n18\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n999999999\\\\n\\\", \\\"output\\\": \\\"81\\\... | {
"split": "train",
"index": 6067,
"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\nConsider the set of all nonnegative integers: ${0, 1, 2, \\dots}$. Given two integers $a$ and $b$ ($1 \\le a, b \\le 10^4$). We paint all the numbers in increasing number first we paint $0$, then we paint $1$, then $2$ an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n10 10\\\\n1 10\\\\n6 9\\\\n7 3\\\\n\\\", \\\"output\\\": \\\"Infinite\\\\nFinite\\\\nInfinite\\\\nFinite\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n863 863\\\\n\\\", \\\"output\\\": \\\... | {
"split": "train",
"index": 6068,
"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\nThere is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been pr... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"...\\\\nX.X\\\\n...\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"X..\\\\nX..\\\\nX..\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\",... | {
"split": "train",
"index": 6069,
"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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTheofanis has a riddle for you and if you manage to solve it, he will give you a Cypriot snack halloumi for free (Cypriot cheese).\n\nYou are given an integer $n$. You need to find two integers $l$ and $r$ such that $-10^... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n1\\\\n2\\\\n3\\\\n6\\\\n100\\\\n25\\\\n3000000000000\\\\n\\\", \\\"output\\\": \\\"0 1\\\\n-1 2\\\\n-2 3\\\\n-5 6\\\\n-99 100\\\\n-24 25\\\\n-2999999999999 3000000000000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\... | {
"split": "train",
"index": 6070,
"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,
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\nThere is a robot on a coordinate plane. Initially, the robot is located at the point $(0, 0)$. Its path is described as a string $s$ of length $n$ consisting of characters 'L', 'R', 'U', 'D'.\n\nEach of these characters c... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n4\\\\nLRUD\\\\n4\\\\nLURD\\\\n5\\\\nRRUDU\\\\n5\\\\nLLDDR\\\\n\\\", \\\"output\\\": \\\"1 2\\\\n1 4\\\\n3 4\\\\n-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n10\\\\nRULLDRRULD\\\\n\\\",... | {
"split": "train",
"index": 6071,
"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\nOnce Bob needed to find the second order statistics of a sequence of integer numbers. Lets choose each number from the sequence exactly once and sort them. The value on the second position is the second order statistics o... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n93 77 -92 26 21 -48 53 91\\\\n\\\", \\\"output\\\": \\\"-48\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2 3\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 6072,
"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\nThe only difference between easy and hard versions are constraints on $n$ and $k$.\n\nYou are messaging in one of the popular social networks via your smartphone. Your smartphone can show at most $k$ most recent conversat... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 2\\\\n1 2 3 2 1 3 2\\\\n\\\", \\\"output\\\": \\\"2\\\\n2 1 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 4\\\\n2 3 3 1 1 2 1 2 3 3\\\\n\\\", \\\"output\\\": \\\"3\\\\n1 3 2 \\\\n\\\"}, {\\\"typ... | {
"split": "train",
"index": 6073,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
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\nAn extension of a complex number is called a quaternion. It is a convenient number that can be used to control the arm of a robot because it is convenient for expressing the rotation of an object. Quaternions are $ using ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2 3 4 7 6 7 8\\\\n5 6 4 8 3 2 3 4\\\\n0\\\", \\\"output\\\": \\\"-58 16 36 32\\\\n-41 20 19 54\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2 3 4 7 6 14 8\\\\n5 6 4 8 3 2 3 4\\\\n0\\\... | {
"split": "train",
"index": 6074,
"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\nThis contest is `CODEFESTIVAL`, which can be shortened to the string `CF` by deleting some characters.\n\nMr. Takahashi, full of curiosity, wondered if he could obtain `CF` from other strings in the same way.\n\nYou are g... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"FC\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"CODDFESTIVAL\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"FCE\\\", \\\"o... | {
"split": "train",
"index": 6075,
"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\nVasilisa the Wise from a far away kingdom got a present from her friend Helga the Wise from a farther away kingdom. The present is a surprise box, yet Vasilisa the Wise doesn't know yet what the surprise actually is becau... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"RRYYOO\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"YYBBOO\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"RRBYRR\\\... | {
"split": "train",
"index": 6076,
"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\nToday's Random Number\n\nE869120 You ran a campaign called \"Today's Random Numbers\" for N days. This is a project to generate a random number once a day and post the value on Twitter.\n\nThe \"random numbers of the day\... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n8 0 9 1 20\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n10 -2 3 1 0\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6077,
"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\nCurrently Tiny is learning Computational Geometry. When trying to solve a problem called \"The Closest Pair Of Points In The Plane\", he found that a code which gave a wrong time complexity got Accepted instead of Time Li... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1854 631695\\\\n\\\", \\\"output\\\": \\\"0 0\\\\n0 1\\\\n0 2\\\\n0 3\\\\n0 4\\\\n0 5\\\\n0 6\\\\n0 7\\\\n0 8\\\\n0 9\\\\n0 10\\\\n0 11\\\\n0 12\\\\n0 13\\\\n0 14\\\\n0 15\\\\n0 16\\\\n0 17\\\\n0 18\\\\n0 19\\\\n0 20\\\\n... | {
"split": "train",
"index": 6078,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
1,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTurbulent times are coming, so you decided to buy sugar in advance. There are $n$ shops around that sell sugar: the $i$-th shop sells one pack of sugar for $a_i$ coins, but only one pack to one customer each day. So in or... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3 7\\\\n2 1 2\\\\n5 9\\\\n10 20 30 40 50\\\\n1 1\\\\n1\\\\n2 1000\\\\n1 1\\\\n\\\", \\\"output\\\": \\\"11\\\\n0\\\\n1\\\\n1500\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n1 1000000\\\\n... | {
"split": "train",
"index": 6079,
"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,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou can not just take the file and send it. When Polycarp trying to send a file in the social network \"Codehorses\", he encountered an unexpected problem. If the name of the file contains three or more \"x\" (lowercase L... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\nxxxiii\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nxxoxx\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6080,
"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\nRecently a Golden Circle of Beetlovers was found in Byteland. It is a circle route going through $n \\cdot k$ cities. The cities are numerated from $1$ to $n \\cdot k$, the distance between the neighboring cities is exact... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n1 1\\\\n\\\", \\\"output\\\": \\\"1 6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n0 0\\\\n\\\", \\\"output\\\": \\\"1 3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":... | {
"split": "train",
"index": 6081,
"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\nOn Bertown's main street n trees are growing, the tree number i has the height of ai meters (1 β€ i β€ n). By the arrival of the President of Berland these trees were decided to be changed so that their heights formed a bea... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n100000\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n4 5 6 5 1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"... | {
"split": "train",
"index": 6082,
"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\nn people came to a party. Then those, who had no friends among people at the party, left. Then those, who had exactly 1 friend among those who stayed, left as well. Then those, who had exactly 2, 3, ..., n - 1 friends amo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n2\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n7... | {
"split": "train",
"index": 6083,
"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\nBear Limak wants to become the largest of bears, or at least to become larger than his brother Bob.\n\nRight now, Limak and Bob weigh a and b respectively. It's guaranteed that Limak's weight is smaller than or equal to h... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 7\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 9\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n\\\", \... | {
"split": "train",
"index": 6084,
"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\nGildong's town has a train system that has $100$ trains that travel from the bottom end to the top end and $100$ trains that travel from the left end to the right end. The trains starting from each side are numbered from ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2\\\\n1\\\\n3 4\\\\n3 2\\\\n1 3 4\\\\n2 4\\\\n9 14\\\\n2 7 16 28 33 57 59 86 99\\\\n3 9 14 19 25 26 28 35 41 59 85 87 99 100\\\\n\\\", \\\"output\\\": \\\"0\\\\n1\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 6085,
"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\nproblem\n\nMobiles are widely known as moving works of art. The IOI Japan Committee has decided to create mobiles to publicize JOI. JOI public relations mobiles are sticks, strings, and weights. It is constructed as follo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n6 9 0 0\\\\n4\\\\n3 2 0 4\\\\n1 3 0 0\\\\n4 4 2 1\\\\n4 2 0 0\\\\n0\\\", \\\"output\\\": \\\"5\\\\n40\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n6 9 0 0\\\\n4\\\\n3 2 0 4\\\\n1 3 0 0\\\... | {
"split": "train",
"index": 6086,
"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\nA: four tea\n\nproblem\n\nTea is indispensable for programming contests. Tea has the effect of relieving constant tension [citation needed]\n\nThere are N players participating in the contest, so I would like to prepare t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1 2 3 2\\\\n1 2 4 8\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1 1 3 2\\\\n0 2 3 8\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\"... | {
"split": "train",
"index": 6087,
"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\nPresident of Berland has a very vast office-room, where, apart from him, work his subordinates. Each subordinate, as well as President himself, has his own desk of a unique colour. Each desk is rectangular, and its sides ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 W\\\\nOO\\\\nWW\\\\nWW\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 10 T\\\\nCCEEEKKKHJ\\\\nCCRRRRRRHJ\\\\nCC..XFFOOO\\\\nZZZZZFFOOO\\\\n..PTTFFOOO\\\\nAAATTFFO... | {
"split": "train",
"index": 6088,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nModern text editors usually show some information regarding the document being edited. For example, the number of words, the number of pages, or the number of characters.\n\nIn this problem you should implement the simila... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"37\\\\n_Hello_Vasya(and_Petya)__bye_(and_OK)\\\\n\\\", \\\"output\\\": \\\"5 4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"37\\\\n_a_(_b___c)__de_f(g_)__h__i(j_k_l)m__\\\\n\\\", \\\"output\\\": \\\"... | {
"split": "train",
"index": 6089,
"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\nConsider a currency system in which there are notes of six denominations, namely, Rs. 1, Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100.\nIf the sum of Rs. N is input, write a program to computer smallest number of notes that will... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1200\\\\n500\\\\n242\\\\n\\\", \\\"output\\\": \\\"12\\\\n5\\\\n7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 \\\\n1200\\\\n360\\\\n242\\\", \\\"output\\\": \\\"12\\\\n5\\\\n7\\\\n\\\"}, {\\... | {
"split": "train",
"index": 6090,
"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\nA few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.\n\nThere are n schools numerated from 1 to n. One can travel... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"43670\\\\n\\\", \\... | {
"split": "train",
"index": 6091,
"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\nThe Little Elephant loves playing with arrays. He has array a, consisting of n positive integers, indexed from 1 to n. Let's denote the number with index i as ai. \n\nAdditionally the Little Elephant has m queries to the ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 6\\\\n1 2 2 3 3 3\\\\n1 2\\\\n2 2\\\\n1 3\\\\n2 4\\\\n4 6\\\\n1 6\\\\n\\\", \\\"output\\\": \\\"1\\\\n0\\\\n2\\\\n1\\\\n1\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2\\\\n1\\\\n1 1\\\\n1 ... | {
"split": "train",
"index": 6092,
"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,
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 have a playlist consisting of $n$ songs. The $i$-th song is characterized by two numbers $t_i$ and $b_i$ β its length and beauty respectively. The pleasure of listening to set of songs is equal to the total length of ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n4 7\\\\n15 1\\\\n3 6\\\\n6 8\\\\n\\\", \\\"output\\\": \\\"78\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3\\\\n12 31\\\\n112 4\\\\n100 100\\\\n13 55\\\\n55 50\\\\n\\\", \\\"output\\\": \\... | {
"split": "train",
"index": 6093,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
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\nKode Festival is an anual contest where the hardest stone in the world is determined. (Kode is a Japanese word for \"hardness\".)\n\nThis year, 2^N stones participated. The hardness of the i-th stone is A_i.\n\nIn the con... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1\\\\n5\\\\n2\\\\n4\\\\n6\\\\n8\\\\n100\\\\n104\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1\\\\n5\\\\n10\\\\n19\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"ty... | {
"split": "train",
"index": 6094,
"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\nLittle girl Tanya is learning how to decrease a number by one, but she does it wrong with a number consisting of two or more digits. Tanya subtracts one from a number by the following algorithm: if the last digit of the ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"512 4\\\\n\\\", \\\"output\\\": \\\"50\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000000000 9\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"131... | {
"split": "train",
"index": 6095,
"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\nThis problem is a complicated version of D1, but it has significant differences, so read the whole statement.\n\nPolycarp has an array of $n$ ($n$ is even) integers $a_1, a_2, \\dots, a_n$. Polycarp conceived of a positiv... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n6\\\\n48 13 22 -15 16 35\\\\n8\\\\n-1 0 1 -1 0 1 -1 0\\\\n4\\\\n100 -1000 -1000 -1000\\\\n4\\\\n1 1 1 1\\\\n\\\", \\\"output\\\": \\\"13\\\\n2\\\\n-1\\\\n-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\... | {
"split": "train",
"index": 6096,
"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,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe phantom thief \"Lupin IV\" is told by the beautiful \"Fujiko Mine\", a descendant of the Aizu clan, that the military funds left by the Aizu clan are sleeping in Aizuwakamatsu city. According to a report by Lupine's l... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n13 199 1\\\\n93 1000 1\\\\n37 350 10\\\\n27 300 2\\\\n99 200 1000\\\", \\\"output\\\": \\\"93 37 27 13 99\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n9 100 1\\\\n13 200 20\\\\n12 300 3\\... | {
"split": "train",
"index": 6097,
"reference": null,
"knowledge_emb": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya is an active Internet user. One day he came across an Internet resource he liked, so he wrote its address in the notebook. We know that the address of the written resource has format: <protocol>://<domain>.ru[/<cont... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"httpsunrux\\\\n\\\", \\\"output\\\": \\\"http://sun.ru/x\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ftphttprururu\\\\n\\\", \\\"output\\\": \\\"ftp://http.ru/ruru\\\\n\\\"}, {\\\"type\\\": \\\"stdi... | {
"split": "train",
"index": 6098,
"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\nConsider the infinite sequence of integers: 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5.... The sequence is built in the following way: at first the number 1 is written out, then the numbers from 1 to 2, then the numbers ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"ou... | {
"split": "train",
"index": 6099,
"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,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.