由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - A math question
相关主题
一道概率题Char x[] = "abc"; 是在heap还是stack上? (转载)
请教一个概率问题请教个C++编程思路
Amazon onsite interview为什么C++的constructor出错可以抛出异常,而destructor出错
来道概率题?问几道老题
一道概率踢 求解A malloc/free question using C/C++
请教一到面试概率题,怎么算?谢谢在子函数内开内存,返回主函数指针然后释放空间是不是很糟糕的(转载)
A problem about Heap and Stack.问两道以前的Bloomberg题
a small question about c++ object allocationtopercode DP问题求解
相关话题的讨论汇总
话题: balls话题: boxes话题: let话题: so话题: math
进入JobHunting版参与讨论
1 (共1页)
m*****y
发帖数: 120
1
let's say in a room there are 2 boxes. We have 40 balls: 20 red and 20 blue.
Let's put the balls into these 2 boxes, so that, if anyone comes in and
randomly pickup a ball, the probability of picking the red ball is max.
Each box can hold as many balls as you want.
So how to allocate the balls to the boxes?
w******g
发帖数: 313
2
box1:19red+20blue
box2:1red

blue.

【在 m*****y 的大作中提到】
: let's say in a room there are 2 boxes. We have 40 balls: 20 red and 20 blue.
: Let's put the balls into these 2 boxes, so that, if anyone comes in and
: randomly pickup a ball, the probability of picking the red ball is max.
: Each box can hold as many balls as you want.
: So how to allocate the balls to the boxes?

x*****p
发帖数: 1707
3
Correct!

【在 w******g 的大作中提到】
: box1:19red+20blue
: box2:1red
:
: blue.

d*******l
发帖数: 338
4
只要有一个box满足blue数目多于red且两者数目之和大于20的任何方案都可以
a********m
发帖数: 15480
5
?
m*****y
发帖数: 120
6
Can you explain this?

【在 d*******l 的大作中提到】
: 只要有一个box满足blue数目多于red且两者数目之和大于20的任何方案都可以
1 (共1页)
进入JobHunting版参与讨论
相关主题
topercode DP问题求解一道概率踢 求解
请教一道题请教一到面试概率题,怎么算?谢谢
明天要面 facebook 的 PhD team allocation interview, 求知情人指导A problem about Heap and Stack.
问道G题(2)a small question about c++ object allocation
一道概率题Char x[] = "abc"; 是在heap还是stack上? (转载)
请教一个概率问题请教个C++编程思路
Amazon onsite interview为什么C++的constructor出错可以抛出异常,而destructor出错
来道概率题?问几道老题
相关话题的讨论汇总
话题: balls话题: boxes话题: let话题: so话题: math