prompt listlengths 1 1 | data_source stringclasses 1
value | extra_info stringlengths 474 78.7M | reward_model stringclasses 1
value |
|---|---|---|---|
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nThere are some websites that are accessible through several different addresses. For example, for a long time Codeforces was accessible with two hostnames codeforces.com and codeforces.ru.\n\nYou are g... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"10\\nhttp://abacaba.ru/test\\nhttp://abacaba.ru/\\nhttp://abacaba.com\\nhttp://abacaba.com/test\\nhttp://abacaba.de/\\nhttp://abacaba.ru/test\\nhttp://abacaba.de/test\\nhttp://abacaba.com/\\nhttp://abacaba.com/t\\nhttp://abacaba.com/test... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nDreamoon loves summing up something for no reason. One day he obtains two integers a and b occasionally. He wants to calculate the sum of all nice integers. Positive integer x is called nice if $\\oper... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"1 1\\n\", \"output\": \"0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"2 2\\n\", \"output\": \"8\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"4 1\\n\", \"output\": \"0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"4 2\\n\", \"... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nTavak and Seyyed are good friends. Seyyed is very funny and he told Tavak to solve the following problem instead of longest-path.\n\nYou are given l and r. For all integers from l to r, inclusive, we w... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"19 29\\n\", \"output\": \"2\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"3 6\\n\", \"output\": \"2\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"39 91\\n\", \"output\": \"2\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"76 134\\... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\n\"QAQ\" is a word to denote an expression of crying. Imagine \"Q\" as eyes with tears and \"A\" as a mouth.\n\nNow Diamond has given Bort a string consisting of only uppercase English letters of length... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"QAQAQYSYIOIWIN\\n\", \"output\": \"4\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"QAQQQZZYNOIWIN\\n\", \"output\": \"3\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"QA\\n\", \"output\": \"0\\n\"}, {\"type\": \"stdin_stdout\", \"in... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nCodefortia is a small island country located somewhere in the West Pacific. It consists of $n$ settlements connected by $m$ bidirectional gravel roads. Curiously enough, the beliefs of the inhabitants ... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"5 5 20 25\\n1 2 25\\n2 3 25\\n3 4 20\\n4 5 20\\n5 1 20\\n\", \"output\": \"0 25 60 40 20\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"6 7 13 22\\n1 2 13\\n2 3 13\\n1 4 22\\n3 4 13\\n4 5 13\\n5 6 13\\n6 1 13\\n\", \"output\": \"0 13 2... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nPikachu had an array with him. He wrote down all the non-empty subsequences of the array on paper. Note that an array of size n has 2^{n} - 1 non-empty subsequences in it. \n\nPikachu being mischievous... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"10 5\\n\", \"output\": \"6\\n1 1 1 7 13 19 \"}, {\"type\": \"stdin_stdout\", \"input\": \"4 2\\n\", \"output\": \"3\\n1 1 4 \"}, {\"type\": \"stdin_stdout\", \"input\": \"4 1\\n\", \"output\": \"3\\n1 1 3 \"}, {\"type\": \"stdin_stdout\"... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nVasya and Kolya play a game with a string, using the following rules. Initially, Kolya creates a string s, consisting of small English letters, and uniformly at random chooses an integer k from a segme... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"technocup\\n\", \"output\": \"1.000000000000000\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"tictictactac\\n\", \"output\": \"0.333333333333333\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"bbaabaabbb\\n\", \"output\": \"0.1000000... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nIn the evenings Donkey would join Shrek to look at the stars. They would sit on a log, sipping tea and they would watch the starry sky. The sky hung above the roof, right behind the chimney. Shrek's st... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"15\\n1/3 2/1\\n3 1\\n6 2\\n4 2\\n2 5\\n4 5\\n6 6\\n3 4\\n1 6\\n2 1\\n7 4\\n9 3\\n5 3\\n1 3\\n15 5\\n12 4\\n\", \"output\": \"4\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"15\\n2/1 2/0\\n3 1\\n6 2\\n9 3\\n12 4\\n15 5\\n2 1\\n4 2\\n5 ... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nThe Little Elephant has an integer a, written in the binary notation. He wants to write this number on a piece of paper.\n\nTo make sure that the number a fits on the piece of paper, the Little Elephan... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"101\\n\", \"output\": \"11\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"110010\\n\", \"output\": \"11010\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"10000\\n\", \"output\": \"1000\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nIt is so boring in the summer holiday, isn't it? So Alice and Bob have invented a new game to play. The rules are as follows. First, they get a set of n distinct integers. And then they take turns to m... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"2\\n2 3\\n\", \"output\": \"Alice\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"2\\n5 3\\n\", \"output\": \"Alice\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"3\\n5 6 7\\n\", \"output\": \"Bob\\n\"}, {\"type\": \"stdin_stdout\", \... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nMad scientist Mike does not use slow hard disks. His modification of a hard drive has not one, but n different heads that can read data in parallel.\n\nWhen viewed from the side, Mike's hard drive is a... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"3 4\\n2 5 6\\n1 3 6 8\\n\", \"output\": \"2\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"3 3\\n1 2 3\\n1 2 3\\n\", \"output\": \"0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"1 2\\n165\\n142 200\\n\", \"output\": \"81\\n\"}, {\"... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nA schoolboy named Vasya loves reading books on programming and mathematics. He has recently read an encyclopedia article that described the method of median smoothing (or median filter) and its many ap... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"4\\n0 0 1 1\\n\", \"output\": \"0\\n0 0 1 1\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"5\\n0 1 0 1 0\\n\", \"output\": \"2\\n0 0 0 0 0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"3\\n1 0 0\\n\", \"output\": \"0\\n1 0 0\\n\"}, ... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nFor a vector $\\vec{v} = (x, y)$, define $|v| = \\sqrt{x^2 + y^2}$.\n\nAllen had a bit too much to drink at the bar, which is at the origin. There are $n$ vectors $\\vec{v_1}, \\vec{v_2}, \\cdots, \\ve... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"3\\n999999 0\\n0 999999\\n999999 0\\n\", \"output\": \"1 1 -1 \\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"1\\n-824590 246031\\n\", \"output\": \"1 \\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"8\\n-67761 603277\\n640586 -396671... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nLimak is a little bear who loves to play. Today he is playing by destroying block towers. He built n towers in a row. The i-th tower is made of h_{i} identical blocks. For clarification see picture for... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"6\\n2 1 4 6 2 2\\n\", \"output\": \"3\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"7\\n3 3 3 1 3 3 3\\n\", \"output\": \"2\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"7\\n5128 5672 5805 5452 5882 5567 5032\\n\", \"output\": \"4\... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nEighth-grader Vova is on duty today in the class. After classes, he went into the office to wash the board, and found on it the number n. He asked what is this number and the teacher of mathematics Inn... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"21\\n\", \"output\": \"1\\n15\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"20\\n\", \"output\": \"0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"1\\n\", \"output\": \"0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"2\\n\", \"o... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a non-empty string s consisting of lowercase English letters. You have to pick exactly one non-empty substring of s and shift all its letters 'z' $\\rightarrow$ 'y' $\\rightarrow$ 'x' $\\... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"codeforces\\n\", \"output\": \"bncdenqbdr\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"abacaba\\n\", \"output\": \"aaacaba\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"babbbabaababbaa\\n\", \"output\": \"aabbbabaababbaa\\n\"}, {\... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nAfter a wonderful evening in the restaurant the time to go home came. Leha as a true gentlemen suggested Noora to give her a lift. Certainly the girl agreed with pleasure. Suddenly one problem appeared... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"4\\n1 1 1 1 1\\n3 2 5 4 5\\n1 1 5 5 10000\\n1 4 2 5 2\\n\", \"output\": \"1\\n13\\n93\\n0\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"10\\n3 7 4 10 7\\n6 1 7 10 18\\n9 6 10 8 3\\n1 8 3 10 3\\n10 4 10 5 19\\n8 9 9 10 10\\n10 1 10 5 4... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nGennady is one of the best child dentists in Berland. Today n children got an appointment with him, they lined up in front of his office.\n\nAll children love to cry loudly at the reception at the dent... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"5\\n4 2 2\\n4 1 2\\n5 2 4\\n3 3 5\\n5 1 2\\n\", \"output\": \"2\\n1 3 \"}, {\"type\": \"stdin_stdout\", \"input\": \"5\\n4 5 1\\n5 3 9\\n4 1 2\\n2 1 8\\n4 1 9\\n\", \"output\": \"4\\n1 2 4 5 \"}, {\"type\": \"stdin_stdout\", \"input\": \... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nThis problem is the most boring one you've ever seen. \n\nGiven a sequence of integers a_1, a_2, ..., a_{n} and a non-negative integer h, our goal is to partition the sequence into two subsequences (no... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"3 2\\n1 2 3\\n\", \"output\": \"1\\n1 2 2 \\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"5 10\\n0 1 0 2 1\\n\", \"output\": \"3\\n2 2 2 2 2 \\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"9 0\\n11 22 33 44 55 66 77 88 99\\n\", \"out... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nIvan wants to make a necklace as a present to his beloved girl. A necklace is a cyclic sequence of beads of different colors. Ivan says that necklace is beautiful relative to the cut point between two ... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"3\\n4 2 1\\n\", \"output\": \"1\\naabcbaa\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"1\\n4\\n\", \"output\": \"4\\naaaa\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"2\\n1 1\\n\", \"output\": \"0\\nab\\n\"}, {\"type\": \"stdin_s... | deepcoder |
[
{
"role": "user",
"content": "Solve the following coding problem using the programming language python:\n\nRecently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex cover problem very interesting.\n\nSuppose the graph G is given. Subset A of its vertices is called a ... | code | {"dataset": "primeintellect", "tests": "[{\"type\": \"stdin_stdout\", \"input\": \"4 2\\n1 2\\n2 3\\n\", \"output\": \"1\\n2 \\n2\\n1 3 \\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"3 3\\n1 2\\n2 3\\n1 3\\n\", \"output\": \"-1\\n\"}, {\"type\": \"stdin_stdout\", \"input\": \"5 7\\n3 2\\n5 4\\n3 4\\n1 3\\n1 5\\n1 4\... | deepcoder |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 20