http://en.wikipedia.org/wiki/Random_number_generation The GLIBC random number generator讲了GLIBC中random()函数的实现原理,并给出了一段代码: #include <stdio.h>
#define MAX 1000
#define seed 1
mai...
分类:
其他好文 时间:
2014-10-12 17:28:29
阅读次数:
198
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2014-10-12 17:19:08
阅读次数:
209
大意就是求 log10(n!) = log10(1 * 2 * 3 * .......*n) = log10(1) + log10(2)...
分类:
其他好文 时间:
2014-10-12 13:46:48
阅读次数:
257
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5062题目意思:给出 N,找出 1 ~ 10^N 中满足 Beautiful Palindrome Numbers (BPN)的数量有多少。 满足 BPN 的条件有两个:(1)回文串 (2)对称的部分从....
分类:
其他好文 时间:
2014-10-12 13:30:28
阅读次数:
185
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2014-10-12 13:29:18
阅读次数:
160
Beautiful Palindrome Number
Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 32768/32768
K (Java/Others)
...
分类:
其他好文 时间:
2014-10-12 11:38:27
阅读次数:
173
Brute force solution:Iterate 32 times, each time determining if the ith bit is a ’1′ or not. This is probably the easiest solution, and the interviewe...
分类:
其他好文 时间:
2014-10-12 06:43:57
阅读次数:
219
在终端输入bash -version,我的是3.2.51,现在从http://git.savannah.gnu.org/cgit/bash.git/snapshot /bash-master.tar.gz下载4.3.24,然后解压,再从ftp://ftp.cwru.edu/pub/bash/bash-4.3- patch...
分类:
系统相关 时间:
2014-10-12 03:33:27
阅读次数:
200
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1]...
分类:
其他好文 时间:
2014-10-12 03:20:27
阅读次数:
193
第一道题 Beautiful Palindrome Number,简单组合计数问题,手算打表就好~【第一次 提交竟然 wa了一次 有一个小小的坑在那。。。。 1 /********************************* 2 Author: jusonalien 3 Email : ju....
分类:
其他好文 时间:
2014-10-12 00:35:47
阅读次数:
349