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\nThere are n cities in Berland. Each city has its index β an integer number from 1 to n. The capital has index r1. All the roads in Berland are two-way. The road system is such that there is exactly one path from the capit... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2 1\\\\n2\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100 62 42\\\\n45 66 13 18 93 47 83 19 41 66 5 70 16 29 54 28 65 91 92 24 90 54 7 40 77 53 68 58 70 65 68 30 94... | {
"split": "train",
"index": 6400,
"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,
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 Little Elephant has an integer a, written in the binary notation. He wants to write this number on a piece of paper.\n\nTo make sure that the number a fits on the piece of paper, the Little Elephant ought to delete ex... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1111111110\\\\n\\\", \\\"output\\\": \\\"111111111\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"11\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1... | {
"split": "train",
"index": 6401,
"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\nEven if the world is full of counterfeits, I still regard it as wonderful.\n\nPile up herbs and incense, and arise again from the flames and ashes of its predecessorΒ β as is known to many, the phoenix does it like this.\n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 10\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"107 109\\\\n\\... | {
"split": "train",
"index": 6402,
"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\nRead problems statements in Mandarin Chinese and Russian as well. \n\nIn every contest there should be an easy problem about matrices. December Cook-Off is not an exception.\n\nGiven a matrix A which consists of n rows an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n1 2\\\\n3 4\\\", \\\"output\\\": \\\"24\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n1 3\\\\n3 4\\\", \\\"output\\\": \\\"28\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 6403,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nHaving bought his own apartment, Boris decided to paper the walls in every room. Boris's flat has n rooms, each of which has the form of a rectangular parallelepiped. For every room we known its length, width and height o... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n9 10 7\\\\n1\\\\n7 1 3\\\\n\\\", \\\"output\\\": \\\"114\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20\\\\n110 466 472\\\\n112 153 152\\\\n424 492 490\\\\n348 366 113\\\\n208 337 415\\\\n491 ... | {
"split": "train",
"index": 6404,
"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\nTo decide which is the strongest among Rock, Paper, and Scissors, we will hold an RPS tournament.\nThere are 2^k players in this tournament, numbered 0 through 2^k-1. Each player has his/her favorite hand, which he/she wi... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\nRPS\\\\n\\\", \\\"output\\\": \\\"P\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"11 1\\\\nRPSSPRSPPRS\\\\n\\\", \\\"output\\\": \\\"P\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input... | {
"split": "train",
"index": 6405,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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\nRead the coordinates of four different points on the plane, $ A (x_A, y_A) $, $ B (x_B, y_B) $, $ C (x_C, y_C) $, $ D (x_D, y_D) $, and straight line $ Create a program that outputs YES if AB $ and $ CD $ are orthogonal, ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1.0 1.0 2.0 2.0 0.0 0.0 1.0 -1.0\\\\n0.0 0.0 2.0 0.0 -1.0 2.0 2.0 2.0\\\\n10.0 6.0 3.4 5.2 6.8 9.5 4.3 2.1\\\\n2.5 3.5 2.5 5.324353001023156 -3.3 -2.3 6.8 -2.3\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nNO\\\\nYES\\\\n\\\"},... | {
"split": "train",
"index": 6406,
"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\nproblem\n\nThere are the following two-player card games.\n\n* This game uses a total of 2n cards with each integer from 1 to 2n written on it. Here, n is an integer between 1 and 100.\n* Deal n cards to each of the two.\... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1\\\\n7\\\\n9\\\\n6\\\\n10\\\\n10\\\\n8\\\\n7\\\\n14\\\\n18\\\\n2\\\\n11\\\\n3\\\\n17\\\\n5\\\\n19\\\\n0\\\", \\\"output\\\": \\\"3\\\\n0\\\\n1\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6407,
"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,
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\nHave you ever played Hanabi? If not, then you've got to try it out! This problem deals with a simplified version of the game.\n\nOverall, the game has 25 types of cards (5 distinct colors and 5 distinct values). Borya is ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\nG3 G3\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\nG4 R4 R3 B3\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\... | {
"split": "train",
"index": 6408,
"reference": null,
"knowledge_emb": [
0,
0,
0,
1,
1,
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,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWelcome to PC Koshien, players. At PC Koshien, competitions are currently being held in a total of three categories: programming category, mobile category, and Ichimai's picture CG category.\n\nGiven the number of partici... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20 10 20\\\", \\\"output\\\": \\\"50\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100 0 1\\\", \\\"output\\\": \\\"101\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0000 1000 100... | {
"split": "train",
"index": 6409,
"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\nPhone number in Berland is a sequence of n digits. Often, to make it easier to memorize the number, it is divided into groups of two or three digits. For example, the phone number 1198733 is easier to remember as 11-987-3... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n1198733\\\\n\\\", \\\"output\\\": \\\"11-98-733\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"22\\\\n7135498415686025907059\\\\n\\\", \\\"output\\\": \\\"71-35-49-84-15-68-60-25-90-70-59\\\\n\\\... | {
"split": "train",
"index": 6410,
"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\nYou are given N points on a plane. Write a program which will find the sum of squares of distances between all pairs of points.\n\nInput\n\nThe first line of input contains one integer number N (1 β€ N β€ 100 000) β the num... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n6 3\\\\n\\\", \\\"output\\\": \\\"0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"30\\\\n-7 -12\\\\n-2 5\\\\n14 8\\\\n9 17\\\\n15 -18\\\\n20 6\\\\n20 8\\\\n-13 12\\\\n-4 -20\\\\n-11 -16\\\\n-6 16\\\\... | {
"split": "train",
"index": 6411,
"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\nMany years ago Berland was a small country where only $n$ people lived. Each person had some savings: the $i$-th one had $a_i$ burles.\n\nThe government considered a person as wealthy if he had at least $x$ burles. To inc... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n4 3\\\\n5 1 2 1\\\\n4 10\\\\n11 9 11 9\\\\n2 5\\\\n4 3\\\\n3 7\\\\n9 4 9\\\\n\\\", \\\"output\\\": \\\"2\\\\n4\\\\n0\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n1 2\\\\n13\\\\n\\\"... | {
"split": "train",
"index": 6412,
"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\nA subsequence of length |x| of string s = s1s2... s|s| (where |s| is the length of string s) is a string x = sk1sk2... sk|x| (1 β€ k1 < k2 < ... < k|x| β€ |s|).\n\nYou've got two strings β s and t. Let's consider all subseq... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcdadbcd\\\\nabcd\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"cctckkhatkgrhktihcgififfgfctctkrgiakrifazzggfzczfkkahhafhcfgacccfakkarcatkfiktczkficahgiriakccfiztkhk... | {
"split": "train",
"index": 6413,
"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 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.\nThe order of a,b,c does matter, and some of them can be the sam... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"31415 9265\\\\n... | {
"split": "train",
"index": 6414,
"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\nVasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types of operations: multiply the current number by 2 (that is, replace the number x by 2Β·x); append the digit 1 to the righ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 162\\\\n\\\", \\\"output\\\": \\\"YES\\\\n5\\\\n2 4 8 81 162 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 42\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"... | {
"split": "train",
"index": 6415,
"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\nThe Little Elephant loves Ukraine very much. Most of all he loves town Rozdol (ukr. \"Rozdil\").\n\nHowever, Rozdil is dangerous to settle, so the Little Elephant wants to go to some other town. The Little Elephant doesn'... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n47\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20\\\\n3 3 6 9 8 2 4 1 7 3 2 9 7 7 9 7 2 6 2 7\\\\n\\\", \\\"output\\\": \\\"8\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 6416,
"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 string s consisting of `A`, `B` and `C`.\n\nSnuke wants to perform the following operation on s as many times as possible:\n\n* Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ABBACCBACCBCAABCB\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"B\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ACBAACBCCABCC... | {
"split": "train",
"index": 6417,
"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\nPolycarpus is the director of a large corporation. There are n secretaries working for the corporation, each of them corresponds via the famous Spyke VoIP system during the day. We know that when two people call each othe... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n0 1 7 1 7 10\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 1 1\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\... | {
"split": "train",
"index": 6418,
"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\nKris works in a large company \"Blake Technologies\". As a best engineer of the company he was assigned a task to develop a printer that will be able to print horizontal and vertical strips. First prototype is already bui... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3 3\\\\n1 1 3\\\\n2 2 1\\\\n1 2 2\\\\n\\\", \\\"output\\\": \\\"3 1 3 \\\\n2 2 2 \\\\n0 1 0 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3 5\\\\n1 1 1\\\\n1 3 1\\\\n1 5 1\\\\n2 1 1\\\\n2 3 1\\\\... | {
"split": "train",
"index": 6419,
"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\nAmugae has a hotel consisting of $10$ rooms. The rooms are numbered from $0$ to $9$ from left to right.\n\nThe hotel has two entrances β one from the left end, and another from the right end. When a customer arrives to th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\nLLRL1RL1\\\\n\\\", \\\"output\\\": \\\"1010000011\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\nL0L0LLRR9\\\\n\\\", \\\"output\\\": \\\"1100000010\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\... | {
"split": "train",
"index": 6420,
"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\nOne day Squidward, Spongebob and Patrick decided to go to the beach. Unfortunately, the weather was bad, so the friends were unable to ride waves. However, they decided to spent their time building sand castles.\n\nAt the... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2 3\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2 1 3 2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \... | {
"split": "train",
"index": 6421,
"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\nBecause of budget cuts one IT company established new non-financial reward system instead of bonuses.\n\nTwo kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a c... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"24\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": ... | {
"split": "train",
"index": 6422,
"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\nWe guessed some integer number $x$. You are given a list of almost all its divisors. Almost all means that there are all divisors except $1$ and $x$ in the list.\n\nYour task is to find the minimum possible integer $x$ th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n8\\\\n8 2 12 6 4 24 16 3\\\\n1\\\\n2\\\\n\\\", \\\"output\\\": \\\"48\\\\n4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"25\\\\n2\\\\n999389 999917\\\\n2\\\\n999307 999613\\\\n2\\\\n999529 9996... | {
"split": "train",
"index": 6423,
"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,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAccording to the regulations of Berland's army, a reconnaissance unit should consist of exactly two soldiers. Since these two soldiers shouldn't differ much, their heights can differ by at most d centimeters. Captain Bob ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100 100\\\\n51 93 101 960 2 477 213 129 663 925 254 78 1486 274 160 481 132 156 412 372 5 57 152 298 1771 7 359 468 254 406 202 929 221 366 552 97 555 29 822 118 539 140 992 854 7 163 134 103 940 30 409 1003 398 43 555 79... | {
"split": "train",
"index": 6424,
"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,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarpus has postcards and photos hung in a row on the wall. He decided to put them away to the closet and hang on the wall a famous painter's picture. Polycarpus does it like that: he goes from the left to the right an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"P\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"PPPPPPPPPPPPPPPPPPPPPPPCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCPPPPPCCCPPPPCCCCCPCC\\\\n\\\", \\\"outpu... | {
"split": "train",
"index": 6425,
"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\nFor a given weighted graph $G = (V, E)$, find the shortest path from a source to each vertex. For each vertex $u$, print the total weight of edges on the shortest path from vertex $0$ to $u$.\n\nConstraints\n\n* $1 \\leq ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n0 3 2 3 3 1 1 1\\\\n1 2 0 2 3 4\\\\n2 3 0 3 3 1 4 1\\\\n3 4 2 1 0 1 1 4 4 3\\\\n4 2 2 1 3 3\\\", \\\"output\\\": \\\"0 0\\\\n1 1\\\\n2 2\\\\n3 1\\\\n4 3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":... | {
"split": "train",
"index": 6426,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is a three-digit integer N. Does N contain the digit 7?\nIf so, print Yes; otherwise, print No.\n\n-----Constraints-----\n - 100 \\leq N \\leq 999\n\n-----Input-----\nInput is given from Standard Input in the follow... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"117\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"123\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"777\\\\n\\\"... | {
"split": "train",
"index": 6427,
"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 two binary strings $x$ and $y$, which are binary representations of some two integers (let's denote these integers as $f(x)$ and $f(y)$). You can choose any integer $k \\ge 0$, calculate the expression $s_k ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1010\\\\n11\\\\n10001\\\\n110\\\\n1\\\\n1\\\\n1010101010101\\\\n11110000\\\\n\\\", \\\"output\\\": \\\"1\\\\n3\\\\n0\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n11\\\\n10\\\\n\\\",... | {
"split": "train",
"index": 6428,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLet's assume that v(n) is the largest prime number, that does not exceed n;\n\n u(n) is the smallest prime number strictly greater than n. \n\nFind $\\sum_{i = 2}^{n} \\frac{1}{v(i) u(i)}$.\n\n\n-----Input-----\n\nThe f... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n2\\\\n3\\\\n\\\", \\\"output\\\": \\\"1/6\\\\n7/30\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n1000000000\\\\n\\\", \\\"output\\\": \\\"999999941999999673/1999999887999999118\\\\n\\\"}, ... | {
"split": "train",
"index": 6429,
"reference": null,
"knowledge_emb": [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is little time left before the release of the first national operating system BerlOS. Some of its components are not finished yet β the memory manager is among them. According to the developers' plan, in the first r... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\nerase -1\\\\nerase 0\\\\nerase -2147483648\\\\n\\\", \\\"output\\\": \\\"ILLEGAL_ERASE_ARGUMENT\\\\nILLEGAL_ERASE_ARGUMENT\\\\nILLEGAL_ERASE_ARGUMENT\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 6430,
"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\nThanos sort is a supervillain sorting algorithm, which works as follows: if the array is not sorted, snap your fingers* to remove the first or the second half of the items, and repeat the process.\n\nGiven an input array,... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 2 2 4\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n11 12 1 2 13 14 3 4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\... | {
"split": "train",
"index": 6431,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nWrite a program that takes in a letterclass ID of a ship and display the equivalent string class description of the given ID. Use the table below.\n\nClass ID Ship ClassB or bBattleShipC or cCruiserD or dDestroyerF or fFr... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\nB\\\\nc\\\\nD\\\\n\\\", \\\"output\\\": \\\"BattleShip\\\\nCruiser\\\\nDestroyer\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 \\\\nC\\\\nc\\\\nD\\\", \\\"output\\\": \\\"Cruiser\\\\nCruiser\\... | {
"split": "train",
"index": 6432,
"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 text of single-space separated words, consisting of small and capital Latin letters.\n\nVolume of the word is number of capital letters in the word. Volume of the text is maximum volume of all words in the... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\nNonZERO\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"24\\\\nthis is zero answer text\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 6433,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSnuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.\nSnuke will first put the die on the table with an arbitrary side f... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"149696127901\\\\n\\\", \\\"output\\\": \\\"27217477801\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6434,
"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\nWe have a 3 \\times 3 grid. A number c_{i, j} is written in the square (i, j), where (i, j) denotes the square at the i-th row from the top and the j-th column from the left.\n\nAccording to Takahashi, there are six integ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 0 1\\\\n2 1 2\\\\n1 0 1\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2 2\\\\n2 1 2\\\\n2 2 2\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin... | {
"split": "train",
"index": 6435,
"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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSnuke, who loves animals, built a zoo.\nThere are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle.\nThe animal numbered i (2β€iβ€N-1) is adjacent to the animals numbered i-1 and i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\nooxoox\\\\n\\\", \\\"output\\\": \\\"SSSWWS\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\noox\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"... | {
"split": "train",
"index": 6436,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
1,
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\nTo make a paper airplane, one has to use a rectangular piece of paper. From a sheet of standard size you can make $s$ airplanes.\n\nA group of $k$ people decided to make $n$ airplanes each. They are going to buy several p... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3 2 3\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3 100 1\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10000... | {
"split": "train",
"index": 6437,
"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<!--\n\nProblem B\n\n-->\n\nOn-Screen Keyboard\n\nYou are to input a string with an OSK (on-screen keyboard). A remote control with five buttons, four arrows and an OK (Fig. B-1), is used for the OSK. Find the minimum num... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 9\\\\nABCDEFGHI\\\\nJKLMNOPQR\\\\nSTUVWXYZ_\\\\nICPC\\\\n5 11\\\\n___________\\\\n____A______\\\\n________M__\\\\n___________\\\\n_C_________\\\\nACM\\\\n4 21\\\\n1_2_3_4_5_6_7_8_9_0_-\\\\nQqWwEeRrTtYyUuIiOoPp@\\\\nAaSs... | {
"split": "train",
"index": 6438,
"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,
1,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a house with $n$ flats situated on the main street of Berlatov. Vova is watching this house every night. The house can be represented as an array of $n$ integer numbers $a_1, a_2, \\dots, a_n$, where $a_i = 1$ if... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1 1 0 1 1 0 1 0 1 0\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 1 0 0 0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\",... | {
"split": "train",
"index": 6439,
"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\nAlexander is learning how to convert numbers from the decimal system to any other, however, he doesn't know English letters, so he writes any number only as a decimal number, it means that instead of the letter A he will ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\n12\\\\n\\\", \\\"output\\\": \\\"12\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"16\\\\n11311\\\\n\\\", \\\"output\\\": \\\"475\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20\\\\n... | {
"split": "train",
"index": 6440,
"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,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nSome dwarves that are finishing the StUDY (State University for Dwarven Youngsters) Bachelor courses, have been told \"no genome, no degree\". That means that all dwarves should write a thesis on genome. Dwarven genome is... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"acaa\\\\nabca\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aab\\\\naa\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 6441,
"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\nLittle Susie listens to fairy tales before bed every day. Today's fairy tale was about wood cutters and the little girl immediately started imagining the choppers cutting wood. She imagined the situation that is described... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 2\\\\n2 1\\\\n5 10\\\\n10 9\\\\n19 1\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 2\\\\n2 1\\\\n5 10\\\\n10 9\\\\n20 1\\\\n\\\", \\\"output\\\": \\\"4\... | {
"split": "train",
"index": 6442,
"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\nTwo chess pieces, a rook and a knight, stand on a standard chessboard 8 Γ 8 in size. The positions in which they are situated are known. It is guaranteed that none of them beats the other one.\n\nYour task is to find the ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"c1\\\\nd2\\\\n\\\", \\\"output\\\": \\\"42\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"g1\\\\ne6\\\\n\\\", \\\"output\\\": \\\"39\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"h... | {
"split": "train",
"index": 6443,
"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\nAnd where the are the phone numbers?\n\nYou are given a string s consisting of lowercase English letters and an integer k. Find the lexicographically smallest string t of length k, such that its set of letters is a subset... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\nabc\\\\n\\\", \\\"output\\\": \\\"aca\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\nabc\\\\n\\\", \\\"output\\\": \\\"ac\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 6444,
"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 have given an array $a$ of length $n$ and an integer $x$ to a brand new robot. What the robot does is the following: it iterates over the elements of the array, let the current element be $q$. If $q$ is divisible by $... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 2\\\\n12\\\\n4 2\\\\n4 6 8 2\\\\n\\\", \\\"output\\\": \\\"36\\\\n44\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 3\\\\n1 12\\\\n4 2\\\\n4 6 8 9\\\\n5 7\\\\n49 49 49 7 49\\\\n\\\", \\... | {
"split": "train",
"index": 6445,
"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\nWrite a program which performs the following operations to a binary search tree $T$ by adding delete operation to B: Binary Search Tree II.\n\n* insert $k$: Insert a node containing $k$ as key into $T$.\n* find $k$: Repo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"18\\\\ninsert 8\\\\ninsert 2\\\\ninsert 3\\\\ninsert 7\\\\ninsert 22\\\\ninsert 1\\\\nfind 1\\\\nfind 2\\\\nfind 1\\\\nfind 4\\\\nfind 5\\\\nfind 6\\\\nfind 7\\\\nfind 8\\\\nprint\\\\ndelete 3\\\\ndelete 7\\\\nprint\\\", ... | {
"split": "train",
"index": 6446,
"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\nYou are given an array $a$ consisting of $n$ integers.\n\nIn one move, you can choose two indices $1 \\le i, j \\le n$ such that $i \\ne j$ and set $a_i := a_j$. You can perform such moves any number of times (possibly, z... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n2\\\\n2 3\\\\n4\\\\n2 2 8 8\\\\n3\\\\n3 3 3\\\\n4\\\\n5 5 5 5\\\\n4\\\\n1 1 1 1\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\\nNO\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\... | {
"split": "train",
"index": 6447,
"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\nLet's introduce the designation <image>, where x is a string, n is a positive integer and operation \" + \" is the string concatenation operation. For example, [abc, 2] = abcabc.\n\nWe'll say that string s can be obtained... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2308056 3\\\\ngabbfdehcegkmjicakkfhfahllalmkhhhjejfibdhgldjcbfmkfbmileigdmlhajfcciemfcbg\\\\nm\\\\n\\\", \\\"output\\\": \\\"4616112\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"585 5\\\\nbedhdhddadc... | {
"split": "train",
"index": 6448,
"reference": null,
"knowledge_emb": [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are three integers A_1, A_2, and A_3.\nIf A_1+A_2+A_3 is greater than or equal to 22, print bust; otherwise, print win.\n\n-----Constraints-----\n - 1 \\leq A_i \\leq 13 \\ \\ (i=1,2,3)\n - All values in input are i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 7 9\\\\n\\\", \\\"output\\\": \\\"win\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 7 2\\\\n\\\", \\\"output\\\": \\\"bust\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 13... | {
"split": "train",
"index": 6449,
"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 process of mammoth's genome decoding in Berland comes to its end!\n\nOne of the few remaining tasks is to restore unrecognized nucleotides in a found chain s. Each nucleotide is coded with a capital letter of English ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\nAG?C??CT\\\\n\\\", \\\"output\\\": \\\"AGACGTCT\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\nAGCT\\\\n\\\", \\\"output\\\": \\\"AGCT\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in... | {
"split": "train",
"index": 6450,
"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\nWe consider a positive integer perfect, if and only if the sum of its digits is exactly $10$. Given a positive integer $k$, your task is to find the $k$-th smallest perfect positive integer.\n\n\n-----Input-----\n\nA sing... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"19\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"28\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\n\\\", \\\"... | {
"split": "train",
"index": 6451,
"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\nConvenience store Deven Eleven is planning to open its first store in Aizuwakamatsu City to expand its business. There are already many other convenience stores in Aizuwakamatsu, so the place to open a new store is likely... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 6\\\\n6\\\\n1 1\\\\n6 1\\\\n3 2\\\\n3 5\\\\n1 6\\\\n5 6\\\\n2\\\\n1 3\\\\n5 3\\\\n6 6\\\\n6\\\\n3 2\\\\n3 5\\\\n6 1\\\\n1 1\\\\n1 6\\\\n5 6\\\\n2\\\\n2 3\\\\n6 3\\\\n0 0\\\", \\\"output\\\": \\\"4\\\\n4\\\\n\\\"}, {\\\"... | {
"split": "train",
"index": 6452,
"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,
1,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAs a New Year's gift, Dolphin received a string s of length 19.\nThe string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`.\nDolphin wants... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"gaiku,atcoder,tasks\\\", \\\"output\\\": \\\"gaiku atcoder tasks\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abgde,fchihgf,edcba\\\", \\\"output\\\": \\\"abgde fchihgf edcba\\\\n\\\"}, {\\\"type\\\"... | {
"split": "train",
"index": 6453,
"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\nVanya is managed to enter his favourite site Codehorses. Vanya uses n distinct passwords for sites at all, however he can't remember which one exactly he specified during Codehorses registration.\n\nVanya will enter passw... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\ncba\\\\nabc\\\\nbb1\\\\nabC\\\\nABC\\\\nabc\\\\n\\\", \\\"output\\\": \\\"1 15\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 100\\\\n11\\\\n22\\\\n1\\\\n2\\\\n22\\\\n\\\", \\\"output\\\": \\... | {
"split": "train",
"index": 6454,
"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\nThere are n TV shows you want to watch. Suppose the whole time is split into equal parts called \"minutes\". The i-th of the shows is going from l_i-th to r_i-th minute, both ends inclusive.\n\nYou need a TV to watch a TV... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2 1\\\\n24 25\\\\n18 23\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 9 5\\\\n25 27\\\\n23 24\\\\n9 29\\\\n25 30\\\\n20 20\\\\n\\\", \\\"output\\\": \\\"181\\\\n\\\... | {
"split": "train",
"index": 6455,
"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\nPrint the K-th element of the following sequence of length 32:\n\n\n1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51\n\nConstraints\n\n* 1 \\leq K \\leq 32\n* All values in... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"16\\\", \\\"output\\\": \\\"14\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"19\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\", \\\"output\\\": \\\... | {
"split": "train",
"index": 6456,
"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\nGiven a string $s$ of length $n$ and integer $k$ ($1 \\le k \\le n$). The string $s$ has a level $x$, if $x$ is largest non-negative integer, such that it's possible to find in $s$: $x$ non-intersecting (non-overlapping)... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 2\\\\naaacaabb\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1\\\\nab\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":... | {
"split": "train",
"index": 6457,
"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 the planning manager of an animation production company. What animation production companies produce these days is not limited to animation itself. Related products, such as figures of characters and character son... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\nakzakr 2 1 8\\\\nfnmyi 5 2 3 4 6 9\\\\ntsnukk 5 2 3 4 7 9\\\\nyskwcnt 6 3 4 7 8 9 10\\\\n4\\\\nakzakr 1 2\\\\nfnmyi 3 10 11 12\\\\ntsnukk 2 1 8\\\\nyskwcnt 2 1 8\\\\n5\\\\nknmmdk 2 13 19\\\\nakmhmr 4 13 15 19 22\\\\... | {
"split": "train",
"index": 6458,
"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\nVasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and Masha, who live at the different ends of the branch, each one is unaware of the other one's existence.\n\nWhen V... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"716249 716248\\\\n\\\", \\\"output\\\": \\\"Equal\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"99087 99090\\\\n\\\", \\\"output\\\": \\\"Equal\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 6459,
"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\nThe flag of Berland is such rectangular field n Γ m that satisfies following conditions:\n\n Flag consists of three colors which correspond to letters 'R', 'G' and 'B'. Flag consists of three equal in width and height s... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 5\\\\nRRRRR\\\\nRRRRR\\\\nBBBBB\\\\nBBBBB\\\\nGGGGG\\\\nGGGGG\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\nBRG\\\\nBRG\\\\nBRG\\\\nBRG\\\\n\\\", \\\"output... | {
"split": "train",
"index": 6460,
"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\nLet's consider equation:x^2 + s(x)Β·x - n = 0, \n\nwhere x, n are positive integers, s(x) is the function, equal to the sum of digits of number x in the decimal number system.\n\nYou are given an integer n, find the small... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"110\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"... | {
"split": "train",
"index": 6461,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe $\\text{$gcdSum$}$ of a positive integer is the $gcd$ of that integer with its sum of digits. Formally, $\\text{$gcdSum$}(x) = gcd(x, \\text{ sum of digits of } x)$ for a positive integer $x$. $gcd(a, b)$ denotes the ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n11\\\\n31\\\\n75\\\\n\\\", \\\"output\\\": \\\"12\\\\n33\\\\n75\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n11\\\\n38\\\\n75\\\\n\\\", \\\"output\\\": \\\"12\\\\n39\\\\n75\\\\n\\\"}, {\\... | {
"split": "train",
"index": 6462,
"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\nMr. A wants to get to the destination on the Yamanote line.\n\nAfter getting on the train, Mr. A gets up for a minute and sleeps for b minutes repeatedly. It is c minutes after boarding to the destination, and you can get... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20 25 20\\\", \\\"output\\\": \\\"20\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"89 40 51\\\", \\\"output\\\": \\\"51\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 14 5\\\", ... | {
"split": "train",
"index": 6463,
"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 weighted undirected graph. The vertices are enumerated from 1 to n. Your task is to find the shortest path between the vertex 1 and the vertex n.\n\nInput\n\nThe first line contains two integers n and m (2... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1\\\\n1 2 1\\\\n\\\", \\\"output\\\": \\\"1 2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n1 2 1\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\... | {
"split": "train",
"index": 6464,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA set of four prime numbers arranged like (a, a + 2, a + 6, a + 8) is called a quadruplet prime number. Of the four prime numbers that make up a quadruplet prime, the largest number is called the size of the quadruplet pr... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\n14\\\\n15\\\\n16\\\\n17\\\\n18\\\\n0\\\\n20\\\\n10000\\\\n0\\\", \\\"output\\\": \\\"13\\\\n13\\\\n13\\\\n13\\\\n13\\\\n13\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\n14\\\\n15\\\\n16\... | {
"split": "train",
"index": 6465,
"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\nLet $n$ be a positive integer. Let $a, b, c$ be nonnegative integers such that $a + b + c = n$.\n\nAlice and Bob are gonna play rock-paper-scissors $n$ times. Alice knows the sequences of hands that Bob will play. However... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3\\\\n1 1 1\\\\nRPS\\\\n3\\\\n3 0 0\\\\nRPS\\\\n\\\", \\\"output\\\": \\\"YES\\\\nPSR\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n2\\\\n1 1 0\\\\nRR\\\\n2\\\\n2 0 0\\\\nSS\\\\n2\\... | {
"split": "train",
"index": 6466,
"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\nSnuke loves \"paper cutting\": he cuts out characters from a newspaper headline and rearranges them to form another string.\nHe will receive a headline which contains one of the strings S_1,...,S_n tomorrow.\nHe is excite... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\ncbaa\\\\ndaacc\\\\nacacac\\\\n\\\", \\\"output\\\": \\\"aac\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\na\\\\naa\\\\nb\\\\n\\\", \\\"output\\\": \\\"\\\\n\\\"}, {\\\"type\\\": \\\"stdin_... | {
"split": "train",
"index": 6467,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are the gym teacher in the school.\n\nThere are $n$ students in the row. And there are two rivalling students among them. The first one is in position $a$, the second in position $b$. Positions are numbered from $1$ t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5 1 3 2\\\\n100 33 100 1\\\\n6 0 2 3\\\\n\\\", \\\"output\\\": \\\"2\\\\n99\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"22\\\\n100 100 100 1\\\\n100 100 1 100\\\\n100 0 100 1\\\\n100 0 1... | {
"split": "train",
"index": 6468,
"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\nProfessor Abacus has just built a new computing engine for making numerical tables. It was designed to calculate the values of a polynomial function in one variable at several points at a time. With the polynomial functio... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1.0\\\\n4.0\\\\n12.0\\\\n16.0\\\\n25.0\\\\n1\\\\n-30.5893962764\\\\n5.76397083962\\\\n39.3853798058\\\\n74.3727663177\\\\n0\\\\n42.4715310246\\\\n79.5420238202\\\\n28.0282396675\\\\n-30.3627807522\\\\n-49.8363481393... | {
"split": "train",
"index": 6469,
"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\nXenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.\n\n<image>\n\nRecently Xenia has bought n_r red gems, n_g green gems and n_b blue gem... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n10 10 10\\\\n761 599 561 998 446 576 705 131 556 821\\\\n896 115 882 957 169 475 289 661 760 434\\\\n131 383 139 446 908 799 56 991 360 189\\\\n\\\", \\\"output\\\": \\\"288\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdou... | {
"split": "train",
"index": 6470,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYour program fails again. This time it gets \"Wrong answer on test 233\"\n\n.\n\nThis is the easier version of the problem. In this version 1 β€ n β€ 2000. You can hack this problem only if you solve and lock both problems.... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"98 102\\\\n79 30 51 87 80 91 32 16 21 54 79 14 48 24 8 66 9 94 45 50 85 82 54 89 44 92 23 62 47 11 75 33 102 27 63 39 91 38 33 55 81 63 81 87 26 19 41 85 46 56 91 97 67 30 94 45 40 5 22 8 23 34 8 77 43 66 67 31 7 77 26 22... | {
"split": "train",
"index": 6471,
"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\nAmugae has a sentence consisting of $n$ words. He want to compress this sentence into one word. Amugae doesn't like repetitions, so when he merges two words into one word, he removes the longest prefix of the second word ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nI want to order pizza\\\\n\\\", \\\"output\\\": \\\"Iwantorderpizza\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nsample please ease in out\\\\n\\\", \\\"output\\\": \\\"sampleaseinout\\\"}, {\... | {
"split": "train",
"index": 6472,
"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\nThere are n incoming messages for Vasya. The i-th message is going to be received after t_{i} minutes. Each message has a cost, which equals to A initially. After being received, the cost of a message decreases by B each ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 5 5 3 5\\\\n1 5 5 4\\\\n\\\", \\\"output\\\": \\\"20\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3 1 1 3\\\\n2 2 2 1 1\\\\n\\\", \\\"output\\\": \\\"15\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout... | {
"split": "train",
"index": 6473,
"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\nThere is a plan view consisting of 12 vertical and 12 horizontal squares showing the terrain. Each square is painted white or black. White represents the sea and black represents the land. When two black squares touch eac... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"111100001111\\\\n111000001111\\\\n110000001111\\\\n100000001111\\\\n000100010000\\\\n000000111000\\\\n000001111100\\\\n100011111110\\\\n110001111100\\\\n111000111000\\\\n111100010000\\\\n000000000000\\\\n\\\\n010001111100... | {
"split": "train",
"index": 6474,
"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\nWe have N integers. The i-th number is A_i.\n\\{A_i\\} is said to be pairwise coprime when GCD(A_i,A_j)=1 holds for every pair (i, j) such that 1\\leq i < j \\leq N.\n\\{A_i\\} is said to be setwise coprime when \\{A_i\\}... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3 4 5\\\\n\\\", \\\"output\\\": \\\"pairwise coprime\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n6 10 15\\\\n\\\", \\\"output\\\": \\\"setwise coprime\\\\n\\\"}, {\\\"type\\\": \\\"stdin... | {
"split": "train",
"index": 6475,
"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\nLet's define the sum of two permutations p and q of numbers 0, 1, ..., (n - 1) as permutation [Image], where Perm(x) is the x-th lexicographically permutation of numbers 0, 1, ..., (n - 1) (counting from zero), and Ord(p)... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n0 1\\\\n0 1\\\\n\\\", \\\"output\\\": \\\"0 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n0 1\\\\n1 0\\\\n\\\", \\\"output\\\": \\\"1 0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\... | {
"split": "train",
"index": 6476,
"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\nTyndex is again well ahead of the rivals! The reaction to the release of Zoozle Chrome browser was the release of a new browser Tyndex.Brome!\n\nThe popularity of the new browser is growing daily. And the secret is not ev... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20 10\\\\niwbiucrjoj\\\\nqvjewvdrgwgc\\\\newwqyhtdzakryafqaacimthycyasyb\\\\ncuoscayekvbsqokyfdmjnojkjennf\\\\nhkuv\\\\njtdgbespjdtbc\\\\ngeujitsrlqihoulvwuobnfospq\\\\nzqhnlqxacchxhyeehnpfwdjnwvj\\\\nxicsaoyfgtdbwqfrdgai... | {
"split": "train",
"index": 6477,
"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\nLet's call a number k-good if it contains all digits not exceeding k (0, ..., k). You've got a number k and an array a containing n numbers. Find out how many k-good numbers are in a (count each number every time it occur... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 6\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n1234560\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 6478,
"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\nZhinΓΌ was a child of the Emperor, but he was weaving the machine even if he opened it at the request of his father.\n\nIt was a pleasure of the Emperor to wear clothes made of a splendid cloth called Unnishiki woven by Zh... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3 5 9 2 8 9 2 11 6 5\\\\n2 5 9 2 8 9 2 11 12 6\\\\n2 5 9 2 8 9 2 11 11 9\\\\n14 1 25 7 17 12 17 9 20 5\\\\n14 1 25 7 17 12 22 13 20 5\\\", \\\"output\\\": \\\"OK\\\\nNG\\\\nNG\\\\nNG\\\\nOK\\\\n\\\"}, {\\\"type\\\":... | {
"split": "train",
"index": 6479,
"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\nSanta Claus has n candies, he dreams to give them as gifts to children.\n\nWhat is the maximal number of children for whose he can give candies if Santa Claus want each kid should get distinct positive integer number of c... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n\\\", \\\"output\\\": \\\"2\\\\n1 4 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\n\\\", \\\"output\\\": \\\"3\\\\n1 2 6 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\... | {
"split": "train",
"index": 6480,
"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 an array $a_1, a_2, \\dots , a_n$ and two integers $m$ and $k$.\n\nYou can choose some subarray $a_l, a_{l+1}, \\dots, a_{r-1}, a_r$. \n\nThe cost of subarray $a_l, a_{l+1}, \\dots, a_{r-1}, a_r$ is equal to... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7 3 10\\\\n2 -4 15 -3 4 8 3\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2 1000\\\\n-13 -4 -9 -20 -11\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"s... | {
"split": "train",
"index": 6481,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou've got an n Γ m matrix. The matrix consists of integers. In one move, you can apply a single transformation to the matrix: choose an arbitrary element of the matrix and increase it by 1. Each element can be increased ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n1 2 3\\\\n5 6 1\\\\n4 4 1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n4 8 8\\\\n9 2 9\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"st... | {
"split": "train",
"index": 6482,
"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\nVasya is developing his own programming language VPL (Vasya Programming Language). Right now he is busy making the system of exceptions. He thinks that the system of exceptions must function like that.\n\nThe exceptions a... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\ntry\\\\nthrow ( X )\\\\ncatch ( X, \\\\\\\"try again\\\\\\\")\\\\n\\\", \\\"output\\\": \\\"try again\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\ntry\\\\nthrow ( try )\\\\ncatch ( try, \... | {
"split": "train",
"index": 6483,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe Rebel fleet is on the run. It consists of m ships currently gathered around a single planet. Just a few seconds ago, the vastly more powerful Empire fleet has appeared in the same solar system, and the Rebels will nee... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n(99+98)/97\\\\n(26+4)/10\\\\n(12+33)/15\\\\n(5+1)/7\\\\n\\\", \\\"output\\\": \\\"1 2 2 1 \\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n(44+98)/19\\\\n(36+58)/47\\\\n(62+74)/68\\\\n(69+95)/82... | {
"split": "train",
"index": 6484,
"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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTaro is an elementary school student who has just learned multiplication. Somehow, he likes multiplication, so when he sees numbers, he wants to multiply. He seems to like to do the following for integers greater than or ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n999999\\\\n1000100\\\", \\\"output\\\": \\\"12\\\\n2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n9\\\\n99\\\\n238\\\", \\\"output\\\": \\\"0\\\\n2\\\\n4\\\\n\\\"}, {\\\"type\\\": \\\"std... | {
"split": "train",
"index": 6485,
"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,
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. Another string T is initially empty. Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:\n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"dre`merer\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"maerdesare\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"resaremaer... | {
"split": "train",
"index": 6486,
"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\nTenten runs a weapon shop for ninjas. Today she is willing to sell n shurikens which cost 1, 2, ..., n ryo (local currency). During a day, Tenten will place the shurikens onto the showcase, which is empty at the beginning... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n+\\\\n- 1\\\\n+\\\\n+\\\\n- 4\\\\n+\\\\n- 2\\\\n- 3\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n+\\\\n+\\\\n+\\\\n- 3\\\\n- 4\\\\n+\\\\n- 1\\\\n- 2\\\\n\... | {
"split": "train",
"index": 6487,
"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 array of positive integers. While there are at least two equal elements, we will perform the following operation. We choose the smallest value $x$ that occurs in the array $2$ or more times. Take the firs... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n3 4 1 2 2 1 1\\\\n\\\", \\\"output\\\": \\\"4\\\\n3 8 2 1 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 1 3 1 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n3 4 \\\\n\\\"}, {\\\"type\\\": \\\"st... | {
"split": "train",
"index": 6488,
"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\nThere are N students and M checkpoints on the xy-plane.\n\nThe coordinates of the i-th student (1 \\leq i \\leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \\leq j \\leq M) is (c_j,d_j).\n\nWhen t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n2 0\\\\n0 0\\\\n-1 0\\\\n1 0\\\\n\\\", \\\"output\\\": \\\"2\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 4\\\\n10 10\\\\n-10 -10\\\\n3 3\\\\n1 2\\\\n2 3\\\\n3 5\\\\n3 5\\\\n\\\", \\\... | {
"split": "train",
"index": 6489,
"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\nAtCoDeer the deer has found two positive integers, a and b.\nDetermine whether the concatenation of a and b in this order is a square number.\n\n-----Constraints-----\n - 1 β€ a,b β€ 100\n - a and b are integers.\n\n-----In... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 21\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100 100\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12 10\\... | {
"split": "train",
"index": 6490,
"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\nIn a strategic computer game \"Settlers II\" one has to build defense structures to expand and protect the territory. Let's take one of these buildings. At the moment the defense structure accommodates exactly n soldiers.... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 100\\\\n98 99 99 99 99 99 99 100 100 100\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 5\\\\n1\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_... | {
"split": "train",
"index": 6491,
"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\nThere was an electronic store heist last night.\n\nAll keyboards which were in the store yesterday were numbered in ascending order from some integer number $x$. For example, if $x = 4$ and there were $3$ keyboards in the... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n10 13 12 8\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n7 5 6 4 8\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input... | {
"split": "train",
"index": 6492,
"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\nOnce Bob took a paper stripe of n squares (the height of the stripe is 1 square). In each square he wrote an integer number, possibly negative. He became interested in how many ways exist to cut this stripe into three pie... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n-6 3 -1 2 -7\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n-2 3 3 2\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 6493,
"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 going out for a walk, when you suddenly encounter N monsters. Each monster has a parameter called health, and the health of the i-th monster is h_i at the moment of encounter. A monster will vanish immediately whe... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 5 3\\\\n8\\\\n7\\\\n4\\\\n2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 10 4\\\\n20\\\\n20\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_std... | {
"split": "train",
"index": 6494,
"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\nIlya is an experienced player in tic-tac-toe on the 4 Γ 4 field. He always starts and plays with Xs. He played a lot of games today with his friend Arseny. The friends became tired and didn't finish the last game. It was ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"xx..\\\\n.oo.\\\\nx...\\\\noox.\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"x.ox\\\\nox..\\\\nx.o.\\\\noo.x\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\... | {
"split": "train",
"index": 6495,
"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\nGiven N integers A_1, ..., A_N, compute A_1 \\times ... \\times A_N.\nHowever, if the result exceeds 10^{18}, print -1 instead.\n\n-----Constraints-----\n - 2 \\leq N \\leq 10^5\n - 0 \\leq A_i \\leq 10^{18}\n - All value... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1000000000 1000000000\\\\n\\\", \\\"output\\\": \\\"1000000000000000000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n101 9901 999999000001\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\... | {
"split": "train",
"index": 6496,
"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\nWe have N squares assigned the numbers 1,2,3,\\ldots,N. Each square has an integer written on it, and the integer written on Square i is a_i.\n\nHow many squares i satisfy both of the following conditions?\n\n* The assign... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15\\\\n13 76 46 15 50 98 93 77 31 43 44 90 6 24 14\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 5 4 5 7\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"std... | {
"split": "train",
"index": 6497,
"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-----Problem Statement-----\nWrite a program that accepts a number, n, and outputs the same.\n\n-----Input-----\nThe only line contains a single integer. \n\n-----Output-----\nOutput the answer in a single line.\n\n-----C... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"123\\\\n\\\", \\\"output\\\": \\\"123\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"191\\\", \\\"output\\\": \\\"191\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"97\\\", \\\"outp... | {
"split": "train",
"index": 6498,
"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 have $n$ sticks of the given lengths.\n\nYour task is to choose exactly four of them in such a way that they can form a rectangle. No sticks can be cut to pieces, each side of the rectangle must be formed by a single ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n4\\\\n7 2 2 7\\\\n8\\\\n2 8 1 4 8 2 1 5\\\\n5\\\\n5 5 5 5 5\\\\n\\\", \\\"output\\\": \\\"2 2 7 7\\\\n1 1 2 2\\\\n5 5 5 5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n4\\\\n1 1 10000 1000... | {
"split": "train",
"index": 6499,
"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,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.