php中奖概率算法,可用于刮刮卡,大转盘等抽奖算法。用法很简单,代码里有详细注释说明,一看就懂?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555...
分类:
Web程序 时间:
2014-05-05 10:55:07
阅读次数:
377
try{ INIT_PLUG I_MongoDB* i = NEW(MongoDB);
/*【注】 若自定义错误消息的数组长度必需指定为MAX_ERROR_SIZE*/ //char errmsg[MAX_ERROR_SIZE]={0};//方式一
...
http://acm.hdu.edu.cn/showproblem.php?pid=1598
1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6
const int inf=1<<30; 7...
分类:
其他好文 时间:
2014-05-05 10:53:38
阅读次数:
344
http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3
#include 4 #define maxn 200 5 using namespace std; 6 const int inf...
分类:
其他好文 时间:
2014-05-05 10:52:15
阅读次数:
315
function Http_num() //浏览计数
在同目录里建立一个count文件,访问网页次数计算结果保存在这里count文件里{ $hanld=fopen(".count.txt","a");
fclose($hanld); ...
分类:
Web程序 时间:
2014-05-05 10:44:20
阅读次数:
406
Disharmony TreesTime Limit: 2000/1000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
663Accepted Submission(s): 307Prob...
分类:
其他好文 时间:
2014-05-05 10:16:18
阅读次数:
486
Given an array of non-negative integers, you
are initially positioned at the first index of the array.Each element in the
array represents your maximu...
分类:
其他好文 时间:
2014-05-05 10:05:58
阅读次数:
300
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3998解题报告:求一个数列的最长上升子序列,并求像这样长的不相交的子序列最多有多少个。我用的是最简单的方法,就是每次求最长上升子序列,然后每次将求得的子序列从数列里面删掉,然后再对剩下的数列求最长上升子序...
分类:
其他好文 时间:
2014-05-05 10:04:28
阅读次数:
236
锯齿数组二维数组的大小是矩形的,例如3×3个元素。而锯齿数组的大小设置是比较灵活的,在锯齿数组中,每一行都可以有不同的大小。图5-4比较了有3×3个元素的二维数组和锯齿数组。图中的锯齿数组有3行,第一行有2个元素,第二行有6个元素,第三行有3个元素。图
5-4在声明锯齿数组时,要依次放置开闭括号。在...
分类:
其他好文 时间:
2014-05-05 10:02:37
阅读次数:
468
原题地址:http://www.rqnoj.cn/problem/90解题思路:题目看起来不太像动态规划。。。我用一个数组f[i][j]来表示在数组第i个元素的后面第一次出现j的位置,为-1则是没出现过。然后每次查找最大的位置即可。如题目例子中:f
1 3 5 2 4 1 3 5 2 2 2 2.....
分类:
其他好文 时间:
2014-05-05 09:55:18
阅读次数:
448