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\nRingo is giving a present to Snuke.\n\nRingo has found out that Snuke loves yakiniku (a Japanese term meaning grilled meat. yaki: grilled, niku: meat). He supposes that Snuke likes grilled things starting with `YAKI` in J... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"UKINIKAY\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"UAKOYAKI\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"KAY\\\", \\\"... | {
"split": "train",
"index": 6200,
"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\nWrite a program which reads two integers x and y, and prints them in ascending order.\n\nConstraints\n\n* 0 ≤ x, y ≤ 10000\n* the number of datasets ≤ 3000\n\nInput\n\nThe input consists of multiple datasets. Each dataset... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n2 2\\\\n5 3\\\\n0 0\\\", \\\"output\\\": \\\"1 3\\\\n2 2\\\\n3 5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n2 2\\\\n9 3\\\\n0 0\\\", \\\"output\\\": \\\"1 3\\\\n2 2\\\\n3 9\\\\n\\\"... | {
"split": "train",
"index": 6201,
"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\nImagine a city with n horizontal streets crossing m vertical streets, forming an (n - 1) × (m - 1) grid. In order to increase the traffic flow, mayor of the city has decided to make each street one way. This means in each... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n><>\\\\nv^v\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 6\\\\n<><>\\\\nv^v^v^\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\... | {
"split": "train",
"index": 6202,
"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\nWhen l is an odd number, the median of l numbers a_1, a_2, ..., a_l is the (\\frac{l+1}{2})-th largest value among a_1, a_2, ..., a_l.\n\nYou are given N numbers X_1, X_2, ..., X_N, where N is an even number. For each i =... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 5 4 4 3 3\\\", \\\"output\\\": \\\"4\\\\n3\\\\n3\\\\n3\\\\n4\\\\n4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2 6 4 3\\\", \\\"output\\\": \\\"4\\\\n3\\\\n3\\\\n4\\\\n\\\"}, {\\\"type... | {
"split": "train",
"index": 6203,
"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\nIn the 17th century, Fermat wrote that he proved for any integer $n \\geq 3$, there exist no positive integers $x$, $y$, $z$ such that $x^n + y^n = z^n$. However he never disclosed the proof. Later, this claim was named F... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n6\\\\n2\\\\n0\\\", \\\"output\\\": \\\"27\\\\n27\\\\n6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n6\\\\n0\\\\n0\\\", \\\"output\\\": \\\"27\\\\n27\\\\n\\\"}, {\\\"type\\\": \\\"stdin_st... | {
"split": "train",
"index": 6204,
"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\nSig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has 3 keys on it: the 0 key, the 1 key and the backspace key.\nTo begin with, he is using a plain text editor with this keyboard. This e... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"01B0\\\\n\\\", \\\"output\\\": \\\"00\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0BB1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"01B1\\\", \\... | {
"split": "train",
"index": 6205,
"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\nKolya Gerasimov loves kefir very much. He lives in year 1984 and knows all the details of buying this delicious drink. One day, as you probably know, he found himself in year 2084, and buying kefir there is much more comp... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n11\\\\n9\\\\n8\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n5\\\\n6\\\\n1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\",... | {
"split": "train",
"index": 6206,
"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\nCyael is a teacher at a very famous school in Byteland and she is known by her students for being very polite to them and also to encourage them to get good marks on their tests.\nThen, if they get good marks she will rew... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n10 2\\\\n100 3\\\\n\\\", \\\"output\\\": \\\"5 0\\\\n33 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n10 2\\\\n101 3\\\", \\\"output\\\": \\\"5 0\\\\n33 2\\\\n\\\"}, {\\\"type\\\": \\\"s... | {
"split": "train",
"index": 6207,
"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 define a good tree:It is a tree with k * n nodes labeled from 0 to k * n - 1\nNode i and node j are not adjacent, for all 0 ≤ i, j < k * n such that i div k = j div k (here div means integer division. E.g. 7 div 2 ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 1\\\\n\\\", \... | {
"split": "train",
"index": 6208,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
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\nSnuke has decided to construct a string that starts with A and ends with Z, by taking out a substring of a string s (that is, a consecutive part of s).\nFind the greatest length of the string Snuke can construct. Here, th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"QWERTYASDFZXCV\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ZABCZ\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"HA... | {
"split": "train",
"index": 6209,
"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\nLimak and Radewoosh are going to compete against each other in the upcoming algorithmic contest. They are equally skilled but they won't solve problems in the same order.\n\nThere will be n problems. The i-th problem has ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n50 85 250\\\\n10 15 25\\\\n\\\", \\\"output\\\": \\\"Limak\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 6\\\\n50 85 250\\\\n10 15 25\\\\n\\\", \\\"output\\\": \\\"Radewoosh\\\\n\\\"}, {\\\"... | {
"split": "train",
"index": 6210,
"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\nThere is an N-car train.\nYou are given an integer i. Find the value of j such that the following statement is true: \"the i-th car from the front of the train is the j-th car from the back.\"\n\n-----Constraints-----\n -... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 2\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15 11\\\\n\\\",... | {
"split": "train",
"index": 6211,
"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 triangular number is the number of dots in an equilateral triangle uniformly filled with dots. For example, three dots can be arranged in a triangle; thus three is a triangular number. The n-th triangular number is the ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"474\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"232\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"300\\\\n\\\",... | {
"split": "train",
"index": 6212,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nRead problems statements in Mandarin Chinese and Russian as well. \n\nPetr, Nikita G. and Nikita are the most influential music critics in Saint-Petersburg. They have recently downloaded their favorite band's new album an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1\\\\n2\\\\n3\\\", \\\"output\\\": \\\"1.0\\\\n3.0\\\\n5.5\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1\\\\n2\\\\n2\\\", \\\"output\\\": \\\"1.0\\\\n3.0\\\\n3.0\\\\n\\\"}, {\\\"type\\\": \\\... | {
"split": "train",
"index": 6213,
"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,
1,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nTokitsukaze is playing a game derivated from Japanese mahjong. In this game, she has three tiles in her hand. Each tile she owns is a suited tile, which means it has a suit (manzu, pinzu or souzu) and a number (a digit ra... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1s 2s 3s\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9m 9m 9m\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3p 9m... | {
"split": "train",
"index": 6214,
"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\nThere are n children in Jzzhu's school. Jzzhu is going to give some candies to them. Let's number all the children from 1 to n. The i-th child wants to get at least a_{i} candies.\n\nJzzhu asks children to line up. Initia... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n1 3 1 4 2\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 4\\\\n1 1 2 2 3 3\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"... | {
"split": "train",
"index": 6215,
"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\nAdilbek was assigned to a special project. For Adilbek it means that he has $n$ days to run a special program and provide its results. But there is a problem: the program needs to run for $d$ days to calculate the results... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 1\\\\n4 5\\\\n5 11\\\\n\\\", \\\"output\\\": \\\"YES\\\\nYES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"50\\\\n1 1\\\\n1 2\\\\n1 3\\\\n1 4\\\\n1 5\\\\n1 6\\\\n1 7\\\\n1 8\\\\n1 9\\\\... | {
"split": "train",
"index": 6216,
"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,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of p... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"xlmw mw xli tmgxyvi xlex m xsso mr ilx xvmt.\\\", \\\"output\\\": \\\"this is the picture that i took in eht trip.\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"xlmw mw xli tmgxyvi xlex m ossx mr ilx ... | {
"split": "train",
"index": 6217,
"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\nAlice and Bob are controlling a robot. They each have one switch that controls the robot.\n\nAlice started holding down her button A second after the start-up of the robot, and released her button B second after the start... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 75 25 100\\\\n\\\", \\\"output\\\": \\\"50\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 33 66 99\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\... | {
"split": "train",
"index": 6218,
"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\nYou a captain of a ship. Initially you are standing in a point $(x_1, y_1)$ (obviously, all positions in the sea can be described by cartesian plane) and you want to travel to a point $(x_2, y_2)$. \n\nYou know the weathe... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 0\\\\n4 6\\\\n3\\\\nUUU\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 3\\\\n0 0\\\\n3\\\\nUDD\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_st... | {
"split": "train",
"index": 6219,
"reference": null,
"knowledge_emb": [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLuke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digit t means replacing it with digit 9 - t. \n\nHelp Chewbacca to transform the initial ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"27\\\\n\\\", \\\"output\\\": \\\"22\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4545\\\\n\\\", \\\"output\\\": \\\"4444\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\",... | {
"split": "train",
"index": 6220,
"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\nPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.\n\... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"42\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"49\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"70\\\\n\\\", ... | {
"split": "train",
"index": 6221,
"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\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\\\": \\\"541 9\\\\nbxhwcmunbdxcatppdsw\\\\nshbppncwbnsxxnxunwsbncpdchcbcspdcppdchmbbcuapphpdxbpcswcxpxpdscxpddbcppdxhpxbuxxdbpdpuudb\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6222,
"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\nHow many integer sequences A_1,A_2,\\ldots,A_N of length N satisfy all of the following conditions?\n - 0 \\leq A_i \\leq 9\n - There exists some i such that A_i=0 holds.\n - There exists some i such that A_i=9 holds.\nTh... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"869121\\\\n\\\", \\... | {
"split": "train",
"index": 6223,
"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 have N voting papers. The i-th vote (1 \\leq i \\leq N) has the string S_i written on it.\nPrint all strings that are written on the most number of votes, in lexicographical order.\n\n-----Constraints-----\n - 1 \\leq ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\nbeat\\\\nvet\\\\nbeet\\\\nbed\\\\nvet\\\\nbet\\\\nbeet\\\\n\\\", \\\"output\\\": \\\"beet\\\\nvet\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\nbuffalo\\\\nbuffalo\\\\nbuffalo\\\\nbuffalo\... | {
"split": "train",
"index": 6224,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nB: Periodic Sequence-\n\nproblem\n\nDr. Period, a professor at H University, is studying a property called the cycle that is supposed to be hidden in all things. As a generally known basic cycle, a cycle hidden in a seque... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 2 3 1 1 3\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 2 3 1 0 3\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \... | {
"split": "train",
"index": 6225,
"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,
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\nThe translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (an... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"kudl\\\\nldku\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcdef\\\\nfecdba\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 6226,
"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 a balmy spring afternoon, and Farmer John's n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, are arranged so that the i-th cow occupies the i-th stall from the left. However... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 10\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100000 2\\\\n... | {
"split": "train",
"index": 6227,
"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,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAsterix, Obelix and their temporary buddies Suffix and Prefix has finally found the Harmony temple. However, its doors were firmly locked and even Obelix had no luck opening them.\n\nA little later they found a string s, ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aaabaabaaaaab\\\\n\\\", \\\"output\\\": \\\"Just a legend\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcabcabcabcabc\\\\n\\\", \\\"output\\\": \\\"abcabcabc\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdo... | {
"split": "train",
"index": 6228,
"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,
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\nZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists a substring (contiguous segment of letters) of it of length 26 where each letter of English alphabet appears exactly once. In partic... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ABC??FGHIJK???OPQR?TUVWXY?\\\\n\\\", \\\"output\\\": \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"WELCOMETOCODEFORCESROUNDTHREEHUNDREDANDSEVENTYTWO\\\\n\\\", \\\"output\\\":... | {
"split": "train",
"index": 6229,
"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\nVasya got really tired of these credits (from problem F) and now wants to earn the money himself! He decided to make a contest to gain a profit.\n\nVasya has $n$ problems to choose from. They are numbered from $1$ to $n$.... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 10\\\\n1 15\\\\n5 3\\\\n6 11\\\\n7 2\\\\n11 22\\\\n\\\", \\\"output\\\": \\\"13\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 5\\\\n1 8\\\\n2 19\\\\n3 11\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"},... | {
"split": "train",
"index": 6230,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is a sequence of integers A_1, A_2, ..., A_N.\nIf its elements are pairwise distinct, print YES; otherwise, print NO.\n\n-----Constraints-----\n - 2 ≤ N ≤ 200000\n - 1 ≤ A_i ≤ 10^9\n - All values in input are intege... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n2 6 1 4 5\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n4 1 3 1 6 2\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"i... | {
"split": "train",
"index": 6231,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a positive integer X.\nFind the largest perfect power that is at most X.\nHere, a perfect power is an integer that can be represented as b^p, where b is an integer not less than 1 and p is an integer not les... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"999\\\\n\\\", \\\"... | {
"split": "train",
"index": 6232,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nFor a given sequence A = {a0, a1, ... , an-1}, find the length of the longest increasing subsequnece (LIS) in A.\n\nAn increasing subsequence of A is defined by a subsequence {ai0, ai1, ... , aik} where 0 ≤ i0 < i1 < ... ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n5\\\\n1\\\\n3\\\\n2\\\\n6\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1\\\\n1\\\\n2\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", ... | {
"split": "train",
"index": 6233,
"reference": null,
"knowledge_emb": [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya decided to learn to play chess. Classic chess doesn't seem interesting to him, so he plays his own sort of chess.\n\nThe queen is the piece that captures all squares on its vertical, horizontal and diagonal lines. I... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"output\\\": \\\"white\\\\n1 2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"black\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\... | {
"split": "train",
"index": 6234,
"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\nPolycarpus is sure that his life fits the description: \"first there is a white stripe, then a black one, then a white one again\". So, Polycarpus is sure that this rule is going to fulfill during the next n days. Polycar... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3 1\\\\n\\\", \\\"output\\\": \\\"12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"300 2 300\\\\n\\\", \\\"output\\\": \\\"775907030\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6235,
"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\nArkady wants to water his only flower. Unfortunately, he has a very poor watering system that was designed for $n$ flowers and so it looks like a pipe with $n$ holes. Arkady can only use the water that flows from the firs... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 10 3\\\\n2 2 2 2\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 80 20\\\\n3 2 1 4\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\... | {
"split": "train",
"index": 6236,
"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\nBerland year consists of $m$ months with $d$ days each. Months are numbered from $1$ to $m$. Berland week consists of $w$ days. The first day of the year is also the first day of the week. Note that the last week of the y... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n6 7 4\\\\n10 7 12\\\\n12 30 7\\\\n1 1 1\\\\n3247834 10298779 625324\\\\n\\\", \\\"output\\\": \\\"6\\\\n9\\\\n5\\\\n0\\\\n116461800\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n6 7 4\\\\n... | {
"split": "train",
"index": 6237,
"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\nLittle Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is the best choice. The main argument ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7330105816139991597267787581532092408135003429259616955239761315950805521264994021242873979309182812\\\\n\\\", \\\"output\\\": \\\"BigInteger\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"126\\\\n\\\"... | {
"split": "train",
"index": 6238,
"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 cats live on the campus of a school. Natsume's daily routine is to pet those cats. However, the cats may be capricious and go for a walk off campus.\n\nThe campus site is a rectangle with each side parallel to the x-... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 3 20 10\\\\n4\\\\n21 13\\\\n1 15\\\\n10 10\\\\n41 10\\\\n1 3 20 10\\\\n4\\\\n21 13\\\\n1 15\\\\n10 10\\\\n25 10\\\", \\\"output\\\": \\\"2\\\\n2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2... | {
"split": "train",
"index": 6239,
"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\nThere are $ n $ acitivities with start times $ \\\\ {s_i \\\\} $ and finish times $ \\\\ {t_i \\\\} $. Assuming that a person can only work on a single activity at a time, find the maximum number of activities that can be... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n2 2\\\\n3 9\\\\n3 5\\\\n5 9\\\\n6 8\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 1\\\\n2 3\\\\n3 4\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"st... | {
"split": "train",
"index": 6240,
"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\nLet's call an array $t$ dominated by value $v$ in the next situation.\n\nAt first, array $t$ should have at least $2$ elements. Now, let's calculate number of occurrences of each number $num$ in $t$ and define it as $occ(... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1\\\\n1\\\\n6\\\\n1 2 3 4 5 1\\\\n9\\\\n4 1 2 4 5 4 3 2 1\\\\n4\\\\n3 3 3 3\\\\n\\\", \\\"output\\\": \\\"-1\\\\n6\\\\n3\\\\n2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n2\\\\n2 2\\\\n\... | {
"split": "train",
"index": 6241,
"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\nZS the Coder and Chris the Baboon are travelling to Udayland! To get there, they have to get on the special IOI bus. The IOI bus has n rows of seats. There are 4 seats in each row, and the seats are separated into pairs b... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\nOO|OX\\\\nXO|XX\\\\nOX|OO\\\\nXX|OX\\\\nOO|OO\\\\nOO|XX\\\\n\\\", \\\"output\\\": \\\"YES\\\\n++|OX\\\\nXO|XX\\\\nOX|OO\\\\nXX|OX\\\\nOO|OO\\\\nOO|XX\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\... | {
"split": "train",
"index": 6242,
"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\nFor a given weighted graph G(V, E) and a source r, find the source shortest path to each vertex from the source (SSSP: Single Source Shortest Path).\n\nConstraints\n\n* 1 ≤ |V| ≤ 100000\n* 0 ≤ di ≤ 10000\n* 0 ≤ |E| ≤ 5000... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 5 0\\\\n0 1 1\\\\n0 2 4\\\\n1 2 2\\\\n2 3 1\\\\n1 3 2\\\", \\\"output\\\": \\\"0\\\\n1\\\\n3\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 5 0\\\\n0 1 1\\\\n0 2 4\\\\n1 2 0\\\\n2 3 1\\\\n1 3... | {
"split": "train",
"index": 6243,
"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\nproblem\n\nTaro bought 10 books. Later, I tried to find out the price based on the receipt, but the receipt was dirty and I could not read the price of a book. We decided to calculate the price of the book from the total ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9850\\\\n1050\\\\n800\\\\n420\\\\n380\\\\n600\\\\n820\\\\n2400\\\\n2983\\\\n980\\\\n0\\\", \\\"output\\\": \\\"-583\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9850\\\\n372\\\\n800\\\\n420\\\\n380\\... | {
"split": "train",
"index": 6244,
"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\nMr. Yamada Springfield Tanaka was appointed as Deputy Deputy Director of the National Land Readjustment Business Bureau. Currently, his country is in the midst of a major land readjustment, and if this land readjustment c... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n-100 -20 100 20\\\\n-20 -100 18 100\\\\n2\\\\n-100 -20 -20 -100\\\\n20 100 100 20\\\\n0\\\", \\\"output\\\": \\\"4\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n-100 -20 100 34\\\\n-... | {
"split": "train",
"index": 6245,
"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\nIndian summer is such a beautiful time of the year! A girl named Alyona is walking in the forest and picking a bouquet from fallen leaves. Alyona is very choosy — she doesn't take a leaf if it matches the color and the sp... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20\\\\nm vkfh\\\\nvptikamead mvx\\\\nitu mf\\\\nklruxckw aqega\\\\nekqkd enjllwol\\\\ncc uybfdh\\\\nimrfdngvo u\\\\ne uh\\\\ntwt jsslcfuogk\\\\nbljwqsag tuqbdn\\\\nqcv q\\\\nasx gzhvwwmajj\\\\nqcv q\\\\nekqkd enjllwol\\\\... | {
"split": "train",
"index": 6246,
"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\nTakahashi loves palindromes. Non-palindromic strings are unacceptable to him. Each time he hugs a string, he can change one of its characters to any character of his choice.\nGiven is a string S. Find the minimum number o... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"redcoder\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"vvvvvv\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcdabc... | {
"split": "train",
"index": 6247,
"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\nLittle penguin Polo adores integer segments, that is, pairs of integers [l; r] (l ≤ r). \n\nHe has a set that consists of n integer segments: [l_1; r_1], [l_2; r_2], ..., [l_{n}; r_{n}]. We know that no two segments of th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n1 2\\\\n3 4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 7\\\\n1 2\\\\n3 3\\\\n4 7\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout... | {
"split": "train",
"index": 6248,
"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\nSnuke has a calculator. It has a display and two buttons.\n\nInitially, the display shows an integer x. Snuke wants to change this value into another integer y, by pressing the following two buttons some number of times i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15 20\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"-10 -3\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"19 -10\\\", \\\"outp... | {
"split": "train",
"index": 6249,
"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\nEntrance Examination\n\nThe International Competitive Programming College (ICPC) is famous for its research on competitive programming. Applicants to the college are required to take its entrance examination.\n\nThe succe... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2 4\\\\n100\\\\n90\\\\n82\\\\n70\\\\n65\\\\n5 2 4\\\\n100\\\\n90\\\\n80\\\\n75\\\\n65\\\\n3 1 2\\\\n5000\\\\n6502\\\\n3000\\\\n4 2 3\\\\n10000\\\\n10000\\\\n8000\\\\n8000\\\\n4 2 3\\\\n10000\\\\n10000\\\\n10000\\\\n8000... | {
"split": "train",
"index": 6250,
"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\nYou are given a string s consisting of lowercase Latin letters. Character c is called k-dominant iff each substring of s with length at least k contains this character c.\n\nYou have to find minimum k such that there exis... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abacaba\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"zzzzz\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcde\\\\... | {
"split": "train",
"index": 6251,
"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\nA prime number is a number which has exactly two distinct divisors: one and itself. For example, numbers 2, 7, 3 are prime, and 1, 6, 4 are not.\n\nThe next prime number after x is the smallest prime number greater than x... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 6\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"31 33\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 11\\\\n\\... | {
"split": "train",
"index": 6252,
"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\n4 different points on the plane Read the coordinates of $ A (x_a, y_a) $, $ B (x_b, y_b) $, $ C (x_c, y_c) $, $ D (x_d, y_d) $ and read those 4 points Create a program that outputs YES if there is no dent in the quadrangl... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0.0,0.0,1.0,0.0,1.0,1.0,0.0,0.1\\\\n0.0,0.0,3.0,0.0,1.0,1.0,1.0,3.0\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1.0,0.0,0.1,0.1,0.0,0.1,0.0,0.0\\\\n0.3,0.1,0.1,1.... | {
"split": "train",
"index": 6253,
"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\nYou are given two strings of equal length $s$ and $t$ consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strings.\n\nDuring each operation you choose two adjacent charac... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\nxabb\\\\naabx\\\\ntechnocup\\\\ntechnocup\\\\na\\\\nz\\\\n\\\", \\\"output\\\": \\\"YES\\\\nYES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\nxabb\\\\naabx\\\\nteohnccup\\\\ntechnoc... | {
"split": "train",
"index": 6254,
"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\nA group of university students wants to get to the top of a mountain to have a picnic there. For that they decided to use a cableway.\n\nA cableway is represented by some cablecars, hanged onto some cable stations by a ca... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"96 3 92\\\\n\\\", \\\"output\\\": \\\"171\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"45 52 48\\\\n\\\", \\\"output\\\": \\\"106\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"89 97 2\\\\n... | {
"split": "train",
"index": 6255,
"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\nAfter passing a test, Vasya got himself a box of $n$ candies. He decided to eat an equal amount of candies each morning until there are no more candies. However, Petya also noticed the box and decided to get some candies ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"68\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n\\\", \\\"ou... | {
"split": "train",
"index": 6256,
"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,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nKurt reaches nirvana when he finds the product of all the digits of some positive integer. Greater value of the product makes the nirvana deeper.\n\nHelp Kurt find the maximum possible product of digits among all integers... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"390\\\\n\\\", \\\"output\\\": \\\"216\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000000000\\\\n... | {
"split": "train",
"index": 6257,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
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 will define Ginkgo numbers and multiplication on Ginkgo numbers.\n\nA Ginkgo number is a pair <m, n> where m and n are integers. For example, <1, 1>, <-2, 1> and <-3,-1> are Ginkgo numbers.\n\nThe multiplication on Gin... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n10 0\\\\n0 2\\\\n-3 1\\\\n4 2\\\\n0 -13\\\\n-4 1\\\\n-2 -1\\\\n3 -1\\\", \\\"output\\\": \\\"C\\\\nC\\\\nC\\\\nC\\\\nC\\\\nP\\\\nP\\\\nC\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n10 0\... | {
"split": "train",
"index": 6258,
"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\nYou are given a sequence of positive integers a1, a2, ..., an. Find all such indices i, that the i-th element equals the arithmetic mean of all other elements (that is all elements except for this one).\n\nInput\n\nThe fi... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 2 3 7\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3 4 4\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in... | {
"split": "train",
"index": 6259,
"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 reads a sequence A of n elements and an integer M, and outputs \"yes\" if you can make M by adding elements in A, otherwise \"no\". You can use an element only once.\n\nYou are given the sequence A a... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 5 7 10 21\\\\n8\\\\n2 4 17 10 22 21 100 35\\\", \\\"output\\\": \\\"no\\\\nno\\\\nyes\\\\nyes\\\\nyes\\\\nyes\\\\nno\\\\nno\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 5 7 3 21\\\\n8... | {
"split": "train",
"index": 6260,
"reference": null,
"knowledge_emb": [
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,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nCasimir has a rectangular piece of paper with a checkered field of size $n \\times m$. Initially, all cells of the field are white.\n\nLet us denote the cell with coordinates $i$ vertically and $j$ horizontally by $(i, j)... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n2 3 1\\\\n*.*\\\\n...\\\\n4 9 2\\\\n*.*.*...*\\\\n.*.*...*.\\\\n..*.*.*..\\\\n.....*...\\\\n4 4 1\\\\n*.*.\\\\n****\\\\n.**.\\\\n....\\\\n5 5 1\\\\n.....\\\\n*...*\\\\n.*.*.\\\\n..*.*\\\\n...*.\\\\n5 5 2\\\\n.....\\... | {
"split": "train",
"index": 6261,
"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\nA bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting characters + and 1 into this sequence. For example, sequences (())(), () and (()(())) are regular, while )(, (() ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n()\\\\n(?)\\\\n(??)\\\\n??()\\\\n)?(?\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\\nYES\\\\nNO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12\\\\n(??)\\\\n(??)\\\\n(??)\\\\n(??)\\\\n(??... | {
"split": "train",
"index": 6262,
"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 the strings $a$ and $b$, consisting of lowercase Latin letters. You can do any number of the following operations in any order:\n\nif $|a| > 0$ (the length of the string $a$ is greater than zero), delete the... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\na\\\\na\\\\nabcd\\\\nbc\\\\nhello\\\\ncodeforces\\\\nhello\\\\nhelo\\\\ndhjakjsnasjhfksafasd\\\\nadjsnasjhfksvdafdser\\\\n\\\", \\\"output\\\": \\\"0\\\\n2\\\\n13\\\\n3\\\\n20\\\\n\\\"}, {\\\"type\\\": \\\"stdin_std... | {
"split": "train",
"index": 6263,
"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\nHeidi's friend Jenny is asking Heidi to deliver an important letter to one of their common friends. Since Jenny is Irish, Heidi thinks that this might be a prank. More precisely, she suspects that the message she is asked... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0 1 4\\\\n0 2 2\\\\n2 3 3\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 0 5987\\\\n2 0 8891\\\\n\\\", \\\"output\\\": \\\"8891\\\\n\\\"}, {\\\"type\\\": \... | {
"split": "train",
"index": 6264,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nUjan decided to make a new wooden roof for the house. He has $n$ rectangular planks numbered from $1$ to $n$. The $i$-th plank has size $a_i \\times 1$ (that is, the width is $1$ and the height is $a_i$).\n\nNow, Ujan wan... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n5\\\\n4 3 1 4 5\\\\n4\\\\n4 4 4 4\\\\n3\\\\n1 1 1\\\\n5\\\\n5 5 1 1 5\\\\n\\\", \\\"output\\\": \\\"3\\\\n4\\\\n1\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n1\\\\n1\\\\n2\\\\n2 1... | {
"split": "train",
"index": 6265,
"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 friend has n cards.\n\nYou know that each card has a lowercase English letter on one side and a digit on the other.\n\nCurrently, your friend has laid out the cards on a table so only one side of each card is visible... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ee\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"z\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0ay1\\\\n\\\", \\\... | {
"split": "train",
"index": 6266,
"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\nA few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.\n\nThere are n schools numerated from 1 to n. One can travel... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"20289\\\\n\\\", \\\"output\\\": \\\"10144\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"31775\\\\n\\\", \\\"output\\\": \\\"15887\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \... | {
"split": "train",
"index": 6267,
"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\nSanta has $n$ candies and he wants to gift them to $k$ kids. He wants to divide as many candies as possible between all $k$ kids. Santa can't divide one candy into parts but he is allowed to not use some candies at all.\n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n5 2\\\\n19 4\\\\n12 7\\\\n6 2\\\\n100000 50010\\\\n\\\", \\\"output\\\": \\\"5\\\\n18\\\\n10\\\\n6\\\\n75015\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n1233212 4\\\\n\\\", \\\"output\\\... | {
"split": "train",
"index": 6268,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA Ministry for Defense sent a general to inspect the Super Secret Military Squad under the command of the Colonel SuperDuper. Having learned the news, the colonel ordered to all n squad soldiers to line up on the parade g... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n48 48 48 48 45 45 45\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"97\\\\n14 15 12 12 13 15 12 15 12 12 12 12 12 14 15 15 13 12 15 15 12 12 12 13 14 15 15 13 14 1... | {
"split": "train",
"index": 6269,
"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\nOnce Max found an electronic calculator from his grandfather Dovlet's chest. He noticed that the numbers were written with seven-segment indicators (https://en.wikipedia.org/wiki/Seven-segment_display). [Image] \n\nMax st... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3\\\\n\\\", \\\"output\\\": \\\"12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 15\\\\n\\\", \\\"output\\\": \\\"39\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 100\\\\n\... | {
"split": "train",
"index": 6270,
"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\nHamed has recently found a string t and suddenly became quite fond of it. He spent several days trying to find all occurrences of t in other strings he had. Finally he became tired and started thinking about the following... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ababa\\\\naba\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"welcometoroundtwohundredandeightytwo\\\\nd\\\\n\\\", \\\"output\\\": \\\"274201\\\\n\\\"}, {\\\"type\\\": \\... | {
"split": "train",
"index": 6271,
"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\nThree numbers A, B and C are the inputs. Write a program to find second largest among them.\n\n-----Input-----\n\nThe first line contains an integer T, the total number of testcases. Then T lines follow, each line contain... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n120 11 400\\\\n10213 312 10\\\\n10 3 450\\\\n\\\", \\\"output\\\": \\\"120\\\\n312\\\\n10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 \\\\n120 14 400\\\\n10213 312 10\\\\n10 3 450\\\", \\\"o... | {
"split": "train",
"index": 6272,
"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 family consisting of father bear, mother bear and son bear owns three cars. Father bear can climb into the largest car and he likes it. Also, mother bear can climb into the middle car and she likes it. Moreover, son bea... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"50 30 10 10\\\\n\\\", \\\"output\\\": \\\"50\\\\n30\\\\n10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100 50 10 21\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \... | {
"split": "train",
"index": 6273,
"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\nPrincess'Marriage\n\nMarriage of a princess\n\nEnglish text is not available in this practice contest.\n\nA brave princess in a poor country, knowing that gambling payouts are determined by the parimutuel method, felt mor... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 8\\\\n5 6\\\\n4 5\\\\n3 2\\\\n5 10\\\\n5 10\\\\n5 10\\\\n0 0\\\", \\\"output\\\": \\\"5\\\\n130\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 8\\\\n5 6\\\\n4 5\\\\n3 2\\\\n5 10\\\\n3 10\\\\n5 10\\... | {
"split": "train",
"index": 6274,
"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,
1,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction.... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3000\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2520\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2519\\\\n\\\", \\\"outp... | {
"split": "train",
"index": 6275,
"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\nMike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. \n\nA palindrome is a string that reads the same backwa... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcdmnp\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ucnolsloncw\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 6276,
"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 sequence $a_1, a_2, \\dots, a_n$ consisting of $n$ integers.\n\nYou can choose any non-negative integer $D$ (i.e. $D \\ge 0$), and for each $a_i$ you can:\n\n add $D$ (only once), i. e. perform $a_i := a_... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 4 4 7 4 1\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n2 2 5 2 5\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 6277,
"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\nWoken up by the alarm clock Igor the financial analyst hurried up to the work. He ate his breakfast and sat in his car. Sadly, when he opened his GPS navigator, he found that some of the roads in Bankopolis, the city wher... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2\\\\nST\\\\n\\\", \\\"output\\\": \\\"YES\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n**T\\\\n*S*\\\\n***\\\\n\\\", \\\"output\\\": \\\"NO\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\... | {
"split": "train",
"index": 6278,
"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\nTomash keeps wandering off and getting lost while he is walking along the streets of Berland. It's no surprise! In his home town, for any pair of intersections there is exactly one way to walk from one intersection to the... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 4\\\\n1 2\\\\n2 3\\\\n1 4\\\\n4 3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 12\\\\n1 2\\\\n1 3\\\\n1 4\\\\n2 1\\\\n2 3\\\\n2 4\\\\n3 1\\\\n3 2\\\\n3 4\\\\n4 1\\... | {
"split": "train",
"index": 6279,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nKatie, Kuro and Shiro are best friends. They have known each other since kindergarten. That's why they often share everything with each other and work together on some very hard problems.\n\nToday is Shiro's birthday. She... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"2\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"5\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"output\\\": ... | {
"split": "train",
"index": 6280,
"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,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAs you might know, cooking is the process of taking a food item and subjecting it to various processes(like heating, roasting, baking etc).\nA food item gets prepared after it has been subjected to exactly N processes.\nT... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 2\\\\n2 3\\\\n1 3\\\", \\\"output\\\": \\\"2\\\\n18\\\\n6\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n0 2\\\\n2 3\\\\n1 3\\\", \\\"output\\\": \\\"2\\\\n18\\\\n6\\\\n\\\"}, {\\\"type\\\": \... | {
"split": "train",
"index": 6281,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDr. Moriarty is about to send a message to Sherlock Holmes. He has a string s. \n\nString p is called a substring of string s if you can read it starting from some position in the string s. For example, string \"aba\" has... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aaabbbaaa\\\\naba\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcde\\\\ncabc\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input... | {
"split": "train",
"index": 6282,
"reference": null,
"knowledge_emb": [
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,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn order to put away old things and welcome a fresh new year, a thorough cleaning of the house is a must.\n\nLittle Tommy finds an old polynomial and cleaned it up by taking it modulo another. But now he regrets doing thi... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"46 2\\\\n\\\", \\\"output\\\": \\\"7\\\\n0 1 0 0 1 1 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2018 214\\\\n\\\", \\\"output\\\": \\\"3\\\\n92 205 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\... | {
"split": "train",
"index": 6283,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nStick n circular stickers with a radius of 1 on a square origami paper with a side length of 10. The stickers can be stacked. Create a program that reads the coordinates of the position where the stickers are to be attach... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15\\\\n3.13979,8.51743\\\\n2.39506,3.84915\\\\n2.68432,5.39095\\\\n5.61904,9.16332\\\\n7.85653,4.75593\\\\n2.84021,5.41511\\\\n1.79500,8.59211\\\\n7.55389,8.17604\\\\n4.70665,4.66125\\\\n1.63470,4.42538\\\\n7.34959,4.6198... | {
"split": "train",
"index": 6284,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nRecently, Anton has found a set. The set consists of small English letters. Anton carefully wrote out all the letters from the set in one line, separated by a comma. He also added an opening curved bracket at the beginnin... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"{a, b, c}\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"{b, a, b, a}\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 6285,
"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\nValera the horse lives on a plane. The Cartesian coordinate system is defined on this plane. Also an infinite spiral is painted on the plane. The spiral consists of segments: [(0, 0), (1, 0)], [(1, 0), (1, 1)], [(1, 1), (... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0 1\\\\n\\\", \... | {
"split": "train",
"index": 6286,
"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\nBerland annual chess tournament is coming!\n\nOrganizers have gathered 2·n chess players who should be divided into two teams with n people each. The first team is sponsored by BerOil and the second team is sponsored by B... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 3 2 4\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n3 3\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 6287,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe mobile application store has a new game called \"Subway Roller\".\n\nThe protagonist of the game Philip is located in one end of the tunnel and wants to get out of the other one. The tunnel is a rectangular field cons... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n100 26\\\\ns................PPPP.CCCCC..UUUUUU.........YYYQQQQQQQ...GGGGG............MMM.....JJJJ..............\\\\n.OOOOOO....EEE....................................................SSSSSS........LLLLLL......NNNIIII... | {
"split": "train",
"index": 6288,
"reference": null,
"knowledge_emb": [
0,
0,
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,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given names of two days of the week.\n\nPlease, determine whether it is possible that during some non-leap year the first day of some month was equal to the first day of the week you are given, while the first day... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"monday\\\\ntuesday\\\\n\\\", \\\"output\\\": \\\"NO\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"sunday\\\\nsunday\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\... | {
"split": "train",
"index": 6289,
"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\nValera has array a, consisting of n integers a_0, a_1, ..., a_{n} - 1, and function f(x), taking an integer from 0 to 2^{n} - 1 as its single argument. Value f(x) is calculated by formula $f(x) = \\sum_{i = 0}^{n - 1} a_{... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n3 8\\\\n10\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n17 0 10 2 1\\\\n11010\\\\n\\\", \\\"output\\\": \\\"27\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 6290,
"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,
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 arrange the numbers between 1 and N (1 <= N <= 10000) in increasing order and decreasing order like this:\n\n\n1 2 3 4 5 6 7 8 9 . . . N\nN . . . 9 8 7 6 5 4 3 2 1\n\n\nTwo numbers faced each other form a pair. Your ta... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n8\\\\n7\\\\n51\\\", \\\"output\\\": \\\"0\\\\n2\\\\n2\\\\n6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n10\\\\n7\\\\n51\\\", \\\"output\\\": \\\"0\\\\n0\\\\n2\\\\n6\\\\n\\\"}, {\\\"type\... | {
"split": "train",
"index": 6291,
"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\nGiven is a string S representing the day of the week today.\nS is SUN, MON, TUE, WED, THU, FRI, or SAT, for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.\nAfter how many days is the nex... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"SAT\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"SUN\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"FRI\\\\n\\\", \... | {
"split": "train",
"index": 6292,
"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\nGiven is a positive integer N.\nHow many tuples (A,B,C) of positive integers satisfy A \\times B + C = N?\n\n-----Constraints-----\n - 2 \\leq N \\leq 10^6\n - All values in input are integers.\n\n-----Input-----\nInput ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n\\\", \\\"output\\\": \\\"473\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000000\\\\n\\\... | {
"split": "train",
"index": 6293,
"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\nPolycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters.\n\nLet A be a set of positions in the string. Let's call it pretty if followin... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"11\\\\naaaaBaabAbA\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12\\\\nzACaAbbaazzC\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\... | {
"split": "train",
"index": 6294,
"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\nVitaly is a very weird man. He's got two favorite digits a and b. Vitaly calls a positive integer good, if the decimal representation of this integer only contains digits a and b. Vitaly calls a good number excellent, if ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3 3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3 10\\\\n\\\", \\\"output\\\": \\\"165\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 8 1421... | {
"split": "train",
"index": 6295,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are positive integers A and B.\nLet us choose some number of positive common divisors of A and B.\nHere, any two of the chosen divisors must be coprime.\nAt most, how many divisors can we choose?Definition of common... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12 18\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"420 660\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 2019\\\... | {
"split": "train",
"index": 6296,
"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\nproblem\n\nA mysterious $ X $ [cm] plant grows in one place. This plant has the following mysterious properties.\n\n* Say \"nobiro\" to this plant and it will grow $ A $ [cm].\n* Say \"tidime\" to this plant and it will g... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 30 10\\\\n0\\\\nnobiro\\\\nnobiro\\\\ntidime\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"18 30 10\\\\n0\\\\nnobiro\\\\nnobiro\\\\ntidime\\\", \\\"output\\\": \\\"18\\\... | {
"split": "train",
"index": 6297,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLet's consider one interesting word game. In this game you should transform one word into another through special operations. \n\nLet's say we have word w, let's split this word into two non-empty parts x and y so, that w... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aaaba\\\\naaaad\\\\n0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"abcd\\\\ncbad\\\\n5\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", ... | {
"split": "train",
"index": 6298,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are an environmental activist at heart but the reality is harsh and you are just a cashier in a cinema. But you can still do something!\n\nYou have $n$ tickets to sell. The price of the $i$-th ticket is $p_i$. As a te... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1\\\\n100\\\\n50 1\\\\n49 1\\\\n100\\\\n8\\\\n100 200 100 200 100 200 100 100\\\\n10 2\\\\n15 3\\\\n107\\\\n3\\\\n1000000000 1000000000 1000000000\\\\n50 1\\\\n50 1\\\\n3000000000\\\\n5\\\\n200 100 100 100 100\\\\n6... | {
"split": "train",
"index": 6299,
"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,
1,
0,
0,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.