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\nWe have an N \\times N square grid.\nWe will paint each square in the grid either black or white.\nIf we paint exactly A squares white, how many squares will be painted black?\n\n-----Constraints-----\n - 1 \\leq N \\leq ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n4\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"19\\\\n100\\\\n\\\", \\\"output\\\": \\\"261\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10...
{ "split": "train", "index": 6600, "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 new pack of n t-shirts came to a shop. Each of the t-shirts is characterized by three integers p_{i}, a_{i} and b_{i}, where p_{i} is the price of the i-th t-shirt, a_{i} is front color of the i-th t-shirt and b_{i} is ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n300 200 400 500 911\\\\n1 2 1 2 3\\\\n2 1 3 2 1\\\\n6\\\\n2 3 1 2 1 1\\\\n\\\", \\\"output\\\": \\\"200 400 300 500 911 -1 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1000000000 1\\\\n1...
{ "split": "train", "index": 6601, "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\nA Garden with Ponds\n\nMr. Gardiner is a modern garden designer who is excellent at utilizing the terrain features. His design method is unique: he first decides the location of ponds and design them with the terrain feat...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n2 3 2\\\\n2 1 2\\\\n2 3 1\\\\n3 5\\\\n3 3 4 3 3\\\\n3 1 0 2 3\\\\n3 3 4 3 2\\\\n7 7\\\\n1 1 1 1 1 0 0\\\\n1 0 0 0 1 0 0\\\\n1 0 1 1 1 1 1\\\\n1 0 1 0 1 0 1\\\\n1 1 1 1 1 0 1\\\\n0 0 2 0 0 0 1\\\\n0 0 1 1 1 1 1\\\\...
{ "split": "train", "index": 6602, "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\nWe have two integers: A and B.\nPrint the largest number among A + B, A - B, and A \\times B.\n\n-----Constraints-----\n - All values in input are integers.\n - -100 \\leq A,\\ B \\leq 100\n\n-----Input-----\nInput is giv...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"-13 3\\\\n\\\", \\\"output\\\": \\\"-10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 -33\\\\n\\\", \\\"output\\\": \\\"34\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 3\\\\...
{ "split": "train", "index": 6603, "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\nHaving stayed home alone, Petya decided to watch forbidden films on the Net in secret. \"What ungentlemanly behavior!\" — you can say that, of course, but don't be too harsh on the kid. In his country films about the Mart...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"Z:1\\\\n\\\", \\\"output\\\": \\\"0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"123:A\\\\n\\\", \\\"output\\\": \\\"0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"N:7\\\\n\\\", \\\"outpu...
{ "split": "train", "index": 6604, "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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nLittle Alyona is celebrating Happy Birthday! Her mother has an array of n flowers. Each flower has some mood, the mood of i-th flower is a_{i}. The mood can be positive, zero or negative.\n\nLet's define a subarray as a s...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 4\\\\n1 -2 1 3 -4\\\\n1 2\\\\n4 5\\\\n3 4\\\\n1 4\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n1 2 3 4\\\\n1 3\\\\n2 4\\\\n1 1\\\\n\\\", \\\"output\\\": \\\"...
{ "split": "train", "index": 6605, "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\nBeroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.\n\nBeroffice works only with small English letters (...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"hellno\\\\n\\\", \\\"output\\\": \\\"hell no \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abacaba\\\\n\\\", \\\"output\\\": \\\"abacaba \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"...
{ "split": "train", "index": 6606, "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\nA string a of length m is called antipalindromic iff m is even, and for each i (1 ≤ i ≤ m) a_{i} ≠ a_{m} - i + 1.\n\nIvan has a string s consisting of n lowercase Latin letters; n is even. He wants to form some string t t...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\nabacabac\\\\n1 1 1 1 1 1 1 1\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\nabaccaba\\\\n1 2 3 4 5 6 7 8\\\\n\\\", \\\"output\\\": \\\"26\\\\n\\\"}, {\\\"typ...
{ "split": "train", "index": 6607, "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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nPermutation p is an ordered set of integers p_1, p_2, ..., p_{n}, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element of permutation p as p_{i}. We'll call number n ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3 0\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n-1 -1 2\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\...
{ "split": "train", "index": 6608, "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 permutation is a sequence of integers p_1, p_2, ..., p_{n}, consisting of n distinct positive integers, each of them doesn't exceed n. Let's denote the i-th element of permutation p as p_{i}. We'll call number n the siz...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"2 1 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\...
{ "split": "train", "index": 6609, "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\nN friends of Takahashi has come to a theme park.\nTo ride the most popular roller coaster in the park, you must be at least K centimeters tall.\nThe i-th friend is h_i centimeters tall.\nHow many of the Takahashi's friend...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 150\\\\n150 140 100 200\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 500\\\\n499\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\...
{ "split": "train", "index": 6610, "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\nVasya is choosing a laptop. The shop has n laptops to all tastes.\n\nVasya is interested in the following properties: processor speed, ram and hdd. Vasya is a programmer and not a gamer which is why he is not interested i...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3511 981 276 808\\\\n3317 2320 354 878\\\\n3089 702 20 732\\\\n1088 2913 327 756\\\\n3837 691 173 933\\\\n\\\", \\\"output\\\": \\\"4\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3000 500 100 ...
{ "split": "train", "index": 6611, "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\nA programming competition site AtCode regularly holds programming contests.\nThe next contest on AtCode is called ABC, which is rated for contestants with ratings less than 1200.\nThe contest after the ABC is called ARC, ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1199\\\\n\\\", \\\"output\\\": \\\"ABC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1200\\\\n\\\", \\\"output\\\": \\\"ARC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4208\\\\n...
{ "split": "train", "index": 6612, "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\nYou are given integers N and K. Find the number of triples (a,b,c) of positive integers not greater than N such that a+b,b+c and c+a are all multiples of K. The order of a,b,c does matter, and some of them can be the same...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"31415 12506\\\", \\\"output\\\": \\\"35\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"35897 446\\\", \\\"output\\\": \\\"1024000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\...
{ "split": "train", "index": 6613, "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\nSquare1001 has seen an electric bulletin board displaying the integer 1.\nHe can perform the following operations A and B to change this value:\n - Operation A: The displayed value is doubled.\n - Operation B: The display...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n10\\\\n\\\", \\\"output\\\": \\\"76\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\...
{ "split": "train", "index": 6614, "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\nYou are given a non-empty string s consisting of lowercase English letters. You have to pick exactly one non-empty substring of s and shift all its letters 'z' $\\rightarrow$ 'y' $\\rightarrow$ 'x' $\\rightarrow \\ldots \...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"codeforces\\\\n\\\", \\\"output\\\": \\\"bncdenqbdr\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abacaba\\\\n\\\", \\\"output\\\": \\\"aaacaba\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu...
{ "split": "train", "index": 6615, "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\nToday, Chef woke up to find that he had no clean socks. Doing laundry is such a turn-off for Chef, that in such a situation, he always buys new socks instead of cleaning the old dirty ones. He arrived at the fashion store...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2 3\\\\n\\\\n\\\\n\\\", \\\"output\\\": \\\"Unlucky Chef\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2 6\\\\n\\\\n\\\\n\\\", \\\"output\\\": \\\"Lucky Chef\\\\n\\\"}, {\\\"type\\\": \\\"stdin_st...
{ "split": "train", "index": 6616, "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 Petya often travels to his grandmother in the countryside. The grandmother has a large garden, which can be represented as a rectangle 1 × n in size, when viewed from above. This rectangle is divided into n equal s...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1 2 3 4 5 6 7 8 9 10\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n10 9 8 7 6 5 4 3 2 1\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"st...
{ "split": "train", "index": 6617, "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\nAtCoder Inc. holds a contest every Saturday.\nThere are two types of contests called ABC and ARC, and just one of them is held at a time.\nThe company holds these two types of contests alternately: an ARC follows an ABC a...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ABC\\\\n\\\", \\\"output\\\": \\\"ARC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ARC\\\\n\\\", \\\"output\\\": \\\"ABC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ARC\\\\n\\\...
{ "split": "train", "index": 6618, "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\nWhen you asked some guy in your class his name, he called himself S, where S is a string of length between 3 and 20 (inclusive) consisting of lowercase English letters. You have decided to choose some three consecutive ch...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"maohiro\\\", \\\"output\\\": \\\"mao\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"sakahashi\\\", \\\"output\\\": \\\"sak\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"orihoam\\\"...
{ "split": "train", "index": 6619, "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\nThe Fair Nut found a string $s$. The string consists of lowercase Latin letters. The Nut is a curious guy, so he wants to find the number of strictly increasing sequences $p_1, p_2, \\ldots, p_k$, such that: For each $i...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abbaa\\\\n\\\", \\\"output\\\": \\\"5\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"baaaa\\\\n\\\", \\\"output\\\": \\\"4\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"agaa\\\\n\\\", \\\"ou...
{ "split": "train", "index": 6620, "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\n$N$ persons visited a restaurant. The restaurant is open from 0 to $T$. The $i$-th person entered the restaurant at $l_i$ and left at $r_i$. Find the maximum number of persons during the business hours.\n\nConstraints\n\n...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 4\\\\n0 1\\\\n1 2\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 10\\\\n0 2\\\\n1 3\\\\n2 6\\\\n3 8\\\\n4 10\\\\n5 10\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\":...
{ "split": "train", "index": 6621, "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, 1, 0, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nWhen Darth Vader gets bored, he sits down on the sofa, closes his eyes and thinks of an infinite rooted tree where each node has exactly n sons, at that for each node, the distance between it an its i-th left child equals...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n1 2 3\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 100000\\\\n1 2 3 4 5 6 7 8 9 10\\\\n\\\", \\\"output\\\": \\\"334171350\\\\n\\\"}, {\\\"type\\\": \\\"std...
{ "split": "train", "index": 6622, "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\nYou are given a permutation of 1,2,...,N: p_1,p_2,...,p_N. Determine if the state where p_i=i for every i can be reached by performing the following operation any number of times:\n - Choose three elements p_{i-1},p_{i},p...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n5\\\\n2\\\\n1\\\\n4\\\\n3\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3\\\\n2\\\\n4\\\\n1\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\...
{ "split": "train", "index": 6623, "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\nBizon the Champion is called the Champion for a reason. \n\nBizon the Champion has recently got a present — a new glass cupboard with n shelves and he decided to put all his presents there. All the presents can be divided...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 1\\\\n1 1 1\\\\n4\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 3\\\\n2 3 4\\\\n2\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout...
{ "split": "train", "index": 6624, "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\nTwo foxes Jiro and Saburo are playing a game called 1D Reversi. This game is played on a board, using black and white stones. On the board, stones are placed in a row, and each player places a new stone to either end of t...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"BBBWW\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"WWWWWW\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"WBWBWBWBWB...
{ "split": "train", "index": 6625, "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\nFind the minimum prime number greater than or equal to X.\n\n-----Notes-----\nA prime number is an integer greater than 1 that cannot be evenly divided by any positive integer except 1 and itself.\nFor example, 2, 3, and ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20\\\\n\\\", \\\"output\\\": \\\"23\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"99992\\\\n\\\", \...
{ "split": "train", "index": 6626, "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\nCalculate the value of the sum: n mod 1 + n mod 2 + n mod 3 + ... + n mod m. As the result can be very large, you should print the value modulo 10^9 + 7 (the remainder when divided by 10^9 + 7).\n\nThe modulo operator a m...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 4\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 4\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n\\\", \...
{ "split": "train", "index": 6627, "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\nLittle Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk.\n\nUnfortunately, internet is not that f...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2 2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 4 7\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 2 3\\\\n\...
{ "split": "train", "index": 6628, "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\nThere are two popular keyboard layouts in Berland, they differ only in letters positions. All the other keys are the same. In Berland they use alphabet with 26 letters which coincides with English alphabet.\n\nYou are giv...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"qwertyuiopasdfghjklzxcvbnm\\\\nveamhjsgqocnrbfxdtwkylupzi\\\\nTwccpQZAvb2017\\\\n\\\", \\\"output\\\": \\\"HelloVKCup2017\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"mnbvcxzlkjhgfdsapoiuytrewq\\\\na...
{ "split": "train", "index": 6629, "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\nMany students live in a dormitory. A dormitory is a whole new world of funny amusements and possibilities but it does have its drawbacks. \n\nThere is only one shower and there are multiple students who wish to have a sho...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 0 0 0 9\\\\n0 0 0 0 0\\\\n0 0 0 0 0\\\\n0 0 0 0 0\\\\n7 0 0 0 0\\\\n\\\", \\\"output\\\": \\\"32\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 43 21 18 2\\\\n3 0 21 11 65\\\\n5 2 0 1 4\\\\n54 62 1...
{ "split": "train", "index": 6630, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nYou are given two arithmetic progressions: a_1k + b_1 and a_2l + b_2. Find the number of integers x such that L ≤ x ≤ R and x = a_1k' + b_1 = a_2l' + b_2, for some integers k', l' ≥ 0.\n\n\n-----Input-----\n\nThe only lin...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 0 3 3 5 21\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 4 3 0 6 17\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \...
{ "split": "train", "index": 6631, "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\nScreen resolution of Polycarp's monitor is $a \\times b$ pixels. Unfortunately, there is one dead pixel at his screen. It has coordinates $(x, y)$ ($0 \\le x < a, 0 \\le y < b$). You can consider columns of pixels to be n...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n8 8 0 0\\\\n1 10 0 3\\\\n17 31 10 4\\\\n2 1 0 0\\\\n5 10 3 9\\\\n10 10 4 8\\\\n\\\", \\\"output\\\": \\\"56\\\\n6\\\\n442\\\\n1\\\\n45\\\\n80\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n...
{ "split": "train", "index": 6632, "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\nYou are given a prime number p, n integers a_1, a_2, …, a_n, and an integer k. \n\nFind the number of pairs of indexes (i, j) (1 ≤ i < j ≤ n) for which (a_i + a_j)(a_i^2 + a_j^2) ≡ k mod p.\n\nInput\n\nThe first line cont...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3 0\\\\n0 2 1\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2 1\\\\n1 0\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 7...
{ "split": "train", "index": 6633, "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, 1, 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 fearless Ikta has finally hunted down the infamous Count Big Bridge! Count Bigbridge is now trapped in a rectangular room w meters wide and h meters deep, waiting for his end.\n\nIf you select a corner of the room and...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3 1001 1000 1 1 1 2\\\", \\\"output\\\": \\\"524646496019\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"16 10 1 10 3 3 7 7\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", ...
{ "split": "train", "index": 6634, "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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThe circle line of the Roflanpolis subway has $n$ stations.\n\nThere are two parallel routes in the subway. The first one visits stations in order $1 \\to 2 \\to \\ldots \\to n \\to 1 \\to 2 \\to \\ldots$ (so the next sto...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 1 4 3 2\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 2 1 9 10\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\...
{ "split": "train", "index": 6635, "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\nOrac is studying number theory, and he is interested in the properties of divisors.\n\nFor two positive integers $a$ and $b$, $a$ is a divisor of $b$ if and only if there exists an integer $c$, such that $a\\cdot c=b$.\n\...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5 1\\\\n8 2\\\\n3 4\\\\n\\\", \\\"output\\\": \\\"10\\\\n12\\\\n12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n497347 19283\\\\n2568 1000000000\\\\n499979 123987\\\\n93 19\\\\n13 5\\\\n\...
{ "split": "train", "index": 6636, "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\n<image>\n\nYou can preview the image in better quality by the link: [http://assets.codeforces.com/files/656/without-text.png](//assets.codeforces.com/files/656/without-text.png)\n\nInput\n\nThe only line of the input is a...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"K3n5JwuWoJdFUVq8H5QldFqDD2B9yCUDFY1TTMN10\\\\n\\\", \\\"output\\\": \\\"118\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"F646Pj3RlX5iZ9ei8oCh.IDjGCcvPQofAPCpNRwkBa6uido8w\\\\n\\\", \\\"output\\\": \\...
{ "split": "train", "index": 6637, "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\nGrigoriy, like the hero of one famous comedy film, found a job as a night security guard at the museum. At first night he received embosser and was to take stock of the whole exposition.\n\nEmbosser is a special devise th...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"zeus\\\\n\\\", \\\"output\\\": \\\"18\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"map\\\\n\\\", \\\"output\\\": \\\"35\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ares\\\\n\\\...
{ "split": "train", "index": 6638, "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\nTonight is brain dinner night and all zombies will gather together to scarf down some delicious brains. The artful Heidi plans to crash the party, incognito, disguised as one of them. Her objective is to get away with at ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"out...
{ "split": "train", "index": 6639, "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, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA non-empty string is called palindrome, if it reads the same from the left to the right and from the right to the left. For example, \"abcba\", \"a\", and \"abba\" are palindromes, while \"abab\" and \"xy\" are not.\n\nA...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\naz\\\\n\\\", \\\"output\\\": \\\"az\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\nmsunonames\\\\n\\\", \\\"output\\\": \\\"aemmnnossu\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ...
{ "split": "train", "index": 6640, "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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n3\n()(()((\n))()()(()\n)())(())\n\n\nOutput\n\nYes\n\nThe input will be stdin and you should print your solution to stdout\n\n\nNow solve the problem and return the code.", "role": "user" } ]
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n()(()((\\\\n))()(((()\\\\n)())(())\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n()(()((\\\\n))()(((()\\\\n))(())()\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"...
{ "split": "train", "index": 6641, "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 a number $n$ (divisible by $3$) and an array $a[1 \\dots n]$. In one move, you can increase any of the array elements by one. Formally, you choose the index $i$ ($1 \\le i \\le n$) and replace $a_i$ with $a_...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n6\\\\n0 2 5 5 4 8\\\\n6\\\\n2 0 2 1 0 0\\\\n9\\\\n7 1 3 4 2 10 3 9 6\\\\n6\\\\n0 1 2 3 4 5\\\\n\\\", \\\"output\\\": \\\"3\\\\n1\\\\n3\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n6...
{ "split": "train", "index": 6642, "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\nRead problems statements in Mandarin Chinese and Russian as well. \n\nAn equation is an equality containing one or more variables. Solving the equation consists of determining which values of the variables make the equali...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3\\\\n9 6 5\\\\n4\\\\n13 11 10 8\\\", \\\"output\\\": \\\"1 4 5 \\\\n1 3 4 6\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3\\\\n9 5 5\\\\n4\\\\n13 11 10 8\\\", \\\"output\\\": \\\"0 4 4\\\\n1 ...
{ "split": "train", "index": 6643, "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[Chopsticks (singular: chopstick) are short, frequently tapered sticks used in pairs of equal length, which are used as the traditional eating utensils of China, Japan, Korea and Vietnam. Originated in ancient China, they...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n1\\\\n3\\\\n3\\\\n9\\\\n4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n2\\\\n3\\\\n3\\\\n9\\\\n4\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \...
{ "split": "train", "index": 6644, "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\nIt is well known that Berland has n cities, which form the Silver ring — cities i and i + 1 (1 ≤ i < n) are connected by a road, as well as the cities n and 1. The goverment have decided to build m new roads. The list of ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 4\\\\n6 3\\\\n1 3\\\\n6 4\\\\n5 3\\\\n\\\", \\\"output\\\": \\\"iiio\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 7\\\\n1 3\\\\n1 4\\\\n1 5\\\\n1 6\\\\n1 7\\\\n1 8\\\\n1 9\\\\n\\\", \\\"output\\...
{ "split": "train", "index": 6645, "reference": null, "knowledge_emb": [ 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, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nGiven are an N \\times N matrix and an integer K. The entry in the i-th row and j-th column of this matrix is denoted as a_{i, j}. This matrix contains each of 1, 2, \\dots, N^2 exactly once.\nSigma can repeat the followi...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 13\\\\n3 2 7\\\\n4 8 9\\\\n1 6 5\\\\n\\\", \\\"output\\\": \\\"12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 165\\\\n82 94 21 65 28 22 61 80 81 79\\\\n93 35 59 85 96 1 78 72 43 5\\\\n12 15 97 ...
{ "split": "train", "index": 6646, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 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\nThere are $n$ block towers in a row, where tower $i$ has a height of $a_i$. You're part of a building crew, and you want to make the buildings look as nice as possible. In a single day, you can perform the following opera...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3\\\\n10 10 10\\\\n4\\\\n3 2 1 2\\\\n5\\\\n1 2 3 1 5\\\\n\\\", \\\"output\\\": \\\"0\\\\n0\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3\\\\n10 10 10\\\\n4\\\\n3 2 0 2\\\\n5\\\\n1 ...
{ "split": "train", "index": 6647, "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\nGiven are two strings S and T.\nLet us change some of the characters in S so that T will be a substring of S.\nAt least how many characters do we need to change?\nHere, a substring is a consecutive subsequence. For exampl...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"cabacc\\\\nabc\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"codeforces\\\\natcoder\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"...
{ "split": "train", "index": 6648, "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, 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 three integers, A, B and C.\n\nAmong them, two are the same, but the remaining one is different from the rest.\n\nFor example, when A=5,B=7,C=5, A and C are the same, but B is different.\n\nFind the one that...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 7 5\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 7\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"-100 100 10...
{ "split": "train", "index": 6649, "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\nFind the number of integers between 1 and K (inclusive) satisfying the following condition, modulo 10^9 + 7:\n\n* The sum of the digits in base ten is a multiple of D.\n\nConstraints\n\n* All values in input are integers....
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"98765432109876543210\\\\n66\\\", \\\"output\\\": \\\"678072802\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"30\\\\n1\\\", \\\"output\\\": \\\"30\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in...
{ "split": "train", "index": 6650, "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, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nRead problems statements in Mandarin Chinese here \n\n------ Problem Statement ------ \n\nMaxim likes dividers of the numbers. Also Maxim is fond of lucky numbers of small elephant from Lviv city.\n \nIf you remember, luc...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1\\\\n2\\\\n3\\\\n4\\\\n5\\\\n6\\\\n7\\\\n8\\\\n9\\\\n10\\\", \\\"output\\\": \\\"0\\\\n0\\\\n0\\\\n1\\\\n0\\\\n0\\\\n1\\\\n1\\\\n0\\\\n0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1\\\\n2...
{ "split": "train", "index": 6651, "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, 1, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA complete binary tree is a binary tree in which every internal node has two children and all leaves have the same depth. A binary tree in which if last level is not completely filled but all nodes (leaves) are pushed acr...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n7 8 1 4 3\\\", \\\"output\\\": \\\"node 1: key = 7, left key = 8, right key = 1, \\\\nnode 2: key = 8, parent key = 7, left key = 4, right key = 3, \\\\nnode 3: key = 1, parent key = 7, \\\\nnode 4: key = 4, parent ...
{ "split": "train", "index": 6652, "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\nToday, hedgehog Filya went to school for the very first time! Teacher gave him a homework which Filya was unable to complete without your help.\n\nFilya is given an array of non-negative integers a_1, a_2, ..., a_{n}. Fir...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 3 3 2 1\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 2 3 4 5\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inp...
{ "split": "train", "index": 6653, "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\nAtCoder Mart sells 1000000 of each of the six items below:\n\n* Riceballs, priced at 100 yen (the currency of Japan) each\n* Sandwiches, priced at 101 yen each\n* Cookies, priced at 102 yen each\n* Cakes, priced at 103 ye...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"386\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"59\\\", \\\"output\\\": \\\...
{ "split": "train", "index": 6654, "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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nForgotten languages (also known as extinct languages) are languages that are no longer in use. Such languages were, probably, widely used before and no one could have ever imagined that they will become extinct at some po...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3 2\\\\npiygu ezyfo rzotm\\\\n1 piygu\\\\n6 tefwz tefwz piygu ezyfo tefwz piygu\\\\n4 1\\\\nkssdy tjzhy ljzym kegqz\\\\n4 kegqz kegqz kegqz vxvyj\\\\n\\\", \\\"output\\\": \\\"YES YES NO\\\\nNO NO NO YES\\\\n\\\"}, ...
{ "split": "train", "index": 6655, "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\nIt is so boring in the summer holiday, isn't it? So Alice and Bob have invented a new game to play. The rules are as follows. First, they get a set of n distinct integers. And then they take turns to make the following mo...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2\\\\n\\\", \\\"output\\\": \\\"Bob\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1 999999999 999999998 999999997 999999996 999999995 999999994 999999993 999999992 999999991\\\\n\\\", \...
{ "split": "train", "index": 6656, "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\nReal stupidity beats artificial intelligence every time.\n\n— Terry Pratchett, Hogfather, Discworld\n\nYou are given a string $s$ of length $n$ and a number $k$. Let's denote by $rev(s)$ the reversed string $s$ (i.e. $rev...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3 2\\\\naab\\\\n3 3\\\\naab\\\\n7 1\\\\nabacaba\\\\n2 0\\\\nab\\\\n\\\", \\\"output\\\": \\\"2\\\\n2\\\\n1\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n4 1\\\\nabcd\\\\n\\\", \\\"ou...
{ "split": "train", "index": 6657, "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, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nMad scientist Mike is building a time machine in his spare time. To finish the work, he needs a resistor with a certain resistance value.\n\nHowever, all Mike has is lots of identical resistors with unit resistance R_0 = ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"199 200\\\\n\\\...
{ "split": "train", "index": 6658, "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\nPetya has n positive integers a_1, a_2, ..., a_{n}. \n\nHis friend Vasya decided to joke and replaced all digits in Petya's numbers with a letters. He used the lowercase letters of the Latin alphabet from 'a' to 'j' and r...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\nab\\\\nde\\\\naj\\\\n\\\", \\\"output\\\": \\\"47\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nabcdef\\\\nghij\\\\nbdef\\\\naccbd\\\\ng\\\\n\\\", \\\"output\\\": \\\"136542\\\\n\\\"}, {\\...
{ "split": "train", "index": 6659, "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\nYou are given two integers $a$ and $b$.\n\nIn one move, you can choose some integer $k$ from $1$ to $10$ and add it to $a$ or subtract it from $a$. In other words, you choose an integer $k \\in [1; 10]$ and perform $a := ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n5 5\\\\n13 42\\\\n18 4\\\\n1337 420\\\\n123456789 1000000000\\\\n100500 9000\\\\n\\\", \\\"output\\\": \\\"0\\\\n3\\\\n2\\\\n92\\\\n87654322\\\\n9150\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\...
{ "split": "train", "index": 6660, "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\nTom is interested in power consumption of his favourite laptop. His laptop has three modes. In normal mode laptop consumes P1 watt per minute. T1 minutes after Tom moved the mouse or touched the keyboard for the last time...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"30 54 76 95 48 16\\\\n9 11\\\\n23 97\\\\n112 116\\\\n126 185\\\\n214 223\\\\n224 271\\\\n278 282\\\\n283 348\\\\n359 368\\\\n373 376\\\\n452 463\\\\n488 512\\\\n532 552\\\\n646 665\\\\n681 685\\\\n699 718\\\\n735 736\\\\n...
{ "split": "train", "index": 6661, "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, 1, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nThis problem is same as the next one, but has smaller constraints.\n\nIt was a Sunday morning when the three friends Selena, Shiro and Katie decided to have a trip to the nearby power station (do not try this at home). Af...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0 0\\\\n1 1\\\\n0 3\\\\n1 2\\\", \\\"output\\\": \\\"14\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0 0\\\\n0 2\\\\n0 4\\\\n2 0\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": ...
{ "split": "train", "index": 6662, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 1, 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\nTakahashi is organizing a party.\nAt the party, each guest will receive one or more snack pieces.\nTakahashi predicts that the number of guests at this party will be A or B.\nFind the minimum number of pieces that can be ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"123 456\\\\n\\\", \\\"output\\\": \\\"18696\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100000 ...
{ "split": "train", "index": 6663, "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\nA widely known among some people Belarusian sport programmer Yura possesses lots of information about cars. That is why he has been invited to participate in a game show called \"Guess That Car!\".\n\nThe game show takes ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 5\\\\n0 0 0 0 0\\\\n0 0 0 0 0\\\\n0 3 3 3 0\\\\n0 3 3 3 0\\\\n0 3 3 3 0\\\\n0 0 0 0 0\\\\n\\\", \\\"output\\\": \\\" 792\\\\n3 2\\\\n\\\"}, {\\\"type\\\": \\\"...
{ "split": "train", "index": 6664, "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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nConstanze is the smartest girl in her village but she has bad eyesight.\n\nOne day, she was able to invent an incredible machine! When you pronounce letters, the machine will inscribe them onto a piece of paper. For examp...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ouuokarinn\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"banana\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"nnn\\...
{ "split": "train", "index": 6665, "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nLengths are measures in Baden in inches and feet. To a length from centimeters it is enough to know that an inch equals three centimeters in Baden and one foot contains 12 inches.\n\nYou are given a length equal to n cent...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"0 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"71\\\\n\\\", \\\"output\\\": \\\"2 0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9999\\\\n\\\",...
{ "split": "train", "index": 6666, "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\nVery soon there will be a parade of victory over alien invaders in Berland. Unfortunately, all soldiers died in the war and now the army consists of entirely new recruits, many of whom do not even know from which leg they...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5 6\\\\n8 9\\\\n10 3\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n6 5\\\\n5 6\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\...
{ "split": "train", "index": 6667, "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\nICPC Ranking\n\nYour mission in this problem is to write a program which, given the submission log of an ICPC (International Collegiate Programming Contest), determines team rankings.\n\nThe log is a sequence of records o...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"300 10 8 5\\\\n50 5 2 1\\\\n70 5 2 0\\\\n75 1 1 0\\\\n100 3 1 0\\\\n150 2 2 0\\\\n240 5 5 7\\\\n50 1 1 0\\\\n60 2 2 0\\\\n70 2 3 0\\\\n90 1 3 0\\\\n120 3 5 0\\\\n140 4 1 0\\\\n150 2 4 1\\\\n180 3 5 4\\\\n15 2 2 1\\\\n20 2...
{ "split": "train", "index": 6668, "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\nPolycarp has a favorite sequence $a[1 \\dots n]$ consisting of $n$ integers. He wrote it out on the whiteboard as follows:\n\nhe wrote the number $a_1$ to the left side (at the beginning of the whiteboard);\n\nhe wrote th...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n7\\\\n3 4 5 2 9 1 1\\\\n4\\\\n9 2 7 1\\\\n11\\\\n8 4 3 1 2 7 8 7 9 4 2\\\\n1\\\\n42\\\\n2\\\\n11 7\\\\n8\\\\n1 1 1 1 1 1 1 1\\\\n\\\", \\\"output\\\": \\\"3 1 4 1 5 9 2 \\\\n9 1 2 7 \\\\n8 2 4 4 3 9 1 7 2 8 7 \\\\n4...
{ "split": "train", "index": 6669, "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nA mischievous notice has arrived from the primitive slow-life organization \"Akaruda\". Akaruda is famous for mischief such as throwing a pie at the face of a VIP, but recently it has become more radical, such as using gu...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n02:15\\\\n05:01\\\\n11:55\\\\n10:40\\\", \\\"output\\\": \\\"alert\\\\nsafe\\\\nalert\\\\nwarning\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n02:15\\\\n05:01\\\\n11:54\\\\n10:40\\\", \\\...
{ "split": "train", "index": 6670, "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, 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 One Card Poker.\n\nOne Card Poker is a two-player game using playing cards. \nEach card in this game shows an integer between 1 and 13, inclusive.\n\nThe strength of a card is determined by the ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 6\\\\n\\\", \\\"output\\\": \\\"Alice\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n\\\", \\\"output\\\": \\\"Draw\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 1\\\\...
{ "split": "train", "index": 6671, "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\nDuring a break in the buffet of the scientific lyceum of the Kingdom of Kremland, there was formed a queue of $n$ high school students numbered from $1$ to $n$. Initially, each student $i$ is on position $i$. Each student...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n4 2\\\\n2 3\\\\n6 1\\\\n\\\", \\\"output\\\": \\\"12\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2 4\\\\n3 3\\\\n7 1\\\\n2 3\\\\n\\\", \\\"output\\\": \\\"25\\\"}, {\\\"type\\\": \\\"stdin_st...
{ "split": "train", "index": 6672, "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\nB: Parentheses Number\n\nproblem\n\nDefine the correct parenthesis string as follows:\n\n* The empty string is the correct parenthesis string\n* For the correct parenthesis string S, `(` S `)` is the correct parenthesis s...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2\\\", \\\"output\\\": \\\"()()\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n2 -2\\\", \\\"output\\\": \\\":(\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n2 ...
{ "split": "train", "index": 6673, "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\nGiven an integer $n$, find the maximum value of integer $k$ such that the following condition holds:\n\n$n$ & ($n-1$) & ($n-2$) & ($n-3$) & ... ($k$) = $0$\n\nwhere & denotes the bitwise AND operation. \n-----Input-----\n...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2\\\\n5\\\\n17\\\\n\\\", \\\"output\\\": \\\"1\\\\n3\\\\n15\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n99888383\\\\n\\\", \\\"output\\\": \\\"67108863\\\\n\\\"}, {\\\"type\\\": \\\"stdi...
{ "split": "train", "index": 6674, "reference": null, "knowledge_emb": [ 0, 0, 0, 1, 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\nCheaterius is a famous in all the Berland astrologist, magician and wizard, and he also is a liar and a cheater. One of his latest inventions is Cheaterius' amulets! They bring luck and wealth, but are rather expensive. C...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n36\\\\n44\\\\n**\\\\n32\\\\n46\\\\n**\\\\n66\\\\n41\\\\n**\\\\n64\\\\n34\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n14\\\\n54\\\\n**\\\\n45\\\\n41\\\\n**...
{ "split": "train", "index": 6675, "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, 1, 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\nIt seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits.\n\nNow you are suggested to solve the following problem: giv...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1987\\\\n\\\", \\\"output\\\": \\\"2013\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2013\\\\n\\\", \\\"output\\\": \\\"2014\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000\\\...
{ "split": "train", "index": 6676, "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\nIf there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print -1.\n - The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n1 7\\\\n3 2\\\\n1 7\\\\n\\\", \\\"output\\\": \\\"702\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n2 1\\\\n2 3\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_std...
{ "split": "train", "index": 6677, "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\nShaass has n books. He wants to make a bookshelf for all his books. He wants the bookshelf's dimensions to be as small as possible. The thickness of the i-th book is t_{i} and its pages' width is equal to w_{i}. The thick...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 12\\\\n1 3\\\\n2 15\\\\n2 5\\\\n2 1\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 10\\\\n2 1\\\\n2 4\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"typ...
{ "split": "train", "index": 6678, "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, 1, 0, 0, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nAnadi has a set of dominoes. Every domino has two parts, and each part contains some dots. For every a and b such that 1 ≤ a ≤ b ≤ 6, there is exactly one domino with a dots on one half and b dots on the other half. The s...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 10\\\\n1 2\\\\n3 4\\\\n1 3\\\\n2 3\\\\n5 4\\\\n5 1\\\\n4 1\\\\n5 3\\\\n5 2\\\\n2 4\\\\n\\\", \\\"output\\\": \\\"10\...
{ "split": "train", "index": 6679, "reference": null, "knowledge_emb": [ 0, 0, 0, 1, 1, 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\nPolycarpus loves lucky numbers. Everybody knows that lucky numbers are positive integers, whose decimal representation (without leading zeroes) contain only the lucky digits x and y. For example, if x = 4, and y = 7, then...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"123\\\\n\\\", \\\"output\\\": \\\"113\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \...
{ "split": "train", "index": 6680, "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\nAfter learning a lot about space exploration, a little girl named Ana wants to change the subject.\n\nAna is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to che...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\naa\\\\nbb\\\\ncd\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\naab\\\\nabcac\\\\ndffe\\\\ned\\\\naa\\\\naade\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\...
{ "split": "train", "index": 6681, "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, 1, 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 have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers wri...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 15\\\\n\\\", \\\"output\\\": \\\"69 96\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 0\\\\n\\\", \\\"output\\\": \\\"-1 -1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1\\\...
{ "split": "train", "index": 6682, "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\nVanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the card can be positive, negative and can even be equal to zero. The only limit is, the number on each c...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n-1 1 2\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n-2 -2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"...
{ "split": "train", "index": 6683, "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\nBob is decorating his kitchen, more precisely, the floor. He has found a prime candidate for the tiles he will use. They come in a simple form factor — a square tile that is diagonally split into white and black part as d...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n\\\", \\\"output\\\": \\\"16\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 4\\\\n\\\", \\\"output\\\": \\\"64\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20 10\\\\n\\\...
{ "split": "train", "index": 6684, "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\nYou are given a string $s$ of even length $n$. String $s$ is binary, in other words, consists only of 0's and 1's.\n\nString $s$ has exactly $\\frac{n}{2}$ zeroes and $\\frac{n}{2}$ ones ($n$ is even).\n\nIn one operation...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2\\\\n10\\\\n4\\\\n0110\\\\n8\\\\n11101000\\\\n\\\", \\\"output\\\": \\\"0\\\\n1\\\\n2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2\\\\n10\\\\n4\\\\n0110\\\\n8\\\\n11100001\\\\n\\\", \\...
{ "split": "train", "index": 6685, "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\nYou are given two positive integers A and B. Compare the magnitudes of these numbers.\n\n-----Constraints-----\n - 1 ≤ A, B ≤ 10^{100}\n - Neither A nor B begins with a 0.\n\n-----Input-----\nInput is given from Standard ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"36\\\\n24\\\\n\\\", \\\"output\\\": \\\"GREATER\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"850\\\\n3777\\\\n\\\", \\\"output\\\": \\\"LESS\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\...
{ "split": "train", "index": 6686, "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\nJeff got 2n real numbers a_1, a_2, ..., a_2n as a birthday present. The boy hates non-integer numbers, so he decided to slightly \"adjust\" the numbers he's got. Namely, Jeff consecutively executes n operations, each of t...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n0.000 0.500 0.750 1.000 2.000 3.000\\\\n\\\", \\\"output\\\": \\\"0.250\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n4469.000 6526.000 4864.000 9356.383 7490.000 995.896\\\\n\\\", \\\"out...
{ "split": "train", "index": 6687, "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\"The zombies are lurking outside. Waiting. Moaning. And when they come...\"\n\n\"When they come?\"\n\n\"I hope the Wall is high enough.\"\n\nZombie attacks have hit the Wall, our line of defense in the North. Its protect...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 7\\\\n.......\\\\n.......\\\\n.BB.B..\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 5\\\\n..B..\\\\n..B..\\\\nB.B.B\\\\nBBB.B\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\...
{ "split": "train", "index": 6688, "reference": null, "knowledge_emb": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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\nSuppose that you are in a campus and have to go for classes day by day. As you may see, when you hurry to a classroom, you surprisingly find that many seats there are already occupied. Today you and your friends went for ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3 2\\\\n**.\\\\n...\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2 2\\\\n..\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inp...
{ "split": "train", "index": 6689, "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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nBooks are indexed. Write a program which reads a list of pairs of a word and a page number, and prints the word and a list of the corresponding page numbers.\n\nYou can assume that a word consists of at most 30 characters...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"style 12\\\\neven 25\\\\nintroduction 3\\\\neasy 9\\\\nstyle 9\\\\ndocument 13\\\\nstyle 21\\\\neven 18\\\", \\\"output\\\": \\\"document\\\\n13\\\\neasy\\\\n9\\\\neven\\\\n18 25\\\\nintroduction\\\\n3\\\\nstyle\\\\n9 12 ...
{ "split": "train", "index": 6690, "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\nBarney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the distance between him and the girl to make his shot accurate. [Image] \n\nBarney asked the bar ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8.549e2\\\\n\\\", \\\"output\\\": \\\"854.9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8.549e3\\\\n\\\", \\\"output\\\": \\\"8549\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"...
{ "split": "train", "index": 6691, "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, 1, ...
primeintellect
[ { "content": "Solve the following coding problem using the programming language python:\n\nKurohashi has never participated in AtCoder Beginner Contest (ABC).\nThe next ABC to be held is ABC N (the N-th ABC ever held).\nKurohashi wants to make his debut in some ABC x such that all the digits of x in base ten ar...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"111\\\\n\\\", \\\"output\\\": \\\"111\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"112\\\\n\\\", \\\"output\\\": \\\"222\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"750\\\\n\\\...
{ "split": "train", "index": 6692, "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 array consisting of n integers. Your task is to find the maximum length of an increasing subarray of the given array.\n\nA subarray is the sequence of consecutive elements of the array. Subarray is called in...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 7 2 11 15\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n100 100 100 100 100 100\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout...
{ "split": "train", "index": 6693, "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\nSnuke loves working out. He is now exercising N times.\nBefore he starts exercising, his power is 1. After he exercises for the i-th time, his power gets multiplied by i.\nFind Snuke's power after he exercises N times. Si...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"output\\\": \\\"3628800\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100000\\\\n\...
{ "split": "train", "index": 6694, "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\nMasha lives in a multi-storey building, where floors are numbered with positive integers. Two floors are called adjacent if their numbers differ by one. Masha decided to visit Egor. Masha lives on the floor $x$, Egor on t...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 1 4 4 2 1\\\\n\\\", \\\"output\\\": \\\"YES\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 6 6 2 1 1\\\\n\\\", \\\"output\\\": \\\"NO\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 1 7 ...
{ "split": "train", "index": 6695, "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\nLunar New Year is approaching, and Bob is struggling with his homework – a number division problem.\n\nThere are $n$ positive integers $a_1, a_2, \\ldots, a_n$ on Bob's homework paper, where $n$ is always an even number. ...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n8 5 2 3\\\\n\\\", \\\"output\\\": \\\"164\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 1 1 2 2 2\\\\n\\\", \\\"output\\\": \\\"27\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inp...
{ "split": "train", "index": 6696, "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\nTwo bears are playing tic-tac-toe via mail. It's boring for them to play usual tic-tac-toe game, so they are a playing modified version of this game. Here are its rules.\n\nThe game is played on the following field. [Imag...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... ... ...\\\\n... ... ...\\\\n... ... ...\\\\n\\\\n... ... ...\\\\n... ... ...\\\\n... x.. ...\\\\n\\\\n... ... ...\\\\n... ... ...\\\\n... ... ...\\\\n6 4\\\\n\\\", \\\"output\\\": \\\"... ... ... \\\\n... ... ... \\\\...
{ "split": "train", "index": 6697, "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\nWe have a bingo card with a 3\\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.\nThe MC will choose N numbers, b_1, b_2, \\cdots, b_N. If our bingo sheet...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"84 97 66\\\\n79 89 11\\\\n61 59 7\\\\n7\\\\n89\\\\n7\\\\n87\\\\n79\\\\n24\\\\n84\\\\n30\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"41 7 46\\\\n26 89 2\\\\n78 92 8\...
{ "split": "train", "index": 6698, "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\nIroha is very particular about numbers. There are K digits that she dislikes: D_1, D_2, ..., D_K.\n\nShe is shopping, and now paying at the cashier. Her total is N yen (the currency of Japan), thus she has to hand at leas...
code
{ "style": "rule", "ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"67 1\\\\n0\\\", \\\"output\\\": \\\"67\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"34 1\\\\n0\\\", \\\"output\\\": \\\"34\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n0...
{ "split": "train", "index": 6699, "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, ...