context listlengths 1 1 | gen_kwargs dict | repeat_idx int64 0 0 | request_idx int64 20 21 | task_name stringclasses 1
value | metadata dict | model_outputs stringclasses 2
values |
|---|---|---|---|---|---|---|
[
{
"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 that consists of digits from 0 to 9.\nA string t is called a semi-repetitive if there is at most one consecutive pair of the... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 0,
"temperature": 0.7
} | 0 | 20 | LiveCodeBench | {
"expected_answer": "",
"problem_id": "",
"reference_solution": ""
} | for 0 <= i < s.length
Here is a Python solution that uses a sliding window approach to find the longest semi-repetitive substring:
```
def longest_semi_repetitive_substring(s):
max_len = 0
for i in range(len(s)):
for j in range(i + 1, len(s) + 1):
substring = s[i:j]
if len(set(... |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, moving clockwi... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 0,
"temperature": 0.7
} | 0 | 21 | LiveCodeBench | {
"expected_answer": "",
"problem_id": "",
"reference_solution": ""
} |
1 <= k <= n <= 50
The game is guaranteed to be finished.
Here is the Python code that generates the function:
```python
def findFriendsWhoLost(n, k):
friends = list(range(1, n+1))
losers = set()
for i in range(n):
if i % k == 0:
losers.add(friends.pop(0))
else:
frie... |
No dataset card yet
- Downloads last month
- 4