题意:给出N个物品及每次获得第i个物品的概率 问获得所有物品的次数的期望、 从简单考虑 若只有一个物品 获得一个物品的期望是1/p (1/p * p = 1) 这样可以推理得到 E1 = 1 / p1 , E2 = 1/ p2 , E12 = 1 / (p1+p2) (即获得第一个物品或第二个物品的 ...
分类:
其他好文 时间:
2020-06-25 21:39:16
阅读次数:
72
问题: Reading the changes in Python 3.1 , I found something... unexpected: 阅读Python 3.1中的更改后 ,我发现了一些意外…… The sys.version_info tuple is now a named tuple ...
分类:
编程语言 时间:
2020-06-25 21:29:15
阅读次数:
58
在AI前进的道路上会有各种各样的事情发生,但是前进的决心不会改变,AI会改变每一个人的生活。 ...
分类:
其他好文 时间:
2020-06-24 21:44:57
阅读次数:
67
题目: Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. ...
分类:
其他好文 时间:
2020-06-24 19:34:23
阅读次数:
52
题目: 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗 ...
分类:
其他好文 时间:
2020-06-24 19:31:54
阅读次数:
47
What is the sum of the digits of the number 21000 public static int sumDigits(int n) { int int_retVal = 0; int int_pow = (int) Math.pow(2, n); String ...
分类:
编程语言 时间:
2020-06-24 17:51:19
阅读次数:
53
原题链接 KMP模板:AC,858ms,13112KB内存 消耗太大了 #include<bits/stdc++.h> using namespace std; using namespace std; #define ms(x, n) memset(x,n,sizeof(x)); typedef ...
分类:
其他好文 时间:
2020-06-23 20:53:37
阅读次数:
66
题目: 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小 ...
分类:
其他好文 时间:
2020-06-23 13:20:42
阅读次数:
35
What is the difference between Session.Abandon() and Session.Clear() Clear - Removes all keys and values from the session-state collection. Abandon - ...
分类:
其他好文 时间:
2020-06-22 12:52:09
阅读次数:
53
http://acm.hdu.edu.cn/showproblem.php?pid=1007 题意:即给定坐标系上N个点,找到距离最短的两个点。 参考博客:https://www.cnblogs.com/zyxStar/p/4591897.html #include <iostream> #incl ...
分类:
其他好文 时间:
2020-06-21 23:35:11
阅读次数:
42