paip.刮刮卡砸金蛋抽奖概率算法跟核心流程.
#---抽奖算法需要满足的需求如下: 1
#---抽奖核心流程 1
#---问题???更好的算法 2
#---实际使用的扩展抽奖算法(带奖品送完判断和每用户最大中奖判断) 2
#-------网上的抽奖算法Php 3
#----java版本的.. 4
参考 5
#---抽奖算法需要满足的需求如下:
1.可以控...
分类:
其他好文 时间:
2014-05-07 08:24:55
阅读次数:
601
修改.proje
修改.settings/org.eclipse.wst.common.component文件...
分类:
编程语言 时间:
2014-05-07 07:44:46
阅读次数:
356
题目大意:
给出m个询问,问【l,r】之间的和 ,求出有多少次询问不和之前的矛盾的。
思路分析:
用并查集记录当前节点到根节点的和。
#include
#include
#include
#include
#define maxn 222222
using namespace std;
int set[maxn];
int sum[maxn];
in...
分类:
其他好文 时间:
2014-05-07 07:35:05
阅读次数:
386
LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value
(will always be posi...
分类:
其他好文 时间:
2014-05-07 07:16:21
阅读次数:
316
题目:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2087
题意:
给出字符串s1和s2,找出s1中有多少个s2。
算法:
KMP字符串匹配。
思路:
简单,看代码吧。(需要注意的就是字符串用要scanf输入)
代码:
#include
#include
#include
using namespac...
分类:
其他好文 时间:
2014-05-07 04:46:37
阅读次数:
304
简单谈谈 Python 中容器的遍历和一下小技巧。
1、遍历单个容器
下面代码遍历一个 List 结构,同样适用于 Tuple、Set 结构类型
>>> x = [1, 2, 3, 'p' , 'y']
>>> for v in x:
... print(x)
...
1
2
3
p
y
遍历字典 Dict 结构也是...
分类:
编程语言 时间:
2014-05-07 04:12:39
阅读次数:
395
http://acm.hdu.edu.cn/showproblem.php?pid=3038
这是一道并查集题目,这并查集感觉好难写,构思花了我很长很长时间,不过打码时间很短。考虑清楚之后明显快多了
#include
#include
#include
#include
#include
#include
#include
#define N 200010
using names...
分类:
其他好文 时间:
2014-05-07 04:03:06
阅读次数:
331
题目:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1358
题意:...
分类:
其他好文 时间:
2014-05-07 03:34:17
阅读次数:
354
小微信,大商机
·截止目前,中国手机用户已经突破12亿,微信用户已经突破6亿!
·如果你错过了10年前的互联网,就不应该错过电子商务!
·如果你错过了5年前电子商务,就不要再错过移动互联网!
·微信已经成为移动互联网上的“超级入口”!
·微信时代,蕴藏着移动互联网的巨大商机!
· 案例1:小米开通微信商城,短短9分55秒,15万台小米手机3即被抢购一空!
· ...
分类:
微信 时间:
2014-05-06 19:26:31
阅读次数:
783