测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 579 字符 |
模型生成的代码 (579 字符)
from typing import List, Dict, Tuple, Any
def unique_sublists(lst: List[List[Any]]) -> Dict[Tuple[Any, ...], int]:
"""
Counts sublists in a list, converting each sublist to a tuple and using it as a dictionary key.
Args:
lst: A list containing sublists (assumed to be lists of any elements).
Returns:
A dictionary where keys are tuples representing the sublists and values are their frequencies.
"""
count: Dict[Tuple[Any, ...], int] = {}
for sub in lst:
t = tuple(sub)
count[t] = count.get(t, 0) + 1
return count
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试