第一题是给一个N,N<=10
然后说N个球等概率放在N个盒子里,问最多的那个盒子里的球的个数的期望。

比如N=2
有4种放法:
1 1
1 1
0 2
2 0

然后期望就是(1+1+2+2)/4=1.5

第二题是语法解析:
<type> :: <pair> | <set> | integer
<pair> :: (<type1>, <type2>)
<set> :: {<type0>, <type0>, ..., <type0>}

给一个串给出其描述,比如输入
({2, 5}, (3, 4))
返回
pair(set(integer),pair(integer,integer))
输入串<=50个字符

第三题是给一个nxn的有向图,图边权值为0或1,0表示不连通。n<=20,再给一个集合s

求一个集合t,要求|t|最小,
且在原图中a->b的最短距离(其中a,b属于s)和在t里面的点所组成的子图中a->b的距离是一样的。