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\nYour security guard friend recently got a new job at a new security company. The company requires him to patrol an area of the city encompassing exactly N city blocks, but they let him choose which blocks. That is, your f... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"11\\\\n\\\", \\\"output\\\": \\\"14\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"22\\\\n\\\", \\\"... | {
"split": "train",
"index": 5900,
"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\nKawashiro Nitori is a girl who loves competitive programming.\n\nOne day she found a string and an integer. As an advanced problem setter, she quickly thought of a problem.\n\nGiven a string $s$ and a parameter $k$, you n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n5 1\\\\nqwqwq\\\\n2 1\\\\nab\\\\n3 1\\\\nioi\\\\n4 2\\\\nicpc\\\\n22 0\\\\ndokidokiliteratureclub\\\\n19 8\\\\nimteamshanghaialice\\\\n6 3\\\\naaaaaa\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\\nNO\\\\nYES\\... | {
"split": "train",
"index": 5901,
"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\nStudents in a class are making towers of blocks. Each student makes a (non-zero) tower by stacking pieces lengthwise on top of each other. n of the students use pieces made of two blocks and m of the students use pieces m... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 0\\\\n\\\", \... | {
"split": "train",
"index": 5902,
"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\nThis contest, AtCoder Beginner Contest, is abbreviated as ABC.\nWhen we refer to a specific round of ABC, a three-digit number is appended after ABC. For example, ABC680 is the 680th round of ABC.\nWhat is the abbreviatio... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n\\\", \\\"output\\\": \\\"ABC100\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"425\\\\n\\\", \\\"output\\\": \\\"ABC425\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"999\\... | {
"split": "train",
"index": 5903,
"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\nGenos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game is to destroy all the gemstones in the line as quickly as possible.\n\n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"50\\\\n22 19 14 22 20 11 16 28 23 15 3 23 6 16 30 15 15 10 24 28 19 19 22 30 28 1 27 12 12 14 17 30 17 26 21 26 27 1 11 23 9 30 18 19 17 29 11 20 29 24\\\\n\\\", \\\"output\\\": \\\"25\\\"}, {\\\"type\\\": \\\"stdin_stdou... | {
"split": "train",
"index": 5904,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nLittle Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.\n\nThere are n columns of toy cubes in the b... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n3 2 1 2\\\\n\\\", \\\"output\\\": \\\"1 2 2 3 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 3 8\\\\n\\\", \\\"output\\\": \\\"2 3 8 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"... | {
"split": "train",
"index": 5905,
"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\nTo stay woke and attentive during classes, Karen needs some coffee! [Image] \n\nKaren, a coffee aficionado, wants to know the optimal temperature for brewing the perfect cup of coffee. Indeed, she has spent some time read... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 4\\\\n91 94\\\\n92 97\\\\n97 99\\\\n92 94\\\\n93 97\\\\n95 96\\\\n90 100\\\\n\\\", \\\"output\\\": \\\"3\\\\n3\\\\n0\\\\n4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1 1\\\\n1 1\\\\n200000 20... | {
"split": "train",
"index": 5906,
"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\nThere are some beautiful girls in Arpa’s land as mentioned before.\n\nOnce Arpa came up with an obvious problem:\n\nGiven an array and a number x, count the number of pairs of indices i, j (1 ≤ i < j ≤ n) such that $a_{i}... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n1 2\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 1\\\\n5 1 2 3 4 1\\\\n\\\", \\\"output\\\": \\\"2\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3... | {
"split": "train",
"index": 5907,
"reference": null,
"knowledge_emb": [
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,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nValentin participates in a show called \"Shockers\". The rules are quite easy: jury selects one letter which Valentin doesn't know. He should make a small speech, but every time he pronounces a word that contains the sele... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n! abc\\\\n. ad\\\\n. b\\\\n! cd\\\\n? c\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8\\\\n! hello\\\\n! codeforces\\\\n? c\\\\n. o\\\\n? d\\\\n? h\\\\n. l\\\\n?... | {
"split": "train",
"index": 5908,
"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 string s.\nAmong the different substrings of s, print the K-th lexicographically smallest one.\nA substring of s is a string obtained by taking out a non-empty contiguous part in s.\nFor example, if s = ab... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aba\\\\n4\\\\n\\\", \\\"output\\\": \\\"b\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"atcoderandatcodeer\\\\n5\\\\n\\\", \\\"output\\\": \\\"andat\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\... | {
"split": "train",
"index": 5909,
"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,
1,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA permutation is a sequence of integers from $1$ to $n$ of length $n$ containing each number exactly once. For example, $[1]$, $[4, 3, 5, 1, 2]$, $[3, 2, 1]$ — are permutations, and $[1, 1]$, $[4, 3, 1]$, $[2, 3, 4]$ — no... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 4\\\\n1 2 4\\\\n2 3\\\\n1 1 2\\\\n1 3 4\\\\n\\\", \\\"output\\\": \\\"9\\\\n4\\\\n6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n1 1 2\\\\n2 1\\\\n1 2 2\\\\n\\\", \\\"output\\\": \\\"3\\\\n... | {
"split": "train",
"index": 5910,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
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,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nBessie the cow has just intercepted a text that Farmer John sent to Burger Queen! However, Bessie is sure that there is a secret message hidden inside.\n\nThe text is a string $s$ of lowercase Latin letters. She considers... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"aaabb\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"usaco\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"lol\\\\n\\\... | {
"split": "train",
"index": 5911,
"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\nVasya has a string $s$ of length $n$ consisting only of digits 0 and 1. Also he has an array $a$ of length $n$. \n\nVasya performs the following operation until the string becomes empty: choose some consecutive substring ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n1101001\\\\n3 4 9 100 1 2 3\\\\n\\\", \\\"output\\\": \\\"109\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n10101\\\\n3 10 15 15 15\\\\n\\\", \\\"output\\\": \\\"23\\\\n\\\"}, {\\\"type\\\... | {
"split": "train",
"index": 5912,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nIn Japan, people make offerings called hina arare, colorful crackers, on March 3.\nWe have a bag that contains N hina arare. (From here, we call them arare.)\nIt is known that the bag either contains arare in three colors... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\nG W Y P Y W\\\\n\\\", \\\"output\\\": \\\"Four\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\nG W W G P W P G G\\\\n\\\", \\\"output\\\": \\\"Three\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdou... | {
"split": "train",
"index": 5913,
"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\nChef loves arrays. But he really loves a specific kind of them - Rainbow Arrays. \nThe array is a Rainbow Array if it has such a structure:\n- The first a1 elements equal to 1. \n- The next a2 elements equal to 2. \n- Th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10 \\\\n\\\\n\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\n\\\\n\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 5914,
"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\nRead problems statements in Mandarin Chinese here \nRead problems statements in Russian here \n\n------ Problem Statement ------ \n\nOne day Chef is waiting his girlfriend on the bus station. The girlfriend said that she ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n10:00\\\\n09:00\\\\n10\\\\n10:00\\\\n09:00\\\\n30\\\\n10:00\\\\n09:00\\\\n60\\\", \\\"output\\\": \\\"70.0 60.0\\\\n90.0 60.0\\\\n120.0 90.0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n10:00\... | {
"split": "train",
"index": 5915,
"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\nGoldbach's Conjecture: For any even number n greater than or equal to 4, there exists at least one pair of prime numbers p1 and p2 such that n = p1 + p2.\n\nThis conjecture has not been proved nor refused yet. No one is s... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1\\\\n12\\\\n0\\\", \\\"output\\\": \\\"1\\\\n0\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n10\\\\n8\\\\n0\\\", \\\"output\\\": \\\"1\\\\n2\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdi... | {
"split": "train",
"index": 5916,
"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\nGiven are N positive integers A_1,...,A_N.\nConsider positive integers B_1, ..., B_N that satisfy the following condition.\nCondition: For any i, j such that 1 \\leq i < j \\leq N, A_i B_i = A_j B_j holds.\nFind the minim... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 3 4\\\\n\\\", \\\"output\\\": \\\"13\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n12 12 12 12 12\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 5917,
"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 have two variables a and b. Consider the following sequence of actions performed with these variables: If a = 0 or b = 0, end the process. Otherwise, go to step 2; If a ≥ 2·b, then set the value of a to a - 2·b, and r... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12 5\\\\n\\\", \\\"output\\\": \\\"0 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"31 12\\\\n\\\", \\\"output\\\": \\\"7 12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000000... | {
"split": "train",
"index": 5918,
"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 problem uses a simplified TCP/IP address model, please make sure you've read the statement attentively.\n\nPolycarpus has found a job, he is a system administrator. One day he came across n IP addresses. Each IP addre... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 3\\\\n0.0.0.1\\\\n0.1.1.2\\\\n0.0.2.1\\\\n0.1.1.0\\\\n0.0.2.3\\\\n\\\", \\\"output\\\": \\\"255.255.254.0\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\n0.0.0.1\\\\n0.1.1.2\\\\n0.0.2.1\\\\n0.1.1.0... | {
"split": "train",
"index": 5919,
"reference": null,
"knowledge_emb": [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two integer numbers, $n$ and $x$. You may perform several operations with the integer $x$.\n\nEach operation you perform is the following one: choose any digit $y$ that occurs in the decimal representation o... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 1\\\\n\\\", \\\"output\\\": \\\"-1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 42\\\\n\\\"... | {
"split": "train",
"index": 5920,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are N integers A_1,\\ldots,A_N.\nFind the sum of A_i \\times A_j over all pairs (i,j) such that 1\\leq i < j \\leq N, modulo (10^9+7).\n\n-----Constraints-----\n - 2 \\leq N \\leq 2\\times 10^5\n - 0 \\leq A_i \\leq... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 2 3\\\\n\\\", \\\"output\\\": \\\"11\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n141421356 17320508 22360679 244949\\\\n\\\", \\\"output\\\": \\\"437235829\\\\n\\\"}, {\\\"type\\\": \\... | {
"split": "train",
"index": 5921,
"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\nJoisino is planning to open a shop in a shopping street.\nEach of the five weekdays is divided into two periods, the morning and the evening. For each of those ten periods, a shop must be either open during the whole peri... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n1 1 0 1 0 0 0 1 0 1\\\\n3 4 5 6 7 8 9 -2 -3 4 -2\\\\n\\\", \\\"output\\\": \\\"8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n1 1 1 1 1 0 0 0 0 0\\\\n0 0 0 0 0 1 1 1 1 1\\\\n0 -2 -2 -2 -2... | {
"split": "train",
"index": 5922,
"reference": null,
"knowledge_emb": [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nConsider a tunnel on a one-way road. During a particular day, $n$ cars numbered from $1$ to $n$ entered and exited the tunnel exactly once. All the cars passed through the tunnel at constant speeds.\n\nA traffic enforceme... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n3 5 2 1 4\\\\n4 3 2 5 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n5 2 3 6 7 1 4\\\\n2 3 6 7 1 4 5\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\... | {
"split": "train",
"index": 5923,
"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\nThere are n banks in the city where Vasya lives, they are located in a circle, such that any two banks are neighbouring if their indices differ by no more than 1. Also, bank 1 and bank n are neighbours if n > 1. No bank i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n5 0 -5\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n-1 0 1 0\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":... | {
"split": "train",
"index": 5924,
"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 are n servers in a laboratory, each of them can perform tasks. Each server has a unique id — integer from 1 to n.\n\nIt is known that during the day q tasks will come, the i-th of them is characterized with three in... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n1 3 2\\\\n2 2 1\\\\n3 4 3\\\\n\\\", \\\"output\\\": \\\"6\\\\n-1\\\\n10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2\\\\n3 2 3\\\\n5 1 2\\\\n\\\", \\\"output\\\": \\\"3\\\\n3\\\\n\\\"}, {... | {
"split": "train",
"index": 5925,
"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,
1,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nCengiz recently learned Fibonacci numbers and now he is studying different algorithms to find them. After getting bored of reading them, he came with his own new type of numbers that he named XORinacci numbers. He defined... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3 4 2\\\\n4 5 0\\\\n325 265 1231232\\\\n\\\", \\\"output\\\": \\\"7\\\\n4\\\\n76\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n0 0 1000000000\\\\n1002 2003 36523\\\\n233 5656 898989\\\\n0... | {
"split": "train",
"index": 5926,
"reference": null,
"knowledge_emb": [
0,
0,
0,
1,
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\nBike loves looking for the second maximum element in the sequence. The second maximum element in the sequence of distinct numbers x_1, x_2, ..., x_{k} (k > 1) is such maximum element x_{j}, that the following inequality h... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n5 2 1 4 3\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n9 8 3 5 7\\\\n\\\", \\\"output\\\": \\\"15\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input... | {
"split": "train",
"index": 5927,
"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\nHolidays are coming up really soon. Rick realized that it's time to think about buying a traditional spruce tree. But Rick doesn't want real trees to get hurt so he decided to find some in an $n \\times m$ matrix consisti... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n2 3\\\\n.*.\\\\n***\\\\n2 3\\\\n.*.\\\\n**.\\\\n4 5\\\\n.***.\\\\n*****\\\\n*****\\\\n*.*.*\\\\n5 7\\\\n..*.*..\\\\n.*****.\\\\n*******\\\\n.*****.\\\\n..*.*..\\\\n\\\", \\\"output\\\": \\\"5\\\\n3\\\\n23\\\\n34\\\\... | {
"split": "train",
"index": 5928,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nI, Fischl, Prinzessin der Verurteilung, descend upon this land by the call of fate an — Oh, you are also a traveler from another world? Very well, I grant you permission to travel with me.\n\nIt is no surprise Fischl spea... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n41\\\\nsugimotomikasaackermannelectromasterjsoap\\\\n\\\", \\\"output\\\": \\\"b\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n25\\\\nabcdefghijklmnopqrstuvwxy\\\\n\\\", \\\"output\\\": \\... | {
"split": "train",
"index": 5929,
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev decided to build a house of cards. For that they've already found a hefty deck of n playing cards. Let's describe th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"153\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"99\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"154\\\\n\\\", \\... | {
"split": "train",
"index": 5930,
"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\nYou have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly $k\\ \\%$ magic essence and $(... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3\\\\n100\\\\n25\\\\n\\\", \\\"output\\\": \\\"100\\\\n1\\\\n4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n2\\\\n36\\\\n43\\\\n19\\\\n99\\\\n100\\\\n98\\\\n9\\\\n79\\\\n57\\\\n1\\\\n78... | {
"split": "train",
"index": 5931,
"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\nAiz, which is located in cyberspace, trades information with Wakamatsu. The two countries are developing their economies by exchanging useful data with each other. The two countries, whose national policy is philanthropy ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0\\\\n1\\\\n-1\\\\n-1\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n0\\\\n2\\\\n-1\\\\n-1\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 5932,
"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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are $n$ students numerated from $1$ to $n$. The level of the $i$-th student is $a_i$. You need to split the students into stable groups. A group of students is called stable, if in the sorted array of their levels n... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 2 3\\\\n1 1 5 8 12 13 20 22\\\\n\\\", \\\"output\\\": \\\"2\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13 0 37\\\\n20 20 80 70 70 70 420 5 1 5 1 60 90\\\\n\\\", \\\"output\\\": \\\"3\\\"}, {\\\"type\\... | {
"split": "train",
"index": 5933,
"reference": null,
"knowledge_emb": [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nA + B is often used as an example of the easiest problem possible to show some contest platform. However, some scientists have observed that sometimes this problem is not so easy to get accepted. Want to try?\n\n\n-----In... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 14\\\\n\\\", \\\"output\\\": \\\"19\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"381 492\\\\n\\\", \\\"output\\\": \\\"873\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"536 298... | {
"split": "train",
"index": 5934,
"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 play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through the ice.\n\nThe level... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 6\\\\nX...XX\\\\n...XX.\\\\n.X..X.\\\\n......\\\\n1 6\\\\n2 2\\\\n\\\", \\\"output\\\": \\\"YES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 4\\\\n.X..\\\\n...X\\\\nX.X.\\\\n....\\\\n.XX.\\\\n5 3... | {
"split": "train",
"index": 5935,
"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,
1,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a string S consisting of letters `b`, `d`, `p` and `q`. Determine whether S is a mirror string.\n\nHere, a mirror string is a string S such that the following sequence of operations on S results in the same ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"qbdp\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"dbqp\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"bdqp\\\", \\\"output... | {
"split": "train",
"index": 5936,
"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\nAmr bought a new video game \"Guess Your Way Out! II\". The goal of the game is to find an exit from the maze that looks like a perfect binary tree of height h. The player is initially standing at the root of the tree and... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1\\\\n3 4 6 0\\\\n\\\", \\\"output\\\": \\\"7\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 3\\\\n4 10 14 1\\\\n3 6 6 0\\\\n2 3 3 1\\\\n\\\", \\\"output\\\": \\\"14\\\"}, {\\\"type\\\": \\\"stdin_stdou... | {
"split": "train",
"index": 5937,
"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\nIn April 2008, Aizuwakamatsu City succeeded in making yakitori with a length of 20 m 85 cm. The chicken used at this time is Aizu local chicken, which is a specialty of Aizu. Aizu local chicken is very delicious, but it i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"48 9297 240 126 32\\\\n20 3010 157 141 7\\\\n30 117002 5680 962 15\\\\n8 1673 1712 190 22\\\\n64 8478 87 54 307\\\\n23 5477 117 92 12\\\\n50 7558 1396 187 17\\\\n279 88677 2825 514 14\\\\n0\\\", \\\"output\\\": \\\"28 20\... | {
"split": "train",
"index": 5938,
"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\nAtCoDeer the deer is seeing a quick report of election results on TV.\nTwo candidates are standing for the election: Takahashi and Aoki.\nThe report shows the ratio of the current numbers of votes the two candidates have ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 3\\\\n1 1\\\\n3 2\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 1\\\\n1 1\\\\n1 5\\\\n1 100\\\\n\\\", \\\"output\\\": \\\"101\\\\n\\\"}, {\\\"type\\\":... | {
"split": "train",
"index": 5939,
"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\nWelcome to Codeforces Stock Exchange! We're pretty limited now as we currently allow trading on one stock, Codeforces Ltd. We hope you'll still be able to make profit from the market!\n\nIn the morning, there are $n$ oppo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 4 11\\\\n4 2 5\\\\n4 4 5 4\\\\n\\\", \\\"output\\\": \\\"26\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2 50\\\\n5 7\\\\n4 2\\\\n\\\", \\\"output\\\": \\\"50\\\\n\\\"}, {\\\"type\\\": \\\"stdin_... | {
"split": "train",
"index": 5940,
"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\nArya has n opponents in the school. Each day he will fight with all opponents who are present this day. His opponents have some fighting plan that guarantees they will win, but implementing this plan requires presence of ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n10\\\\n00\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 1\\\\n0100\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\... | {
"split": "train",
"index": 5941,
"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 a sequence of positive integers a_1, a_2, ..., a_{n}. \n\nWhile possible, you perform the following operation: find a pair of equal consecutive elements. If there are more than one such pair, find the leftmo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n5 2 1 1 2 2\\\\n\\\", \\\"output\\\": \\\"2\\\\n5 4 \\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1000000000 1000000000 1000000000 1000000000\\\\n\\\", \\\"output\\\": \\\"1\\\\n1000000002 \\\... | {
"split": "train",
"index": 5942,
"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\nLet us define the FizzBuzz sequence a_1,a_2,... as follows:\n - If both 3 and 5 divides i, a_i=\\mbox{FizzBuzz}.\n - If the above does not hold but 3 divides i, a_i=\\mbox{Fizz}.\n - If none of the above holds but 5 divid... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15\\\\n\\\", \\\"output\\\": \\\"60\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000000\\\\n\\\", \\\"output\\\": \\\"266666333332\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 5943,
"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 positive integer X is said to be a lunlun number if and only if the following condition is satisfied:\n - In the base ten representation of X (without leading zeros), for every pair of two adjacent digits, the absolute ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"15\\\\n\\\", \\\"output\\\": \\\"23\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"13\\\\n\\\", \\\"... | {
"split": "train",
"index": 5944,
"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\nWrite a program which reads a $n \\times m$ matrix $A$ and a $m \\times l$ matrix $B$, and prints their product, a $n \\times l$ matrix $C$. An element of matrix $C$ is obtained by the following formula:\n\n\\\\[ c_{ij} =... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 3\\\\n1 2\\\\n0 3\\\\n4 5\\\\n1 2 1\\\\n1 3 2\\\", \\\"output\\\": \\\"3 8 5\\\\n3 9 6\\\\n9 23 14\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 2 3\\\\n1 2\\\\n1 3\\\\n4 5\\\\n1 2 1\\\\n1 3 2\\... | {
"split": "train",
"index": 5945,
"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\nThere is a set of cards with positive integers written on them. Stack the cards to make several piles and arrange them side by side. Select two adjacent piles of cards from them, and stack the left pile on top of the righ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3 5\\\\n2 16\\\\n5 4\\\", \\\"output\\\": \\\"760\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n2 5\\\\n2 16\\\\n5 4\\\", \\\"output\\\": \\\"720\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout... | {
"split": "train",
"index": 5946,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nAika's house runs a small coffee shop. The scones baked by Aika's mother were very delicious and the shop was very prosperous.\n\nOne of the jobs of Aika, a waitress, is to deliver the scones that are baked one after anot... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 11\\\\n11 27 34 45 56\\\\n8 5\\\\n0 2 1 5 4 6 8 3\\\\n5 2\\\\n2 4 2 4 6\\\\n10 18\\\\n10 15 12 31 12 50 11 11 43 181\\\\n1 100\\\\n5\\\\n0 0\\\", \\\"output\\\": \\\"8\\\\n4\\\\n0\\\\n16\\\\n5\\\\n\\\"}, {\\\"type\\\": ... | {
"split": "train",
"index": 5947,
"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,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nVasya became interested in bioinformatics. He's going to write an article about similar cyclic DNA sequences, so he invented a new method for determining the similarity of cyclic sequences.\n\nLet's assume that strings s ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\nC\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\nAG\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n... | {
"split": "train",
"index": 5948,
"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,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N children in AtCoder Kindergarten. Mr. Evi will arrange the children in a line, then give 1 candy to the first child in the line, 2 candies to the second child, ..., N candies to the N-th child. How many candie... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n\\\", \\\"output\\\": \\\"55\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\", \\\"o... | {
"split": "train",
"index": 5949,
"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 kindergarten teacher Natalia Pavlovna has invented a new ball game. This game not only develops the children's physique, but also teaches them how to count. \n\nThe game goes as follows. Kids stand in circle. Let's agre... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n\\\", \\\"output\\\": \\\"2 4 1 5 4 \\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\n\\\", \\\"output\\\": \\\"2 4 7 2 7 4 2 1 \\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"25\\\... | {
"split": "train",
"index": 5950,
"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 have full control over a robot that walks around in a rectangular field paved with square tiles like a chessboard. There are m columns of tiles from west to east, and n rows of tiles from south to north (1 <= m, n <= ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 5\\\\nFORWARD 3\\\\nRIGHT\\\\nFORWARD 5\\\\nLEFT\\\\nBACKWARD 2\\\\nSTOP\\\\n5 1\\\\nFORWARD 2\\\\nSTOP\\\\n0 0\\\", \\\"output\\\": \\\"6 2\\\\n1 1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 5... | {
"split": "train",
"index": 5951,
"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\nWe have a 3×3 square grid, where each square contains a lowercase English letters.\nThe letter in the square at the i-th row from the top and j-th column from the left is c_{ij}.\nPrint the string of length 3 that can be ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ant\\\\nobe\\\\nrec\\\\n\\\", \\\"output\\\": \\\"abc\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"edu\\\\ncat\\\\nion\\\\n\\\", \\\"output\\\": \\\"ean\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\"... | {
"split": "train",
"index": 5952,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp is very careful. He even types numeric sequences carefully, unlike his classmates. If he sees a sequence without a space after the comma, with two spaces in a row, or when something else does not look neat, he ru... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1... | {
"split": "train",
"index": 5953,
"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 survived several months of exam wars and were able to enter ICPC University on a sunny day. On the day of admission, there was an enthusiastic recruitment of circles on the campus of the university, and you received a... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\n256\\\\n0\\\", \\\"output\\\": \\\"2\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"9\\\\n160\\\\n0\\\", \\\"output\\\": \\\"2\\\\n1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inpu... | {
"split": "train",
"index": 5954,
"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\nWe have an undirected graph G with N vertices numbered 1 to N and N edges as follows:\n - For each i=1,2,...,N-1, there is an edge between Vertex i and Vertex i+1.\n - There is an edge between Vertex X and Vertex Y.\nFor ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2 4\\\\n\\\", \\\"output\\\": \\\"5\\\\n4\\\\n1\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 1 3\\\\n\\\", \\\"output\\\": \\\"3\\\\n0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in... | {
"split": "train",
"index": 5955,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nDwarfs have planted a very interesting plant, which is a triangle directed \"upwards\". This plant has an amusing feature. After one year a triangle plant directed \"upwards\" divides into four triangle plants: three of t... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"7\\\\n\\\", \\\"output\\\": \\\"8256\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"84324827171274022\\\\n\\\", \\\"output\\\": \\\"462535280\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\... | {
"split": "train",
"index": 5956,
"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\nFind the least common multiple (LCM) of given n integers.\n\nConstraints\n\n* 2 ≤ n ≤ 10\n* 1 ≤ ai ≤ 1000\n* Product of given integers ai(i = 1, 2, ... n) does not exceed 231-1\n\nInput\n\n\nn\na1 a2 ... an\n\n\nn is give... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\n1 2 5 5\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3 4 3\\\", \\\"output\\\": \\\"12\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\... | {
"split": "train",
"index": 5957,
"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\nGotou just received a dictionary. However, he doesn't recognize the language used in the dictionary. He did some analysis on the dictionary and realizes that the dictionary contains all possible diverse words in lexicogra... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"redocta\\\", \\\"output\\\": \\\"redoctab\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"azcdefghijklmnopqrstuvwbyx\\\", \\\"output\\\": \\\"azcdefghijklmnopqrstuvwx\\\\n\\\"}, {\\\"type\\\": \\\"stdin... | {
"split": "train",
"index": 5958,
"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\nIn this problem we consider a special type of an auction, which is called the second-price auction. As in regular auction n bidders place a bid which is price a bidder ready to pay. The auction is closed, that is, each bi... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n5 7\\\\n\\\", \\\"output\\\": \\\"2 5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n10 2 8\\\\n\\\", \\\"output\\\": \\\"1 8\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": ... | {
"split": "train",
"index": 5959,
"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\nCat Snuke is learning to write characters.\nToday, he practiced writing digits 1 and 9, but he did it the other way around.\nYou are given a three-digit integer n written by Snuke.\nPrint the integer obtained by replacing... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"119\\\\n\\\", \\\"output\\\": \\\"991\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"999\\\\n\\\", \\\"output\\\": \\\"111\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"191\\\\n\\\... | {
"split": "train",
"index": 5960,
"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\nYour task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.\n\nThe tex... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"Thank you for your mail amd your lectures\\\", \\\"output\\\": \\\"your lectures\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"ahTnk you for your mail and your serutcel\\\", \\\"output\\\": \\\"your s... | {
"split": "train",
"index": 5961,
"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\nPolycarpus takes part in the \"Field of Wonders\" TV show. The participants of the show have to guess a hidden word as fast as possible. Initially all the letters of the word are hidden.\n\nThe game consists of several tu... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\\na**d\\\\n2\\\\nabcd\\\\nacbd\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nlo*er\\\\n2\\\\nlover\\\\nloser\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"t... | {
"split": "train",
"index": 5962,
"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\nIn Berland the opposition is going to arrange mass walking on the boulevard. The boulevard consists of n tiles that are lain in a row and are numbered from 1 to n from right to left. The opposition should start walking on... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"50\\\\n14 4 20 37 50 46 19 20 25 47 10 6 34 12 41 47 9 22 28 41 34 47 40 12 42 9 4 15 15 27 8 38 9 4 17 8 13 47 7 9 38 30 48 50 7 41 34 23 11 16\\\\n\\\", \\\"output\\\": \\\"9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\... | {
"split": "train",
"index": 5963,
"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\nPetya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.\... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"14\\\\n44444447777000\\\\n\\\", \\\"output\\\": \\\"NO\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n33\\\\n\\\", \\\"output\\\": \\\"NO\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 5964,
"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\nWe have a string S consisting of uppercase English letters. Additionally, an integer N will be given.\nShift each character of S by N in alphabetical order (see below), and print the resulting string.\nWe assume that A fo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\nABCXYZ\\\\n\\\", \\\"output\\\": \\\"CDEZAB\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0\\\\nABCXYZ\\\\n\\\", \\\"output\\\": \\\"ABCXYZ\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"in... | {
"split": "train",
"index": 5965,
"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\nWhile purchasing certain items, a discount of 10% is offered if the quantity purchased is more than 1000. \nIf the quantity and price per item are input, write a program to calculate the total expenses.\n\n------ Input Fo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 \\\\n100 120\\\\n10 20\\\\n1200 20\\\\n\\\", \\\"output\\\": \\\"12000.000000\\\\n200.000000\\\\n21600.000000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 \\\\n100 120\\\\n10 20\\\\n1200 40\\\", ... | {
"split": "train",
"index": 5966,
"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\nOne beautiful July morning a terrible thing happened in Mainframe: a mean virus Megabyte somehow got access to the memory of his not less mean sister Hexadecimal. He loaded there a huge amount of n different natural numbe... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"100\\\\n\\\", \\\"output\\\": \\\"4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1010011\\\\n\\\", \\\"output\\\": \\\"83\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\\n\\\"... | {
"split": "train",
"index": 5967,
"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\nHere is a very simple variation of the game backgammon, named “Minimal Backgammon”. The game is played by only one player, using only one of the dice and only one checker (the token used by the player).\n\nThe game board ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6 1 0 0\\\\n7 1 0 0\\\\n7 2 0 0\\\\n6 6 1 1\\\\n2\\\\n5\\\\n7 10 0 6\\\\n2\\\\n2\\\\n3\\\\n4\\\\n5\\\\n6\\\\n0 0 0 0\\\", \\\"output\\\": \\\"0.166667\\\\n0.000000\\\\n0.166667\\\\n0.619642\\\\n0.201206\\\\n\\\"}, {\\\"ty... | {
"split": "train",
"index": 5968,
"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,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a kangaroo at coordinate 0 on an infinite number line that runs from left to right, at time 0. During the period between time i-1 and time i, the kangaroo can either stay at his position, or perform a jump of len... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"12\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"19\\\", \\\"output\\\": \\\"... | {
"split": "train",
"index": 5969,
"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\nPolar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got hold of lots of wooden cubes somewhere. They started making cube towers by placing the cubes one on top of the o... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"53 3\\\\n1 3 4 4 5 7 10 14 19 25 32 40 49 59 70 82 95 109 124 140 157 175 194 214 235 257 280 304 329 355 382 410 439 469 500 532 565 599 634 670 707 745 784 824 865 907 950 994 1039 1085 1132 1180 1229\\\\n1 2 40\\\\n\\\... | {
"split": "train",
"index": 5970,
"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\nYou will turn on the air conditioner if, and only if, the temperature of the room is 30 degrees Celsius or above.\nThe current temperature of the room is X degrees Celsius. Will you turn on the air conditioner?\n\n-----Co... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"25\\\\n\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"30\\\\n\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"40\\\\n\\\", \... | {
"split": "train",
"index": 5971,
"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\nWrite a program which counts and reports the number of each alphabetical letter. Ignore the case of characters.\n\nConstraints\n\n* The number of characters in the sentence < 1200\n\nInput\n\nA sentence in English is give... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"This is ` pen.\\\", \\\"output\\\": \\\"a : 0\\\\nb : 0\\\\nc : 0\\\\nd : 0\\\\ne : 1\\\\nf : 0\\\\ng : 0\\\\nh : 1\\\\ni : 2\\\\nj : 0\\\\nk : 0\\\\nl : 0\\\\nm : 0\\\\nn : 1\\\\no : 0\\\\np : 1\\\\nq : 0\\\\nr : 0\\\\ns... | {
"split": "train",
"index": 5972,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThe string $s$ is given, the string length is odd number. The string consists of lowercase letters of the Latin alphabet.\n\nAs long as the string length is greater than $1$, the following operation can be performed on it... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\nabcde\\\\nc\\\\nabcde\\\\nb\\\\nx\\\\ny\\\\naaaaaaaaaaaaaaa\\\\na\\\\ncontest\\\\nt\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nNO\\\\nYES\\\\nYES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 5973,
"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\nAndi and Budi were given an assignment to tidy up their bookshelf of $n$ books. Each book is represented by the book title — a string $s_i$ numbered from $1$ to $n$, each with length $m$. Andi really wants to sort the boo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\nAA\\\\nAB\\\\nBB\\\\nBA\\\\nAZ\\\\n\\\", \\\"output\\\": \\\"5 2 1 3 4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 2\\\\nAA\\\\nAB\\\\nBB\\\\nBA\\\\nZA\\\\n\\\", \\\"output\\\": \\\"2 1 3 ... | {
"split": "train",
"index": 5974,
"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\nHr0d1y has $q$ queries on a binary string $s$ of length $n$. A binary string is a string containing only characters '0' and '1'.\n\nA query is described by a pair of integers $l_i$, $r_i$ $(1 \\leq l_i \\lt r_i \\leq n)$.... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n6 3\\\\n001000\\\\n2 4\\\\n1 3\\\\n3 5\\\\n4 2\\\\n1111\\\\n1 4\\\\n2 3\\\\n\\\", \\\"output\\\": \\\"YES\\\\nNO\\\\nYES\\\\nNO\\\\nYES\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n6 3\\\... | {
"split": "train",
"index": 5975,
"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\nTo write a research paper, you should definitely follow the structured format. This format, in many cases, is strictly defined, and students who try to write their papers have a hard time with it.\n\nOne of such formats i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 1 3 5 6\\\\n3\\\\n7 8 9\\\\n0\\\", \\\"output\\\": \\\"1 1 3 5-6\\\\n7-9\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 1 6 5 6\\\\n3\\\\n7 8 9\\\\n0\\\", \\\"output\\\": \\\"1 1 6 5-6\... | {
"split": "train",
"index": 5976,
"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\nFor given an integer $n$, print all permutations of $\\\\{1, 2, ..., n\\\\}$ in lexicographic order.\n\nConstraints\n\n* $1 \\leq n \\leq 9$\n\nInput\n\nAn integer $n$ is given in a line.\n\nOutput\n\nPrint each permutati... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4\\\", \\\"output\\\": \\\"1 2 3 4\\\\n1 2 4 3\\\\n1 3 2 4\\\\n1 3 4 2\\\\n1 4 2 3\\\\n1 4 3 2\\\\n2 1 3 4\\\\n2 1 4 3\\\\n2 ... | {
"split": "train",
"index": 5977,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nToday an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya!\n\nSonya is an owl and she sleeps during the day and stay awake from minute l_1 to minute r_1 inclusive. Also,... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 10 9 20 1\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 100 50 200 75\\\\n\\\", \\\"output\\\": \\\"50\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"... | {
"split": "train",
"index": 5978,
"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 are two integer sequences of N elements each: A_1,...,A_N and B_1,...,B_N. Determine if it is possible to do the following operation at most N-2 times (possibly zero) so that, for every integer i from 1 to N, A_i \\... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 3 3\\\\n2 2 2\\\", \\\"output\\\": \\\"No\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n1 3 2\\\\n2 2 3\\\", \\\"output\\\": \\\"Yes\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"i... | {
"split": "train",
"index": 5979,
"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\nThe Little Elephant has got a problem — somebody has been touching his sorted by non-decreasing array a of length n and possibly swapped some elements of the array.\n\nThe Little Elephant doesn't want to call the police u... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n4 4 4 4 10 4 4 4 4 4\\\\n\\\", \\\"output\\\": \\\"YES\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n1 3 2 3 3\\\\n\\\", \\\"output\\\": \\\"YES\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"... | {
"split": "train",
"index": 5980,
"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\nMonocarp is the coach of the Berland State University programming teams. He decided to compose a problemset for a training session for his teams.\n\nMonocarp has $n$ problems that none of his students have seen yet. The $... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n4\\\\n2 4\\\\n3 4\\\\n2 1\\\\n1 3\\\\n5\\\\n1 5\\\\n2 4\\\\n3 3\\\\n4 2\\\\n5 1\\\\n\\\", \\\"output\\\": \\\"3\\\\n10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2\\\\n4\\\\n2 4\\\\n3 4\\\\n2... | {
"split": "train",
"index": 5981,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nShortest Common Non-Subsequence\n\nA subsequence of a sequence $P$ is a sequence that can be derived from the original sequence $P$ by picking up some or no elements of $P$ preserving the order. For example, \"ICPC\" is a... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0101\\\\n1101001\\\", \\\"output\\\": \\\"0000\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"0101\\\\n1100000\\\", \\\"output\\\": \\\"111\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\"... | {
"split": "train",
"index": 5982,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nFurik loves math lessons very much, so he doesn't attend them, unlike Rubik. But now Furik wants to get a good mark for math. For that Ms. Ivanova, his math teacher, gave him a new task. Furik solved the task immediately.... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"247 499\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"18 198\\\\n\\\", \\\"output\\\": \\\"1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n\\\", \\\"... | {
"split": "train",
"index": 5983,
"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\nSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in education, Katanobu Matsudaira, the lord ... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"16\\\\n10 8\\\\n2 2\\\\n2 5\\\\n2 7\\\\n3 3\\\\n3 8\\\\n4 2\\\\n4 5\\\\n4 8\\\\n6 4\\\\n6 7\\\\n7 5\\\\n7 8\\\\n8 1\\\\n8 4\\\\n9 6\\\\n10 3\\\\n4 3\\\\n8\\\\n6 4\\\\n1 2\\\\n2 1\\\\n2 4\\\\n3 4\\\\n4 2\\\\n5 3\\\\n6 1\\\... | {
"split": "train",
"index": 5984,
"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\nproblem\n\nThere are many $ N $ colored balls of different weights in the queue. The queue is in ascending order from the beginning: $ 1,2,3, \\ dots, N-1, N, 1,2,3, \\ dots, N-1, N, 1,2,3, \\ dots $ The balls are lined u... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 2\\\\n23 85 57 13 91 41 79 41\\\", \\\"output\\\": \\\"194\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"8 2\\\\n23 94 57 13 91 41 79 41\\\", \\\"output\\\": \\\"203\\\\n\\\"}, {\\\"type\\\": \\\"st... | {
"split": "train",
"index": 5985,
"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\nOne not particularly beautiful evening Valera got very bored. To amuse himself a little bit, he found the following game.\n\nHe took a checkered white square piece of paper, consisting of n × n cells. After that, he start... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1\\\\n1 1\\\\n\\\", \\\"output\\\": \\\"-1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1000 1\\\\n542 374\\\\n\\\", \\\"output\\\": \\\"-1\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 5986,
"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\nThis is a simplified version of the task Toy Train. These two versions differ only in the constraints. Hacks for this version are disabled.\n\nAlice received a set of Toy Train™ from Bob. It consists of one train and a co... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 7\\\\n2 4\\\\n5 1\\\\n2 3\\\\n3 4\\\\n4 1\\\\n5 3\\\\n3 5\\\\n\\\", \\\"output\\\": \\\"10 9 10 10 9 \\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 3\\\\n1 2\\\\n1 2\\\\n1 2\\\\n\\\", \\\"output\\... | {
"split": "train",
"index": 5987,
"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,
1,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nThose days, many boys use beautiful girls' photos as avatars in forums. So it is pretty hard to tell the gender of a user at the first glance. Last year, our hero went to a forum and had a nice chat with a beauty (he thou... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"wjmzbmr\\\\n\\\", \\\"output\\\": \\\"CHAT WITH HER!\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"xiaodao\\\\n\\\", \\\"output\\\": \\\"IGNORE HIM!\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\... | {
"split": "train",
"index": 5988,
"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\nChefs from all over the globe gather each year for an international convention. Each chef represents some country. Please, note that more than one chef can represent a country.\nEach of them presents their best dish to th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 3\\\\nLeibniz Germany\\\\nLeibniz\\\\nLeibniz\\\\nLeibniz\\\\n\\\", \\\"output\\\": \\\"Germany\\\\nLeibniz\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 5\\\\nRamanujan India\\\\nTorricelli Italy... | {
"split": "train",
"index": 5989,
"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\nFind the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k.\n\n\n-----Input-----\n\nThe only line contains thre... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 10\\\\n\\\", \\\"output\\\": \\\"10\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 -4 4\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"1 1 1\\\... | {
"split": "train",
"index": 5990,
"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 Fair Nut likes kvass very much. On his birthday parents presented him $n$ kegs of kvass. There are $v_i$ liters of kvass in the $i$-th keg. Each keg has a lever. You can pour your glass by exactly $1$ liter pulling th... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 3\\\\n4 3 5\\\\n\\\", \\\"output\\\": \\\"3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 4\\\\n5 3 4\\\\n\\\", \\\"output\\\": \\\"2\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\":... | {
"split": "train",
"index": 5991,
"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\nLinear Kingdom has exactly one tram line. It has n stops, numbered from 1 to n in the order of tram's movement. At the i-th stop ai passengers exit the tram, while bi passengers enter it. The tram is empty before it arriv... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5\\\\n0 0\\\\n0 0\\\\n0 0\\\\n0 0\\\\n0 0\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"10\\\\n0 1\\\\n1 0\\\\n0 0\\\\n0 0\\\\n0 0\\\\n0 1\\\\n1 1\\\\n0 1\\\\n1 0\\\\n1... | {
"split": "train",
"index": 5992,
"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 have $n \\times n$ square grid and an integer $k$. Put an integer in each cell while satisfying the conditions below. All numbers in the grid should be between $1$ and $k$ inclusive. Minimum number of the $i$-th row... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"2 2\\\\n\\\", \\\"output\\\": \\\"7\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"123 456789\\\\n\\\", \\\"output\\\": \\\"689974806\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"... | {
"split": "train",
"index": 5993,
"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\nLittle town Nsk consists of n junctions connected by m bidirectional roads. Each road connects two distinct junctions and no two roads connect the same pair of junctions. It is possible to get from any junction to any oth... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 4 1 5\\\\n1 2\\\\n2 3\\\\n3 4\\\\n4 5\\\\n\\\", \\\"output\\\": \\\"0\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"5 4 3 5\\\\n1 2\\\\n2 3\\\\n3 4\\\\n4 5\\\\n\\\", \\\"output\\\": \\\"5\\\\n\\\"},... | {
"split": "train",
"index": 5994,
"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,
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\nSereja loves number sequences very much. That's why he decided to make himself a new one following a certain algorithm.\n\nSereja takes a blank piece of paper. Then he starts writing out the sequence in m stages. Each tim... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1 1\\\\n1 2\\\\n2 2 1\\\\n1 3\\\\n2 5 2\\\\n1 4\\\\n16\\\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\\\\n\\\", \\\"output\\\": \\\"1 2 1 2 3 1 2 1 2 3 1 2 1 2 3 4\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"inp... | {
"split": "train",
"index": 5995,
"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\nAlice is playing with some stones.\n\nNow there are three numbered heaps of stones. The first of them contains $a$ stones, the second of them contains $b$ stones and the third of them contains $c$ stones.\n\nEach time she... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n3 4 5\\\\n1 0 5\\\\n5 3 2\\\\n\\\", \\\"output\\\": \\\"9\\\\n0\\\\n6\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"64\\\\n0 0 0\\\\n0 0 1\\\\n0 0 2\\\\n0 0 3\\\\n0 1 0\\\\n0 1 1\\\\n0 1 2\\\\n0... | {
"split": "train",
"index": 5996,
"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\nRecently Luba learned about a special kind of numbers that she calls beautiful numbers. The number is called beautiful iff its binary representation consists of k + 1 consecutive ones, and then k consecutive zeroes.\n\nSo... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3\\\\n\\\", \\\"output\\\": \\\"1\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"992\\\\n\\\", \\\"output\\\": \\\"496\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"81142\\\\n\\\",... | {
"split": "train",
"index": 5997,
"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\nRidbit starts with an integer $n$.\n\nIn one move, he can perform one of the following operations:\n\ndivide $n$ by one of its proper divisors, or\n\nsubtract $1$ from $n$ if $n$ is greater than $1$.\n\nA proper divisor i... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1\\\\n2\\\\n3\\\\n4\\\\n6\\\\n9\\\\n\\\", \\\"output\\\": \\\"0\\\\n1\\\\n2\\\\n2\\\\n2\\\\n3\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"6\\\\n1\\\\n2\\\\n3\\\\n4\\\\n6\\\\n16\\\\n\\\", \\\"o... | {
"split": "train",
"index": 5998,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
... |
primeintellect | [
{
"content": "Solve the following coding problem using the programming language python:\n\nArkady coordinates rounds on some not really famous competitive programming platform. Each round features $n$ problems of distinct difficulty, the difficulties are numbered from $1$ to $n$.\n\nTo hold a round Arkady needs... | code | {
"style": "rule",
"ground_truth": "\"[{\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"3 11\\\\n2 3 1 2 2 2 3 2 2 3 1\\\\n\\\", \\\"output\\\": \\\"00100000001\\\\n\\\"}, {\\\"type\\\": \\\"stdin_stdout\\\", \\\"input\\\": \\\"4 8\\\\n4 1 3 3 2 3 3 3\\\\n\\\", \\\"output\\\": \\\"00001000\\\\n\\\"}, {\\\"ty... | {
"split": "train",
"index": 5999,
"reference": null,
"knowledge_emb": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.