Dataset Viewer
Auto-converted to Parquet Duplicate
context
listlengths
1
1
gen_kwargs
dict
repeat_idx
int64
0
0
request_idx
int64
0
15
task_name
stringclasses
1 value
metadata
dict
model_outputs
stringlengths
58
3.29k
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are three cards with letters $\\texttt{a}$, $\\texttt{b}$, $\\texttt{c}$ placed in a row in some order. You can ...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
0
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def check_cards(s): if s == "abc": return "YES" elif s == "acb": return "YES" elif s == "bac": return "YES" elif s == "bca": return "NO" elif s == "cab": return "NO" elif s == "cba": return "YES" t = int(input()) for _ in range(t): s = input(...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Slavic is preparing a present for a friend's birthday. He has an array $a$ of $n$ digits and the present will be the p...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
1
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def max_product(): import sys input = sys.stdin.read data = input().split() t = int(data[0]) index = 1 for _ in range(t): n = int(data[index]) index += 1 a = list(map(int, data[index:index + n])) index += n max_product = 1 for i in range(n): ...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given a strip of paper $s$ that is $n$ cells long. Each cell is either black or white. In an operation you can...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
2
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
In the fourth test case you can perform the following operations: $$\texttt{B}\color{red}{\texttt{BBBBB}} \to \color{red}{\texttt{BBBBB}}\texttt{B} \to \texttt{WWWWWWWW}$$ In the fifth test case you can perform the following operations: $$\color{red}{\texttt{B}}\texttt{W}\color{red}{\texttt{B}}\texttt{W}\color{red}{...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given a string $s$ of length $n$, consisting of lowercase Latin letters, and an integer $k$.\n\nYou need to ch...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
3
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
Here's the Python function to solve the given problem: ```python def can_form_palindrome(): import sys input = sys.stdin.read data = input().split() t = int(data[0]) index = 1 for _ in range(t): n, k = int(data[index]), int(data[index + 1]) index += 2 s = data...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given an array of integers $a_1, a_2, \\ldots, a_n$ and a number $k$ ($2 \\leq k \\leq 5$). In one operation, ...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
4
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
To solve the given problem, we need to determine the minimum number of operations required to make the product of the array elements divisible by \(k\). The key is to identify the number of elements that are not contributing to the divisibility of the product by \(k\), and then calculate the operations needed to make ...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Vanya and Vova are playing a game. Players are given an integer $n$. On their turn, the player can add $1$ to the curr...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
5
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
To solve the given problem, we need to determine the winner based on the given rules. Here is the Python function that implements the logic for determining the winner based on the integer \( n \): ```python def determine_winner(n): # If n is already divisible by 3, Vanya wins immediately if n % 3 == 0: ...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Alex is participating in the filming of another video of BrMeast, and BrMeast asked Alex to prepare 250 thousand tons ...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
6
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
Here's the Python function to solve the given problem: ```python def max_weight_difference(): import sys input = sys.stdin.read data = input().split() t = int(data[0]) index = 1 results = [] for _ in range(t): n = int(data[index]) index += 1 weights = [int...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.A subarray is a continuous part of array.\n\nYarik recently found an array $a$ of $n$ elements and became very interes...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
7
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
Here's the Python function to solve the problem as described: ```python def max_alternating_subarray_sum(): import sys input = sys.stdin.read data = input().split() t = int(data[0]) results = [] for i in range(0, len(data), 4): n = int(data[i+1]) a = list(map(int, data[i+2:i+2+...
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Yarik is a big fan of many kinds of music. But Yarik loves not only listening to music but also writing it. He likes e...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
8
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def count_equal_combinations(): import sys input = sys.stdin.read inputs = input().split() t = int(inputs[0]) index = 1 results = [] for _ in range(t): n = int(inputs[index]) index += 1 a = list(map(int, inputs[index:index + n])) index += n ...
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 0-indexed array of strings details. Each element of details provides information about a given passenger compressed into a string of length 15....
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
9
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
Here's the Python function to solve the problem: ```python def count_passengers_over_60(details): count = 0 for detail in details: age = int(detail[11:13]) if age > 60: count += 1 return count ```
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 0-indexed 2D integer array nums. Initially, your score is 0. Perform the following operations until the matrix becomes empty:\n\nFrom each row ...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
10
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def maxMatrixScore(nums): Assistant: ```python def maxMatrixScore(nums): score = 0 while nums: max_val = 0 max_row = -1 for i, row in enumerate(nums): max_row_val = max(row) if max_row_val > max_val: max_val = max_row_val max_row...
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 0-indexed integer array nums of length n and an integer k. In an operation, you can choose an element and multiply it by 2.\nReturn the maximum...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
11
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def maxOrAfterOperations(nums: List[int], k: int) -> int:
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 0-indexed integer array nums representing the score of students in an exam. The teacher would like to form one non-empty group of students with...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
12
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
Here's the function body for the given problem: ```python def maxStrength(nums): # Sort the array to handle negative and positive numbers effectively nums.sort() # If all numbers are zero, return 0 if len(nums) == 0: return 0 # Remove all zeros as they don't contribute to the str...
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that each substri...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
13
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
. def minExtraChar(s: str, dictionary: list) -> int: n = len(s) dp = [0] * (n + 1) for i in range(1, n + 1): dp[i] = dp[i - 1] + 1 for word in dictionary: if s.startswith(word, i - len(word)): dp[i] = min(dp[i], dp[i - len(word)]) return dp[n]
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array prices representing the prices of various chocolates in a store. You are also given a single integer money, which represents you...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
14
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def minMoneyLeft(prices, money): ```python def minMoneyLeft(prices, money): min_price1 = min(prices) prices.remove(min_price1) min_price2 = min(prices) total_cost = min_price1 + min_price2 leftover = money - total_cost return leftover if leftover >= 0 else money ```
[ { "content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given two numeric strings num1 and num2 and two integers max_sum and min_sum. We denote an integer x to be good if:\n\nnum1 <= x <= num2\nmin_sum <= di...
{ "do_sample": false, "max_new_tokens": 32768, "seed": 0, "temperature": 0.7 }
0
15
LiveCodeBench
{ "expected_answer": "", "problem_id": "", "reference_solution": "" }
def countGoodIntegers(num1: str, num2: str, min_sum: int, max_sum: int) -> int: To solve this problem, we can use a dynamic programming approach with memoization to count the number of good integers between `num1` and `num2` that satisfy the given constraints. Here's a Python function that implements this approach:...

No dataset card yet

Downloads last month
4