北美字节( Tik Tok )炸了,四道 OA 难到逆天,拿两道给大家感受下。如果有大佬能解答就更好了~
## 1. Common Elements in Arrays Given two arrays containing only unsorted integers(within range [0, 1000]), write a function to return all the common elements (each number in one array can be used only once). Array size N:0<= N<=10000. Sort output from smallest to biggest. example #1 [1, 2], [1] => [1] # one 1 in both arrays example #2 [2, 1], [] => [] # no common elements example #3 [3, 1, 3], [3, 3] => [3, 3] # both array S have two 3s.
## 2. Real Programmer Game Real Programmer Game (RPG) is about having a hero swinging sticks at a monster. The monster has N Health Points (НР). It is killed when HP drops to 0 or negative. Each swing of the hero reduces monster's HP by a (evenly distributed) random number in [0, M]. What's the probability for the hero to kill the monster in K swings? Write a function, input N, м, K, return such probability (in [0, 1]). Constraints 0<=N<= 1000 0<M <= 1000 0<=K<= 1000
50 只 医用外科口罩 灭菌 7.5 元 包邮 优惠券
老婆公司新店的亏钱推广。。质量不错,需要的可以考虑下
现在广泛用的 arm 机器都是树莓派之类的,性能很弱。想了解了解有没有性能比较强的 arm 机器,而且个人能买到的。