
pick 순회function winningPlayerCount(n: number, pick: number[][]): number {
const winner = new Set<number>()
const history = new Map<string, number>()
for(const [player, color] of pick) {
if(winner.has(player)) continue
const curKey = player + ', ' + color
const curValue = (history.get(curKey) ?? 0) + 1
history.set(curKey, curValue)
if(curValue > player) winner.add(player)
}
return winner.size
};