分糖果
去重
function distributeCandies(candyType: number[]): number {
return Math.min(new Set(candyType).size, candyType.length / 2)
}
function distributeCandies(candyType: number[]): number {
return Math.min(new Set(candyType).size, candyType.length / 2)
}