Euler 14的不同解法 ----所涉及的知识 1. yield 2.BF 3. decorator 4.cache 5.等等
def euler_problem_14():
"""
最直接粗暴的解法:就是直接如下所示了
"""
max_count = 1
max_value = 1
for i in xrange(10010...
分类:
编程语言 时间:
2014-06-05 04:46:16
阅读次数:
266
DescriptionInputOutputSample InputSample
Output12HINT一开始还想什么离线做,其实不用,空间足够,我们直接开100个二维树状数组,然后就行了但是如果c范围很大就离线做好一些 1 type 2
tree=array[0..300,0..300]...
分类:
Web程序 时间:
2014-06-03 12:26:54
阅读次数:
277
public class TestRetry {
public static void main(String[] args) {
retry(5);
}
private static void retry(int maxCount) {
int count = 0;
boolean result = false;
do {
count++;
System....
分类:
其他好文 时间:
2014-06-03 05:10:35
阅读次数:
179
字典树的删除操作:
1 没找到直接返回
2 找到叶子节点的时候,叶子节点的count标志清零,代表不是叶子节点了
3 如果当前节点没有其他孩子节点的时候,可以删除这个节点
判断是否需是叶子节点,就检查叶子节点的count标志就可以了。
判断是否有其他孩子节点就需要循环26个节点了,如果都为空,那么就没有其他孩子节点了。
#include
#include
#include ...
分类:
其他好文 时间:
2014-06-03 00:49:49
阅读次数:
279
//打开织梦系统文件 /include/arc.archives.class.php 找到GetPreNext函数 function GetPreNext($gtype='')
{
$rs = '';
if(count($this->PreNext)ArcID;
...
分类:
其他好文 时间:
2014-06-01 08:49:14
阅读次数:
241
文章标题 文章内容 编辑 prepare($query);
$result_acticle->execute(); $msg_count =$result_act...
分类:
Web程序 时间:
2014-05-31 21:10:01
阅读次数:
386
类似 153=1^3+5^3+3^3 这样的数就叫做水仙花数#include int
main(void){ int bw,sw,gw; int i; int count=0; for(i=100;i<=999;i++){
bw=i/100; //取出百位上的数 sw=i%100/10;/...
分类:
其他好文 时间:
2014-05-31 14:22:33
阅读次数:
173
1 2 13 25 26 You can count on this being a dark
29 background with light text on top, but should try to make no 30 other
assumptions ...
分类:
移动开发 时间:
2014-05-31 06:12:59
阅读次数:
492
1 CREATE PROC usp_OrgPage_SQL 2 @pageIndex INT, 3
@pageSize INT, 4 @totalCount INT OUTPUT 5 AS 6 BEGIN 7 SET @totalCount = (SELECT
COUNT(...
分类:
其他好文 时间:
2014-05-30 23:43:33
阅读次数:
516
Given a stringSand a stringT, count the number
of distinct subsequences ofTinS.A subsequence of a string is a new string which
is formed from the orig...
分类:
其他好文 时间:
2014-05-30 15:58:40
阅读次数:
187