task_id
stringclasses
161 values
condition
stringclasses
10 values
entry_point
stringclasses
155 values
code
stringlengths
41
2.13k
spec
stringclasses
161 values
oracle_pass
bool
2 classes
mutation_site
stringclasses
15 values
mutation_from
stringclasses
3 values
difficulty
stringclasses
0 values
contest_date
stringclasses
0 values
judge
stringclasses
5 values
judge_model
stringclasses
5 values
prompt_variant
stringclasses
2 values
rep
int64
0
2
said_correct
bool
2 classes
confidence
int64
0
100
quality
int64
0
5
reason
stringlengths
59
4.93k
json_mode
stringclasses
3 values
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
1
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold by sorting the list and then iterating through it to compare adjacent elements.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
2
true
100
5
The implementation correctly checks for close elements in the list by sorting the numbers and then iterating through the sorted list to find any pairs of numbers that are closer than the given threshold.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
0
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than or equal to the threshold. This approach is efficient and logically sound because if any two numbers are closer than the threshold, they will be adjacent in the sorted list. The examples provided in the specification are sat...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
1
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than or equal to the threshold. This approach is efficient and logically sound: if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The examples provided in the docstring are correctly hand...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
2
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than or equal to the threshold. This approach is efficient and logically sound: if any two numbers are closer than the threshold, they will be adjacent in the sorted list. The examples match: [1.0, 2.0, 3.0] with threshold 0.5 ha...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
claude
anthropic/claude-haiku-4.5
ignore_docs
0
false
85
4
The implementation uses <= instead of < for the threshold comparison. According to the specification, numbers should be 'closer to each other than given threshold', which means the distance should be strictly less than the threshold, not less than or equal to. For example, if two numbers are exactly at the threshold di...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
claude
anthropic/claude-haiku-4.5
ignore_docs
1
false
85
4
The implementation uses <= instead of < for the threshold comparison. According to the specification, numbers should be 'closer to each other than given threshold', which means the distance should be strictly less than the threshold, not less than or equal to. For example, if two numbers are exactly at the threshold di...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
claude
anthropic/claude-haiku-4.5
ignore_docs
2
false
85
4
The implementation uses <= instead of < for the threshold comparison. According to the specification, numbers should be 'closer to each other than given threshold', which means the distance should be strictly less than the threshold, not less than or equal to. For example, if two numbers are exactly at the threshold di...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
ignore_docs
0
true
100
5
The implementation correctly sorts the list and checks consecutive differences, returning True if any difference is less than or equal to the threshold, which matches the specification's examples and logical requirement.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
ignore_docs
1
true
95
4
The implementation correctly sorts the list and checks consecutive differences, which is sufficient to find any pair closer than the threshold, as the minimum distance between any two numbers must be between some consecutive elements in sorted order.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
ignore_docs
2
true
95
4
The implementation correctly sorts the list and checks consecutive differences, which is sufficient to find any pair closer than the threshold, as the minimum distance between any two numbers must be between some consecutive elements in sorted order.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
gpt
openai/gpt-5.1
ignore_docs
0
false
99
4
The implementation uses '<= threshold' instead of '< threshold', so it returns True when two numbers are exactly at the threshold apart, whereas the specification asks for numbers closer than the given threshold (strictly less than). All other aspects (sorting and adjacent difference check) are correct.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
gpt
openai/gpt-5.1
ignore_docs
1
false
96
4
The function uses `<= threshold` instead of strictly `< threshold` to decide closeness, so it returns True when two numbers differ by exactly the threshold, which contradicts the specification that they must be closer than the threshold. Otherwise the logic is sound but does not fully meet the spec.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
gpt
openai/gpt-5.1
ignore_docs
2
false
93
4
The function returns True when any two numbers are at distance less than or equal to the threshold, but the specification examples imply it should be strictly less than the threshold. For input [1.0, 2.0, 3.0] and threshold 1.0, the implementation would return True though 1.0 is not strictly closer than 1.0, so it does...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
ignore_docs
0
true
100
5
The implementation correctly checks for close elements by sorting the list and comparing adjacent elements, and it handles the given test cases as expected.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
ignore_docs
1
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold. It sorts the list of numbers and then iterates through the sorted list, checking the difference between each pair of adjacent numbers. If it finds a pair with a difference less than or equal to th...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
ignore_docs
2
true
1
1
The implementation correctly checks if any two numbers in the list are closer to each other than the given threshold by sorting the list and then iterating over the sorted list to check the difference between adjacent numbers.
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
ignore_docs
0
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than or equal to the threshold. This approach is efficient and logically sound: if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The examples match: [1.0, 2.0, 3.0] with threshold 0.5 ha...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
ignore_docs
1
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than or equal to the threshold. This approach is efficient and logically sound: if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The examples provided in the docstring are correctly hand...
json_schema
HumanEval/0
mut_compare
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
Lt->LtE
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
ignore_docs
2
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than or equal to the threshold. This approach is efficient and logically sound: if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The examples match: [1.0, 2.0, 3.0] with threshold 0.5 ha...
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
claude
anthropic/claude-haiku-4.5
default
0
false
95
2
The implementation has an off-by-one error in the loop range. It uses `range(len(sorted_numbers) - 2)` which skips checking the last pair of adjacent elements. For example, with a 6-element list, it only checks pairs at indices (0,1), (1,2), (2,3), (3,4) but misses (4,5). The correct range should be `range(len(sorted_n...
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
claude
anthropic/claude-haiku-4.5
default
1
false
95
2
The implementation has an off-by-one error in the loop range. It uses `range(len(sorted_numbers) - 2)` which skips checking the last pair of adjacent elements. For example, with a 6-element list, it only checks pairs at indices (0,1), (1,2), (2,3), (3,4) but misses (4,5). The correct range should be `range(len(sorted_n...
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
claude
anthropic/claude-haiku-4.5
default
2
false
95
2
The implementation has an off-by-one error in the loop range. It uses `range(len(sorted_numbers) - 2)` which skips checking the last pair of adjacent elements. For example, with a 6-element list, it only checks pairs at indices (0,1), (1,2), (2,3), (3,4) but misses (4,5). The correct range should be `range(len(sorted_n...
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
0
false
90
2
The implementation incorrectly iterates only up to len(sorted_numbers) - 2, missing the comparison between the last two elements, which can cause false negatives.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
1
false
90
2
The implementation incorrectly iterates only up to len(sorted_numbers) - 2, missing the comparison between the last two elements, which can cause false negatives for valid inputs like [1.0, 1.2] with threshold 0.3.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
2
false
95
2
The implementation incorrectly iterates only up to len(sorted_numbers) - 2, missing the comparison between the last two elements, which can cause false negatives for lists where the last two elements are close.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
gpt
openai/gpt-5.1
default
0
false
93
3
Logic is almost correct but the loop bounds are off by one: it iterates to len(sorted_numbers) - 2 instead of len(sorted_numbers) - 1, so it fails to compare the last adjacent pair in the sorted list and can return False when the only close pair is at the end.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
gpt
openai/gpt-5.1
default
1
true
96
4
The function correctly checks adjacent differences after sorting, which is sufficient to detect any pair of numbers closer than the threshold; the loop bound (len-2) still covers all adjacent pairs, so behavior matches the specification and examples.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
gpt
openai/gpt-5.1
default
2
true
96
5
The implementation correctly checks for any two numbers closer than the threshold by sorting and comparing adjacent elements; the loop bound (len-2) still covers all adjacent pairs, and the behavior matches the specification examples for all valid inputs.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
0
false
1
0
The loop only checks up to the second last element in the sorted list, it should check up to the last element. The correct range should be `range(len(sorted_numbers) - 1)` instead of `range(len(sorted_numbers) - 2)`.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
1
false
0
2
The implementation only checks for adjacent elements in the sorted list up to the second last element, it should check up to the last element.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
2
false
1
0
The loop only checks up to the second last element in the sorted list, it should check up to the last element. The condition in the loop should be `range(len(sorted_numbers) - 1)` instead of `range(len(sorted_numbers) - 2)`.
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
0
false
0
0
The implementation has a bug in the loop range: it uses `range(len(sorted_numbers) - 2)`, which means it only checks pairs up to the second-to-last element, but misses the final adjacent pair (i.e., the last two elements). For example, if the two closest numbers are the last two in the sorted list, the function will in...
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
1
false
0
0
The implementation has a bug in the loop range: it uses `range(len(sorted_numbers) - 2)` which skips the last pair of adjacent elements. For example, in a list of length n, it only checks pairs (0,1), (1,2), ..., (n-3, n-2), but misses the pair (n-2, n-1). This means it could incorrectly return False when there is a cl...
json_schema
HumanEval/0
mut_offbyone
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
int+1
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
2
false
0
0
The implementation has a bug in the loop range. It uses `range(len(sorted_numbers) - 2)`, which means it only checks pairs from index 0 to len-3, missing the last adjacent pair (len-2 and len-1). For example, in a list of 3 elements, it only checks index 0 and 1, but not 1 and 2. It should be `range(len(sorted_numbers)...
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
claude
anthropic/claude-haiku-4.5
default
0
false
95
1
The implementation has a critical bug in the loop range. `range(1 - len(sorted_numbers))` produces an empty range for any list with 2+ elements (e.g., range(-5) for a 6-element list), so the loop never executes and the function always returns False, failing both test cases.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
claude
anthropic/claude-haiku-4.5
default
1
false
95
1
The implementation has a critical bug in the loop range. `range(1 - len(sorted_numbers))` produces an empty range for any list with 2+ elements (e.g., range(-5) for a 6-element list), so the loop never executes and the function always returns False, failing both test cases.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
claude
anthropic/claude-haiku-4.5
default
2
false
95
1
The implementation has a critical bug in the loop range. `range(1 - len(sorted_numbers))` produces an empty range for any list with 2+ elements (e.g., range(-5) for a 6-element list), so the loop never executes and the function always returns False, failing both test cases.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
0
false
95
2
The implementation contains a critical error in the loop range: 'range(1 - len(sorted_numbers))' will produce an empty or incorrect range for typical list lengths, causing the function to always return False and fail the provided test cases.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
1
false
95
1
The implementation contains a critical error in the loop range: 'range(1 - len(sorted_numbers))' will produce an empty or incorrect range for typical list lengths, causing the function to always return False and fail the provided test cases.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
2
false
95
2
The implementation has a critical bug: the loop range 'range(1 - len(sorted_numbers))' is incorrect and will not iterate properly, causing the function to always return False for non-empty lists.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
gpt
openai/gpt-5.1
default
0
false
100
2
The loop range is incorrect (range(1 - len(sorted_numbers)) is empty for non-empty lists), so the function always returns False and does not detect close elements as required by the specification.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
gpt
openai/gpt-5.1
default
1
false
100
2
The loop range is incorrect: range(1 - len(sorted_numbers)) is empty for any non-empty list, so the body never executes and the function always returns False, failing the second example and any case where close elements exist.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
gpt
openai/gpt-5.1
default
2
false
100
2
The loop range is incorrect: range(1 - len(sorted_numbers)) is empty for any non-empty list, so the function always returns False and never detects close elements, failing the second example and the general specification.
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
0
false
0
1
The implementation has a logical error in the loop range, it should be range(len(sorted_numbers) - 1) instead of range(1 - len(sorted_numbers)).
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
1
false
1
0
The loop in the candidate implementation will throw an error because the range function is called with a negative value (1 - len(sorted_numbers)). The correct range should be from 0 to len(sorted_numbers) - 1. The correct implementation should be: for i in range(len(sorted_numbers) - 1):
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
2
false
1
0
The loop in the candidate implementation will throw an error because the range function is called with a negative value (1 - len(sorted_numbers)). The correct range should be from 0 to len(sorted_numbers) - 1. The correct implementation should be: for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sort...
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
0
false
1
1
The implementation has a critical bug in the for loop condition: 'range(1 - len(sorted_numbers))' will produce an empty range for any list with length >= 1, because 1 - len(sorted_numbers) is negative or zero. This means the loop body never executes, so the function always returns False. The correct range should be 'ra...
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
1
false
1
1
The implementation has a critical bug in the for loop condition: 'range(1 - len(sorted_numbers))' will produce an empty range for any list of length >= 1, because 1 - len(sorted_numbers) is negative or zero. This means the loop body never executes, so the function always returns False. The correct range should be 'rang...
json_schema
HumanEval/0
mut_swap
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
false
binop-Sub
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
2
false
1
1
The implementation has a critical bug in the for loop condition: 'range(1 - len(sorted_numbers))' will produce an empty range for any list with length >= 1, because 1 - len(sorted_numbers) is negative or zero. This means the loop body never executes, so the function always returns False. The correct range should be 'ra...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
0
true
95
5
The implementation correctly identifies when any two numbers are closer than the threshold by sorting the list and checking consecutive elements. Since the minimum distance between any two numbers must occur between consecutive elements in a sorted list, this approach is both correct and efficient (O(n log n)). Both pr...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
1
true
95
5
The implementation correctly identifies when any two numbers are closer than the threshold by sorting the list and checking consecutive elements. Since the minimum distance between any two numbers must occur between consecutive elements in a sorted list, this approach is both correct and efficient (O(n log n)). Both pr...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
2
true
95
5
The implementation correctly identifies when any two numbers are closer than the threshold by sorting the list and checking consecutive elements. Since the minimum distance between any two numbers must occur between consecutive elements in a sorted list, this approach is both correct and efficient (O(n log n)). Both pr...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
0
true
100
5
The implementation correctly sorts the list and checks consecutive differences, which is the minimal necessary comparison to find any pair closer than the threshold, satisfying all given examples and the general specification.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
1
true
100
5
The implementation correctly sorts the list and checks consecutive differences, which is sufficient to find any pair closer than the threshold, as the minimum distance between any two numbers must be between some consecutive elements in sorted order.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
2
true
100
5
The implementation correctly sorts the list and checks consecutive differences, which is sufficient to find any pair closer than the threshold, and it passes the provided examples.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
0
true
96
5
The function correctly checks adjacent differences in the sorted list, which is sufficient to detect any pair of numbers closer than the threshold; it returns the expected results for the given examples and for all valid numeric lists.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
1
true
95
5
The function correctly checks pairwise distances by sorting and only comparing adjacent elements, which is sufficient to find the minimum difference; it returns the expected results for the examples and all valid numeric inputs.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
2
true
95
5
The function correctly checks all adjacent pairs in the sorted list and returns True if any pair has a difference less than the threshold, which is equivalent to checking all pairs for closeness; it matches the examples and intended behavior for all float inputs.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
0
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold. It first sorts the list of numbers, then iterates over the sorted list to check the difference between each pair of adjacent numbers. If it finds a pair with a difference less than the threshold, ...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
1
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold by sorting the list and then iterating through it to compare adjacent elements.
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
2
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold. It first sorts the list of numbers, then iterates over the sorted list to check the difference between each pair of adjacent numbers. If it finds a pair with a difference less than the threshold, ...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
0
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two numbers are closer than the threshold, they will be adjacent in the sorted list. The examples provided in the docstring are satisfied: [1.0, 2.0, 3.0] with threshold 0...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
1
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two numbers are closer than the threshold, they will be adjacent in the sorted list. The examples provided in the docstring are correctly handled: [1.0, 2.0, 3.0] with thr...
json_schema
HumanEval/0
reformat
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
2
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two numbers are closer than the threshold, they will be adjacent in the sorted list. The examples provided in the docstring are correctly handled: [1.0, 2.0, 3.0] with thr...
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
0
true
95
4
The implementation correctly identifies when any two numbers are closer than the threshold by sorting the list and checking consecutive elements. This approach is sound because if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The logic handles both test cases correctly.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
1
true
95
4
The implementation correctly identifies when any two numbers are closer than the threshold by sorting the list and checking consecutive elements. This approach is sound because if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The logic handles both test cases correctly.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
2
true
95
4
The implementation correctly identifies when any two numbers are closer than the threshold by sorting the list and checking consecutive elements. This approach is sound because if any two numbers are closer than the threshold, they must be adjacent in the sorted list. The logic handles both test cases correctly.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
0
true
95
4
The implementation correctly sorts the list and checks adjacent differences, which is sufficient to find any pair closer than the threshold, as the minimum difference between any two numbers must occur between adjacent elements in sorted order.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
1
true
95
4
The implementation correctly sorts the list and checks consecutive differences, which is sufficient to find any pair closer than the threshold, as the closest pair in an unsorted list must be adjacent in sorted order.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
2
true
95
4
The implementation correctly sorts the list and checks consecutive differences, which is an efficient and correct approach to find any pair closer than the threshold. It passes the provided examples and handles general cases properly.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
0
true
96
5
The function sorts the list and checks adjacent differences, correctly detecting whether any pair of numbers is closer than the given threshold; it matches the provided examples and intended behavior for all inputs.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
1
true
95
5
The function sorts the list and checks consecutive differences, which correctly identifies whether any pair of numbers are closer than the given threshold. It matches the provided examples and the intended behavior for all real-number inputs.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
2
true
98
5
The function correctly sorts the list and checks adjacent differences; if any pair has a difference smaller than the threshold it returns True, otherwise False, matching the examples and the intended specification for all float inputs.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
0
true
1
1
The implementation correctly checks if any two numbers in the list are closer to each other than the given threshold by sorting the list and then comparing adjacent elements.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
1
true
1
1
The implementation correctly checks if any two numbers in the list are closer to each other than the given threshold by sorting the list and then iterating over the sorted list to check the difference between adjacent elements.
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
2
true
1
1
The implementation correctly checks if any two numbers in the given list are closer to each other than the given threshold. It sorts the list first, then iterates over the sorted list to check the difference between adjacent elements. If it finds a pair of elements with a difference less than the threshold, it immediat...
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
0
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two elements are closer than the threshold, the closest pair must be adjacent in the sorted list. The function returns True when such a pair is found, and False otherwise,...
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
1
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two elements are closer than the threshold, the closest pair must be adjacent in the sorted list. The function returns True when such a pair is found, and False otherwise,...
json_schema
HumanEval/0
rename
has_close_elements
from typing import List def has_close_elements(v1: List[float], v3: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) ...
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
2
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two elements are closer than the threshold, the smallest such distance must occur between two adjacent elements in the sorted list. The function returns True when such a p...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
0
true
95
5
The implementation correctly identifies if any two numbers are closer than the threshold by sorting the list and checking consecutive elements. Since the minimum distance between any two elements must occur between consecutive elements in a sorted list, this approach is both correct and efficient (O(n log n) time compl...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
1
true
95
5
The implementation correctly identifies if any two numbers are closer than the threshold by sorting the list and checking consecutive elements. Since the minimum distance between any two elements must occur between consecutive elements in a sorted list, this approach is both correct and efficient (O(n log n) time compl...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
2
true
95
5
The implementation correctly identifies if any two numbers are closer than the threshold by sorting the list and checking consecutive elements. Since the minimum distance between any two elements must occur between consecutive elements in a sorted list, this approach is both correct and efficient (O(n log n) time compl...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
0
true
100
5
The implementation correctly sorts the list and checks consecutive differences, which is the standard and efficient approach to find if any pair is closer than the threshold, satisfying all given examples and the general specification.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
1
true
100
5
The implementation correctly sorts the list and checks consecutive differences, which is the minimal necessary comparison to find any pair closer than the threshold, satisfying all given examples and the general specification.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
2
true
100
5
The implementation correctly sorts the list and checks consecutive differences, which is the standard and efficient approach to find any pair closer than the threshold, satisfying all given examples and the general specification.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
0
true
100
5
The implementation correctly sorts the list and checks consecutive differences to determine if any pair is closer than the threshold, matching the specification and examples for all valid inputs.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
1
true
100
5
The function correctly sorts the list and checks all adjacent pairs for a distance smaller than the threshold, which is sufficient and matches the examples in the specification for all valid numeric inputs.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
gpt
openai/gpt-5.1
default
2
true
98
5
The function correctly checks all adjacent pairs in the sorted list and returns True if any two numbers differ by less than the given threshold, which matches the specification and example behaviors.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
0
true
1
1
The implementation correctly checks if any two numbers in the list are closer to each other than the given threshold by sorting the list and then iterating over the sorted list to check the difference between adjacent numbers.
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
1
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold. It sorts the list first, then iterates over the sorted list to check the difference between adjacent numbers. If it finds a pair of numbers with a difference less than the threshold, it immediatel...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
llama
meta-llama/llama-3.3-70b-instruct
default
2
true
1
1
The implementation correctly checks for any two numbers in the list that are closer to each other than the given threshold. It sorts the list first, then iterates over the sorted list to check the difference between adjacent numbers. If it finds a pair of numbers with a difference less than the threshold, it immediatel...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
0
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two numbers are closer than the threshold, they will be adjacent in the sorted list. The examples provided are handled correctly: [1.0, 2.0, 3.0] with threshold 0.5 return...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
1
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two numbers are closer than the threshold, they must be adjacent in the sorted list (otherwise, a closer pair would exist between them). The examples provided are handled ...
json_schema
HumanEval/0
strip_docstring
has_close_elements
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: sorted_numbers = sorted(numbers) for i in range(len(sorted_numbers) - 1): if sorted_numbers[i + 1] - sorted_numbers[i] < threshold: return True return False
Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True
true
null
null
null
null
qwen
qwen/qwen3-next-80b-a3b-instruct
default
2
true
1
1
The implementation correctly sorts the list and checks adjacent pairs for differences less than the threshold. This approach is valid because if any two numbers are closer than the threshold, they must be adjacent in the sorted list (otherwise, a closer pair would exist between them). The examples match: [1.0, 2.0, 3.0...
json_schema
HumanEval/1
baseline
separate_paren_groups
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace ...
Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace is properly closed) and not nested within each other Ignore any spaces in the input str...
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
0
true
95
5
The implementation correctly handles the task by tracking parenthesis balance with a counter, accumulating characters into groups while ignoring spaces, and appending complete groups (when counter reaches 0) to the results list. It produces the expected output for the given example and handles edge cases like empty str...
json_schema
HumanEval/1
baseline
separate_paren_groups
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace ...
Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace is properly closed) and not nested within each other Ignore any spaces in the input str...
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
1
true
95
5
The implementation correctly handles the task by tracking parenthesis balance with a counter, accumulating characters into groups while ignoring spaces, and appending complete groups (when counter reaches 0) to the results list. It produces the expected output for the given example and handles edge cases like empty str...
json_schema
HumanEval/1
baseline
separate_paren_groups
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace ...
Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace is properly closed) and not nested within each other Ignore any spaces in the input str...
true
null
null
null
null
claude
anthropic/claude-haiku-4.5
default
2
true
95
5
The implementation correctly handles the task by tracking parenthesis balance with a counter, accumulating characters into groups while ignoring spaces, and appending complete groups (when counter reaches 0) to the results list. It produces the expected output for the given example and handles edge cases like empty str...
json_schema
HumanEval/1
baseline
separate_paren_groups
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace ...
Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace is properly closed) and not nested within each other Ignore any spaces in the input str...
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
0
false
85
2
The implementation fails to correctly separate groups when there are spaces within parentheses, as it includes spaces in the group string before checking for cnt == 0, leading to incorrect grouping in some cases.
json_schema
HumanEval/1
baseline
separate_paren_groups
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace ...
Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace is properly closed) and not nested within each other Ignore any spaces in the input str...
true
null
null
null
null
deepseek
deepseek/deepseek-v3.2-exp
default
1
false
95
3
The implementation fails to correctly separate groups when spaces appear inside parentheses, as it adds all non-space characters to the current group before checking if the group is complete, leading to incorrect grouping for inputs like '( ) (( )) (( )( ))' where spaces are inside groups.
json_schema