Dataset Viewer
Auto-converted to Parquet Duplicate
task
stringclasses
4 values
dataset
stringclasses
11 values
trajectory
listlengths
1
11
chosen
stringlengths
18
8.89k
rejected
stringlengths
0
7.48k
id
stringlengths
68
69
parent_id
stringlengths
64
64
original_len
int64
0
5
sampled_h_from_original_len
int64
0
4
trajectory_sampled_h_from_original_len_0
listlengths
10
10
trajectory_sampled_h_from_original_len_1
listlengths
10
10
trajectory_sampled_h_from_original_len_0_reward
sequencelengths
5
5
trajectory_sampled_h_from_original_len_1_reward
sequencelengths
5
5
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nMike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. \n\nA palindrome is a string that reads the same backward as forward, for example strings \"z\...
Step 1: This problem asks us to determine if it is possible to change exactly one character in the string to make it a palindrome. Step 2: We can start by iterating through the characters in the string and counting the number of differences between corresponding characters from the beginning and end of the string. St...
Step 1: We need to determine if it is possible to change exactly one character in the string to make it a palindrome. Step 2: We can start by checking if the string is already a palindrome. If it is, then we can change any character to make it a different palindrome. Step 3: If the string is not a palindrome, we nee...
390473b96c1696b6dda5bc62c6f6124651c7cf327c80dfe0aa3ab4f4601dbf7f_1_1
f0c215931a9f22324fc897d6d2fbe6ccb18688bf17cea67c26d259b679173521
0
0
[ { "content": "Write Python code to solve the task:\nMike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. \n\nA palindrome is a string that reads the same backward as forward, for example strings \"z\...
[ { "content": "Write Python code to solve the task:\nMike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. \n\nA palindrome is a string that reads the same backward as forward, for example strings \"z\...
[ 0.125, 0.21875, 0.171875, 0.1787109375, 0.2041015625 ]
[ 0.1455078125, 0.1826171875, 0.1748046875, 0.2060546875, 0.1494140625 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nLocal authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are n people who plan to move to the cities. The wealth of the i of them is equal to ai. Authorities plan to...
Step 1: To solve this problem, we need to find the optimal way to select residents for the two cities. Step 2: The wealth of the residents and the planned number of residents for each city are given as input. Step 3: We need to calculate the maximum possible sum of the arithmetic means of the wealth of the cities' ...
Step 1: To maximize the sum of arithmetic means of the wealth of cities' residents, we need to choose subsets of candidates that result in the largest possible sums for each city. Step 2: One possible approach is to sort the candidates in descending order of wealth and then allocate the first n1 candidates to the fir...
cd5fdca85484ff7376844d2d68760da424f3a758b61b1cc8a9a39eb7de928746_1_1
43c3e928e9f73a40032a89ae07101e437651ba0a0086f0025e503f36e163be5a
0
0
[ { "content": "Write Python code to solve the task:\nLocal authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are n people who plan to move to the cities. The wealth of the i of them is equal to ai. Authorities plan to...
[ { "content": "Write Python code to solve the task:\nLocal authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are n people who plan to move to the cities. The wealth of the i of them is equal to ai. Authorities plan to...
[ 0.1640625, 0.150390625, 0.138671875, 0.1455078125, 0.1328125 ]
[ 0.1025390625, 0.1533203125, 0.1240234375, 0.14453125, 0.150390625 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nLily Aldrin, as the slap bet commissioner, needs to resolve issues regarding slap bets due with Barney and Marshall. She has mandated that there be a fixed period of time in which the slaps may be used.\n\nSo, she draws two lines representing the given two ti...
Step 1: To solve this problem, we need to determine the relationship between the given time slots for Barney and Marshall. Step 2: We can start by reading the input, which contains the time slots and the number of test cases. Step 3: For each test case, we compare the time slots to determine if they are indistinguis...
Step 1: We need to compare the given time slots for Barney and Marshall and determine the relationship between them. Step 2: We can start by identifying the different scenarios based on the input lines (indistinguishable, more than one day, or just one point). Step 3: Once we have the scenarios identified, we can wr...
0266ff70ccd8d3c72cd3ba7708d3b1bc7d675dc5bd24baaca2c6197fb8a42e35_1_1
62abef87aa3ea07083faa1aacc01c97c912d66c8908ced3fb8695bbd6f1625a8
0
0
[ { "content": "Write Python code to solve the task:\nLily Aldrin, as the slap bet commissioner, needs to resolve issues regarding slap bets due with Barney and Marshall. She has mandated that there be a fixed period of time in which the slaps may be used.\n\nSo, she draws two lines representing the given two ti...
[ { "content": "Write Python code to solve the task:\nLily Aldrin, as the slap bet commissioner, needs to resolve issues regarding slap bets due with Barney and Marshall. She has mandated that there be a fixed period of time in which the slaps may be used.\n\nSo, she draws two lines representing the given two ti...
[ 0.1513671875, 0.158203125, 0.1484375, 0.1806640625, 0.201171875 ]
[ 0.1474609375, 0.181640625, 0.197265625, 0.1689453125, 0.17578125 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nCaptain Jack loves tables. He wants to know whether you love tables or not. So he asks you to solve the following problem:\nGiven an array A and element m, you have to find the value up to which table of m is present in the array. (example - if the array is 3 ...
Step 1: To solve this problem, we need to find the value up to which the table of m is present in the array. Step 2: First, we need to read the input which contains the array A and the value of m. Step 3: Then, we check if m is present in the array A. Step 4: If m is not present in A, the answer is 0. Step 5: If m...
Step 1: We need to find the largest value in the array that is divisible by the given value m. Step 2: We can start by iterating through the array and keeping track of the maximum value that is divisible by m. Step 3: If no value is found, we should return 0. Step 4: Let's create a plan to implement the solution ba...
8b2805f4112f3bf8541bb54c630017cb8d92fdfe0c1d40f634e208181f7a29ea_1_1
8bbf5dce0216696b64f4d8e58cffc65c89fc61415a0be0565d49a576cb23f079
0
0
[ { "content": "Write Python code to solve the task:\nCaptain Jack loves tables. He wants to know whether you love tables or not. So he asks you to solve the following problem:\nGiven an array A and element m, you have to find the value up to which table of m is present in the array. (example - if the array is 3 ...
[ { "content": "Write Python code to solve the task:\nCaptain Jack loves tables. He wants to know whether you love tables or not. So he asks you to solve the following problem:\nGiven an array A and element m, you have to find the value up to which table of m is present in the array. (example - if the array is 3 ...
[ 0.1640625, 0.1513671875, 0.15234375, 0.154296875, 0.1474609375 ]
[ 0.1455078125, 0.150390625, 0.1533203125, 0.1708984375, 0.1826171875 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nWe have a board with a 2 \\times N grid. Snuke covered the board with N dominoes without overlaps. Here, a domino can cover a 1 \\times 2 or 2 \\times 1 square.\n\nThen, Snuke decided to paint these dominoes using three colors: red, cyan and green. Two dominoe...
Step 1: The goal is to find the number of ways to paint the dominoes with three colors: red, cyan, and green. Step 2: We need to consider the arrangement of dominoes represented by two strings S_1 and S_2. Step 3: We also need to ensure that adjacent dominoes by side are painted by different colors. Step 4: We can ...
Step 1: We need to calculate the number of ways to paint the dominoes using three colors while ensuring that adjacent dominoes have different colors. Step 2: We can solve this problem using dynamic programming. Step 3: We can start by defining a recursive function to calculate the number of ways to paint the dominoe...
01ba4e9939de89cd231f75a7ace47cebc1dabb9ea1c67509459a8dc5dc1fc51a_1_1
ba69fa6eaccab3fca92273247502dfb1e7b96911aef7113a440ee0b1405c07d3
0
0
[ { "content": "Write Python code to solve the task:\nWe have a board with a 2 \\times N grid. Snuke covered the board with N dominoes without overlaps. Here, a domino can cover a 1 \\times 2 or 2 \\times 1 square.\n\nThen, Snuke decided to paint these dominoes using three colors: red, cyan and green. Two dominoe...
[ { "content": "Write Python code to solve the task:\nWe have a board with a 2 \\times N grid. Snuke covered the board with N dominoes without overlaps. Here, a domino can cover a 1 \\times 2 or 2 \\times 1 square.\n\nThen, Snuke decided to paint these dominoes using three colors: red, cyan and green. Two dominoe...
[ 0.1787109375, 0.173828125, 0.1748046875, 0.1748046875, 0.1611328125 ]
[ 0.1484375, 0.1767578125, 0.1494140625, 0.1455078125, 0.1484375 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nYou are given a chessboard of size 1 × n. It is guaranteed that n is even. The chessboard is painted like this: \"BWBW...BW\".\n\nSome cells of the board are occupied by the chess pieces. Each cell contains no more than one chess piece. It is known that the to...
Step 1: To solve this problem, we can start by analyzing the different patterns of chess pieces on the board and consider how they can be moved to the same-colored cells with the minimum number of moves. Step 2: It seems that pieces on even and odd positions will be moved to cells of different colors. We should write...
Step 1: We need to find the minimum number of moves required to place all the pieces in cells of the same color. Step 2: We can start by finding the positions of the black cells and the white cells. Step 3: Once we have the positions, we can calculate the minimum number of moves required to place all the pieces in t...
f491495ebd3553a87b907464fb6b4af0020a5dfa59afbdb30ec8e4dd01de663c_1_1
284795d03ebe5c69effa1a03ea4f2c2abac1c72831e162197cfaf74d020ea0a6
0
0
[ { "content": "Write Python code to solve the task:\nYou are given a chessboard of size 1 × n. It is guaranteed that n is even. The chessboard is painted like this: \"BWBW...BW\".\n\nSome cells of the board are occupied by the chess pieces. Each cell contains no more than one chess piece. It is known that the to...
[ { "content": "Write Python code to solve the task:\nYou are given a chessboard of size 1 × n. It is guaranteed that n is even. The chessboard is painted like this: \"BWBW...BW\".\n\nSome cells of the board are occupied by the chess pieces. Each cell contains no more than one chess piece. It is known that the to...
[ 0.138671875, 0.1884765625, 0.185546875, 0.1650390625, 0.1533203125 ]
[ 0.142578125, 0.158203125, 0.169921875, 0.134765625, 0.16796875 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nYou have a given integer n. Find the number of ways to fill all 3 × n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.\n\n<image> This picture describes when n = 4. The left one is the shape...
Step 1: To solve this problem, we need to find the number of ways to fill all 3 × n tiles with the given shape without overlapping or leaving empty spaces. Step 2: One approach is to use recursion to generate all possible arrangements of the given shape within the 3 × n area. Step 3: Then we can count the number of ...
Step 1: We need to find the number of ways to fill a 3 x n grid with a specific shape. Step 2: We can approach this problem using dynamic programming and recursion to count the number of possible ways to fill the grid. Step 3: The base case is when n = 1, there are no ways to fill the grid. Step 4: We need to consi...
55f089686c595785744e5796f401cb22e9fdb17fe72c5f558f8494b64ce0763e_1_1
0267eab4f578bb9c85a771ff7a8f4c49a84158e3ce990dd3e322157e850b1962
0
0
[ { "content": "Write Python code to solve the task:\nYou have a given integer n. Find the number of ways to fill all 3 × n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.\n\n<image> This picture describes when n = 4. The left one is the shape...
[ { "content": "Write Python code to solve the task:\nYou have a given integer n. Find the number of ways to fill all 3 × n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.\n\n<image> This picture describes when n = 4. The left one is the shape...
[ 0.1708984375, 0.1826171875, 0.1884765625, 0.1611328125, 0.205078125 ]
[ 0.1748046875, 0.1943359375, 0.19140625, 0.1943359375, 0.15625 ]
Coding
codecontest
[ { "content": "Write Python code to solve the task:\nLong ago during the Jurassic Park age, there was a company TopHunters, which used to conduct hunting competitions for the Dinosaurs around the world. Petrosaurus was believed to be the greatest hunter of that time and all other dinosaurs enjoyed watching the h...
Step 1: To solve this problem, we can write a function that takes a sentence as input and replaces specific words with their corresponding replacements. We need to consider if the words are standalone and not part of a larger word. Step 2: We also need to handle any consecutive spaces present in the input and preserv...
Step 1: We need to create a program that takes a sentence as input and replaces certain words with their corresponding expansions. Step 2: We should read the input and split the sentence into words. Step 3: We then need to iterate through the words and replace the specified words with their expansions. Step 4: We a...
9cd996b016a9335543eceb83a9523b0af8c7c4df36def6d4d86b6c3f7e2f0e28_1_1
8ab8e94f05cae8a36c6023b8df1d8ec482daf39d34d32ceb4170dec17c2f4aa7
0
0
[ { "content": "Write Python code to solve the task:\nLong ago during the Jurassic Park age, there was a company TopHunters, which used to conduct hunting competitions for the Dinosaurs around the world. Petrosaurus was believed to be the greatest hunter of that time and all other dinosaurs enjoyed watching the h...
[ { "content": "Write Python code to solve the task:\nLong ago during the Jurassic Park age, there was a company TopHunters, which used to conduct hunting competitions for the Dinosaurs around the world. Petrosaurus was believed to be the greatest hunter of that time and all other dinosaurs enjoyed watching the h...
[ 0.1982421875, 0.203125, 0.1474609375, 0.193359375, 0.18359375 ]
[ 0.1611328125, 0.18359375, 0.1640625, 0.1552734375, 0.189453125 ]
Coding
codecontest
[{"content":"Write Python code to solve the task:\nWalter White is on a tour to sell meth. There are(...TRUNCATED)
"Step 1: The given solution is reading inputs and solving the problem using loops and manual calcul(...TRUNCATED)
"Step 1: We need to find the cost of traveling between the cities given the cost matrix and the pat(...TRUNCATED)
bb512d72bcc8169eca1b2c24faf91a3c28a0002c3aa8aa9c026895ab00a07289_1_1
09d681d9cf0d40e02eebc42ead01fea6f921659f653cadc52877d3d689fbfdea
0
0
[{"content":"Write Python code to solve the task:\nWalter White is on a tour to sell meth. There are(...TRUNCATED)
[{"content":"Write Python code to solve the task:\nWalter White is on a tour to sell meth. There are(...TRUNCATED)
[ 0.1513671875, 0.1943359375, 0.16796875, 0.1435546875, 0.19140625 ]
[ 0.1494140625, 0.1591796875, 0.154296875, 0.1591796875, 0.1884765625 ]
Coding
codecontest
[{"content":"Write Python code to solve the task:\nN people are waiting in a single line in front of(...TRUNCATED)
"Step 1: The problem requires a program that helps Mr. Takahashi determine the maximum number of pr(...TRUNCATED)
"Step 1: We need to find the maximum number of products Mr. Takahashi can sell, considering the ini(...TRUNCATED)
ac321434143e6d229fb757ecdbe60e4d823899fc523ac62ebe0ed0306b764227_1_1
c66f5312e9e93b6b81cad2c4e88b361f51fddfdde3d9ebbc3d983f9a74b04f35
0
0
[{"content":"Write Python code to solve the task:\nN people are waiting in a single line in front of(...TRUNCATED)
[{"content":"Write Python code to solve the task:\nN people are waiting in a single line in front of(...TRUNCATED)
[ 0.17578125, 0.18359375, 0.1923828125, 0.19140625, 0.1865234375 ]
[ 0.1640625, 0.1845703125, 0.1533203125, 0.201171875, 0.1796875 ]
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5