Mbpp/758

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度440 字符
模型生成的代码 (440 字符)
from typing import List, Tuple, Dict
def unique_sublists(lst: List[List]) -> Dict[Tuple, int]:
    """
    Counts the occurrences of each sublist in the given list.
    
    Each sublist is converted to a tuple (since lists are not hashable) 
    and the number of times it appears is returned as a dictionary.
    """
    count = {}
    for sublist in lst:
        t = tuple(sublist)
        count[t] = count.get(t, 0) + 1
    return count
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试