正在加载……
← 返回 meta 的题目列表
Pick Random Based on Weight
类型:online_judge
meta You are given an array of positive integers representing weights. Implement a function to randomly select an index based on its weight. Example Input 1 3 2