加群看见的但是计算好慢,谁有更优的算法,麻烦说一下。factor=[]for x in
xrange(1, 987654//2+1): if 987654%x==0: factor.append(x)sum=0for y in xrange(1,
1000000000): ...
分类:
编程语言 时间:
2014-05-06 00:37:50
阅读次数:
851
Given a binary tree containing digits from 0-9
only, each root-to-leaf path could represent a number.An example is the
root-to-leaf path 1->2->3 which...
分类:
其他好文 时间:
2014-05-05 23:55:36
阅读次数:
407
Given two binary strings, return their sum
(also a binary string).For example,a ="11"b
="1"Return"100".思路:一个二进制字符串相加;首先从字符串的末尾开始,先二进制字符转化为数字,然后再相加;然后将...
分类:
其他好文 时间:
2014-05-05 23:10:15
阅读次数:
319
# Definition for a binary tree node# class
TreeNode:# def __init__(self, x):# self.val = x# self.left = None# self.right
...
分类:
其他好文 时间:
2014-05-05 22:56:23
阅读次数:
419
Link:http://oj.leetcode.com/problems/reverse-linked-list-ii/Reverse a linked
list from positionmton. Do it in-place and in one-pass.For example:Given1...
分类:
其他好文 时间:
2014-05-05 22:46:11
阅读次数:
411
原地址:http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-ii-publishing-to-windows-8/Windows
8 is a new OS with a Windows Store where you can...
[问题2014S11] 设 \(A,B\) 为 \(n\) 阶实对称阵,
\(p(A),p(B),p(A+B)\) 分别为 \(A,B,A+B\) 的正惯性指数, 证明: \[p(A+B)\leq p(A)+p(B).\]
分类:
其他好文 时间:
2014-05-03 23:22:18
阅读次数:
256
证明
\[\sum_{n=0}^{\infty}\frac{(n!)^{2}2^{n+1}}{(2n+1)!}=\pi\]分析:这道题初看具有难度运用幂级数恐难解决,由分子分母的特性易想到
$\Gamma$函数然后利用$\Gamma$函数与$\beta$函数的关系即可。Proof:\begin{al...
分类:
其他好文 时间:
2014-05-03 22:29:12
阅读次数:
296
Max Sum of Max-K-sub-sequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 5673 Accepted Submission(s): 2049
Problem Description...
分类:
其他好文 时间:
2014-05-03 16:30:10
阅读次数:
412
hdu 1165 Eddy's research II (数学题,递推)...
分类:
其他好文 时间:
2014-05-03 15:34:41
阅读次数:
215